diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..82da9c1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Themesberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a5f481 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ + +## Getting started + +Make sure that you have [Node.js](https://nodejs.org/en/), [Tailwind CSS](https://tailwindcss.com/docs/installation) and [Flowbite](https://flowbite.com/docs/getting-started/quickstart/) installed. + +1. Run `npm install` inside your terminal + +2. Watch for files and compile Tailwind CSS + Flowbite: + +``` +npx tailwindcss -i ./input.css -o ./output.css --watch +``` + +3. To deploy you will only need the `index.html` file and the `output.css` styles. +for live preview on localhost, Run below: + +``` +npm run start +``` + + +Alternatively you can also just directly copy this code into your own projects, whether you use Laravel, React, Vue.js or other frameworks. + +## About us + +### Hero Labs + +Hero Labs provides a decentralized autonomous cloud technologies that allows anyone to become a cloud service provider. + +We aims to create a cloud where people and organizations can buy, sell, and use cloud resources autonomously,enable individuals to earn by providing compute, network, and storage capacity​. \ No newline at end of file diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 0000000..ad337a2 Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 0000000..79460c8 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..5c2ed09 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/browserconfig.xml b/browserconfig.xml new file mode 100644 index 0000000..b3930d0 --- /dev/null +++ b/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..6700735 Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..9522871 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..50a2189 Binary files /dev/null and b/favicon.ico differ diff --git a/hero.html b/hero.html new file mode 100644 index 0000000..870e736 --- /dev/null +++ b/hero.html @@ -0,0 +1,397 @@ + + + + + + + + Hero by Mycelium Project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+

Discover Hero,

+

Your Unified Digital Identity.

+

Hero is your unique, singular digital avatar, streamlining your online interactions by eliminating the need to duplicate identities across various platforms. With Hero, manage every aspect of your digital life through one secure, efficient identity.

+ +
+
+
+ + + + +
+
+ +
+
+

Do Anything. Do Everything.

+

From secure file sharing to encrypted communication, your Hero comes equipped with all the essential skills and capabilities needed to enhance the flexibility and security of your digital life.

+ +
    +
  • + + + + +
    + Communication +

    Chat, hold meetings, and video conferencing.

    +
    +
  • +
  • + + + + +
    + Finance +

    Use wallet features to transact and manage assets.

    +
    +
  • +
  • + + + + +
    + Collaborate +

    Engage in projects and tasks with your network.

    +
    +
  • + + + + +
    + Develop & Expand +

    Create tools or decentralized applications.

    +
    +
  • + + + + +
    + Creativity +

    Generate videos, documents, and other contents.

    +
    +
  • + + + + +
    + Filesharing +

    Directly send data and files without central servers.

    +
    +
  • +
  • + + + + +
    + Organization +

    Securely store and organize data.

    +
    +
  • +
  • + + + + +
    + Browser +

    Browse information securely without tracking.

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

Become the Center of Your Internet.

+

By eliminating the need for centralized servers, Hero allows you to be the only central point of data accumulation, communication and execution of digital capabilities.

+
+
+
+
+ + + + +
+
+
+

Why Join Hero

+

Hero is designed to benefit everyone by offering a new internet where members can engage in a community dedicated to inclusivity and growth

+
+
+ +
+ Icon representing Node & Earn +

Inclusivity

+

Everyone gains equal network access and there are no barriers to entry.

+
+ +
+ Icon representing Node & Earn +

Sovereignty

+

Only you have control of your data and decide who has access to it.

+
+ +
+ Icon representing Node & Earn +

Equality

+

Anyone can attain the opportunity to earn and to better their lives.

+
+
+
+
+ + + +
+
+
+

Be a Hero Today

+

Become the center of your digital life.

+ Get Started +
+
+ Free Trial Image +
+
+
+ + + + + + \ No newline at end of file diff --git a/images/.DS_Store b/images/.DS_Store new file mode 100644 index 0000000..bd2e660 Binary files /dev/null and b/images/.DS_Store differ diff --git a/images/banner.png b/images/banner.png new file mode 100644 index 0000000..441e4e9 Binary files /dev/null and b/images/banner.png differ diff --git a/images/benefit.png b/images/benefit.png new file mode 100644 index 0000000..e6cbd81 Binary files /dev/null and b/images/benefit.png differ diff --git a/images/benefit.zip b/images/benefit.zip new file mode 100644 index 0000000..1ce8932 Binary files /dev/null and b/images/benefit.zip differ diff --git a/images/brand1.png b/images/brand1.png new file mode 100644 index 0000000..757eb6a Binary files /dev/null and b/images/brand1.png differ diff --git a/images/brand2.png b/images/brand2.png new file mode 100644 index 0000000..db6302c Binary files /dev/null and b/images/brand2.png differ diff --git a/images/brand3.png b/images/brand3.png new file mode 100644 index 0000000..faf73f5 Binary files /dev/null and b/images/brand3.png differ diff --git a/images/brand4.png b/images/brand4.png new file mode 100644 index 0000000..668892c Binary files /dev/null and b/images/brand4.png differ diff --git a/images/brand5.png b/images/brand5.png new file mode 100644 index 0000000..09fbbb2 Binary files /dev/null and b/images/brand5.png differ diff --git a/images/brand6.png b/images/brand6.png new file mode 100644 index 0000000..1e8973b Binary files /dev/null and b/images/brand6.png differ diff --git a/images/build.png b/images/build.png new file mode 100644 index 0000000..416362a Binary files /dev/null and b/images/build.png differ diff --git a/images/cloud.svg b/images/cloud.svg new file mode 100644 index 0000000..6032ccf --- /dev/null +++ b/images/cloud.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/images/dashboard.png b/images/dashboard.png new file mode 100644 index 0000000..2a1024f Binary files /dev/null and b/images/dashboard.png differ diff --git a/images/download.png b/images/download.png new file mode 100644 index 0000000..cec7496 Binary files /dev/null and b/images/download.png differ diff --git a/images/experiences.png b/images/experiences.png new file mode 100644 index 0000000..36ad304 Binary files /dev/null and b/images/experiences.png differ diff --git a/images/farmer.png b/images/farmer.png new file mode 100644 index 0000000..59e63ad Binary files /dev/null and b/images/farmer.png differ diff --git a/images/feature-1.png b/images/feature-1.png new file mode 100644 index 0000000..1226b3f Binary files /dev/null and b/images/feature-1.png differ diff --git a/images/feature-2.png b/images/feature-2.png new file mode 100644 index 0000000..64046df Binary files /dev/null and b/images/feature-2.png differ diff --git a/images/feature.png b/images/feature.png new file mode 100644 index 0000000..0711507 Binary files /dev/null and b/images/feature.png differ diff --git a/images/feature4.png b/images/feature4.png new file mode 100644 index 0000000..720fa5c Binary files /dev/null and b/images/feature4.png differ diff --git a/images/hero.png b/images/hero.png new file mode 100644 index 0000000..8edbbca Binary files /dev/null and b/images/hero.png differ diff --git a/images/hero1.svg b/images/hero1.svg new file mode 100644 index 0000000..29d5ede --- /dev/null +++ b/images/hero1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/hero2.png b/images/hero2.png new file mode 100644 index 0000000..7d839b8 Binary files /dev/null and b/images/hero2.png differ diff --git a/images/hero2.svg b/images/hero2.svg new file mode 100644 index 0000000..c389655 --- /dev/null +++ b/images/hero2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/hero3.svg b/images/hero3.svg new file mode 100644 index 0000000..5cefb41 --- /dev/null +++ b/images/hero3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/hero4.png b/images/hero4.png new file mode 100644 index 0000000..8d70bb1 Binary files /dev/null and b/images/hero4.png differ diff --git a/images/hero5.png b/images/hero5.png new file mode 100644 index 0000000..45db495 Binary files /dev/null and b/images/hero5.png differ diff --git a/images/icon1.png b/images/icon1.png new file mode 100644 index 0000000..05c58af Binary files /dev/null and b/images/icon1.png differ diff --git a/images/icon1.svg b/images/icon1.svg new file mode 100644 index 0000000..77ecb53 --- /dev/null +++ b/images/icon1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icon2.svg b/images/icon2.svg new file mode 100644 index 0000000..a08760d --- /dev/null +++ b/images/icon2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icon3.svg b/images/icon3.svg new file mode 100644 index 0000000..2dcb65b --- /dev/null +++ b/images/icon3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/ict.png b/images/ict.png new file mode 100644 index 0000000..fde19db Binary files /dev/null and b/images/ict.png differ diff --git a/images/id.png b/images/id.png new file mode 100644 index 0000000..84a5613 Binary files /dev/null and b/images/id.png differ diff --git a/images/kds.png b/images/kds.png new file mode 100644 index 0000000..8b17f18 Binary files /dev/null and b/images/kds.png differ diff --git a/images/learn.png b/images/learn.png new file mode 100644 index 0000000..78c04fe Binary files /dev/null and b/images/learn.png differ diff --git a/images/logo.svg b/images/logo.svg new file mode 100644 index 0000000..e9195ce --- /dev/null +++ b/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/my1.png b/images/my1.png new file mode 100644 index 0000000..d246652 Binary files /dev/null and b/images/my1.png differ diff --git a/images/mycelium.png b/images/mycelium.png new file mode 100644 index 0000000..125ecd7 Binary files /dev/null and b/images/mycelium.png differ diff --git a/images/node.png b/images/node.png new file mode 100644 index 0000000..395f3b4 Binary files /dev/null and b/images/node.png differ diff --git a/images/node1.png b/images/node1.png new file mode 100644 index 0000000..773cb6d Binary files /dev/null and b/images/node1.png differ diff --git a/images/node2.png b/images/node2.png new file mode 100644 index 0000000..45f1500 Binary files /dev/null and b/images/node2.png differ diff --git a/images/node3.png b/images/node3.png new file mode 100644 index 0000000..23f945d Binary files /dev/null and b/images/node3.png differ diff --git a/images/ourworld.png b/images/ourworld.png new file mode 100644 index 0000000..ef1aa66 Binary files /dev/null and b/images/ourworld.png differ diff --git a/images/plug.png b/images/plug.png new file mode 100644 index 0000000..2fec072 Binary files /dev/null and b/images/plug.png differ diff --git a/images/sikana.png b/images/sikana.png new file mode 100644 index 0000000..216e66b Binary files /dev/null and b/images/sikana.png differ diff --git a/images/social_network.png b/images/social_network.png new file mode 100644 index 0000000..a7d85a6 Binary files /dev/null and b/images/social_network.png differ diff --git a/images/stat1.svg b/images/stat1.svg new file mode 100644 index 0000000..94aaf20 --- /dev/null +++ b/images/stat1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/stat2.svg b/images/stat2.svg new file mode 100644 index 0000000..5b2ab9e --- /dev/null +++ b/images/stat2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/stat3.svg b/images/stat3.svg new file mode 100644 index 0000000..65f84be --- /dev/null +++ b/images/stat3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/stat4.svg b/images/stat4.svg new file mode 100644 index 0000000..b3ff4eb --- /dev/null +++ b/images/stat4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/vverse.png b/images/vverse.png new file mode 100644 index 0000000..ff9d23c Binary files /dev/null and b/images/vverse.png differ diff --git a/images/xp1.svg b/images/xp1.svg new file mode 100644 index 0000000..ac8716e --- /dev/null +++ b/images/xp1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/xp2.svg b/images/xp2.svg new file mode 100644 index 0000000..ee7ee37 --- /dev/null +++ b/images/xp2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/xp3.svg b/images/xp3.svg new file mode 100644 index 0000000..c10dc05 --- /dev/null +++ b/images/xp3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/xp4.svg b/images/xp4.svg new file mode 100644 index 0000000..760044b --- /dev/null +++ b/images/xp4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..35c879a --- /dev/null +++ b/index.html @@ -0,0 +1,540 @@ + + + + + + + + Hero by Mycelium Project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+
+

Become the Hero of
your own digital world.

+

Start owning your data and digital life.
With Hero, we can build a conscious collective intelligence together.

+ +
+ +
+
+ + + + +
+
+
+
+ +
+
+ + + + + + + +
+
+ +
+ +
+

Everyone can be a Hero

+

Hero is your own personal intelligent digital identity that fosters a collective intelligence and empower everyone to enhance our digital existence with unfettered access to essential tools for learning, participating, and thriving within the Mycelium Network.

+ +
    +
  • + + + Unified Digital Identity +
  • +
  • + + + Enhanced Privacy and Security +
  • +
  • + + + Seamless Integration and Accessibility +
  • +
  • + + + Customizable and Extensible Experiences +
  • +
+ +
+
+
+
+ + + + + + + +
+
+
+ +

Our Alter Ego within the Mycelium Network

+ + Mycelium Network + +

Discover how Mycelium Network is revolutionizing internet access with a decentralized, community-powered approach. We aim to empower individuals worldwide by enabling them to own and manage internet resources collectively.

+
+
+ Explore Mycelium +
+
+ + + + + +
+
+
+
+

Powered by Mycelium Nodes.

+

Mycelium Network and Heroes exist thanks to a vast network of cloud capacity deployed by ‘Farmers’- who deploy Mycelium Nodes in supporting locations worldwide.

+ +
    +
  • + + + Decentralized and globally distributed. +
  • +
  • + + + Fully Autonomous Operations +
  • +
  • + + + Peer-to-Peer Technologies +
  • +
+

Together, we can create a globally distributed AI and internet infrastructure and earn an income.

+ +
+ +
+
+ +
+ + + + + + + +
+
+
+

Join The Movement

+

Hero invites you to your new sovereign digital life with 3 easy steps.

+
+
+ +
+ Icon representing Node & Earn +

Get A Node & Earn

+

Get a Mycelium Node and add capacity to the Mycelium Network.

+ Get started +
+ +
+ Icon representing Node & Earn +

Get Your Hero

+

Register and reserve your own Hero - your sovereign digital identity.

+ Get started +
+ +
+ Icon representing Node & Earn +

Acquire INCA Token

+

Purchase INCA - The digital currency of the Mycelium Network.

+ Get started +
+
+
+
+ + + + + + + +
+
+ +
+ +
+

Hero Xperiences

+

Dive into a world of fully decentralized and completely secure applications on the Mycelium Network, built to empower and enable our Heroes with innovative digital Xperiences.

+
+
+
+ +

Drive

+
+
+ +

Chat

+ +
+
+ +

Browse

+
+
+ +

Wallet

+
+
+ +
+
+
+
+
+ + + + + +
+
+
+
+

Frequently asked questions

+
+
+

+ +

+
+
+

Hero is your personalized digital identity within the Mycelium network. It serves as your unique avatar, enabling you to securely interact with various applications and services while maintaining control over your data. The Mycelium network provides the decentralized infrastructure that powers Hero, ensuring a secure and private digital experience.

+

Check out this guide to learn how to get started and start using Hero on Mycelium Network.

+
+
+

+ +

+ +

+ +

+ +

+ +

+ +
+
+
+
+ + + + +
+
+
+

Be a Hero Today

+

Become the center of your digital life.

+ Get Started +
+
+ Free Trial Image +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/input.css b/input.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/input.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/mstile-150x150.png b/mstile-150x150.png new file mode 100644 index 0000000..cec3184 Binary files /dev/null and b/mstile-150x150.png differ diff --git a/mycelium.html b/mycelium.html new file mode 100644 index 0000000..0f03162 --- /dev/null +++ b/mycelium.html @@ -0,0 +1,468 @@ + + + + + + + + Hero by Mycelium Project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+
+

Welcome to Mycelium Network

+ + Mycelium Network +

Discover how Mycelium Network is revolutionizing internet access with a decentralized, community-powered approach.
We aim to empower individuals worldwide by enabling them to own and manage internet resources collectively.

+
+ Learn More +
+
+
+ + + + + +
+
+
+

Our Planet Needs a
Cloud & AI Infrastructure Upgrade.

+

This free and open-source landing page template was built using the utility classes from Tailwind CSS and based on the components from the Flowbite Library and the Blocks System.

+
+
+

Sovereign

+

Local infrastructure ensures data locality and security +

+
+
+

Private

+

Complete control over your own data at your proximity

+
+
+

Decentralized

+

Dispersed workloads System, instead of centralizing data

+
+
+

Secure

+

Multi-layered security architecture for data and compute safe

+
+
+
+ +
+
+ + + + + + +
+
+
+

Mycelium by the Numbers

+

Explore key metrics that showcase the scope and scale of the Mycelium Network's global impact. Our widespread global presence is not owned by one single entity, but maintained through the collective effort of a global community.

+
+
+ +
+ Icon representing Node & Earn +

32.74 PB
Capacity

+

Total data storage capacity available within the Mycelium Network.

+
+ +
+ Icon representing Get Your Hero +

2569
Nodes

+

The number of active nodes within the network’s infrastructure.

+
+ +
+ Icon representing Acquire INCA Token +

61M
Countries

+

The number of countries where the Mycelium Network has a presence

+
+ +
+ Icon representing Explore Services +

63.986
Cores

+

The total number of processing cores that power the network.

+
+
+
+
+ + + + + + + + + +
+
+ +
+ +
+

Mycelium Technologies

+

Learn the basics of how our decentralized network distributes computing and storage resources globally.

+ +
    +
  • + + +

    Decentralized

    + Nodes distributed globally ensure no single point of failure and enhance network resilience. +
  • +
  • + + +

    Autonomous

    + Network self-manages resource allocation and maintenance without human intervention. +
  • +
  • + + +

    P2P

    + Direct node interactions eliminate central servers, enhancing privacy, reducing latency. +
  • +
+ +
+
+
+
+
+
+ +
+
+

From Farmers to Everyone

+

Mycelium Network and Heroes exist thanks to a vast network of cloud capacity deployed by ‘Farmers’- who deploy Mycelium Nodes in supporting locations worldwide.

+ +
    +
  • + + + Promising Financial Incentives +
  • +
  • + + + Plug & Play +
  • +
  • + + + Minimal Tech skills required +
  • +
+ +
+ +
+
+
+ + + + + + + + + +
+
+
+
+

Frequently asked questions

+
+
+

+ +

+
+
+

Hero is your personalized digital identity within the Mycelium network. It serves as your unique avatar, enabling you to securely interact with various applications and services while maintaining control over your data. The Mycelium network provides the decentralized infrastructure that powers Hero, ensuring a secure and private digital experience.

+

Check out this guide to learn how to get started and start using Hero on Mycelium Network.

+
+
+

+ +

+ +

+ +

+ +

+ +

+ +
+
+
+
+ + + + + +
+
+
+

Be a Hero Today

+

Become the center of your digital life.

+ Get Started +
+
+ Free Trial Image +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/node_modules/.DS_Store b/node_modules/.DS_Store new file mode 100644 index 0000000..0984a16 Binary files /dev/null and b/node_modules/.DS_Store differ diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/cssesc b/node_modules/.bin/cssesc new file mode 120000 index 0000000..487b689 --- /dev/null +++ b/node_modules/.bin/cssesc @@ -0,0 +1 @@ +../cssesc/bin/cssesc \ No newline at end of file diff --git a/node_modules/.bin/detective b/node_modules/.bin/detective new file mode 120000 index 0000000..8c3093a --- /dev/null +++ b/node_modules/.bin/detective @@ -0,0 +1 @@ +../detective/bin/detective.js \ No newline at end of file diff --git a/node_modules/.bin/mini-svg-data-uri b/node_modules/.bin/mini-svg-data-uri new file mode 120000 index 0000000..20b061f --- /dev/null +++ b/node_modules/.bin/mini-svg-data-uri @@ -0,0 +1 @@ +../mini-svg-data-uri/cli.js \ No newline at end of file diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid new file mode 120000 index 0000000..e2be547 --- /dev/null +++ b/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 0000000..b6afda6 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/tailwind b/node_modules/.bin/tailwind new file mode 120000 index 0000000..d497797 --- /dev/null +++ b/node_modules/.bin/tailwind @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tailwindcss b/node_modules/.bin/tailwindcss new file mode 120000 index 0000000..d497797 --- /dev/null +++ b/node_modules/.bin/tailwindcss @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..d183f0a --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,826 @@ +{ + "name": "landwind", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", + "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "dependencies": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==", + "dev": true + }, + "node_modules/detective": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", + "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", + "dev": true, + "dependencies": { + "acorn-node": "^1.8.2", + "defined": "^1.0.0", + "minimist": "^1.2.6" + }, + "bin": { + "detective": "bin/detective.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flowbite": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-1.8.1.tgz", + "integrity": "sha512-lXTcO8a6dRTPFpINyOLcATCN/pK1Of/jY4PryklPllAiqH64tSDUsOdQpar3TO59ZXWwugm2e92oaqwH6X90Xg==", + "dependencies": { + "@popperjs/core": "^2.9.3", + "mini-svg-data-uri": "^1.4.3" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/lilconfig": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", + "integrity": "sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", + "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.6" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.4.tgz", + "integrity": "sha512-NrxbFV4tYsga/hpWbRyUfIaBrNMXDxx5BsHgBS4v5tlyjf+sDsgBg5m9OxjrXIqAS/uR9kicxLKP+bEHI7BSeQ==", + "dev": true, + "dependencies": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.1", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.14", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "5.0.6", + "postcss-selector-parser": "^6.0.10", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + } + } +} diff --git a/node_modules/@nodelib/.DS_Store b/node_modules/@nodelib/.DS_Store new file mode 100644 index 0000000..5b8f728 Binary files /dev/null and b/node_modules/@nodelib/.DS_Store differ diff --git a/node_modules/@nodelib/fs.scandir/LICENSE b/node_modules/@nodelib/fs.scandir/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.scandir/README.md b/node_modules/@nodelib/fs.scandir/README.md new file mode 100644 index 0000000..e0b218b --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/README.md @@ -0,0 +1,171 @@ +# @nodelib/fs.scandir + +> List files and directories inside the specified directory. + +## :bulb: Highlights + +The package is aimed at obtaining information about entries in the directory. + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode). +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.scandir +``` + +## Usage + +```ts +import * as fsScandir from '@nodelib/fs.scandir'; + +fsScandir.scandir('path', (error, stats) => { /* … */ }); +``` + +## API + +### .scandir(path, [optionsOrSettings], callback) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style. + +```ts +fsScandir.scandir('path', (error, entries) => { /* … */ }); +fsScandir.scandir('path', {}, (error, entries) => { /* … */ }); +fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ }); +``` + +### .scandirSync(path, [optionsOrSettings]) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path. + +```ts +const entries = fsScandir.scandirSync('path'); +const entries = fsScandir.scandirSync('path', {}); +const entries = fsScandir.scandirSync(('path', new fsScandir.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsScandir.Settings({ followSymbolicLinks: false }); + +const entries = fsScandir.scandirSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class. +* `stats` (optional) — An instance of `fs.Stats` class. + +For example, the `scandir` call for `tools` directory with one directory inside: + +```ts +{ + dirent: Dirent { name: 'typedoc', /* … */ }, + name: 'typedoc', + path: 'tools/typedoc' +} +``` + +## Options + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO?? + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; + readdir?: typeof fs.readdir; + readdirSync?: typeof fs.readdirSync; +} + +const settings = new fsScandir.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## `old` and `modern` mode + +This package has two modes that are used depending on the environment and parameters of use. + +### old + +* Node.js below `10.10` or when the `stats` option is enabled + +When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links). + +### modern + +* Node.js 10.10+ and the `stats` option is disabled + +In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present. + +This mode makes fewer calls to the file system. It's faster. + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts new file mode 100644 index 0000000..827f1db --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts @@ -0,0 +1,20 @@ +import type * as fsStat from '@nodelib/fs.stat'; +import type { Dirent, ErrnoException } from '../types'; +export interface ReaddirAsynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void; + (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void; +} +export interface ReaddirSynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }): Dirent[]; + (filepath: string): string[]; +} +export declare type FileSystemAdapter = fsStat.FileSystemAdapter & { + readdir: ReaddirAsynchronousMethod; + readdirSync: ReaddirSynchronousMethod; +}; +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js new file mode 100644 index 0000000..f0fe022 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/node_modules/@nodelib/fs.scandir/out/constants.d.ts new file mode 100644 index 0000000..33f1749 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.d.ts @@ -0,0 +1,4 @@ +/** + * IS `true` for Node.js 10.10 and greater. + */ +export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.js b/node_modules/@nodelib/fs.scandir/out/constants.js new file mode 100644 index 0000000..7e3d441 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; +const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); +if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); +} +const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); +const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); +const SUPPORTED_MAJOR_VERSION = 10; +const SUPPORTED_MINOR_VERSION = 10; +const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; +const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; +/** + * IS `true` for Node.js 10.10 and greater. + */ +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; diff --git a/node_modules/@nodelib/fs.scandir/out/index.d.ts b/node_modules/@nodelib/fs.scandir/out/index.d.ts new file mode 100644 index 0000000..b9da83e --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Dirent, Entry } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function scandir(path: string, callback: AsyncCallback): void; +declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace scandir { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[]; +export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options }; diff --git a/node_modules/@nodelib/fs.scandir/out/index.js b/node_modules/@nodelib/fs.scandir/out/index.js new file mode 100644 index 0000000..99c70d3 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.scandirSync = exports.scandir = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.scandir = scandir; +function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.scandirSync = scandirSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts new file mode 100644 index 0000000..5829676 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts @@ -0,0 +1,7 @@ +/// +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; +export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.js b/node_modules/@nodelib/fs.scandir/out/providers/async.js new file mode 100644 index 0000000..e8e2f0a --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.js @@ -0,0 +1,104 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const rpl = require("run-parallel"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); +} +exports.read = read; +function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; +} +function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); +} +exports.readdir = readdir; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts new file mode 100644 index 0000000..2b4d08b --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts @@ -0,0 +1 @@ +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.js b/node_modules/@nodelib/fs.scandir/out/providers/common.js new file mode 100644 index 0000000..8724cb5 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = void 0; +function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts new file mode 100644 index 0000000..e05c8f0 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts @@ -0,0 +1,5 @@ +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare function read(directory: string, settings: Settings): Entry[]; +export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[]; +export declare function readdir(directory: string, settings: Settings): Entry[]; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/node_modules/@nodelib/fs.scandir/out/providers/sync.js new file mode 100644 index 0000000..146db34 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); +} +exports.read = read; +function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } + catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); +} +exports.readdir = readdir; diff --git a/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/node_modules/@nodelib/fs.scandir/out/settings.d.ts new file mode 100644 index 0000000..a0db115 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.d.ts @@ -0,0 +1,20 @@ +import * as fsStat from '@nodelib/fs.stat'; +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLinks: boolean; + readonly fs: fs.FileSystemAdapter; + readonly pathSegmentSeparator: string; + readonly stats: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + readonly fsStatSettings: fsStat.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.scandir/out/settings.js b/node_modules/@nodelib/fs.scandir/out/settings.js new file mode 100644 index 0000000..15a3e8c --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsStat = require("@nodelib/fs.stat"); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts new file mode 100644 index 0000000..f326c5e --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts @@ -0,0 +1,20 @@ +/// +import type * as fs from 'fs'; +export interface Entry { + dirent: Dirent; + name: string; + path: string; + stats?: Stats; +} +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; +export interface Dirent { + isBlockDevice: () => boolean; + isCharacterDevice: () => boolean; + isDirectory: () => boolean; + isFIFO: () => boolean; + isFile: () => boolean; + isSocket: () => boolean; + isSymbolicLink: () => boolean; + name: string; +} diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.js b/node_modules/@nodelib/fs.scandir/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts new file mode 100644 index 0000000..bb863f1 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts @@ -0,0 +1,2 @@ +import type { Dirent, Stats } from '../types'; +export declare function createDirentFromStats(name: string, stats: Stats): Dirent; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/node_modules/@nodelib/fs.scandir/out/utils/fs.js new file mode 100644 index 0000000..ace7c74 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDirentFromStats = void 0; +class DirentFromStats { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } +} +function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); +} +exports.createDirentFromStats = createDirentFromStats; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts new file mode 100644 index 0000000..1b41954 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts @@ -0,0 +1,2 @@ +import * as fs from './fs'; +export { fs }; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.js b/node_modules/@nodelib/fs.scandir/out/utils/index.js new file mode 100644 index 0000000..f5de129 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fs = void 0; +const fs = require("./fs"); +exports.fs = fs; diff --git a/node_modules/@nodelib/fs.scandir/package.json b/node_modules/@nodelib/fs.scandir/package.json new file mode 100644 index 0000000..d3a8924 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.scandir", + "version": "2.1.5", + "description": "List files and directories inside the specified directory", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "scandir", + "readdir", + "dirent" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4", + "@types/run-parallel": "^1.1.0" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/@nodelib/fs.stat/LICENSE b/node_modules/@nodelib/fs.stat/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.stat/README.md b/node_modules/@nodelib/fs.stat/README.md new file mode 100644 index 0000000..686f047 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/README.md @@ -0,0 +1,126 @@ +# @nodelib/fs.stat + +> Get the status of a file with some features. + +## :bulb: Highlights + +Wrapper around standard method `fs.lstat` and `fs.stat` with some features. + +* :beginner: Normally follows symbolic link. +* :gear: Can safely work with broken symbolic link. + +## Install + +```console +npm install @nodelib/fs.stat +``` + +## Usage + +```ts +import * as fsStat from '@nodelib/fs.stat'; + +fsStat.stat('path', (error, stats) => { /* … */ }); +``` + +## API + +### .stat(path, [optionsOrSettings], callback) + +Returns an instance of `fs.Stats` class for provided path with standard callback-style. + +```ts +fsStat.stat('path', (error, stats) => { /* … */ }); +fsStat.stat('path', {}, (error, stats) => { /* … */ }); +fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ }); +``` + +### .statSync(path, [optionsOrSettings]) + +Returns an instance of `fs.Stats` class for provided path. + +```ts +const stats = fsStat.stat('path'); +const stats = fsStat.stat('path', {}); +const stats = fsStat.stat('path', new fsStat.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsStat.Settings({ followSymbolicLink: false }); + +const stats = fsStat.stat('path', settings); +``` + +## Options + +### `followSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`. + +### `markSymbolicLink` + +* Type: `boolean` +* Default: `false` + +Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`). + +> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; +} + +const settings = new fsStat.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts new file mode 100644 index 0000000..3af759c --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts @@ -0,0 +1,13 @@ +/// +import * as fs from 'fs'; +import type { ErrnoException } from '../types'; +export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; +export declare type StatSynchronousMethod = (path: string) => fs.Stats; +export interface FileSystemAdapter { + lstat: StatAsynchronousMethod; + stat: StatAsynchronousMethod; + lstatSync: StatSynchronousMethod; + statSync: StatSynchronousMethod; +} +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/node_modules/@nodelib/fs.stat/out/adapters/fs.js new file mode 100644 index 0000000..8dc08c8 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/index.d.ts b/node_modules/@nodelib/fs.stat/out/index.d.ts new file mode 100644 index 0000000..f95db99 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Stats } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function stat(path: string, callback: AsyncCallback): void; +declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace stat { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats; +export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats }; diff --git a/node_modules/@nodelib/fs.stat/out/index.js b/node_modules/@nodelib/fs.stat/out/index.js new file mode 100644 index 0000000..b23f751 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.statSync = exports.stat = exports.Settings = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.stat = stat; +function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.statSync = statSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts new file mode 100644 index 0000000..85423ce --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts @@ -0,0 +1,4 @@ +import type Settings from '../settings'; +import type { ErrnoException, Stats } from '../types'; +export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; +export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.js b/node_modules/@nodelib/fs.stat/out/providers/async.js new file mode 100644 index 0000000..983ff0e --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); +} +exports.read = read; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts new file mode 100644 index 0000000..428c3d7 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts @@ -0,0 +1,3 @@ +import type Settings from '../settings'; +import type { Stats } from '../types'; +export declare function read(path: string, settings: Settings): Stats; diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.js b/node_modules/@nodelib/fs.stat/out/providers/sync.js new file mode 100644 index 0000000..1521c36 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } + catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } +} +exports.read = read; diff --git a/node_modules/@nodelib/fs.stat/out/settings.d.ts b/node_modules/@nodelib/fs.stat/out/settings.d.ts new file mode 100644 index 0000000..f4b3d44 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.d.ts @@ -0,0 +1,16 @@ +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLink?: boolean; + fs?: Partial; + markSymbolicLink?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLink: boolean; + readonly fs: fs.FileSystemAdapter; + readonly markSymbolicLink: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.stat/out/settings.js b/node_modules/@nodelib/fs.stat/out/settings.js new file mode 100644 index 0000000..111ec09 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/node_modules/@nodelib/fs.stat/out/types/index.d.ts new file mode 100644 index 0000000..74c08ed --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.d.ts @@ -0,0 +1,4 @@ +/// +import type * as fs from 'fs'; +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; diff --git a/node_modules/@nodelib/fs.stat/out/types/index.js b/node_modules/@nodelib/fs.stat/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.stat/package.json b/node_modules/@nodelib/fs.stat/package.json new file mode 100644 index 0000000..f2540c2 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/package.json @@ -0,0 +1,37 @@ +{ + "name": "@nodelib/fs.stat", + "version": "2.0.5", + "description": "Get the status of a file with some features", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "stat" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/@nodelib/fs.walk/LICENSE b/node_modules/@nodelib/fs.walk/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.walk/README.md b/node_modules/@nodelib/fs.walk/README.md new file mode 100644 index 0000000..6ccc08d --- /dev/null +++ b/node_modules/@nodelib/fs.walk/README.md @@ -0,0 +1,215 @@ +# @nodelib/fs.walk + +> A library for efficiently walking a directory recursively. + +## :bulb: Highlights + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode). +* :gear: Built-in directories/files and error filtering system. +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.walk +``` + +## Usage + +```ts +import * as fsWalk from '@nodelib/fs.walk'; + +fsWalk.walk('path', (error, entries) => { /* … */ }); +``` + +## API + +### .walk(path, [optionsOrSettings], callback) + +Reads the directory recursively and asynchronously. Requires a callback function. + +> :book: If you want to use the Promise API, use `util.promisify`. + +```ts +fsWalk.walk('path', (error, entries) => { /* … */ }); +fsWalk.walk('path', {}, (error, entries) => { /* … */ }); +fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ }); +``` + +### .walkStream(path, [optionsOrSettings]) + +Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider. + +```ts +const stream = fsWalk.walkStream('path'); +const stream = fsWalk.walkStream('path', {}); +const stream = fsWalk.walkStream('path', new fsWalk.Settings()); +``` + +### .walkSync(path, [optionsOrSettings]) + +Reads the directory recursively and synchronously. Returns an array of entries. + +```ts +const entries = fsWalk.walkSync('path'); +const entries = fsWalk.walkSync('path', {}); +const entries = fsWalk.walkSync('path', new fsWalk.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsWalk.Settings({ followSymbolicLinks: true }); + +const entries = fsWalk.walkSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. +* [`stats`] — An instance of `fs.Stats` class. + +## Options + +### basePath + +* Type: `string` +* Default: `undefined` + +By default, all paths are built relative to the root path. You can use this option to set custom root path. + +In the example below we read the files from the `root` directory, but in the results the root path will be `custom`. + +```ts +fsWalk.walkSync('root'); // → ['root/file.txt'] +fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt'] +``` + +### concurrency + +* Type: `number` +* Default: `Infinity` + +The maximum number of concurrent calls to `fs.readdir`. + +> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)). + +### deepFilter + +* Type: [`DeepFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the directory will be read deep or not. + +```ts +// Skip all directories that starts with `node_modules` +const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules'); +``` + +### entryFilter + +* Type: [`EntryFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the entry will be included to results or not. + +```ts +// Exclude all `.js` files from results +const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js'); +``` + +### errorFilter + +* Type: [`ErrorFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that allows you to skip errors that occur when reading directories. + +For example, you can skip `ENOENT` errors if required: + +```ts +// Skip all ENOENT errors +const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT'; +``` + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type. + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: `FileSystemAdapter` +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat: typeof fs.lstat; + stat: typeof fs.stat; + lstatSync: typeof fs.lstatSync; + statSync: typeof fs.statSync; + readdir: typeof fs.readdir; + readdirSync: typeof fs.readdirSync; +} + +const settings = new fsWalk.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.walk/out/index.d.ts b/node_modules/@nodelib/fs.walk/out/index.d.ts new file mode 100644 index 0000000..8864c7b --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.d.ts @@ -0,0 +1,14 @@ +/// +import type { Readable } from 'stream'; +import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir'; +import { AsyncCallback } from './providers/async'; +import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings'; +import type { Entry } from './types'; +declare function walk(directory: string, callback: AsyncCallback): void; +declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace walk { + function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[]; +declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable; +export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction }; diff --git a/node_modules/@nodelib/fs.walk/out/index.js b/node_modules/@nodelib/fs.walk/out/index.js new file mode 100644 index 0000000..1520787 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; +const async_1 = require("./providers/async"); +const stream_1 = require("./providers/stream"); +const sync_1 = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); +} +exports.walk = walk; +function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); +} +exports.walkSync = walkSync; +function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); +} +exports.walkStream = walkStream; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.d.ts b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts new file mode 100644 index 0000000..0f6717d --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts @@ -0,0 +1,12 @@ +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; +export default class AsyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + private readonly _storage; + constructor(_root: string, _settings: Settings); + read(callback: AsyncCallback): void; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.js b/node_modules/@nodelib/fs.walk/out/providers/async.js new file mode 100644 index 0000000..51d3be5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const async_1 = require("../readers/async"); +class AsyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } +} +exports.default = AsyncProvider; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, entries) { + callback(null, entries); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.d.ts b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts new file mode 100644 index 0000000..874f60c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts @@ -0,0 +1,4 @@ +import AsyncProvider from './async'; +import StreamProvider from './stream'; +import SyncProvider from './sync'; +export { AsyncProvider, StreamProvider, SyncProvider }; diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.js b/node_modules/@nodelib/fs.walk/out/providers/index.js new file mode 100644 index 0000000..4c2529c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0; +const async_1 = require("./async"); +exports.AsyncProvider = async_1.default; +const stream_1 = require("./stream"); +exports.StreamProvider = stream_1.default; +const sync_1 = require("./sync"); +exports.SyncProvider = sync_1.default; diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts new file mode 100644 index 0000000..294185f --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts @@ -0,0 +1,12 @@ +/// +import { Readable } from 'stream'; +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +export default class StreamProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + protected readonly _stream: Readable; + constructor(_root: string, _settings: Settings); + read(): Readable; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.js b/node_modules/@nodelib/fs.walk/out/providers/stream.js new file mode 100644 index 0000000..51298b0 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const async_1 = require("../readers/async"); +class StreamProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit('error', error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } +} +exports.default = StreamProvider; diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts new file mode 100644 index 0000000..551c42e --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts @@ -0,0 +1,10 @@ +import SyncReader from '../readers/sync'; +import type Settings from '../settings'; +import type { Entry } from '../types'; +export default class SyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: SyncReader; + constructor(_root: string, _settings: Settings); + read(): Entry[]; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.js b/node_modules/@nodelib/fs.walk/out/providers/sync.js new file mode 100644 index 0000000..faab6ca --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = require("../readers/sync"); +class SyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } +} +exports.default = SyncProvider; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.d.ts b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts new file mode 100644 index 0000000..9acf4e6 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts @@ -0,0 +1,30 @@ +/// +import { EventEmitter } from 'events'; +import * as fsScandir from '@nodelib/fs.scandir'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +import Reader from './reader'; +declare type EntryEventCallback = (entry: Entry) => void; +declare type ErrorEventCallback = (error: Errno) => void; +declare type EndEventCallback = () => void; +export default class AsyncReader extends Reader { + protected readonly _settings: Settings; + protected readonly _scandir: typeof fsScandir.scandir; + protected readonly _emitter: EventEmitter; + private readonly _queue; + private _isFatalError; + private _isDestroyed; + constructor(_root: string, _settings: Settings); + read(): EventEmitter; + get isDestroyed(): boolean; + destroy(): void; + onEntry(callback: EntryEventCallback): void; + onError(callback: ErrorEventCallback): void; + onEnd(callback: EndEventCallback): void; + private _pushToQueue; + private _worker; + private _handleError; + private _handleEntry; + private _emitEntry; +} +export {}; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.js b/node_modules/@nodelib/fs.walk/out/readers/async.js new file mode 100644 index 0000000..ebe8dd5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const events_1 = require("events"); +const fsScandir = require("@nodelib/fs.scandir"); +const fastq = require("fastq"); +const common = require("./common"); +const reader_1 = require("./reader"); +class AsyncReader extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit('end'); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error('The reader is already destroyed'); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on('entry', callback); + } + onError(callback) { + this._emitter.once('error', callback); + } + onEnd(callback) { + this._emitter.once('end', callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, undefined); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, undefined); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit('error', error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit('entry', entry); + } +} +exports.default = AsyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.d.ts b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts new file mode 100644 index 0000000..5985f97 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts @@ -0,0 +1,7 @@ +import type { FilterFunction } from '../settings'; +import type Settings from '../settings'; +import type { Errno } from '../types'; +export declare function isFatalError(settings: Settings, error: Errno): boolean; +export declare function isAppliedFilter(filter: FilterFunction | null, value: T): boolean; +export declare function replacePathSegmentSeparator(filepath: string, separator: string): string; +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.js b/node_modules/@nodelib/fs.walk/out/readers/common.js new file mode 100644 index 0000000..a93572f --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; +function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); +} +exports.isFatalError = isFatalError; +function isAppliedFilter(filter, value) { + return filter === null || filter(value); +} +exports.isAppliedFilter = isAppliedFilter; +function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); +} +exports.replacePathSegmentSeparator = replacePathSegmentSeparator; +function joinPathSegments(a, b, separator) { + if (a === '') { + return b; + } + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts new file mode 100644 index 0000000..e1f383b --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts @@ -0,0 +1,6 @@ +import type Settings from '../settings'; +export default class Reader { + protected readonly _root: string; + protected readonly _settings: Settings; + constructor(_root: string, _settings: Settings); +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.js b/node_modules/@nodelib/fs.walk/out/readers/reader.js new file mode 100644 index 0000000..782f07c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const common = require("./common"); +class Reader { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } +} +exports.default = Reader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts new file mode 100644 index 0000000..af41033 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts @@ -0,0 +1,15 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry } from '../types'; +import Reader from './reader'; +export default class SyncReader extends Reader { + protected readonly _scandir: typeof fsScandir.scandirSync; + private readonly _storage; + private readonly _queue; + read(): Entry[]; + private _pushToQueue; + private _handleQueue; + private _handleDirectory; + private _handleError; + private _handleEntry; + private _pushToStorage; +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.js b/node_modules/@nodelib/fs.walk/out/readers/sync.js new file mode 100644 index 0000000..9a8d5a6 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsScandir = require("@nodelib/fs.scandir"); +const common = require("./common"); +const reader_1 = require("./reader"); +class SyncReader extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } + catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } +} +exports.default = SyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/settings.d.ts b/node_modules/@nodelib/fs.walk/out/settings.d.ts new file mode 100644 index 0000000..d1c4b45 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.d.ts @@ -0,0 +1,30 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry, Errno } from './types'; +export declare type FilterFunction = (value: T) => boolean; +export declare type DeepFilterFunction = FilterFunction; +export declare type EntryFilterFunction = FilterFunction; +export declare type ErrorFilterFunction = FilterFunction; +export interface Options { + basePath?: string; + concurrency?: number; + deepFilter?: DeepFilterFunction; + entryFilter?: EntryFilterFunction; + errorFilter?: ErrorFilterFunction; + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly basePath?: string; + readonly concurrency: number; + readonly deepFilter: DeepFilterFunction | null; + readonly entryFilter: EntryFilterFunction | null; + readonly errorFilter: ErrorFilterFunction | null; + readonly pathSegmentSeparator: string; + readonly fsScandirSettings: fsScandir.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.walk/out/settings.js b/node_modules/@nodelib/fs.walk/out/settings.js new file mode 100644 index 0000000..d7a85c8 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsScandir = require("@nodelib/fs.scandir"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, undefined); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.walk/out/types/index.d.ts b/node_modules/@nodelib/fs.walk/out/types/index.d.ts new file mode 100644 index 0000000..6ee9bd3 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/types/index.d.ts @@ -0,0 +1,8 @@ +/// +import type * as scandir from '@nodelib/fs.scandir'; +export declare type Entry = scandir.Entry; +export declare type Errno = NodeJS.ErrnoException; +export interface QueueItem { + directory: string; + base?: string; +} diff --git a/node_modules/@nodelib/fs.walk/out/types/index.js b/node_modules/@nodelib/fs.walk/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.walk/package.json b/node_modules/@nodelib/fs.walk/package.json new file mode 100644 index 0000000..86bfce4 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.walk", + "version": "1.2.8", + "description": "A library for efficiently walking a directory recursively", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "walk", + "scanner", + "crawler" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*", + "!out/**/tests/**" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8" +} diff --git a/node_modules/@popperjs/core/LICENSE.md b/node_modules/@popperjs/core/LICENSE.md new file mode 100644 index 0000000..0370c45 --- /dev/null +++ b/node_modules/@popperjs/core/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@popperjs/core/README.md b/node_modules/@popperjs/core/README.md new file mode 100644 index 0000000..53be7b9 --- /dev/null +++ b/node_modules/@popperjs/core/README.md @@ -0,0 +1,376 @@ + +

+ Popper +

+ +
+

Tooltip & Popover Positioning Engine

+
+ +

+ + npm version + + + npm downloads per month (popper.js + @popperjs/core) + + + Rolling Versions + +

+ +
+ + +**Positioning tooltips and popovers is difficult. Popper is here to help!** + +Given an element, such as a button, and a tooltip element describing it, Popper +will automatically put the tooltip in the right place near the button. + +It will position _any_ UI element that "pops out" from the flow of your document +and floats near a target element. The most common example is a tooltip, but it +also includes popovers, drop-downs, and more. All of these can be generically +described as a "popper" element. + +## Demo + +[![Popper visualized](https://i.imgur.com/F7qWsmV.jpg)](https://popper.js.org) + +## Docs + +- [v2.x (latest)](https://popper.js.org/docs/v2/) +- [v1.x](https://popper.js.org/docs/v1/) + +We've created a +[Migration Guide](https://popper.js.org/docs/v2/migration-guide/) to help you +migrate from Popper 1 to Popper 2. + +To contribute to the Popper website and documentation, please visit the +[dedicated repository](https://github.com/popperjs/website). + +## Why not use pure CSS? + +- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from + overflowing clipping boundaries, such as the viewport. It will get partially + cut off or overflows if it's near the edge since there is no dynamic + positioning logic. When using Popper, your popper will always be positioned in + the right place without needing manual adjustments. +- **No flipping**: CSS poppers will not flip to a different placement to fit + better in view if necessary. While you can manually adjust for the main axis + overflow, this feature cannot be achieved via CSS alone. Popper automatically + flips the tooltip to make it fit in view as best as possible for the user. +- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be + used as a context menu. Popper allows you to position your tooltip relative to + any coordinates you desire. +- **Slower development cycle**: When pure CSS is used to position popper + elements, the lack of dynamic positioning means they must be carefully placed + to consider overflow on all screen sizes. In reusable component libraries, + this means a developer can't just add the component anywhere on the page, + because these issues need to be considered and adjusted for every time. With + Popper, you can place your elements anywhere and they will be positioned + correctly, without needing to consider different screen sizes, layouts, etc. + This massively speeds up development time because this work is automatically + offloaded to Popper. +- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any + arbitrary use case you may need to adjust for. Popper is built with + extensibility in mind. + +## Why Popper? + +With the CSS drawbacks out of the way, we now move on to Popper in the +JavaScript space itself. + +Naive JavaScript tooltip implementations usually have the following problems: + +- **Scrolling containers**: They don't ensure the tooltip stays with the + reference element while scrolling when inside any number of scrolling + containers. +- **DOM context**: They often require the tooltip move outside of its original + DOM context because they don't handle `offsetParent` contexts. +- **Compatibility**: Popper handles an incredible number of edge cases regarding + different browsers and environments (mobile viewports, RTL, scrollbars enabled + or disabled, etc.). Popper is a popular and well-maintained library, so you + can be confident positioning will work for your users on any device. +- **Configurability**: They often lack advanced configurability to suit any + possible use case. +- **Size**: They are usually relatively large in size, or require an ancient + jQuery dependency. +- **Performance**: They often have runtime performance issues and update the + tooltip position too slowly. + +**Popper solves all of these key problems in an elegant, performant manner.** It +is a lightweight ~3 kB library that aims to provide a reliable and extensible +positioning engine you can use to ensure all your popper elements are positioned +in the right place. + +When you start writing your own popper implementation, you'll quickly run into +all of the problems mentioned above. These widgets are incredibly common in our +UIs; we've done the hard work figuring this out so you don't need to spend hours +fixing and handling numerous edge cases that we already ran into while building +the library! + +Popper is used in popular libraries like Bootstrap, Foundation, Material UI, and +more. It's likely you've already used popper elements on the web positioned by +Popper at some point in the past few years. + +Since we write UIs using powerful abstraction libraries such as React or Angular +nowadays, you'll also be glad to know Popper can fully integrate with them and +be a good citizen together with your other components. Check out `react-popper` +for the official Popper wrapper for React. + +## Installation + +### 1. Package Manager + +```bash +# With npm +npm i @popperjs/core + +# With Yarn +yarn add @popperjs/core +``` + +### 2. CDN + +```html + + + + + +``` + +### 3. Direct Download? + +Managing dependencies by "directly downloading" them and placing them into your +source code is not recommended for a variety of reasons, including missing out +on feat/fix updates easily. Please use a versioning management system like a CDN +or npm/Yarn. + +## Usage + +The most straightforward way to get started is to import Popper from the `unpkg` +CDN, which includes all of its features. You can call the `Popper.createPopper` +constructor to create new popper instances. + +Here is a complete example: + +```html + +Popper example + + + + + + + + +``` + +Visit the [tutorial](https://popper.js.org/docs/v2/tutorial/) for an example of +how to build your own tooltip from scratch using Popper. + +### Module bundlers + +You can import the `createPopper` constructor from the fully-featured file: + +```js +import { createPopper } from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +// Pass the button, the tooltip, and some options, and Popper will do the +// magic positioning for you: +createPopper(button, tooltip, { + placement: 'right', +}); +``` + +All the modifiers listed in the docs menu will be enabled and "just work", so +you don't need to think about setting Popper up. The size of Popper including +all of its features is about 5 kB minzipped, but it may grow a bit in the +future. + +#### Popper Lite (tree-shaking) + +If bundle size is important, you'll want to take advantage of tree-shaking. The +library is built in a modular way to allow to import only the parts you really +need. + +```js +import { createPopperLite as createPopper } from '@popperjs/core'; +``` + +The Lite version includes the most necessary modifiers that will compute the +offsets of the popper, compute and add the positioning styles, and add event +listeners. This is close in bundle size to pure CSS tooltip libraries, and +behaves somewhat similarly. + +However, this does not include the features that makes Popper truly useful. + +The two most useful modifiers not included in Lite are `preventOverflow` and +`flip`: + +```js +import { + createPopperLite as createPopper, + preventOverflow, + flip, +} from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +createPopper(button, tooltip, { + modifiers: [preventOverflow, flip], +}); +``` + +As you make more poppers, you may be finding yourself needing other modifiers +provided by the library. + +See [tree-shaking](https://popper.js.org/docs/v2/performance/#tree-shaking) for more +information. + +## Distribution targets + +Popper is distributed in 3 different versions, in 3 different file formats. + +The 3 file formats are: + +- `esm` (works with `import` syntax — **recommended**) +- `umd` (works with ` + + +``` + +The `initFlowbite` function sets up all of the init functions for dropdowns, modals, navbars, tooltips and so on to hook onto the data attributes. Alternatively, you can also initialise each component category class separately with `initDropdowns` or `initModals`. + +You can view more examples by browsing the [components from Flowbite](#components). + +### ESM and CJS + +Flowbite also offers an API for using the components programmatically and it supports both CJS and ESM for JavaScript which can be helpful if you need to expand the default capabilities of the data attributes interface and get access to function callbacks. + +Here's an example how you can import and create a new Modal component inside JavaScript: + +```javascript +import { Modal } from 'flowbite' + +const $modalElement = document.querySelector('#modalEl'); + +const modalOptions = { + placement: 'bottom-right', + backdrop: 'dynamic', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + onHide: () => { + console.log('modal is hidden'); + }, + onShow: () => { + console.log('modal is shown'); + }, + onToggle: () => { + console.log('modal has been toggled'); + } +} + +const modal = new Modal($modalElement, modalOptions); + +modal.show(); +``` + +Check out the JavaScript behaviour section of each component's page to learn how you can use this. + +### TypeScript + +Flowbite supports type declarations for the interactive UI components including object interfaces and parameter types. Check out the following examples to learn how you can use types with Flowbite. + +Additionally to our code above, we will now import some relevant types from the Flowbite package, namely the `ModalOptions` and `ModalInterface`: + +```javascript +import { Modal } from 'flowbite' +import type { ModalOptions, ModalInterface } from 'flowbite' + +// other code +``` + +Generally speaking, all of the components have an interface definition that you can use whenever you create a new object to make sure that you're using the correct types of parameters and methods. + +When creating a new modal you can set the `ModalInterface` as the main type: + +```javascript +const modal: ModalInterface = new Modal($modalElement, modalOptions); +``` + +Flowbite also supports type definitions for the options object so if you want to set the placement of the modal based on types, here's how you would do that: + +```javascript +const modalOptions: ModalOptions = { + placement: 'top-right' +} + +const modal: ModalInterface = new Modal($modalElement, modalOptions); +``` + +Learn more about Flowbite and TypeScript in the [quickstart guide](https://flowbite.com/docs/getting-started/typescript/). + +### JavaScript Frameworks + +The awesome open-source community also built and currently maintains the following standalone libraries for React, Vue, Svelte, and Angular: + +- [🌀 Flowbite React Library](https://github.com/themesberg/flowbite-react) +- [🍀 Flowbite Vue Library](https://github.com/themesberg/flowbite-vue) +- [🎸 Flowbite Svelte Library](https://github.com/themesberg/flowbite-svelte) +- [📕 Flowbite Angular Library](https://github.com/themesberg/flowbite-angular) + +We also wrote integration guides for the following front-end frameworks and libraries: + +- [📝 Flowbite with React guide](https://flowbite.com/docs/getting-started/react/) +- [📝 Flowbite with Next.js guide](https://flowbite.com/docs/getting-started/next-js/) +- [📝 Flowbite with Remix guide](https://flowbite.com/docs/getting-started/remix/) +- [📝 Flowbite with Vue guide](https://flowbite.com/docs/getting-started/vue/) +- [📝 Flowbite with Nuxt guide](https://flowbite.com/docs/getting-started/nuxt-js/) +- [📝 Flowbite with Svelte guide](https://flowbite.com/docs/getting-started/svelte/) +- [📝 Flowbite with Astro guide](https://flowbite.com/docs/getting-started/astro/) +- [📝 Flowbite with Gatsby guide](https://flowbite.com/docs/getting-started/gatsby/) +- [📝 Flowbite with SolidJS guide](https://flowbite.com/docs/getting-started/solid-js/) + +### Back-end Frameworks + +Flowbite has a great integration with most of the back-end frameworks because it relies on vanilla JavaScript: + +- [📚 Using Flowbite with Laravel](https://flowbite.com/docs/getting-started/laravel/) +- [🎼 Using Flowbite with Symfony](https://flowbite.com/docs/getting-started/symfony/) +- [🚊 Using Flowbite with Ruby on Rails 7](https://flowbite.com/docs/getting-started/rails/) +- [🐉 Using Flowbite with Phoenix (Elixir)](https://flowbite.com/docs/getting-started/phoenix/) +- [🐸 Using Flowbite with Django](https://flowbite.com/docs/getting-started/django/) +- [🌶 Using Flowbite with Flask](https://flowbite.com/docs/getting-started/flask/) + +## Components + +Flowbite is an open source collection of UI components built with the utility classes from Tailwind CSS that you can use as a starting point when coding user interfaces and websites. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AlertsBadgeBreadcrumbs
+ + Tailwind CSS Alerts + + + + Tailwind CSS Badge + + + + Tailwind CSS Breadcrumbs + +
ButtonsButton groupCards
+ + Tailwind CSS Buttons + + + + Tailwind CSS Button Group + + + + Tailwind CSS Cards + +
DropdownFormsList group
+ + Tailwind CSS Dropdown + + + + Tailwind CSS Forms + + + + Tailwind CSS List group + +
TypographyModalTabs
+ + Tailwind CSS Typography + + + + Tailwind CSS Modal + + + + Tailwind CSS Tabs + +
NavbarPaginationTimeline
+ + Tailwind CSS Navbar + + + + Tailwind CSS Pagination + + + + Tailwind CSS Timeline + +
Progress barTablesToast
+ + Tailwind CSS Progress Bar + + + + Tailwind CSS Tables + + + + Tailwind CSS Toast + +
TooltipsDatepickerSpinner
+ + Tailwind CSS Tooltips + + + + Tailwind CSS Datepicker + + + + Tailwind CSS Spinner + +
FooterAccordionSidebar
+ + Tailwind CSS Footer + + + + Tailwind CSS Accordion + + + + Tailwind CSS Sidebar + +
CarouselAvatarRating
+ + Tailwind CSS Carousel + + + + Tailwind CSS Avatar + + + + Tailwind CSS Rating + +
Input FieldFile InputSearch Input
+ + Tailwind CSS Input Field + + + + Tailwind CSS File Input + + + + Tailwind CSS Search Input + +
SelectTextareaCheckbox
+ + Tailwind CSS Select + + + + Tailwind CSS Textarea + + + + Tailwind CSS Checkbox + +
RadioToggleRange Slider
+ + Tailwind CSS Radio + + + + Tailwind CSS Toggle + + + + Tailwind CSS Range Slider + +
Floating LabelMega MenuSkeleton
+ + Tailwind CSS Floating Label + + + + Tailwind CSS Mega Menu + + + + Tailwind CSS Skeleton + +
KBD (keyboard)Drawer (offcanvas)Popover
+ + Tailwind CSS KBD (Keyboard) + + + + Tailwind CSS Drawer (offcanvas) + + + + Tailwind CSS Popover + +
VideoHeadingParagraph
+ + Tailwind CSS Video + + + + Tailwind CSS Heading + + + + Tailwind CSS Paragraph + +
BlockquoteImageList
+ + Tailwind CSS Blockquote + + + + Tailwind CSS Image + + + + Tailwind CSS List + +
LinkTextHorizontal line (HR)
+ + Tailwind CSS Link + + + + Tailwind CSS Text + + + + Tailwind CSS HR + +
Speed DialStepperIndicators
+ + Tailwind CSS Speed Dial + + + + Tailwind CSS Stepper + + + + Tailwind CSS Indicators + +
Bottom NavigationSticky BannerGallery (Masonry)
+ + Tailwind CSS Bottom Navigation Bar + + + + Tailwind CSS Bottom Sticky Banner + + + + Tailwind CSS Image Gallery (Masonry) + +
JumbotronDevice mockupsCharts
+ + Tailwind CSS Jumbotron + + + + Tailwind CSS Device Mockups + + + + Tailwind CSS Charts + +
+ +## Figma Design System + +If you need the Figma files for the components you can check out our website for more information: + +🎨 [Get access to the Figma design files](https://flowbite.com/figma/) + +## Flowbite Blocks + +Check out Flowbite Blocks to get access to over 330+ website sections coded in Tailwind CSS and Flowbite: + +📦 [Check out Flowbite Blocks](https://flowbite.com/blocks/) + +## Flowbite Icons + +Start using over 430+ free and open-source collection of solid and outline SVG icons built for Tailwind CSS and with support for Figma and JSX (React): + +🔍 [Check out the icons](https://flowbite.com/icons/) + +## Pro version + +Get access to all premium features including the Figma design system, access to all Flowbite Block sections and a dashboard UI interface: + +💎 [Check out Flowbite Pro](https://flowbite.com/pro/) + +## Learn Design Concepts + +If you want to create even better Flowbite pages, learn design fundamentals from Teach Me Design - Enhance UI, a book that covers color theory, typography, UI and UX so you can make the most to implement the Flowbite Ecosystem! + +📖 [Learn with Enhance UI](https://www.enhanceui.com/?ref=flowbite-github) + +## Community + +If you need help or just want to discuss about the library join the community on Github: + +⌨️ [Discuss about Flowbite on GitHub](https://github.com/themesberg/flowbite/discussions) + +For casual chatting with others using the library: + +💬 [Join the Flowbite Discord Server](https://discord.gg/4eeurUVvTy) + +Video tutorials and presentations using Flowbite: + +🎥 [Subscribe to our YouTube channel](https://www.youtube.com/channel/UC_Ms4V2kYDsh7F_CSsHyQ6A) + +## Copyright and license + +The Flowbite name and logos are trademarks of Bergside Inc. + +- 📝 [Read about the licensing terms](https://flowbite.com/docs/getting-started/license/) +- 📀 [Brand guideline and trademark usage agreement](https://flowbite.com/brand/) diff --git a/node_modules/flowbite/dist/datepicker.js b/node_modules/flowbite/dist/datepicker.js new file mode 100644 index 0000000..6df2667 --- /dev/null +++ b/node_modules/flowbite/dist/datepicker.js @@ -0,0 +1,3119 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 482: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Z": function() { return /* binding */ DateRangePicker; } +/* harmony export */ }); +/* harmony import */ var _lib_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(698); +/* harmony import */ var _lib_date_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(963); +/* harmony import */ var _Datepicker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(770); + + + + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + const newOpts = Object.assign({}, options); + + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} + +function setupDatepicker(rangepicker, changeDateListener, el, options) { + (0,_lib_event_js__WEBPACK_IMPORTED_MODULE_0__/* .registerListeners */ .cF)(rangepicker, [ + [el, 'changeDate', changeDateListener], + ]); + new _Datepicker_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z(el, options, rangepicker); +} + +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + + const target = ev.target; + if (target.datepicker === undefined) { + return; + } + + const datepickers = rangepicker.datepickers; + const setDateOptions = {render: false}; + const changedSide = rangepicker.inputs.indexOf(target); + const otherSide = changedSide === 0 ? 1 : 0; + const changedDate = datepickers[changedSide].dates[0]; + const otherDate = datepickers[otherSide].dates[0]; + + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +class DateRangePicker { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + constructor(element, options = {}) { + const inputs = Array.isArray(options.inputs) + ? options.inputs + : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const changeDateListener = onChangeDate.bind(null, this); + const cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + const datepickers = []; + Object.defineProperty(this, 'datepickers', { + get() { + return datepickers; + }, + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, {target: this.inputs[0]}); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, {target: this.inputs[1]}); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + get dates() { + return this.datepickers.length === 2 + ? [ + this.datepickers[0].dates[0], + this.datepickers[1].dates[0], + ] + : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + (0,_lib_event_js__WEBPACK_IMPORTED_MODULE_0__/* .unregisterListeners */ .uV)(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + getDates(format = undefined) { + const callback = format + ? date => (0,_lib_date_format_js__WEBPACK_IMPORTED_MODULE_1__/* .formatDate */ .p6)(date, format, this.datepickers[0].config.locale) + : date => new Date(date); + + return this.dates.map(date => date === undefined ? date : callback(date)); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + setDates(rangeStart, rangeEnd) { + const [datepicker0, datepicker1] = this.datepickers; + const origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, {target: this.inputs[1]}); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, {target: this.inputs[0]}); + } + } +} + + +/***/ }), + +/***/ 770: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ Datepicker; } +}); + +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/utils.js +var utils = __webpack_require__(105); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/date.js +var lib_date = __webpack_require__(560); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/date-format.js +var date_format = __webpack_require__(963); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/event.js +var lib_event = __webpack_require__(698); +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/i18n/base-locales.js +// default locales +const locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/options/defaultOptions.js +// config options updatable by setOptions() and their default values +const defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0, +}; + +/* harmony default export */ var options_defaultOptions = (defaultOptions); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/lib/dom.js +const range = document.createRange(); + +function parseHTML(html) { + return range.createContextualFragment(html); +} + +// equivalent to jQuery's :visble +function isVisible(el) { + return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); +} + +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} + +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} + +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} + +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach((node) => { + el.appendChild(node); + }); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/options/processOptions.js + + + + + + +const { + language: defaultLang, + format: defaultFormat, + weekStart: defaultWeekStart, +} = options_defaultOptions; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 + ? (0,utils/* pushUnique */.$C)(dow, day) + : dow; +} + +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + const date = (0,date_format/* parseDate */.sG)(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue, max = 3) { + const viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + const inOpts = Object.assign({}, options); + const config = {}; + const locales = datepicker.constructor.locales; + let { + format, + language, + locale, + maxDate, + maxView, + minDate, + pickLevel, + startView, + weekStart, + } = datepicker.config || {}; + + if (inOpts.language) { + let lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + const origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + + if (inOpts.format) { + const hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + const hasToValue = typeof inOpts.format.toValue === 'function'; + const validFormatString = date_format/* reFormatTokens.test */.CL.test(inOpts.format); + if ((hasToDisplay && hasToValue) || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + let minDt = minDate; + let maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null + ? (0,lib_date/* dateValue */.by)(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null + ? undefined + : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => { + const date = (0,date_format/* parseDate */.sG)(dt, format, locale); + return date !== undefined ? (0,utils/* pushUnique */.$C)(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + const viewDate = (0,date_format/* parseDate */.sG)(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + const wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + let newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + + let newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + + let newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + const prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + const nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + const orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto', + y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto', + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch(inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach((key) => { + if (inOpts[key] !== undefined && (0,utils/* hasProperty */.l$)(options_defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + + return config; +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/pickerTemplate.js + + +const pickerTemplate = (0,utils/* optimizeTemplateHTML */.zh)(``); + +/* harmony default export */ var templates_pickerTemplate = (pickerTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/daysTemplate.js + + +const daysTemplate = (0,utils/* optimizeTemplateHTML */.zh)(`
+
${(0,utils/* createTagRepeat */.em)('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
${(0,utils/* createTagRepeat */.em)('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
+
`); + +/* harmony default export */ var templates_daysTemplate = (daysTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/calendarWeeksTemplate.js + + +const calendarWeeksTemplate = (0,utils/* optimizeTemplateHTML */.zh)(`
+
+
${(0,utils/* createTagRepeat */.em)('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
`); + +/* harmony default export */ var templates_calendarWeeksTemplate = (calendarWeeksTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/View.js + + + +// Base class of the view classes +class View { + constructor(picker, config) { + Object.assign(this, config, { + picker, + element: parseHTML(`
`).firstChild, + selected: [], + }); + this.init(this.picker.datepicker.config); + } + + init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + performBeforeHook(el, current, timeValue) { + let result = this.beforeShow(new Date(timeValue)); + switch (typeof result) { + case 'boolean': + result = {enabled: result}; + break; + case 'string': + result = {classes: result}; + } + + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + if (result.classes) { + const extraClasses = result.classes.split(/\s+/); + el.classList.add(...extraClasses); + if (extraClasses.includes('disabled')) { + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/DaysView.js + + + + + + + + +class DaysView extends View { + constructor(picker) { + super(picker, { + id: 0, + name: 'days', + cellClass: 'day', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + const inner = parseHTML(templates_daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + super.init(options); + } + + setOptions(options) { + let updateDOW; + + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + this.minDate = options.minDate; + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + const locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' + ? options.beforeShowDay + : undefined; + } + + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + const weeksElem = parseHTML(templates_calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild, + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach((el, index) => { + const dow = (this.weekStart + index) % 7; + el.textContent = this.dayNames[dow]; + el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const viewYear = viewDate.getFullYear(); + const viewMonth = viewDate.getMonth(); + const firstOfMonth = (0,lib_date/* dateValue */.by)(viewYear, viewMonth, 1); + const start = (0,lib_date/* dayOfTheWeekOf */.fr)(firstOfMonth, this.weekStart, this.weekStart); + + this.first = firstOfMonth; + this.last = (0,lib_date/* dateValue */.by)(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + render() { + // update today marker on ever render + this.today = this.todayHighlight ? (0,lib_date/* today */.Lg)() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = [...this.datesDisabled]; + + const switchLabel = (0,date_format/* formatDate */.p6)(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + const startOfWeek = (0,lib_date/* dayOfTheWeekOf */.fr)(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => { + el.textContent = (0,lib_date/* getWeek */.Qk)((0,lib_date/* addWeeks */.jh)(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = (0,lib_date/* addDays */.E4)(this.start, index); + const date = new Date(current); + const day = date.getDay(); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + el.dataset.date = current; + el.textContent = date.getDate(); + + if (current < this.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > this.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (this.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed'); + } + if (this.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed'); + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + if (this.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg') + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.dataset.date); + const classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg') + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/MonthsView.js + + + + + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + + const [[startY, startM], [endY, endM]] = range; + if (startY > thisYear || endY < thisYear) { + return; + } + return [ + startY === thisYear ? startM : -1, + endY === thisYear ? endM : 12, + ]; +} + +class MonthsView extends View { + constructor(picker) { + super(picker, { + id: 1, + name: 'months', + cellClass: 'month', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML((0,utils/* createTagRepeat */.em)('span', 12, {'data-month': ix => ix}))); + } + super.init(options); + } + + setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + const minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + const maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = (0,lib_date/* dateValue */.by)(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' + ? options.beforeShowMonth + : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((selected, timeValue) => { + const date = new Date(timeValue); + const year = date.getFullYear(); + const month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + (0,utils/* pushUnique */.$C)(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + const date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + + const selected = this.selected[this.year] || []; + const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + const isMinYear = this.year === this.minYear; + const isMaxYear = this.year === this.maxYear; + const range = computeMonthRange(this.range, this.year); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const date = (0,lib_date/* dateValue */.by)(this.year, index, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = this.monthNames[index]; + + if ( + yrOutOfRange + || isMinYear && index < this.minMonth + || isMaxYear && index > this.maxMonth + ) { + classList.add('disabled'); + } + if (range) { + const [rangeStart, rangeEnd] = range; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const selected = this.selected[this.year] || []; + const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'dark:bg-blue-600', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } +} +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/YearsView.js + + + + + +function toTitleCase(word) { + return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), ''); +} + +// Class representing the years and decades view elements +class YearsView extends View { + constructor(picker, config) { + super(picker, config); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`; + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML((0,utils/* createTagRepeat */.em)('span', 12))); + } + super.init(options); + } + + setOptions(options) { + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = (0,lib_date/* startOfYearPeriod */.ak)(options.minDate, this.step); + this.minDate = (0,lib_date/* dateValue */.by)(this.minYear, 0, 1); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = (0,lib_date/* startOfYearPeriod */.ak)(options.maxDate, this.step); + this.maxDate = (0,lib_date/* dateValue */.by)(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + const beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const first = (0,lib_date/* startOfYearPeriod */.ak)(viewDate, this.navStep); + const last = first + 9 * this.step; + + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = (0,lib_date/* startOfYearPeriod */.ak)(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((years, timeValue) => { + return (0,utils/* pushUnique */.$C)(years, (0,lib_date/* startOfYearPeriod */.ak)(timeValue, this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + if (timeValue !== undefined) { + return (0,lib_date/* startOfYearPeriod */.ak)(timeValue, this.step); + } + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(`${this.first}-${this.last}`); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = this.start + (index * this.step); + const date = (0,lib_date/* dateValue */.by)(current, 0, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < this.minYear || current > this.maxYear) { + classList.add('disabled'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.textContent); + const classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/functions.js + + + +function triggerDatepickerEvent(datepicker, type) { + const detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker, + }; + datepicker.element.dispatchEvent(new CustomEvent(type, {detail})); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + const {minDate, maxDate} = datepicker.config; + const {currentView, viewDate} = datepicker.picker; + let newViewDate; + switch (currentView.id) { + case 0: + newViewDate = (0,lib_date/* addMonths */.zI)(viewDate, direction); + break; + case 1: + newViewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction); + break; + default: + newViewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction * currentView.navStep); + } + newViewDate = (0,utils/* limitToRange */.jG)(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} + +function switchView(datepicker) { + const viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} + +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({autohide: true}); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/pickerListeners.js + + + + +function goToSelectedMonthOrYear(datepicker, selection) { + const picker = datepicker.picker; + const viewDate = new Date(picker.viewDate); + const viewId = picker.currentView.id; + const newDate = viewId === 1 + ? (0,lib_date/* addMonths */.zI)(viewDate, selection - viewDate.getMonth()) + : (0,lib_date/* addYears */.Bc)(viewDate, selection - viewDate.getFullYear()); + + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} + +function onClickTodayBtn(datepicker) { + const picker = datepicker.picker; + const currentDate = (0,lib_date/* today */.Lg)(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, {render: false}); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} + +function onClickClearBtn(datepicker) { + datepicker.setDate({clear: true}); +} + +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} + +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} + +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + const target = (0,lib_event/* findElementInEventPath */.He)(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + + const {id, isMinView} = datepicker.picker.currentView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} + +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/Picker.js + + + + + + + + + + + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + const prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach((node) => { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + const nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach((node) => { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'minDate') || (0,utils/* hasProperty */.l$)(options, 'maxDate')) { + const {minDate, maxDate} = picker.datepicker.config; + picker.controls.todayBtn.disabled = !(0,utils/* isInRange */.mh)((0,lib_date/* today */.Lg)(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + const {dates, config} = datepicker; + const viewDate = dates.length > 0 ? (0,utils/* lastItemOf */.Jm)(dates) : config.defaultViewDate; + return (0,utils/* limitToRange */.jG)(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + const oldViewDate = new Date(picker.viewDate); + const newViewDate = new Date(newDate); + const {id, year, first, last} = picker.currentView; + const viewYear = newViewDate.getFullYear(); + + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} + +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +class Picker { + constructor(datepicker) { + this.datepicker = datepicker; + + const template = templates_pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + const element = this.element = parseHTML(template).firstChild; + const [header, main, footer] = element.firstChild.children; + const title = header.firstElementChild; + const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children; + const [todayBtn, clearBtn] = footer.firstChild.children; + const controls = { + title, + prevBtn, + viewSwitch, + nextBtn, + todayBtn, + clearBtn, + }; + this.main = main; + this.controls = controls; + + const elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add(`datepicker-${elementClass}`); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + (0,lib_event/* registerListeners */.cF)(datepicker, [ + [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}], + [main, 'click', onClickView.bind(null, datepicker)], + [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], + [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], + [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], + [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], + [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)], + ]); + + // set up views + this.views = [ + new DaysView(this), + new MonthsView(this), + new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}), + new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}), + ]; + this.currentView = this.views[datepicker.config.startView]; + + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + + setOptions(options) { + processPickerOptions(this, options); + this.views.forEach((view) => { + view.init(options, false); + }); + this.currentView.render(); + } + + detach() { + this.datepicker.config.container.removeChild(this.element); + } + + show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + + const datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + const inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + + hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + + place() { + const {classList, style} = this.element; + const {config, inputField} = this.datepicker; + const container = config.container; + const { + width: calendarWidth, + height: calendarHeight, + } = this.element.getBoundingClientRect(); + const { + left: containerLeft, + top: containerTop, + width: containerWidth, + } = container.getBoundingClientRect(); + const { + left: inputLeft, + top: inputTop, + width: inputWidth, + height: inputHeight + } = inputField.getBoundingClientRect(); + let {x: orientX, y: orientY} = config.orientation; + let scrollTop; + let left; + let top; + + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + + classList.remove( + 'datepicker-orient-top', + 'datepicker-orient-bottom', + 'datepicker-orient-right', + 'datepicker-orient-left' + ); + classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`); + + style.top = top ? `${top}px` : top; + style.left = left ? `${left}px` : left; + } + + setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + + setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + + setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + + changeView(viewId) { + const oldView = this.currentView; + const newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach((view) => { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + update() { + const newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach((view) => { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + render(quickRender = true) { + const renderMethod = (quickRender && this._renderMethod) || 'render'; + delete this._renderMethod; + + this.currentView[renderMethod](); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/inputFieldListeners.js + + + + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!(0,utils/* isInRange */.mh)(date, min, max)) { + return; + } + if (testFn(date)) { + const newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + const picker = datepicker.picker; + const currentView = picker.currentView; + const step = currentView.step || 1; + let viewDate = picker.viewDate; + let addFn; + let testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = (0,lib_date/* addDays */.E4)(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction); + } else { + viewDate = (0,lib_date/* addDays */.E4)(viewDate, direction); + } + addFn = lib_date/* addDays */.E4; + testFn = (date) => currentView.disabled.includes(date); + break; + case 1: + viewDate = (0,lib_date/* addMonths */.zI)(viewDate, vertical ? direction * 4 : direction); + addFn = lib_date/* addMonths */.zI; + testFn = (date) => { + const dt = new Date(date); + const {year, disabled} = currentView; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = lib_date/* addYears */.Bc; + testFn = date => currentView.disabled.includes((0,lib_date/* startOfYearPeriod */.ak)(date, step)); + } + viewDate = findNextAvailableOne( + viewDate, + addFn, + direction < 0 ? -step : step, + testFn, + currentView.minDate, + currentView.maxDate + ); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} + +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + + const picker = datepicker.picker; + const {id, isMinView} = picker.currentView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide}); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} + +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + const el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(() => { + delete el._active; + delete el._clicking; + }, 2000); + } +} + +function onClickInput(datepicker, ev) { + const el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} + +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/otherListeners.js + + + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + const element = datepicker.element; + if (element !== document.activeElement) { + return; + } + const pickerElem = datepicker.picker.element; + if ((0,lib_event/* findElementInEventPath */.He)(ev, el => el === element || el === pickerElem)) { + return; + } + unfocus(datepicker); +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/Datepicker.js + + + + + + + + + + + + +function stringifyDates(dates, config) { + return dates + .map(dt => (0,date_format/* formatDate */.p6)(dt, config.format, config.locale)) + .join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates, clear = false) { + const {config, dates: origDates, rangepicker} = datepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + + const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + let newDates = inputDates.reduce((dates, dt) => { + let date = (0,date_format/* parseDate */.sG)(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + const dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd + ? dt.setMonth(dt.getMonth() + 1, 0) + : dt.setDate(1); + } else { + date = rangeEnd + ? dt.setFullYear(dt.getFullYear() + 1, 0, 0) + : dt.setMonth(0, 1); + } + } + if ( + (0,utils/* isInRange */.mh)(date, config.minDate, config.maxDate) + && !dates.includes(date) + && !config.datesDisabled.includes(date) + && !config.daysOfWeekDisabled.includes(new Date(date).getDay()) + ) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce((dates, date) => { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(date => !newDates.includes(date))); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates + ? newDates.slice(config.maxNumberOfDates * -1) + : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker, mode = 3, quickRender = true) { + const {config, picker, inputField} = datepicker; + if (mode & 2) { + const newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} + +function setDate(datepicker, inputDates, options) { + let {clear, render, autohide} = options; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + + const newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +class Datepicker { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + constructor(element, options = {}, rangepicker = undefined) { + element.datepicker = this; + this.element = element; + + // set up config + const config = this.config = Object.assign({ + buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button', + container: document.body, + defaultViewDate: (0,lib_date/* today */.Lg)(), + maxDate: undefined, + minDate: undefined, + }, processOptions(options_defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + const inline = this.inline = element.tagName !== 'INPUT'; + let inputField; + let initialDates; + + if (inline) { + config.container = element; + initialDates = (0,utils/* stringToArray */.W7)(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + const container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = (0,utils/* stringToArray */.W7)(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + const index = rangepicker.inputs.indexOf(inputField); + const datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get() { + return rangepicker; + }, + }); + } + + // set initial dates + this.dates = []; + // process initial value + const inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + + const picker = this.picker = new Picker(this); + + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + const onMousedownDocument = onClickOutside.bind(null, this); + const listeners = [ + [inputField, 'keydown', onKeydown.bind(null, this)], + [inputField, 'focus', onFocus.bind(null, this)], + [inputField, 'mousedown', onMousedown.bind(null, this)], + [inputField, 'click', onClickInput.bind(null, this)], + [inputField, 'paste', onPaste.bind(null, this)], + [document, 'mousedown', onMousedownDocument], + [document, 'touchstart', onMousedownDocument], + [window, 'resize', picker.place.bind(picker)] + ]; + (0,lib_event/* registerListeners */.cF)(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + static formatDate(date, format, lang) { + return (0,date_format/* formatDate */.p6)(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + static parseDate(dateStr, format, lang) { + return (0,date_format/* parseDate */.sG)(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + static get locales() { + return locales; + } + + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + get active() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + get pickerElement() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + const picker = this.picker; + const newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + destroy() { + this.hide(); + (0,lib_event/* unregisterListeners */.uV)(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + getDate(format = undefined) { + const callback = format + ? date => (0,date_format/* formatDate */.p6)(date, format, this.config.locale) + : date => new Date(date); + + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + setDate(...args) { + const dates = [...args]; + const opts = {}; + const lastArg = (0,utils/* lastItemOf */.Jm)(args); + if ( + typeof lastArg === 'object' + && !Array.isArray(lastArg) + && !(lastArg instanceof Date) + && lastArg + ) { + Object.assign(opts, dates.pop()); + } + + const inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + update(options = undefined) { + if (this.inline) { + return; + } + + const opts = {clear: true, autohide: !!(options && options.autohide)}; + const inputDates = (0,utils/* stringToArray */.W7)(this.inputField.value, this.config.dateDelimiter); + setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + refresh(target = undefined, forceRender = false) { + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + + let mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + exitEditMode(options = undefined) { + if (this.inline || !this.editMode) { + return; + } + const opts = Object.assign({update: false}, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700'); + if (opts.update) { + this.update(opts); + } + } +} + + +/***/ }), + +/***/ 963: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "CL": function() { return /* binding */ reFormatTokens; }, +/* harmony export */ "p6": function() { return /* binding */ formatDate; }, +/* harmony export */ "sG": function() { return /* binding */ parseDate; } +/* harmony export */ }); +/* unused harmony export reNonDateParts */ +/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(560); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); + + + +// pattern for format parts +const reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +const reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +let knownFormats = {}; +// parse funtions for date parts +const parseFns = { + y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m(date, month, locale) { + const newDate = new Date(date); + let monthIndex = parseInt(month, 10) - 1; + + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + + const monthName = month.toLowerCase(); + const compareNames = name => name.toLowerCase().startsWith(monthName); + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) + ? newDate.setDate(0) + : newDate.getTime(); + }, + d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + }, +}; +// format functions for date parts +const formatFns = { + d(date) { + return date.getDate(); + }, + dd(date) { + return padZero(date.getDate(), 2); + }, + D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD(date, locale) { + return locale.days[date.getDay()]; + }, + m(date) { + return date.getMonth() + 1; + }, + mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y(date) { + return date.getFullYear(); + }, + yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy(date) { + return padZero(date.getFullYear(), 4); + }, +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} + +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} + +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + const separators = format.split(reFormatTokens); + const parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + const partFormatters = parts.map(token => formatFns[token]); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + const partParserKeys = Object.keys(parseFns).reduce((keys, key) => { + const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key); + if (token) { + keys.push(key); + } + return keys; + }, []); + + return knownFormats[format] = { + parser(dateStr, locale) { + const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => { + if (part.length > 0 && parts[index]) { + const token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce((origDate, key) => { + const newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .today */ .Lg)()); + }, + formatter(date, locale) { + let dateStr = partFormatters.reduce((str, fn, index) => { + return str += `${separators[index]}${fn(date, locale)}`; + }, ''); + // separators' length is always parts' length + 1, + return dateStr += (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .lastItemOf */ .Jm)(separators); + }, + }; +} + +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + const date = (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .stripTime */ .xR)(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .today */ .Lg)(); + } + + if (format && format.toValue) { + const date = format.toValue(dateStr, format, locale); + return isNaN(date) ? undefined : (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .stripTime */ .xR)(date); + } + + return parseFormatString(format).parser(dateStr, locale); +} + +function formatDate(date, format, locale) { + if (isNaN(date) || (!date && date !== 0)) { + return ''; + } + + const dateObj = typeof date === 'number' ? new Date(date) : date; + + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + + return parseFormatString(format).formatter(dateObj, locale); +} + + +/***/ }), + +/***/ 560: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Bc": function() { return /* binding */ addYears; }, +/* harmony export */ "E4": function() { return /* binding */ addDays; }, +/* harmony export */ "Lg": function() { return /* binding */ today; }, +/* harmony export */ "Qk": function() { return /* binding */ getWeek; }, +/* harmony export */ "ak": function() { return /* binding */ startOfYearPeriod; }, +/* harmony export */ "by": function() { return /* binding */ dateValue; }, +/* harmony export */ "fr": function() { return /* binding */ dayOfTheWeekOf; }, +/* harmony export */ "jh": function() { return /* binding */ addWeeks; }, +/* harmony export */ "xR": function() { return /* binding */ stripTime; }, +/* harmony export */ "zI": function() { return /* binding */ addMonths; } +/* harmony export */ }); +function stripTime(timeValue) { + return new Date(timeValue).setHours(0, 0, 0, 0); +} + +function today() { + return new Date().setHours(0, 0, 0, 0); +} + +// Get the time value of the start of given date or year, month and day +function dateValue(...args) { + switch (args.length) { + case 0: + return today(); + case 1: + return stripTime(args[0]); + } + + // use setFullYear() to keep 2-digit year from being mapped to 1900-1999 + const newDate = new Date(0); + newDate.setFullYear(...args); + return newDate.setHours(0, 0, 0, 0); +} + +function addDays(date, amount) { + const newDate = new Date(date); + return newDate.setDate(newDate.getDate() + amount); +} + +function addWeeks(date, amount) { + return addDays(date, amount * 7); +} + +function addMonths(date, amount) { + // If the day of the date is not in the new month, the last day of the new + // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03) + const newDate = new Date(date); + const monthsToSet = newDate.getMonth() + amount; + let expectedMonth = monthsToSet % 12; + if (expectedMonth < 0) { + expectedMonth += 12; + } + + const time = newDate.setMonth(monthsToSet); + return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time; +} + +function addYears(date, amount) { + // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the + // new year will be returned. + const newDate = new Date(date); + const expectedMonth = newDate.getMonth(); + const time = newDate.setFullYear(newDate.getFullYear() + amount); + return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time; +} + +// Calculate the distance bettwen 2 days of the week +function dayDiff(day, from) { + return (day - from + 7) % 7; +} + +// Get the date of the specified day of the week of given base date +function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) { + const baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + const year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + + +/***/ }), + +/***/ 698: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "He": function() { return /* binding */ findElementInEventPath; }, +/* harmony export */ "cF": function() { return /* binding */ registerListeners; }, +/* harmony export */ "uV": function() { return /* binding */ unregisterListeners; } +/* harmony export */ }); +const listenerRegistry = new WeakMap(); +const {addEventListener, removeEventListener} = EventTarget.prototype; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + let registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach((listener) => { + addEventListener.call(...listener); + registered.push(listener); + }); +} + +function unregisterListeners(keyObj) { + let listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach((listener) => { + removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + const getComposedPath = (node, path = []) => { + path.push(node); + + let parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { // ShadowRoot + parent = node.host; + } else if (node.defaultView) { // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} + +function findFromPath(path, criteria, currentTarget, index = 0) { + const el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + const criteria = typeof selector === 'function' ? selector : el => el.matches(selector); + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + + +/***/ }), + +/***/ 105: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "$C": function() { return /* binding */ pushUnique; }, +/* harmony export */ "Jm": function() { return /* binding */ lastItemOf; }, +/* harmony export */ "W7": function() { return /* binding */ stringToArray; }, +/* harmony export */ "em": function() { return /* binding */ createTagRepeat; }, +/* harmony export */ "jG": function() { return /* binding */ limitToRange; }, +/* harmony export */ "l$": function() { return /* binding */ hasProperty; }, +/* harmony export */ "mh": function() { return /* binding */ isInRange; }, +/* harmony export */ "zh": function() { return /* binding */ optimizeTemplateHTML; } +/* harmony export */ }); +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr, ...items) { + items.forEach((item) => { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} + +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} + +function isInRange(testVal, min, max) { + const minOK = min === undefined || testVal >= min; + const maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} + +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} + +function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') { + const openTagSrc = Object.keys(attributes).reduce((src, attr) => { + let val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return `${src} ${attr}="${val}"`; + }, tagName); + html += `<${openTagSrc}>`; + + const next = index + 1; + return next < repeat + ? createTagRepeat(tagName, repeat, attributes, next, html) + : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nexport default class DateRangePicker {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n constructor(element, options = {}) {\n const inputs = Array.isArray(options.inputs)\n ? options.inputs\n : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n const changeDateListener = onChangeDate.bind(null, this);\n const cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n const datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get() {\n return datepickers;\n },\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {target: this.inputs[0]});\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {target: this.inputs[1]});\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n get dates() {\n return this.datepickers.length === 2\n ? [\n this.datepickers[0].dates[0],\n this.datepickers[1].dates[0],\n ]\n : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n const cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n getDates(format = undefined) {\n const callback = format\n ? date => formatDate(date, format, this.datepickers[0].config.locale)\n : date => new Date(date);\n\n return this.dates.map(date => date === undefined ? date : callback(date));\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n setDates(rangeStart, rangeEnd) {\n const [datepicker0, datepicker1] = this.datepickers;\n const origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {target: this.inputs[1]});\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {target: this.inputs[0]});\n }\n }\n}\n","// default locales\nexport const locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n","// config options updatable by setOptions() and their default values\nconst defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined, // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0,\n};\n\nexport default defaultOptions;\n","const range = document.createRange();\n\nexport function parseHTML(html) {\n return range.createContextualFragment(html);\n}\n\n// equivalent to jQuery's :visble\nexport function isVisible(el) {\n return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n}\n\nexport function hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\n\nexport function showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\n\nexport function emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\n\nexport function replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach((node) => {\n el.appendChild(node);\n });\n }\n}\n","import {hasProperty, pushUnique} from '../lib/utils.js';\nimport {dateValue} from '../lib/date.js';\nimport {reFormatTokens, parseDate} from '../lib/date-format.js';\nimport {parseHTML} from '../lib/dom.js';\nimport defaultOptions from './defaultOptions.js';\n\nconst {\n language: defaultLang,\n format: defaultFormat,\n weekStart: defaultWeekStart,\n} = defaultOptions;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7\n ? pushUnique(dow, day)\n : dow;\n}\n\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n const date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue, max = 3) {\n const viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nexport default function processOptions(options, datepicker) {\n const inOpts = Object.assign({}, options);\n const config = {};\n const locales = datepicker.constructor.locales;\n let {\n format,\n language,\n locale,\n maxDate,\n maxView,\n minDate,\n pickLevel,\n startView,\n weekStart,\n } = datepicker.config || {};\n\n if (inOpts.language) {\n let lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n const origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n\n if (inOpts.format) {\n const hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n const hasToValue = typeof inOpts.format.toValue === 'function';\n const validFormatString = reFormatTokens.test(inOpts.format);\n if ((hasToDisplay && hasToValue) || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n let minDt = minDate;\n let maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null\n ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null\n ? undefined\n : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => {\n const date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n const viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n const wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n let newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n\n let newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n\n let newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n const prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n const nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n const orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto',\n y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto',\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch(inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach((key) => {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n\n return config;\n}\n","import {optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst pickerTemplate = optimizeTemplateHTML(`
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
`);\n\nexport default pickerTemplate;\n","import {createTagRepeat, optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst daysTemplate = optimizeTemplateHTML(`
\n
${createTagRepeat('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
\n
${createTagRepeat('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
\n
`);\n\nexport default daysTemplate;\n","import {createTagRepeat, optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst calendarWeeksTemplate = optimizeTemplateHTML(`
\n
\n
${createTagRepeat('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
\n
`);\n\nexport default calendarWeeksTemplate;\n","import {pushUnique} from '../../lib/utils.js';\nimport {parseHTML, replaceChildNodes} from '../../lib/dom.js';\n\n// Base class of the view classes\nexport default class View {\n constructor(picker, config) {\n Object.assign(this, config, {\n picker,\n element: parseHTML(`
`).firstChild,\n selected: [],\n });\n this.init(this.picker.datepicker.config);\n }\n\n init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n performBeforeHook(el, current, timeValue) {\n let result = this.beforeShow(new Date(timeValue));\n switch (typeof result) {\n case 'boolean':\n result = {enabled: result};\n break;\n case 'string':\n result = {classes: result};\n }\n\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n const extraClasses = result.classes.split(/\\s+/);\n el.classList.add(...extraClasses);\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n}\n","import {hasProperty, pushUnique} from '../../lib/utils.js';\nimport {today, dateValue, addDays, addWeeks, dayOfTheWeekOf, getWeek} from '../../lib/date.js';\nimport {formatDate} from '../../lib/date-format.js';\nimport {parseHTML, showElement, hideElement} from '../../lib/dom.js';\nimport daysTemplate from '../templates/daysTemplate.js';\nimport calendarWeeksTemplate from '../templates/calendarWeeksTemplate.js';\nimport View from './View.js';\n\nexport default class DaysView extends View {\n constructor(picker) {\n super(picker, {\n id: 0,\n name: 'days',\n cellClass: 'day',\n });\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n const inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n super.init(options);\n }\n\n setOptions(options) {\n let updateDOW;\n\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n const locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function'\n ? options.beforeShowDay\n : undefined;\n }\n\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n const weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild,\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach((el, index) => {\n const dow = (this.weekStart + index) % 7;\n el.textContent = this.dayNames[dow];\n el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n const viewYear = viewDate.getFullYear();\n const viewMonth = viewDate.getMonth();\n const firstOfMonth = dateValue(viewYear, viewMonth, 1);\n const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n render() {\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [...this.datesDisabled];\n\n const switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n const startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const current = addDays(this.start, index);\n const date = new Date(current);\n const day = date.getDay();\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n el.dataset.date = current;\n el.textContent = date.getDate();\n\n if (current < this.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > this.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (this.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed');\n }\n if (this.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed');\n pushUnique(this.disabled, current);\n }\n if (this.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (this.range) {\n const [rangeStart, rangeEnd] = this.range;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg')\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const [rangeStart, rangeEnd] = this.range || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach((el) => {\n const current = Number(el.dataset.date);\n const classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg')\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n const index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n}\n","import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js';\nimport {dateValue} from '../../lib/date.js';\nimport {parseHTML} from '../../lib/dom.js';\nimport View from './View.js';\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n\n const [[startY, startM], [endY, endM]] = range;\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [\n startY === thisYear ? startM : -1,\n endY === thisYear ? endM : 12,\n ];\n}\n\nexport default class MonthsView extends View {\n constructor(picker) {\n super(picker, {\n id: 1,\n name: 'months',\n cellClass: 'month',\n });\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix})));\n }\n super.init(options);\n }\n\n setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n const minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n const maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function'\n ? options.beforeShowMonth\n : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates.reduce((selected, timeValue) => {\n const date = new Date(timeValue);\n const year = date.getFullYear();\n const month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(timeValue => {\n const date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n render() {\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n\n const selected = this.selected[this.year] || [];\n const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n const isMinYear = this.year === this.minYear;\n const isMaxYear = this.year === this.maxYear;\n const range = computeMonthRange(this.range, this.year);\n\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const date = dateValue(this.year, index, 1);\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n if (this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = this.monthNames[index];\n\n if (\n yrOutOfRange\n || isMinYear && index < this.minMonth\n || isMaxYear && index > this.maxMonth\n ) {\n classList.add('disabled');\n }\n if (range) {\n const [rangeStart, rangeEnd] = range;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const selected = this.selected[this.year] || [];\n const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'dark:bg-blue-600', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n}","import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js';\nimport {dateValue, startOfYearPeriod} from '../../lib/date.js';\nimport {parseHTML} from '../../lib/dom.js';\nimport View from './View.js';\n\nfunction toTitleCase(word) {\n return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), '');\n}\n\n// Class representing the years and decades view elements\nexport default class YearsView extends View {\n constructor(picker, config) {\n super(picker, config);\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`;\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n super.init(options);\n }\n\n setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n const beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n const first = startOfYearPeriod(viewDate, this.navStep);\n const last = first + 9 * this.step;\n\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates.reduce((years, timeValue) => {\n return pushUnique(years, startOfYearPeriod(timeValue, this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(timeValue => {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n render() {\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n\n this.picker.setViewSwitchLabel(`${this.first}-${this.last}`);\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const current = this.start + (index * this.step);\n const date = dateValue(current, 0, 1);\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n if (this.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < this.minYear || current > this.maxYear) {\n classList.add('disabled');\n }\n if (this.range) {\n const [rangeStart, rangeEnd] = this.range;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const [rangeStart, rangeEnd] = this.range || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach((el) => {\n const current = Number(el.textContent);\n const classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n const index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n}\n","import {limitToRange} from '../lib/utils.js';\nimport {addMonths, addYears} from '../lib/date.js';\n\nexport function triggerDatepickerEvent(datepicker, type) {\n const detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker,\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {detail}));\n}\n\n// direction: -1 (to previous), 1 (to next)\nexport function goToPrevOrNext(datepicker, direction) {\n const {minDate, maxDate} = datepicker.config;\n const {currentView, viewDate} = datepicker.picker;\n let newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\n\nexport function switchView(datepicker) {\n const viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\n\nexport function unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({autohide: true});\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n","import {today, addMonths, addYears} from '../lib/date.js';\nimport {findElementInEventPath} from '../lib/event.js';\nimport {goToPrevOrNext, switchView} from './functions.js';\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n const picker = datepicker.picker;\n const viewDate = new Date(picker.viewDate);\n const viewId = picker.currentView.id;\n const newDate = viewId === 1\n ? addMonths(viewDate, selection - viewDate.getMonth())\n : addYears(viewDate, selection - viewDate.getFullYear());\n\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\n\nexport function onClickTodayBtn(datepicker) {\n const picker = datepicker.picker;\n const currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {render: false});\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\n\nexport function onClickClearBtn(datepicker) {\n datepicker.setDate({clear: true});\n}\n\nexport function onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\n\nexport function onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\n\nexport function onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nexport function onClickView(datepicker, ev) {\n const target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n\n const {id, isMinView} = datepicker.picker.currentView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\n\nexport function onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n","import {hasProperty, lastItemOf, isInRange, limitToRange} from '../lib/utils.js';\nimport {today} from '../lib/date.js';\nimport {parseHTML, showElement, hideElement, emptyChildNodes} from '../lib/dom.js';\nimport {registerListeners} from '../lib/event.js';\nimport pickerTemplate from './templates/pickerTemplate.js';\nimport DaysView from './views/DaysView.js';\nimport MonthsView from './views/MonthsView.js';\nimport YearsView from './views/YearsView.js';\nimport {triggerDatepickerEvent} from '../events/functions.js';\nimport {\n onClickTodayBtn,\n onClickClearBtn,\n onClickViewSwitch,\n onClickPrevBtn,\n onClickNextBtn,\n onClickView,\n onClickPicker,\n} from '../events/pickerListeners.js';\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n const prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach((node) => {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n const nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach((node) => {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n const {minDate, maxDate} = picker.datepicker.config;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n const {dates, config} = datepicker;\n const viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n const oldViewDate = new Date(picker.viewDate);\n const newViewDate = new Date(newDate);\n const {id, year, first, last} = picker.currentView;\n const viewYear = newViewDate.getFullYear();\n\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\n\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nexport default class Picker {\n constructor(datepicker) {\n this.datepicker = datepicker;\n\n const template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n const element = this.element = parseHTML(template).firstChild;\n const [header, main, footer] = element.firstChild.children;\n const title = header.firstElementChild;\n const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children;\n const [todayBtn, clearBtn] = footer.firstChild.children;\n const controls = {\n title,\n prevBtn,\n viewSwitch,\n nextBtn,\n todayBtn,\n clearBtn,\n };\n this.main = main;\n this.controls = controls;\n\n const elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(`datepicker-${elementClass}`);\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [\n [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}],\n [main, 'click', onClickView.bind(null, datepicker)],\n [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)],\n [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)],\n [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)],\n [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)],\n [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)],\n ]);\n\n // set up views\n this.views = [\n new DaysView(this),\n new MonthsView(this),\n new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}),\n new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}),\n ];\n this.currentView = this.views[datepicker.config.startView];\n\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n\n setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach((view) => {\n view.init(options, false);\n });\n this.currentView.render();\n }\n\n detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n\n show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n\n const datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n const inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n\n hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n\n place() {\n const {classList, style} = this.element;\n const {config, inputField} = this.datepicker;\n const container = config.container;\n const {\n width: calendarWidth,\n height: calendarHeight,\n } = this.element.getBoundingClientRect();\n const {\n left: containerLeft,\n top: containerTop,\n width: containerWidth,\n } = container.getBoundingClientRect();\n const {\n left: inputLeft,\n top: inputTop,\n width: inputWidth,\n height: inputHeight\n } = inputField.getBoundingClientRect();\n let {x: orientX, y: orientY} = config.orientation;\n let scrollTop;\n let left;\n let top;\n\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n\n classList.remove(\n 'datepicker-orient-top',\n 'datepicker-orient-bottom',\n 'datepicker-orient-right',\n 'datepicker-orient-left'\n );\n classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`);\n\n style.top = top ? `${top}px` : top;\n style.left = left ? `${left}px` : left;\n }\n\n setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n\n setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n\n setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n\n changeView(viewId) {\n const oldView = this.currentView;\n const newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach((view) => {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n update() {\n const newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach((view) => {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n render(quickRender = true) {\n const renderMethod = (quickRender && this._renderMethod) || 'render';\n delete this._renderMethod;\n\n this.currentView[renderMethod]();\n }\n}\n","import {isInRange} from '../lib/utils.js';\nimport {addDays, addMonths, addYears, startOfYearPeriod} from '../lib/date.js';\nimport {goToPrevOrNext, switchView, unfocus} from './functions.js';\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n const newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n const picker = datepicker.picker;\n const currentView = picker.currentView;\n const step = currentView.step || 1;\n let viewDate = picker.viewDate;\n let addFn;\n let testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = (date) => currentView.disabled.includes(date);\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = (date) => {\n const dt = new Date(date);\n const {year, disabled} = currentView;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = date => currentView.disabled.includes(startOfYearPeriod(date, step));\n }\n viewDate = findNextAvailableOne(\n viewDate,\n addFn,\n direction < 0 ? -step : step,\n testFn,\n currentView.minDate,\n currentView.maxDate\n );\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\n\nexport function onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n\n const picker = datepicker.picker;\n const {id, isMinView} = picker.currentView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide});\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\n\nexport function onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nexport function onMousedown(datepicker, ev) {\n const el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(() => {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\n\nexport function onClickInput(datepicker, ev) {\n const el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\n\nexport function onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n","import {findElementInEventPath} from '../lib/event.js';\nimport {unfocus} from './functions.js';\n\n// for the `document` to delegate the events from outside the picker/input field\nexport function onClickOutside(datepicker, ev) {\n const element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n const pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, el => el === element || el === pickerElem)) {\n return;\n }\n unfocus(datepicker);\n}\n","import {lastItemOf, stringToArray, isInRange} from './lib/utils.js';\nimport {today} from './lib/date.js';\nimport {parseDate, formatDate} from './lib/date-format.js';\nimport {registerListeners, unregisterListeners} from './lib/event.js';\nimport {locales} from './i18n/base-locales.js';\nimport defaultOptions from './options/defaultOptions.js';\nimport processOptions from './options/processOptions.js';\nimport Picker from './picker/Picker.js';\nimport {triggerDatepickerEvent} from './events/functions.js';\nimport {onKeydown, onFocus, onMousedown, onClickInput, onPaste} from './events/inputFieldListeners.js';\nimport {onClickOutside} from './events/otherListeners.js';\n\nfunction stringifyDates(dates, config) {\n return dates\n .map(dt => formatDate(dt, config.format, config.locale))\n .join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates, clear = false) {\n const {config, dates: origDates, rangepicker} = datepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n\n const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n let newDates = inputDates.reduce((dates, dt) => {\n let date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n const dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd\n ? dt.setMonth(dt.getMonth() + 1, 0)\n : dt.setDate(1);\n } else {\n date = rangeEnd\n ? dt.setFullYear(dt.getFullYear() + 1, 0, 0)\n : dt.setMonth(0, 1);\n }\n }\n if (\n isInRange(date, config.minDate, config.maxDate)\n && !dates.includes(date)\n && !config.datesDisabled.includes(date)\n && !config.daysOfWeekDisabled.includes(new Date(date).getDay())\n ) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce((dates, date) => {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(date => !newDates.includes(date)));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates\n ? newDates.slice(config.maxNumberOfDates * -1)\n : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker, mode = 3, quickRender = true) {\n const {config, picker, inputField} = datepicker;\n if (mode & 2) {\n const newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\n\nfunction setDate(datepicker, inputDates, options) {\n let {clear, render, autohide} = options;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n\n const newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nexport default class Datepicker {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n constructor(element, options = {}, rangepicker = undefined) {\n element.datepicker = this;\n this.element = element;\n\n // set up config\n const config = this.config = Object.assign({\n buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined,\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n const inline = this.inline = element.tagName !== 'INPUT';\n let inputField;\n let initialDates;\n\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n const container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n const index = rangepicker.inputs.indexOf(inputField);\n const datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get() {\n return rangepicker;\n },\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n const inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n\n const picker = this.picker = new Picker(this);\n\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n const onMousedownDocument = onClickOutside.bind(null, this);\n const listeners = [\n [inputField, 'keydown', onKeydown.bind(null, this)],\n [inputField, 'focus', onFocus.bind(null, this)],\n [inputField, 'mousedown', onMousedown.bind(null, this)],\n [inputField, 'click', onClickInput.bind(null, this)],\n [inputField, 'paste', onPaste.bind(null, this)],\n [document, 'mousedown', onMousedownDocument],\n [document, 'touchstart', onMousedownDocument],\n [window, 'resize', picker.place.bind(picker)]\n ];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n static formatDate(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n static parseDate(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n static get locales() {\n return locales;\n }\n\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n get active() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n get pickerElement() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n setOptions(options) {\n const picker = this.picker;\n const newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n getDate(format = undefined) {\n const callback = format\n ? date => formatDate(date, format, this.config.locale)\n : date => new Date(date);\n\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n setDate(...args) {\n const dates = [...args];\n const opts = {};\n const lastArg = lastItemOf(args);\n if (\n typeof lastArg === 'object'\n && !Array.isArray(lastArg)\n && !(lastArg instanceof Date)\n && lastArg\n ) {\n Object.assign(opts, dates.pop());\n }\n\n const inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n update(options = undefined) {\n if (this.inline) {\n return;\n }\n\n const opts = {clear: true, autohide: !!(options && options.autohide)};\n const inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n refresh(target = undefined, forceRender = false) {\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n\n let mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n exitEditMode(options = undefined) {\n if (this.inline || !this.editMode) {\n return;\n }\n const opts = Object.assign({update: false}, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n}\n","import {stripTime, today} from './date.js';\nimport {lastItemOf} from './utils.js';\n\n// pattern for format parts\nexport const reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nexport const reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nlet knownFormats = {};\n// parse funtions for date parts\nconst parseFns = {\n y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m(date, month, locale) {\n const newDate = new Date(date);\n let monthIndex = parseInt(month, 10) - 1;\n\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n\n const monthName = month.toLowerCase();\n const compareNames = name => name.toLowerCase().startsWith(monthName);\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex)\n ? newDate.setDate(0)\n : newDate.getTime();\n },\n d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n },\n};\n// format functions for date parts\nconst formatFns = {\n d(date) {\n return date.getDate();\n },\n dd(date) {\n return padZero(date.getDate(), 2);\n },\n D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m(date) {\n return date.getMonth() + 1;\n },\n mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y(date) {\n return date.getFullYear();\n },\n yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy(date) {\n return padZero(date.getFullYear(), 4);\n },\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\n\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\n\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n const separators = format.split(reFormatTokens);\n const parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n const partFormatters = parts.map(token => formatFns[token]);\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n const partParserKeys = Object.keys(parseFns).reduce((keys, key) => {\n const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key);\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n\n return knownFormats[format] = {\n parser(dateStr, locale) {\n const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => {\n if (part.length > 0 && parts[index]) {\n const token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce((origDate, key) => {\n const newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter(date, locale) {\n let dateStr = partFormatters.reduce((str, fn, index) => {\n return str += `${separators[index]}${fn(date, locale)}`;\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n },\n };\n}\n\nexport function parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n const date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n\n if (format && format.toValue) {\n const date = format.toValue(dateStr, format, locale);\n return isNaN(date) ? undefined : stripTime(date);\n }\n\n return parseFormatString(format).parser(dateStr, locale);\n}\n\nexport function formatDate(date, format, locale) {\n if (isNaN(date) || (!date && date !== 0)) {\n return '';\n }\n\n const dateObj = typeof date === 'number' ? new Date(date) : date;\n\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n\n return parseFormatString(format).formatter(dateObj, locale);\n}\n","export function stripTime(timeValue) {\n return new Date(timeValue).setHours(0, 0, 0, 0);\n}\n\nexport function today() {\n return new Date().setHours(0, 0, 0, 0);\n}\n\n// Get the time value of the start of given date or year, month and day\nexport function dateValue(...args) {\n switch (args.length) {\n case 0:\n return today();\n case 1:\n return stripTime(args[0]);\n }\n\n // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n const newDate = new Date(0);\n newDate.setFullYear(...args);\n return newDate.setHours(0, 0, 0, 0);\n}\n\nexport function addDays(date, amount) {\n const newDate = new Date(date);\n return newDate.setDate(newDate.getDate() + amount);\n}\n\nexport function addWeeks(date, amount) {\n return addDays(date, amount * 7);\n}\n\nexport function addMonths(date, amount) {\n // If the day of the date is not in the new month, the last day of the new\n // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03)\n const newDate = new Date(date);\n const monthsToSet = newDate.getMonth() + amount;\n let expectedMonth = monthsToSet % 12;\n if (expectedMonth < 0) {\n expectedMonth += 12;\n }\n\n const time = newDate.setMonth(monthsToSet);\n return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n}\n\nexport function addYears(date, amount) {\n // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n // new year will be returned.\n const newDate = new Date(date);\n const expectedMonth = newDate.getMonth();\n const time = newDate.setFullYear(newDate.getFullYear() + amount);\n return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n}\n\n// Calculate the distance bettwen 2 days of the week\nfunction dayDiff(day, from) {\n return (day - from + 7) % 7;\n}\n\n// Get the date of the specified day of the week of given base date\nexport function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) {\n const baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nexport function getWeek(date) {\n // start of ISO week is Monday\n const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nexport function startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n const year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n","const listenerRegistry = new WeakMap();\nconst {addEventListener, removeEventListener} = EventTarget.prototype;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nexport function registerListeners(keyObj, listeners) {\n let registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach((listener) => {\n addEventListener.call(...listener);\n registered.push(listener);\n });\n}\n\nexport function unregisterListeners(keyObj) {\n let listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach((listener) => {\n removeEventListener.call(...listener);\n });\n listenerRegistry.delete(keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n const getComposedPath = (node, path = []) => {\n path.push(node);\n\n let parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) { // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) { // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\n\nfunction findFromPath(path, criteria, currentTarget, index = 0) {\n const el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nexport function findElementInEventPath(ev, selector) {\n const criteria = typeof selector === 'function' ? selector : el => el.matches(selector);\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n","export function hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nexport function pushUnique(arr, ...items) {\n items.forEach((item) => {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\n\nexport function stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\n\nexport function isInRange(testVal, min, max) {\n const minOK = min === undefined || testVal >= min;\n const maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\n\nexport function limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\n\nexport function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') {\n const openTagSrc = Object.keys(attributes).reduce((src, attr) => {\n let val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return `${src} ${attr}=\"${val}\"`;\n }, tagName);\n html += `<${openTagSrc}>`;\n\n const next = index + 1;\n return next < repeat\n ? createTagRepeat(tagName, repeat, attributes, next, html)\n : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nexport function optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Datepicker from 'flowbite-datepicker/Datepicker';\nimport DateRangePicker from 'flowbite-datepicker/DateRangePicker';\nimport Events from '../dom/events';\n\nconst getDatepickerOptions = (datepickerEl) => {\n const buttons = datepickerEl.hasAttribute('datepicker-buttons');\n const autohide = datepickerEl.hasAttribute('datepicker-autohide');\n const format = datepickerEl.hasAttribute('datepicker-format');\n const orientation = datepickerEl.hasAttribute('datepicker-orientation');\n const title = datepickerEl.hasAttribute('datepicker-title');\n\n const options = {};\n if (buttons) {\n options.todayBtn = true;\n options.clearBtn = true;\n }\n if (autohide) {\n options.autohide = true;\n }\n if (format) {\n options.format = datepickerEl.getAttribute('datepicker-format');\n }\n if (orientation) {\n options.orientation = datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n }\n if (title) {\n options.title = datepickerEl.getAttribute('datepicker-title');\n }\n\n return options;\n};\n\nexport function initDatepickers() {\n document.querySelectorAll('[datepicker]').forEach(function (datepickerEl) {\n new Datepicker(datepickerEl, getDatepickerOptions(datepickerEl));\n });\n\n document\n .querySelectorAll('[inline-datepicker]')\n .forEach(function (datepickerEl) {\n new Datepicker(datepickerEl, getDatepickerOptions(datepickerEl));\n });\n\n document\n .querySelectorAll('[date-rangepicker]')\n .forEach(function (datepickerEl) {\n new DateRangePicker(\n datepickerEl,\n getDatepickerOptions(datepickerEl)\n );\n });\n}\n\nconst events = new Events('DOMContentLoaded', [initDatepickers]);\nevents.init();\n"],"names":["Datepicker","DateRangePicker","Events","getDatepickerOptions","datepickerEl","buttons","hasAttribute","autohide","format","orientation","title","options","todayBtn","clearBtn","getAttribute","initDatepickers","document","querySelectorAll","forEach","events","init"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/datepicker.min.js b/node_modules/flowbite/dist/datepicker.min.js new file mode 100644 index 0000000..f0c9007 --- /dev/null +++ b/node_modules/flowbite/dist/datepicker.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Flowbite",[],t):"object"==typeof exports?exports.Flowbite=t():e.Flowbite=t()}(self,(function(){return function(){"use strict";var e={482:function(e,t,i){i.d(t,{Z:function(){return c}});var r=i(698),n=i(963),a=i(770);function s(e){const t=Object.assign({},e);return delete t.inputs,delete t.allowOneSidedRange,delete t.maxNumberOfDates,t}function o(e,t,i,n){(0,r.cF)(e,[[i,"changeDate",t]]),new a.Z(i,n,e)}function d(e,t){if(e._updating)return;e._updating=!0;const i=t.target;if(void 0===i.datepicker)return;const r=e.datepickers,n={render:!1},a=e.inputs.indexOf(i),s=0===a?1:0,o=r[a].dates[0],d=r[s].dates[0];void 0!==o&&void 0!==d?0===a&&o>d?(r[0].setDate(d,n),r[1].setDate(o,n)):1===a&&o0?d(this,{target:this.inputs[0]}):a[1].dates.length>0&&d(this,{target:this.inputs[1]})}get dates(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}setOptions(e){this.allowOneSidedRange=!!e.allowOneSidedRange;const t=s(e);this.datepickers[0].setOptions(t),this.datepickers[1].setOptions(t)}destroy(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),(0,r.uV)(this),delete this.element.rangepicker}getDates(e){const t=e?t=>(0,n.p6)(t,e,this.datepickers[0].config.locale):e=>new Date(e);return this.dates.map((e=>void 0===e?e:t(e)))}setDates(e,t){const[i,r]=this.datepickers,n=this.dates;this._updating=!0,i.setDate(e),r.setDate(t),delete this._updating,r.dates[0]!==n[1]?d(this,{target:this.inputs[1]}):i.dates[0]!==n[0]&&d(this,{target:this.inputs[0]})}}},770:function(e,t,i){i.d(t,{Z:function(){return ae}});var r=i(105),n=i(560),a=i(963),s=i(698);const o={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};var d={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0};const c=document.createRange();function l(e){return c.createContextualFragment(e)}function h(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function u(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function g(e){e.firstChild&&(e.removeChild(e.firstChild),g(e))}const{language:f,format:p,weekStart:m}=d;function b(e,t){return e.length<6&&t>=0&&t<7?(0,r.$C)(e,t):e}function y(e){return(e+6)%7}function w(e,t,i,r){const n=(0,a.sG)(e,t,i);return void 0!==n?n:r}function k(e,t,i=3){const r=parseInt(e,10);return r>=0&&r<=i?r:t}function v(e,t){const i=Object.assign({},e),s={},o=t.constructor.locales;let{format:c,language:h,locale:u,maxDate:g,maxView:v,minDate:x,pickLevel:D,startView:M,weekStart:S}=t.config||{};if(i.language){let e;if(i.language!==h&&(o[i.language]?e=i.language:(e=i.language.split("-")[0],void 0===o[e]&&(e=!1))),delete i.language,e){h=s.language=e;const t=u||o[f];u=Object.assign({format:p,weekStart:m},o[f]),h!==f&&Object.assign(u,o[h]),s.locale=u,c===t.format&&(c=s.format=u.format),S===t.weekStart&&(S=s.weekStart=u.weekStart,s.weekEnd=y(u.weekStart))}}if(i.format){const e="function"==typeof i.format.toDisplay,t="function"==typeof i.format.toValue,r=a.CL.test(i.format);(e&&t||r)&&(c=s.format=i.format),delete i.format}let O=x,C=g;if(void 0!==i.minDate&&(O=null===i.minDate?(0,n.by)(0,0,1):w(i.minDate,c,u,O),delete i.minDate),void 0!==i.maxDate&&(C=null===i.maxDate?void 0:w(i.maxDate,c,u,C),delete i.maxDate),C{const i=(0,a.sG)(t,c,u);return void 0!==i?(0,r.$C)(e,i):e}),[]),delete i.datesDisabled),void 0!==i.defaultViewDate){const e=(0,a.sG)(i.defaultViewDate,c,u);void 0!==e&&(s.defaultViewDate=e),delete i.defaultViewDate}if(void 0!==i.weekStart){const e=Number(i.weekStart)%7;isNaN(e)||(S=s.weekStart=e,s.weekEnd=y(e)),delete i.weekStart}if(i.daysOfWeekDisabled&&(s.daysOfWeekDisabled=i.daysOfWeekDisabled.reduce(b,[]),delete i.daysOfWeekDisabled),i.daysOfWeekHighlighted&&(s.daysOfWeekHighlighted=i.daysOfWeekHighlighted.reduce(b,[]),delete i.daysOfWeekHighlighted),void 0!==i.maxNumberOfDates){const e=parseInt(i.maxNumberOfDates,10);e>=0&&(s.maxNumberOfDates=e,s.multidate=1!==e),delete i.maxNumberOfDates}i.dateDelimiter&&(s.dateDelimiter=String(i.dateDelimiter),delete i.dateDelimiter);let E=D;void 0!==i.pickLevel&&(E=k(i.pickLevel,2),delete i.pickLevel),E!==D&&(D=s.pickLevel=E);let F=v;void 0!==i.maxView&&(F=k(i.maxView,v),delete i.maxView),F=D>F?D:F,F!==v&&(v=s.maxView=F);let L=M;if(void 0!==i.startView&&(L=k(i.startView,L),delete i.startView),Lv&&(L=v),L!==M&&(s.startView=L),i.prevArrow){const e=l(i.prevArrow);e.childNodes.length>0&&(s.prevArrow=e.childNodes),delete i.prevArrow}if(i.nextArrow){const e=l(i.nextArrow);e.childNodes.length>0&&(s.nextArrow=e.childNodes),delete i.nextArrow}if(void 0!==i.disableTouchKeyboard&&(s.disableTouchKeyboard="ontouchstart"in document&&!!i.disableTouchKeyboard,delete i.disableTouchKeyboard),i.orientation){const e=i.orientation.toLowerCase().split(/\s+/g);s.orientation={x:e.find((e=>"left"===e||"right"===e))||"auto",y:e.find((e=>"top"===e||"bottom"===e))||"auto"},delete i.orientation}if(void 0!==i.todayBtnMode){switch(i.todayBtnMode){case 0:case 1:s.todayBtnMode=i.todayBtnMode}delete i.todayBtnMode}return Object.keys(i).forEach((e=>{void 0!==i[e]&&(0,r.l$)(d,e)&&(s[e]=i[e])})),s}var x=(0,r.zh)('');var D=(0,r.zh)(`
\n
${(0,r.em)("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
${(0,r.em)("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}
\n
`);var M=(0,r.zh)(`
\n
\n
${(0,r.em)("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
`);class S{constructor(e,t){Object.assign(this,t,{picker:e,element:l('
').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}performBeforeHook(e,t,i){let n=this.beforeShow(new Date(i));switch(typeof n){case"boolean":n={enabled:n};break;case"string":n={classes:n}}if(n){if(!1===n.enabled&&(e.classList.add("disabled"),(0,r.$C)(this.disabled,t)),n.classes){const i=n.classes.split(/\s+/);e.classList.add(...i),i.includes("disabled")&&(0,r.$C)(this.disabled,t)}n.content&&function(e,t){g(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(l(t)):"function"==typeof t.forEach&&t.forEach((t=>{e.appendChild(t)}))}(e,n.content)}}}class O extends S{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=l(D).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(e){let t;if((0,r.l$)(e,"minDate")&&(this.minDate=e.minDate),(0,r.l$)(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){const i=this.locale=e.locale;this.dayNames=i.daysMin,this.switchLabelFormat=i.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"==typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){const e=l(M).firstChild;this.calendarWeeks={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(u(this.dow),this.calendarWeeks&&u(this.calendarWeeks.dow)):(h(this.dow),this.calendarWeeks&&h(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach(((e,t)=>{const i=(this.weekStart+t)%7;e.textContent=this.dayNames[i],e.className=this.daysOfWeekDisabled.includes(i)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}))}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),i=e.getMonth(),r=(0,n.by)(t,i,1),a=(0,n.fr)(r,this.weekStart,this.weekStart);this.first=r,this.last=(0,n.by)(t,i+1,0),this.start=a,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){this.today=this.todayHighlight?(0,n.Lg)():void 0,this.disabled=[...this.datesDisabled];const e=(0,a.p6)(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const e=(0,n.fr)(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach(((t,i)=>{t.textContent=(0,n.Qk)((0,n.jh)(e,i))}))}Array.from(this.grid.children).forEach(((e,t)=>{const i=e.classList,a=(0,n.E4)(this.start,t),s=new Date(a),o=s.getDay();if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,e.dataset.date=a,e.textContent=s.getDate(),athis.last&&i.add("next","text-gray-500","dark:text-white"),this.today===a&&i.add("today","bg-gray-100","dark:bg-gray-600"),(athis.maxDate||this.disabled.includes(a))&&i.add("disabled","cursor-not-allowed"),this.daysOfWeekDisabled.includes(o)&&(i.add("disabled","cursor-not-allowed"),(0,r.$C)(this.disabled,a)),this.daysOfWeekHighlighted.includes(o)&&i.add("highlighted"),this.range){const[e,t]=this.range;a>e&&a{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","text-white","dark:bg-blue-600","dark:text-white","focused"),e.classList.add("text-gray-900","rounded-lg","dark:text-white")})),Array.from(this.grid.children).forEach((i=>{const r=Number(i.dataset.date),n=i.classList;n.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),r>e&&r{e.classList.remove("focused")})),this.grid.children[e].classList.add("focused")}}function C(e,t){if(!e||!e[0]||!e[1])return;const[[i,r],[n,a]]=e;return i>t||ne})))),super.init(e)}setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),(0,r.l$)(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if((0,r.l$)(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const t=new Date(e.maxDate);this.maxYear=t.getFullYear(),this.maxMonth=t.getMonth(),this.maxDate=(0,n.by)(this.maxYear,this.maxMonth+1,0)}void 0!==e.beforeShowMonth&&(this.beforeShow="function"==typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce(((e,t)=>{const i=new Date(t),n=i.getFullYear(),a=i.getMonth();return void 0===e[n]?e[n]=[a]:(0,r.$C)(e[n],a),e}),{}),t&&t.dates&&(this.range=t.dates.map((e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.yearthis.maxYear,i=this.year===this.minYear,r=this.year===this.maxYear,a=C(this.range,this.year);Array.from(this.grid.children).forEach(((s,o)=>{const d=s.classList,c=(0,n.by)(this.year,o,1);if(s.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(s.dataset.date=c),s.textContent=this.monthNames[o],(t||i&&othis.maxMonth)&&d.add("disabled"),a){const[e,t]=a;o>e&&o{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","dark:bg-blue-600","dark:text-white","text-white","focused"),e.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")})),Array.from(this.grid.children).forEach(((r,n)=>{const a=r.classList;n>t&&n{e.classList.remove("focused")})),this.grid.children[this.focused].classList.add("focused")}}class F extends S{constructor(e,t){super(e,t)}init(e,t=!0){var i;t&&(this.navStep=10*this.step,this.beforeShowOption=`beforeShow${i=this.cellClass,[...i].reduce(((e,t,i)=>e+(i?t:t.toUpperCase())),"")}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(l((0,r.em)("span",12)))),super.init(e)}setOptions(e){if((0,r.l$)(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=(0,n.ak)(e.minDate,this.step),this.minDate=(0,n.by)(this.minYear,0,1))),(0,r.l$)(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=(0,n.ak)(e.maxDate,this.step),this.maxDate=(0,n.by)(this.maxYear,11,31))),void 0!==e[this.beforeShowOption]){const t=e[this.beforeShowOption];this.beforeShow="function"==typeof t?t:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=(0,n.ak)(e,this.navStep),i=t+9*this.step;this.first=t,this.last=i,this.start=t-this.step,this.focused=(0,n.ak)(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce(((e,t)=>(0,r.$C)(e,(0,n.ak)(t,this.step))),[]),t&&t.dates&&(this.range=t.dates.map((e=>{if(void 0!==e)return(0,n.ak)(e,this.step)})))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach(((e,t)=>{const i=e.classList,r=this.start+t*this.step,a=(0,n.by)(r,0,1);if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(e.dataset.date=a),e.textContent=e.dataset.year=r,0===t?i.add("prev"):11===t&&i.add("next"),(rthis.maxYear)&&i.add("disabled"),this.range){const[e,t]=this.range;r>e&&r{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","text-white","dark:bg-blue-600","dark:text-white","focused")})),Array.from(this.grid.children).forEach((i=>{const r=Number(i.textContent),n=i.classList;r>e&&r{e.classList.remove("focused")})),this.grid.children[e].classList.add("focused")}}function L(e,t){const i={date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e};e.element.dispatchEvent(new CustomEvent(t,{detail:i}))}function V(e,t){const{minDate:i,maxDate:a}=e.config,{currentView:s,viewDate:o}=e.picker;let d;switch(s.id){case 0:d=(0,n.zI)(o,t);break;case 1:d=(0,n.Bc)(o,t);break;default:d=(0,n.Bc)(o,t*s.navStep)}d=(0,r.jG)(d,i,a),e.picker.changeFocus(d).render()}function B(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function A(e){e.config.updateOnBlur?e.update({autohide:!0}):(e.refresh("input"),e.hide())}function N(e,t){const i=e.picker,r=new Date(i.viewDate),a=i.currentView.id,s=1===a?(0,n.zI)(r,t-r.getMonth()):(0,n.Bc)(r,t-r.getFullYear());i.changeFocus(s).changeView(a-1).render()}function W(e){const t=e.picker,i=(0,n.Lg)();if(1===e.config.todayBtnMode){if(e.config.autohide)return void e.setDate(i);e.setDate(i,{render:!1}),t.update()}t.viewDate!==i&&t.changeFocus(i),t.changeView(0).render()}function Y(e){e.setDate({clear:!0})}function $(e){B(e)}function j(e){V(e,-1)}function _(e){V(e,1)}function H(e,t){const i=(0,s.He)(t,".datepicker-cell");if(!i||i.classList.contains("disabled"))return;const{id:r,isMinView:n}=e.picker.currentView;n?e.setDate(Number(i.dataset.date)):N(e,Number(1===r?i.dataset.month:i.dataset.year))}function T(e){e.inline||e.config.disableTouchKeyboard||e.inputField.focus()}function K(e,t){if(void 0!==t.title&&(t.title?(e.controls.title.textContent=t.title,u(e.controls.title)):(e.controls.title.textContent="",h(e.controls.title))),t.prevArrow){const i=e.controls.prevBtn;g(i),t.prevArrow.forEach((e=>{i.appendChild(e.cloneNode(!0))}))}if(t.nextArrow){const i=e.controls.nextBtn;g(i),t.nextArrow.forEach((e=>{i.appendChild(e.cloneNode(!0))}))}if(t.locale&&(e.controls.todayBtn.textContent=t.locale.today,e.controls.clearBtn.textContent=t.locale.clear),void 0!==t.todayBtn&&(t.todayBtn?u(e.controls.todayBtn):h(e.controls.todayBtn)),(0,r.l$)(t,"minDate")||(0,r.l$)(t,"maxDate")){const{minDate:t,maxDate:i}=e.datepicker.config;e.controls.todayBtn.disabled=!(0,r.mh)((0,n.Lg)(),t,i)}void 0!==t.clearBtn&&(t.clearBtn?u(e.controls.clearBtn):h(e.controls.clearBtn))}function I(e){const{dates:t,config:i}=e,n=t.length>0?(0,r.Jm)(t):i.defaultViewDate;return(0,r.jG)(n,i.minDate,i.maxDate)}function P(e,t){const i=new Date(e.viewDate),r=new Date(t),{id:n,year:a,first:s,last:o}=e.currentView,d=r.getFullYear();switch(e.viewDate=t,d!==i.getFullYear()&&L(e.datepicker,"changeYear"),r.getMonth()!==i.getMonth()&&L(e.datepicker,"changeMonth"),n){case 0:return to;case 1:return d!==a;default:return do}}function R(e){return window.getComputedStyle(e).direction}class z{constructor(e){this.datepicker=e;const t=x.replace(/%buttonClass%/g,e.config.buttonClass),i=this.element=l(t).firstChild,[r,n,a]=i.firstChild.children,o=r.firstElementChild,[d,c,h]=r.lastElementChild.children,[u,g]=a.firstChild.children,f={title:o,prevBtn:d,viewSwitch:c,nextBtn:h,todayBtn:u,clearBtn:g};this.main=n,this.controls=f;const p=e.inline?"inline":"dropdown";i.classList.add(`datepicker-${p}`),"dropdown"===p&&i.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),K(this,e.config),this.viewDate=I(e),(0,s.cF)(e,[[i,"click",T.bind(null,e),{capture:!0}],[n,"click",H.bind(null,e)],[f.viewSwitch,"click",$.bind(null,e)],[f.prevBtn,"click",j.bind(null,e)],[f.nextBtn,"click",_.bind(null,e)],[f.todayBtn,"click",W.bind(null,e)],[f.clearBtn,"click",Y.bind(null,e)]]),this.views=[new O(this),new E(this),new F(this,{id:2,name:"years",cellClass:"year",step:1}),new F(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}setOptions(e){K(this,e),this.views.forEach((t=>{t.init(e,!1)})),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;const e=this.datepicker;if(!e.inline){const t=R(e.inputField);t!==R(e.config.container)?this.element.dir=t:this.element.dir&&this.element.removeAttribute("dir"),this.place(),e.config.disableTouchKeyboard&&e.inputField.blur()}L(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,L(this.datepicker,"hide"))}place(){const{classList:e,style:t}=this.element,{config:i,inputField:r}=this.datepicker,n=i.container,{width:a,height:s}=this.element.getBoundingClientRect(),{left:o,top:d,width:c}=n.getBoundingClientRect(),{left:l,top:h,width:u,height:g}=r.getBoundingClientRect();let f,p,m,{x:b,y:y}=i.orientation;n===document.body?(f=window.scrollY,p=l+window.scrollX,m=h+f):(f=n.scrollTop,p=l-o,m=h-d+f),"auto"===b&&(p<0?(b="left",p=10):b=p+a>c||"rtl"===R(r)?"right":"left"),"right"===b&&(p-=a-u),"auto"===y&&(y=m-s{e.updateFocus()})),this}update(){const e=I(this.datepicker);return this._renderMethod=P(this,e)?"render":"refresh",this.views.forEach((e=>{e.updateFocus(),e.updateSelection()})),this}render(e=!0){const t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}function q(e,t,i,n,a,s){if((0,r.mh)(e,a,s)){if(n(e)){return q(t(e,i),t,i,n,a,s)}return e}}function J(e,t,i,r){const a=e.picker,s=a.currentView,o=s.step||1;let d,c,l=a.viewDate;switch(s.id){case 0:l=r?(0,n.E4)(l,7*i):t.ctrlKey||t.metaKey?(0,n.Bc)(l,i):(0,n.E4)(l,i),d=n.E4,c=e=>s.disabled.includes(e);break;case 1:l=(0,n.zI)(l,r?4*i:i),d=n.zI,c=e=>{const t=new Date(e),{year:i,disabled:r}=s;return t.getFullYear()===i&&r.includes(t.getMonth())};break;default:l=(0,n.Bc)(l,i*(r?4:1)*o),d=n.Bc,c=e=>s.disabled.includes((0,n.ak)(e,o))}l=q(l,d,i<0?-o:o,c,s.minDate,s.maxDate),void 0!==l&&a.changeFocus(l).render()}function G(e,t){if("Tab"===t.key)return void A(e);const i=e.picker,{id:r,isMinView:n}=i.currentView;if(i.active)if(e.editMode)switch(t.key){case"Escape":i.hide();break;case"Enter":e.exitEditMode({update:!0,autohide:e.config.autohide});break;default:return}else switch(t.key){case"Escape":i.hide();break;case"ArrowLeft":if(t.ctrlKey||t.metaKey)V(e,-1);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,-1,!1)}break;case"ArrowRight":if(t.ctrlKey||t.metaKey)V(e,1);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,1,!1)}break;case"ArrowUp":if(t.ctrlKey||t.metaKey)B(e);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,-1,!0)}break;case"ArrowDown":if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();J(e,t,1,!0);break;case"Enter":n?e.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void e.enterEditMode();default:return void(1!==t.key.length||t.ctrlKey||t.metaKey||e.enterEditMode())}else switch(t.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":e.update();break;default:return}t.preventDefault(),t.stopPropagation()}function Z(e){e.config.showOnFocus&&!e._showing&&e.show()}function U(e,t){const i=t.target;(e.picker.active||e.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout((()=>{delete i._active,delete i._clicking}),2e3))}function Q(e,t){const i=t.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&e.enterEditMode(),delete i._active,e.config.showOnClick&&e.show())}function X(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function ee(e,t){const i=e.element;if(i!==document.activeElement)return;const r=e.picker.element;(0,s.He)(t,(e=>e===i||e===r))||A(e)}function te(e,t){return e.map((e=>(0,a.p6)(e,t.format,t.locale))).join(t.dateDelimiter)}function ie(e,t,i=!1){const{config:n,dates:s,rangepicker:o}=e;if(0===t.length)return i?[]:void 0;const d=o&&e===o.datepickers[1];let c=t.reduce(((e,t)=>{let i=(0,a.sG)(t,n.format,n.locale);if(void 0===i)return e;if(n.pickLevel>0){const e=new Date(i);i=1===n.pickLevel?d?e.setMonth(e.getMonth()+1,0):e.setDate(1):d?e.setFullYear(e.getFullYear()+1,0,0):e.setMonth(0,1)}return!(0,r.mh)(i,n.minDate,n.maxDate)||e.includes(i)||n.datesDisabled.includes(i)||n.daysOfWeekDisabled.includes(new Date(i).getDay())||e.push(i),e}),[]);return 0!==c.length?(n.multidate&&!i&&(c=c.reduce(((e,t)=>(s.includes(t)||e.push(t),e)),s.filter((e=>!c.includes(e))))),n.maxNumberOfDates&&c.length>n.maxNumberOfDates?c.slice(-1*n.maxNumberOfDates):c):void 0}function re(e,t=3,i=!0){const{config:r,picker:n,inputField:a}=e;if(2&t){const e=n.active?r.pickLevel:r.startView;n.update().changeView(e).render(i)}1&t&&a&&(a.value=te(e.dates,r))}function ne(e,t,i){let{clear:r,render:n,autohide:a}=i;void 0===n&&(n=!0),n?void 0===a&&(a=e.config.autohide):a=!1;const s=ie(e,t,r);s&&(s.toString()!==e.dates.toString()?(e.dates=s,re(e,n?3:1),L(e,"changeDate")):re(e,1),a&&e.hide())}class ae{constructor(e,t={},i){e.datepicker=this,this.element=e;const a=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:document.body,defaultViewDate:(0,n.Lg)(),maxDate:void 0,minDate:void 0},v(d,this));this._options=t,Object.assign(a,v(t,this));const o=this.inline="INPUT"!==e.tagName;let c,l;if(o)a.container=e,l=(0,r.W7)(e.dataset.date,a.dateDelimiter),delete e.dataset.date;else{const i=t.container?document.querySelector(t.container):null;i&&(a.container=i),c=this.inputField=e,c.classList.add("datepicker-input"),l=(0,r.W7)(c.value,a.dateDelimiter)}if(i){const e=i.inputs.indexOf(c),t=i.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,Object.defineProperty(this,"rangepicker",{get(){return i}})}this.dates=[];const h=ie(this,l);h&&h.length>0&&(this.dates=h),c&&(c.value=te(this.dates,a));const u=this.picker=new z(this);if(o)this.show();else{const e=ee.bind(null,this),t=[[c,"keydown",G.bind(null,this)],[c,"focus",Z.bind(null,this)],[c,"mousedown",U.bind(null,this)],[c,"click",Q.bind(null,this)],[c,"paste",X.bind(null,this)],[document,"mousedown",e],[document,"touchstart",e],[window,"resize",u.place.bind(u)]];(0,s.cF)(this,t)}}static formatDate(e,t,i){return(0,a.p6)(e,t,i&&o[i]||o.en)}static parseDate(e,t,i){return(0,a.sG)(e,t,i&&o[i]||o.en)}static get locales(){return o}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=this.picker,i=v(e,this);Object.assign(this._options,e),Object.assign(this.config,i),t.setOptions(i),re(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),(0,s.uV)(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(e){const t=e?t=>(0,a.p6)(t,e,this.config.locale):e=>new Date(e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const t=[...e],i={},n=(0,r.Jm)(e);"object"!=typeof n||Array.isArray(n)||n instanceof Date||!n||Object.assign(i,t.pop());ne(this,Array.isArray(t[0])?t[0]:t,i)}update(e){if(this.inline)return;const t={clear:!0,autohide:!(!e||!e.autohide)};ne(this,(0,r.W7)(this.inputField.value,this.config.dateDelimiter),t)}refresh(e,t=!1){let i;e&&"string"!=typeof e&&(t=e,e=void 0),i="picker"===e?2:"input"===e?1:3,re(this,i,!t)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700"))}exitEditMode(e){if(this.inline||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700"),t.update&&this.update(t)}}},963:function(e,t,i){i.d(t,{CL:function(){return a},p6:function(){return f},sG:function(){return g}});var r=i(560),n=i(105);const a=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,s=/[\s!-/:-@[-`{-~年月日]+/;let o={};const d={y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m(e,t,i){const r=new Date(e);let n=parseInt(t,10)-1;if(isNaN(n)){if(!t)return NaN;const e=t.toLowerCase(),r=t=>t.toLowerCase().startsWith(e);if(n=i.monthsShort.findIndex(r),n<0&&(n=i.months.findIndex(r)),n<0)return NaN}return r.setMonth(n),r.getMonth()!==l(n)?r.setDate(0):r.getTime()},d(e,t){return new Date(e).setDate(parseInt(t,10))}},c={d(e){return e.getDate()},dd(e){return h(e.getDate(),2)},D(e,t){return t.daysShort[e.getDay()]},DD(e,t){return t.days[e.getDay()]},m(e){return e.getMonth()+1},mm(e){return h(e.getMonth()+1,2)},M(e,t){return t.monthsShort[e.getMonth()]},MM(e,t){return t.months[e.getMonth()]},y(e){return e.getFullYear()},yy(e){return h(e.getFullYear(),2).slice(-2)},yyyy(e){return h(e.getFullYear(),4)}};function l(e){return e>-1?e%12:l(e+12)}function h(e,t){return e.toString().padStart(t,"0")}function u(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in o)return o[e];const t=e.split(a),i=e.match(new RegExp(a,"g"));if(0===t.length||!i)throw new Error("Invalid date format.");const l=i.map((e=>c[e])),h=Object.keys(d).reduce(((e,t)=>(i.find((e=>"D"!==e[0]&&e[0].toLowerCase()===t))&&e.push(t),e)),[]);return o[e]={parser(e,t){const n=e.split(s).reduce(((e,t,r)=>{if(t.length>0&&i[r]){const n=i[r][0];"M"===n?e.m=t:"D"!==n&&(e[n]=t)}return e}),{});return h.reduce(((e,i)=>{const r=d[i](e,n[i],t);return isNaN(r)?e:r}),(0,r.Lg)())},formatter(e,i){return l.reduce(((r,n,a)=>r+`${t[a]}${n(e,i)}`),"")+(0,n.Jm)(t)}}}function g(e,t,i){if(e instanceof Date||"number"==typeof e){const t=(0,r.xR)(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return(0,r.Lg)();if(t&&t.toValue){const n=t.toValue(e,t,i);return isNaN(n)?void 0:(0,r.xR)(n)}return u(t).parser(e,i)}}function f(e,t,i){if(isNaN(e)||!e&&0!==e)return"";const r="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,i):u(t).formatter(r,i)}},560:function(e,t,i){function r(e){return new Date(e).setHours(0,0,0,0)}function n(){return(new Date).setHours(0,0,0,0)}function a(...e){switch(e.length){case 0:return n();case 1:return r(e[0])}const t=new Date(0);return t.setFullYear(...e),t.setHours(0,0,0,0)}function s(e,t){const i=new Date(e);return i.setDate(i.getDate()+t)}function o(e,t){return s(e,7*t)}function d(e,t){const i=new Date(e),r=i.getMonth()+t;let n=r%12;n<0&&(n+=12);const a=i.setMonth(r);return i.getMonth()!==n?i.setDate(0):a}function c(e,t){const i=new Date(e),r=i.getMonth(),n=i.setFullYear(i.getFullYear()+t);return 1===r&&2===i.getMonth()?i.setDate(0):n}function l(e,t){return(e-t+7)%7}function h(e,t,i=0){const r=new Date(e).getDay();return s(e,l(t,i)-l(r,i))}function u(e){const t=h(e,4,1),i=h(new Date(t).setMonth(0,4),4,1);return Math.round((t-i)/6048e5)+1}function g(e,t){const i=new Date(e).getFullYear();return Math.floor(i/t)*t}i.d(t,{Bc:function(){return c},E4:function(){return s},Lg:function(){return n},Qk:function(){return u},ak:function(){return g},by:function(){return a},fr:function(){return h},jh:function(){return o},xR:function(){return r},zI:function(){return d}})},698:function(e,t,i){i.d(t,{He:function(){return c},cF:function(){return s},uV:function(){return o}});const r=new WeakMap,{addEventListener:n,removeEventListener:a}=EventTarget.prototype;function s(e,t){let i=r.get(e);i||(i=[],r.set(e,i)),t.forEach((e=>{n.call(...e),i.push(e)}))}function o(e){let t=r.get(e);t&&(t.forEach((e=>{a.call(...e)})),r.delete(e))}if(!Event.prototype.composedPath){const e=(t,i=[])=>{let r;return i.push(t),t.parentNode?r=t.parentNode:t.host?r=t.host:t.defaultView&&(r=t.defaultView),r?e(r,i):i};Event.prototype.composedPath=function(){return e(this.target)}}function d(e,t,i,r=0){const n=e[r];return t(n)?n:n!==i&&n.parentElement?d(e,t,i,r+1):void 0}function c(e,t){const i="function"==typeof t?t:e=>e.matches(t);return d(e.composedPath(),i,e.currentTarget)}},105:function(e,t,i){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n(e){return e[e.length-1]}function a(e,...t){return t.forEach((t=>{e.includes(t)||e.push(t)})),e}function s(e,t){return e?e.split(t):[]}function o(e,t,i){return(void 0===t||e>=t)&&(void 0===i||e<=i)}function d(e,t,i){return ei?i:e}function c(e,t,i={},r=0,n=""){n+=`<${Object.keys(i).reduce(((e,t)=>{let n=i[t];return"function"==typeof n&&(n=n(r)),`${e} ${t}="${n}"`}),e)}>`;const a=r+1;return a\s+/g,">").replace(/\s+ the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +class DateRangePicker { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + constructor(element, options = {}) { + const inputs = Array.isArray(options.inputs) + ? options.inputs + : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const changeDateListener = onChangeDate.bind(null, this); + const cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + const datepickers = []; + Object.defineProperty(this, 'datepickers', { + get() { + return datepickers; + }, + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, {target: this.inputs[0]}); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, {target: this.inputs[1]}); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + get dates() { + return this.datepickers.length === 2 + ? [ + this.datepickers[0].dates[0], + this.datepickers[1].dates[0], + ] + : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + (0,_lib_event_js__WEBPACK_IMPORTED_MODULE_0__/* .unregisterListeners */ .uV)(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + getDates(format = undefined) { + const callback = format + ? date => (0,_lib_date_format_js__WEBPACK_IMPORTED_MODULE_1__/* .formatDate */ .p6)(date, format, this.datepickers[0].config.locale) + : date => new Date(date); + + return this.dates.map(date => date === undefined ? date : callback(date)); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + setDates(rangeStart, rangeEnd) { + const [datepicker0, datepicker1] = this.datepickers; + const origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, {target: this.inputs[1]}); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, {target: this.inputs[0]}); + } + } +} + + +/***/ }), + +/***/ 770: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ Datepicker; } +}); + +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/utils.js +var utils = __webpack_require__(105); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/date.js +var lib_date = __webpack_require__(560); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/date-format.js +var date_format = __webpack_require__(963); +// EXTERNAL MODULE: ./node_modules/flowbite-datepicker/js/lib/event.js +var lib_event = __webpack_require__(698); +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/i18n/base-locales.js +// default locales +const locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/options/defaultOptions.js +// config options updatable by setOptions() and their default values +const defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0, +}; + +/* harmony default export */ var options_defaultOptions = (defaultOptions); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/lib/dom.js +const range = document.createRange(); + +function parseHTML(html) { + return range.createContextualFragment(html); +} + +// equivalent to jQuery's :visble +function isVisible(el) { + return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); +} + +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} + +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} + +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} + +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach((node) => { + el.appendChild(node); + }); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/options/processOptions.js + + + + + + +const { + language: defaultLang, + format: defaultFormat, + weekStart: defaultWeekStart, +} = options_defaultOptions; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 + ? (0,utils/* pushUnique */.$C)(dow, day) + : dow; +} + +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + const date = (0,date_format/* parseDate */.sG)(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue, max = 3) { + const viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + const inOpts = Object.assign({}, options); + const config = {}; + const locales = datepicker.constructor.locales; + let { + format, + language, + locale, + maxDate, + maxView, + minDate, + pickLevel, + startView, + weekStart, + } = datepicker.config || {}; + + if (inOpts.language) { + let lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + const origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + + if (inOpts.format) { + const hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + const hasToValue = typeof inOpts.format.toValue === 'function'; + const validFormatString = date_format/* reFormatTokens.test */.CL.test(inOpts.format); + if ((hasToDisplay && hasToValue) || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + let minDt = minDate; + let maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null + ? (0,lib_date/* dateValue */.by)(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null + ? undefined + : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => { + const date = (0,date_format/* parseDate */.sG)(dt, format, locale); + return date !== undefined ? (0,utils/* pushUnique */.$C)(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + const viewDate = (0,date_format/* parseDate */.sG)(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + const wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + let newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + + let newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + + let newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + const prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + const nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + const orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto', + y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto', + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch(inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach((key) => { + if (inOpts[key] !== undefined && (0,utils/* hasProperty */.l$)(options_defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + + return config; +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/pickerTemplate.js + + +const pickerTemplate = (0,utils/* optimizeTemplateHTML */.zh)(``); + +/* harmony default export */ var templates_pickerTemplate = (pickerTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/daysTemplate.js + + +const daysTemplate = (0,utils/* optimizeTemplateHTML */.zh)(`
+
${(0,utils/* createTagRepeat */.em)('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
${(0,utils/* createTagRepeat */.em)('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
+
`); + +/* harmony default export */ var templates_daysTemplate = (daysTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/templates/calendarWeeksTemplate.js + + +const calendarWeeksTemplate = (0,utils/* optimizeTemplateHTML */.zh)(`
+
+
${(0,utils/* createTagRepeat */.em)('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
`); + +/* harmony default export */ var templates_calendarWeeksTemplate = (calendarWeeksTemplate); + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/View.js + + + +// Base class of the view classes +class View { + constructor(picker, config) { + Object.assign(this, config, { + picker, + element: parseHTML(`
`).firstChild, + selected: [], + }); + this.init(this.picker.datepicker.config); + } + + init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + performBeforeHook(el, current, timeValue) { + let result = this.beforeShow(new Date(timeValue)); + switch (typeof result) { + case 'boolean': + result = {enabled: result}; + break; + case 'string': + result = {classes: result}; + } + + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + if (result.classes) { + const extraClasses = result.classes.split(/\s+/); + el.classList.add(...extraClasses); + if (extraClasses.includes('disabled')) { + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/DaysView.js + + + + + + + + +class DaysView extends View { + constructor(picker) { + super(picker, { + id: 0, + name: 'days', + cellClass: 'day', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + const inner = parseHTML(templates_daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + super.init(options); + } + + setOptions(options) { + let updateDOW; + + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + this.minDate = options.minDate; + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + const locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' + ? options.beforeShowDay + : undefined; + } + + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + const weeksElem = parseHTML(templates_calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild, + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach((el, index) => { + const dow = (this.weekStart + index) % 7; + el.textContent = this.dayNames[dow]; + el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const viewYear = viewDate.getFullYear(); + const viewMonth = viewDate.getMonth(); + const firstOfMonth = (0,lib_date/* dateValue */.by)(viewYear, viewMonth, 1); + const start = (0,lib_date/* dayOfTheWeekOf */.fr)(firstOfMonth, this.weekStart, this.weekStart); + + this.first = firstOfMonth; + this.last = (0,lib_date/* dateValue */.by)(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + render() { + // update today marker on ever render + this.today = this.todayHighlight ? (0,lib_date/* today */.Lg)() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = [...this.datesDisabled]; + + const switchLabel = (0,date_format/* formatDate */.p6)(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + const startOfWeek = (0,lib_date/* dayOfTheWeekOf */.fr)(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => { + el.textContent = (0,lib_date/* getWeek */.Qk)((0,lib_date/* addWeeks */.jh)(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = (0,lib_date/* addDays */.E4)(this.start, index); + const date = new Date(current); + const day = date.getDay(); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + el.dataset.date = current; + el.textContent = date.getDate(); + + if (current < this.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > this.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (this.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed'); + } + if (this.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed'); + (0,utils/* pushUnique */.$C)(this.disabled, current); + } + if (this.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg') + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.dataset.date); + const classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg') + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/MonthsView.js + + + + + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + + const [[startY, startM], [endY, endM]] = range; + if (startY > thisYear || endY < thisYear) { + return; + } + return [ + startY === thisYear ? startM : -1, + endY === thisYear ? endM : 12, + ]; +} + +class MonthsView extends View { + constructor(picker) { + super(picker, { + id: 1, + name: 'months', + cellClass: 'month', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML((0,utils/* createTagRepeat */.em)('span', 12, {'data-month': ix => ix}))); + } + super.init(options); + } + + setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + const minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + const maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = (0,lib_date/* dateValue */.by)(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' + ? options.beforeShowMonth + : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((selected, timeValue) => { + const date = new Date(timeValue); + const year = date.getFullYear(); + const month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + (0,utils/* pushUnique */.$C)(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + const date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + + const selected = this.selected[this.year] || []; + const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + const isMinYear = this.year === this.minYear; + const isMaxYear = this.year === this.maxYear; + const range = computeMonthRange(this.range, this.year); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const date = (0,lib_date/* dateValue */.by)(this.year, index, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = this.monthNames[index]; + + if ( + yrOutOfRange + || isMinYear && index < this.minMonth + || isMaxYear && index > this.maxMonth + ) { + classList.add('disabled'); + } + if (range) { + const [rangeStart, rangeEnd] = range; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const selected = this.selected[this.year] || []; + const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'dark:bg-blue-600', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } +} +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/views/YearsView.js + + + + + +function toTitleCase(word) { + return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), ''); +} + +// Class representing the years and decades view elements +class YearsView extends View { + constructor(picker, config) { + super(picker, config); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`; + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML((0,utils/* createTagRepeat */.em)('span', 12))); + } + super.init(options); + } + + setOptions(options) { + if ((0,utils/* hasProperty */.l$)(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = (0,lib_date/* startOfYearPeriod */.ak)(options.minDate, this.step); + this.minDate = (0,lib_date/* dateValue */.by)(this.minYear, 0, 1); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = (0,lib_date/* startOfYearPeriod */.ak)(options.maxDate, this.step); + this.maxDate = (0,lib_date/* dateValue */.by)(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + const beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const first = (0,lib_date/* startOfYearPeriod */.ak)(viewDate, this.navStep); + const last = first + 9 * this.step; + + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = (0,lib_date/* startOfYearPeriod */.ak)(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((years, timeValue) => { + return (0,utils/* pushUnique */.$C)(years, (0,lib_date/* startOfYearPeriod */.ak)(timeValue, this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + if (timeValue !== undefined) { + return (0,lib_date/* startOfYearPeriod */.ak)(timeValue, this.step); + } + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(`${this.first}-${this.last}`); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = this.start + (index * this.step); + const date = (0,lib_date/* dateValue */.by)(current, 0, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < this.minYear || current > this.maxYear) { + classList.add('disabled'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.textContent); + const classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/functions.js + + + +function triggerDatepickerEvent(datepicker, type) { + const detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker, + }; + datepicker.element.dispatchEvent(new CustomEvent(type, {detail})); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + const {minDate, maxDate} = datepicker.config; + const {currentView, viewDate} = datepicker.picker; + let newViewDate; + switch (currentView.id) { + case 0: + newViewDate = (0,lib_date/* addMonths */.zI)(viewDate, direction); + break; + case 1: + newViewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction); + break; + default: + newViewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction * currentView.navStep); + } + newViewDate = (0,utils/* limitToRange */.jG)(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} + +function switchView(datepicker) { + const viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} + +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({autohide: true}); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/pickerListeners.js + + + + +function goToSelectedMonthOrYear(datepicker, selection) { + const picker = datepicker.picker; + const viewDate = new Date(picker.viewDate); + const viewId = picker.currentView.id; + const newDate = viewId === 1 + ? (0,lib_date/* addMonths */.zI)(viewDate, selection - viewDate.getMonth()) + : (0,lib_date/* addYears */.Bc)(viewDate, selection - viewDate.getFullYear()); + + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} + +function onClickTodayBtn(datepicker) { + const picker = datepicker.picker; + const currentDate = (0,lib_date/* today */.Lg)(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, {render: false}); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} + +function onClickClearBtn(datepicker) { + datepicker.setDate({clear: true}); +} + +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} + +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} + +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + const target = (0,lib_event/* findElementInEventPath */.He)(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + + const {id, isMinView} = datepicker.picker.currentView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} + +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/picker/Picker.js + + + + + + + + + + + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + const prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach((node) => { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + const nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach((node) => { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if ((0,utils/* hasProperty */.l$)(options, 'minDate') || (0,utils/* hasProperty */.l$)(options, 'maxDate')) { + const {minDate, maxDate} = picker.datepicker.config; + picker.controls.todayBtn.disabled = !(0,utils/* isInRange */.mh)((0,lib_date/* today */.Lg)(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + const {dates, config} = datepicker; + const viewDate = dates.length > 0 ? (0,utils/* lastItemOf */.Jm)(dates) : config.defaultViewDate; + return (0,utils/* limitToRange */.jG)(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + const oldViewDate = new Date(picker.viewDate); + const newViewDate = new Date(newDate); + const {id, year, first, last} = picker.currentView; + const viewYear = newViewDate.getFullYear(); + + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} + +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +class Picker { + constructor(datepicker) { + this.datepicker = datepicker; + + const template = templates_pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + const element = this.element = parseHTML(template).firstChild; + const [header, main, footer] = element.firstChild.children; + const title = header.firstElementChild; + const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children; + const [todayBtn, clearBtn] = footer.firstChild.children; + const controls = { + title, + prevBtn, + viewSwitch, + nextBtn, + todayBtn, + clearBtn, + }; + this.main = main; + this.controls = controls; + + const elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add(`datepicker-${elementClass}`); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + (0,lib_event/* registerListeners */.cF)(datepicker, [ + [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}], + [main, 'click', onClickView.bind(null, datepicker)], + [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], + [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], + [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], + [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], + [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)], + ]); + + // set up views + this.views = [ + new DaysView(this), + new MonthsView(this), + new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}), + new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}), + ]; + this.currentView = this.views[datepicker.config.startView]; + + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + + setOptions(options) { + processPickerOptions(this, options); + this.views.forEach((view) => { + view.init(options, false); + }); + this.currentView.render(); + } + + detach() { + this.datepicker.config.container.removeChild(this.element); + } + + show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + + const datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + const inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + + hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + + place() { + const {classList, style} = this.element; + const {config, inputField} = this.datepicker; + const container = config.container; + const { + width: calendarWidth, + height: calendarHeight, + } = this.element.getBoundingClientRect(); + const { + left: containerLeft, + top: containerTop, + width: containerWidth, + } = container.getBoundingClientRect(); + const { + left: inputLeft, + top: inputTop, + width: inputWidth, + height: inputHeight + } = inputField.getBoundingClientRect(); + let {x: orientX, y: orientY} = config.orientation; + let scrollTop; + let left; + let top; + + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + + classList.remove( + 'datepicker-orient-top', + 'datepicker-orient-bottom', + 'datepicker-orient-right', + 'datepicker-orient-left' + ); + classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`); + + style.top = top ? `${top}px` : top; + style.left = left ? `${left}px` : left; + } + + setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + + setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + + setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + + changeView(viewId) { + const oldView = this.currentView; + const newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach((view) => { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + update() { + const newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach((view) => { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + render(quickRender = true) { + const renderMethod = (quickRender && this._renderMethod) || 'render'; + delete this._renderMethod; + + this.currentView[renderMethod](); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/inputFieldListeners.js + + + + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!(0,utils/* isInRange */.mh)(date, min, max)) { + return; + } + if (testFn(date)) { + const newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + const picker = datepicker.picker; + const currentView = picker.currentView; + const step = currentView.step || 1; + let viewDate = picker.viewDate; + let addFn; + let testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = (0,lib_date/* addDays */.E4)(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction); + } else { + viewDate = (0,lib_date/* addDays */.E4)(viewDate, direction); + } + addFn = lib_date/* addDays */.E4; + testFn = (date) => currentView.disabled.includes(date); + break; + case 1: + viewDate = (0,lib_date/* addMonths */.zI)(viewDate, vertical ? direction * 4 : direction); + addFn = lib_date/* addMonths */.zI; + testFn = (date) => { + const dt = new Date(date); + const {year, disabled} = currentView; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = (0,lib_date/* addYears */.Bc)(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = lib_date/* addYears */.Bc; + testFn = date => currentView.disabled.includes((0,lib_date/* startOfYearPeriod */.ak)(date, step)); + } + viewDate = findNextAvailableOne( + viewDate, + addFn, + direction < 0 ? -step : step, + testFn, + currentView.minDate, + currentView.maxDate + ); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} + +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + + const picker = datepicker.picker; + const {id, isMinView} = picker.currentView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide}); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} + +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + const el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(() => { + delete el._active; + delete el._clicking; + }, 2000); + } +} + +function onClickInput(datepicker, ev) { + const el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} + +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/events/otherListeners.js + + + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + const element = datepicker.element; + if (element !== document.activeElement) { + return; + } + const pickerElem = datepicker.picker.element; + if ((0,lib_event/* findElementInEventPath */.He)(ev, el => el === element || el === pickerElem)) { + return; + } + unfocus(datepicker); +} + +;// CONCATENATED MODULE: ./node_modules/flowbite-datepicker/js/Datepicker.js + + + + + + + + + + + + +function stringifyDates(dates, config) { + return dates + .map(dt => (0,date_format/* formatDate */.p6)(dt, config.format, config.locale)) + .join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates, clear = false) { + const {config, dates: origDates, rangepicker} = datepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + + const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + let newDates = inputDates.reduce((dates, dt) => { + let date = (0,date_format/* parseDate */.sG)(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + const dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd + ? dt.setMonth(dt.getMonth() + 1, 0) + : dt.setDate(1); + } else { + date = rangeEnd + ? dt.setFullYear(dt.getFullYear() + 1, 0, 0) + : dt.setMonth(0, 1); + } + } + if ( + (0,utils/* isInRange */.mh)(date, config.minDate, config.maxDate) + && !dates.includes(date) + && !config.datesDisabled.includes(date) + && !config.daysOfWeekDisabled.includes(new Date(date).getDay()) + ) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce((dates, date) => { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(date => !newDates.includes(date))); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates + ? newDates.slice(config.maxNumberOfDates * -1) + : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker, mode = 3, quickRender = true) { + const {config, picker, inputField} = datepicker; + if (mode & 2) { + const newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} + +function setDate(datepicker, inputDates, options) { + let {clear, render, autohide} = options; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + + const newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +class Datepicker { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + constructor(element, options = {}, rangepicker = undefined) { + element.datepicker = this; + this.element = element; + + // set up config + const config = this.config = Object.assign({ + buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button', + container: document.body, + defaultViewDate: (0,lib_date/* today */.Lg)(), + maxDate: undefined, + minDate: undefined, + }, processOptions(options_defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + const inline = this.inline = element.tagName !== 'INPUT'; + let inputField; + let initialDates; + + if (inline) { + config.container = element; + initialDates = (0,utils/* stringToArray */.W7)(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + const container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = (0,utils/* stringToArray */.W7)(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + const index = rangepicker.inputs.indexOf(inputField); + const datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get() { + return rangepicker; + }, + }); + } + + // set initial dates + this.dates = []; + // process initial value + const inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + + const picker = this.picker = new Picker(this); + + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + const onMousedownDocument = onClickOutside.bind(null, this); + const listeners = [ + [inputField, 'keydown', onKeydown.bind(null, this)], + [inputField, 'focus', onFocus.bind(null, this)], + [inputField, 'mousedown', onMousedown.bind(null, this)], + [inputField, 'click', onClickInput.bind(null, this)], + [inputField, 'paste', onPaste.bind(null, this)], + [document, 'mousedown', onMousedownDocument], + [document, 'touchstart', onMousedownDocument], + [window, 'resize', picker.place.bind(picker)] + ]; + (0,lib_event/* registerListeners */.cF)(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + static formatDate(date, format, lang) { + return (0,date_format/* formatDate */.p6)(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + static parseDate(dateStr, format, lang) { + return (0,date_format/* parseDate */.sG)(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + static get locales() { + return locales; + } + + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + get active() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + get pickerElement() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + const picker = this.picker; + const newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + destroy() { + this.hide(); + (0,lib_event/* unregisterListeners */.uV)(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + getDate(format = undefined) { + const callback = format + ? date => (0,date_format/* formatDate */.p6)(date, format, this.config.locale) + : date => new Date(date); + + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + setDate(...args) { + const dates = [...args]; + const opts = {}; + const lastArg = (0,utils/* lastItemOf */.Jm)(args); + if ( + typeof lastArg === 'object' + && !Array.isArray(lastArg) + && !(lastArg instanceof Date) + && lastArg + ) { + Object.assign(opts, dates.pop()); + } + + const inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + update(options = undefined) { + if (this.inline) { + return; + } + + const opts = {clear: true, autohide: !!(options && options.autohide)}; + const inputDates = (0,utils/* stringToArray */.W7)(this.inputField.value, this.config.dateDelimiter); + setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + refresh(target = undefined, forceRender = false) { + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + + let mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + exitEditMode(options = undefined) { + if (this.inline || !this.editMode) { + return; + } + const opts = Object.assign({update: false}, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700'); + if (opts.update) { + this.update(opts); + } + } +} + + +/***/ }), + +/***/ 963: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "CL": function() { return /* binding */ reFormatTokens; }, +/* harmony export */ "p6": function() { return /* binding */ formatDate; }, +/* harmony export */ "sG": function() { return /* binding */ parseDate; } +/* harmony export */ }); +/* unused harmony export reNonDateParts */ +/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(560); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); + + + +// pattern for format parts +const reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +const reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +let knownFormats = {}; +// parse funtions for date parts +const parseFns = { + y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m(date, month, locale) { + const newDate = new Date(date); + let monthIndex = parseInt(month, 10) - 1; + + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + + const monthName = month.toLowerCase(); + const compareNames = name => name.toLowerCase().startsWith(monthName); + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) + ? newDate.setDate(0) + : newDate.getTime(); + }, + d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + }, +}; +// format functions for date parts +const formatFns = { + d(date) { + return date.getDate(); + }, + dd(date) { + return padZero(date.getDate(), 2); + }, + D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD(date, locale) { + return locale.days[date.getDay()]; + }, + m(date) { + return date.getMonth() + 1; + }, + mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y(date) { + return date.getFullYear(); + }, + yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy(date) { + return padZero(date.getFullYear(), 4); + }, +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} + +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} + +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + const separators = format.split(reFormatTokens); + const parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + const partFormatters = parts.map(token => formatFns[token]); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + const partParserKeys = Object.keys(parseFns).reduce((keys, key) => { + const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key); + if (token) { + keys.push(key); + } + return keys; + }, []); + + return knownFormats[format] = { + parser(dateStr, locale) { + const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => { + if (part.length > 0 && parts[index]) { + const token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce((origDate, key) => { + const newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .today */ .Lg)()); + }, + formatter(date, locale) { + let dateStr = partFormatters.reduce((str, fn, index) => { + return str += `${separators[index]}${fn(date, locale)}`; + }, ''); + // separators' length is always parts' length + 1, + return dateStr += (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .lastItemOf */ .Jm)(separators); + }, + }; +} + +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + const date = (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .stripTime */ .xR)(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .today */ .Lg)(); + } + + if (format && format.toValue) { + const date = format.toValue(dateStr, format, locale); + return isNaN(date) ? undefined : (0,_date_js__WEBPACK_IMPORTED_MODULE_0__/* .stripTime */ .xR)(date); + } + + return parseFormatString(format).parser(dateStr, locale); +} + +function formatDate(date, format, locale) { + if (isNaN(date) || (!date && date !== 0)) { + return ''; + } + + const dateObj = typeof date === 'number' ? new Date(date) : date; + + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + + return parseFormatString(format).formatter(dateObj, locale); +} + + +/***/ }), + +/***/ 560: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Bc": function() { return /* binding */ addYears; }, +/* harmony export */ "E4": function() { return /* binding */ addDays; }, +/* harmony export */ "Lg": function() { return /* binding */ today; }, +/* harmony export */ "Qk": function() { return /* binding */ getWeek; }, +/* harmony export */ "ak": function() { return /* binding */ startOfYearPeriod; }, +/* harmony export */ "by": function() { return /* binding */ dateValue; }, +/* harmony export */ "fr": function() { return /* binding */ dayOfTheWeekOf; }, +/* harmony export */ "jh": function() { return /* binding */ addWeeks; }, +/* harmony export */ "xR": function() { return /* binding */ stripTime; }, +/* harmony export */ "zI": function() { return /* binding */ addMonths; } +/* harmony export */ }); +function stripTime(timeValue) { + return new Date(timeValue).setHours(0, 0, 0, 0); +} + +function today() { + return new Date().setHours(0, 0, 0, 0); +} + +// Get the time value of the start of given date or year, month and day +function dateValue(...args) { + switch (args.length) { + case 0: + return today(); + case 1: + return stripTime(args[0]); + } + + // use setFullYear() to keep 2-digit year from being mapped to 1900-1999 + const newDate = new Date(0); + newDate.setFullYear(...args); + return newDate.setHours(0, 0, 0, 0); +} + +function addDays(date, amount) { + const newDate = new Date(date); + return newDate.setDate(newDate.getDate() + amount); +} + +function addWeeks(date, amount) { + return addDays(date, amount * 7); +} + +function addMonths(date, amount) { + // If the day of the date is not in the new month, the last day of the new + // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03) + const newDate = new Date(date); + const monthsToSet = newDate.getMonth() + amount; + let expectedMonth = monthsToSet % 12; + if (expectedMonth < 0) { + expectedMonth += 12; + } + + const time = newDate.setMonth(monthsToSet); + return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time; +} + +function addYears(date, amount) { + // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the + // new year will be returned. + const newDate = new Date(date); + const expectedMonth = newDate.getMonth(); + const time = newDate.setFullYear(newDate.getFullYear() + amount); + return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time; +} + +// Calculate the distance bettwen 2 days of the week +function dayDiff(day, from) { + return (day - from + 7) % 7; +} + +// Get the date of the specified day of the week of given base date +function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) { + const baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + const year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + + +/***/ }), + +/***/ 698: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "He": function() { return /* binding */ findElementInEventPath; }, +/* harmony export */ "cF": function() { return /* binding */ registerListeners; }, +/* harmony export */ "uV": function() { return /* binding */ unregisterListeners; } +/* harmony export */ }); +const listenerRegistry = new WeakMap(); +const {addEventListener, removeEventListener} = EventTarget.prototype; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + let registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach((listener) => { + addEventListener.call(...listener); + registered.push(listener); + }); +} + +function unregisterListeners(keyObj) { + let listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach((listener) => { + removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + const getComposedPath = (node, path = []) => { + path.push(node); + + let parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { // ShadowRoot + parent = node.host; + } else if (node.defaultView) { // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} + +function findFromPath(path, criteria, currentTarget, index = 0) { + const el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + const criteria = typeof selector === 'function' ? selector : el => el.matches(selector); + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + + +/***/ }), + +/***/ 105: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "$C": function() { return /* binding */ pushUnique; }, +/* harmony export */ "Jm": function() { return /* binding */ lastItemOf; }, +/* harmony export */ "W7": function() { return /* binding */ stringToArray; }, +/* harmony export */ "em": function() { return /* binding */ createTagRepeat; }, +/* harmony export */ "jG": function() { return /* binding */ limitToRange; }, +/* harmony export */ "l$": function() { return /* binding */ hasProperty; }, +/* harmony export */ "mh": function() { return /* binding */ isInRange; }, +/* harmony export */ "zh": function() { return /* binding */ optimizeTemplateHTML; } +/* harmony export */ }); +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr, ...items) { + items.forEach((item) => { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} + +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} + +function isInRange(testVal, min, max) { + const minOK = min === undefined || testVal >= min; + const maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} + +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} + +function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') { + const openTagSrc = Object.keys(attributes).reduce((src, attr) => { + let val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return `${src} ${attr}="${val}"`; + }, tagName); + html += `<${openTagSrc}>`; + + const next = index + 1; + return next < repeat + ? createTagRepeat(tagName, repeat, attributes, next, html) + : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ {\n const buttons = datepickerEl.hasAttribute('datepicker-buttons');\n const autohide = datepickerEl.hasAttribute('datepicker-autohide');\n const format = datepickerEl.hasAttribute('datepicker-format');\n const orientation = datepickerEl.hasAttribute('datepicker-orientation');\n const title = datepickerEl.hasAttribute('datepicker-title');\n\n const options = {};\n if (buttons) {\n options.todayBtn = true;\n options.clearBtn = true;\n }\n if (autohide) {\n options.autohide = true;\n }\n if (format) {\n options.format = datepickerEl.getAttribute('datepicker-format');\n }\n if (orientation) {\n options.orientation = datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n }\n if (title) {\n options.title = datepickerEl.getAttribute('datepicker-title');\n }\n\n return options;\n};\n\nexport function initDatepickers() {\n document.querySelectorAll('[datepicker]').forEach(function (datepickerEl) {\n new Datepicker(datepickerEl, getDatepickerOptions(datepickerEl));\n });\n\n document\n .querySelectorAll('[inline-datepicker]')\n .forEach(function (datepickerEl) {\n new Datepicker(datepickerEl, getDatepickerOptions(datepickerEl));\n });\n\n document\n .querySelectorAll('[date-rangepicker]')\n .forEach(function (datepickerEl) {\n new DateRangePicker(\n datepickerEl,\n getDatepickerOptions(datepickerEl)\n );\n });\n}\n\nconst events = new Events('DOMContentLoaded', [initDatepickers]);\nevents.init();\n","import {registerListeners, unregisterListeners} from './lib/event.js';\nimport {formatDate} from './lib/date-format.js';\nimport Datepicker from './Datepicker.js';\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n const newOpts = Object.assign({}, options);\n\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\n\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [\n [el, 'changeDate', changeDateListener],\n ]);\n new Datepicker(el, options, rangepicker);\n}\n\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n\n const target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n\n const datepickers = rangepicker.datepickers;\n const setDateOptions = {render: false};\n const changedSide = rangepicker.inputs.indexOf(target);\n const otherSide = changedSide === 0 ? 1 : 0;\n const changedDate = datepickers[changedSide].dates[0];\n const otherDate = datepickers[otherSide].dates[0];\n\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nexport default class DateRangePicker {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n constructor(element, options = {}) {\n const inputs = Array.isArray(options.inputs)\n ? options.inputs\n : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n const changeDateListener = onChangeDate.bind(null, this);\n const cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n const datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get() {\n return datepickers;\n },\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {target: this.inputs[0]});\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {target: this.inputs[1]});\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n get dates() {\n return this.datepickers.length === 2\n ? [\n this.datepickers[0].dates[0],\n this.datepickers[1].dates[0],\n ]\n : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n const cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n getDates(format = undefined) {\n const callback = format\n ? date => formatDate(date, format, this.datepickers[0].config.locale)\n : date => new Date(date);\n\n return this.dates.map(date => date === undefined ? date : callback(date));\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n setDates(rangeStart, rangeEnd) {\n const [datepicker0, datepicker1] = this.datepickers;\n const origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {target: this.inputs[1]});\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {target: this.inputs[0]});\n }\n }\n}\n","// default locales\nexport const locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n","// config options updatable by setOptions() and their default values\nconst defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined, // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0,\n};\n\nexport default defaultOptions;\n","const range = document.createRange();\n\nexport function parseHTML(html) {\n return range.createContextualFragment(html);\n}\n\n// equivalent to jQuery's :visble\nexport function isVisible(el) {\n return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n}\n\nexport function hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\n\nexport function showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\n\nexport function emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\n\nexport function replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach((node) => {\n el.appendChild(node);\n });\n }\n}\n","import {hasProperty, pushUnique} from '../lib/utils.js';\nimport {dateValue} from '../lib/date.js';\nimport {reFormatTokens, parseDate} from '../lib/date-format.js';\nimport {parseHTML} from '../lib/dom.js';\nimport defaultOptions from './defaultOptions.js';\n\nconst {\n language: defaultLang,\n format: defaultFormat,\n weekStart: defaultWeekStart,\n} = defaultOptions;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7\n ? pushUnique(dow, day)\n : dow;\n}\n\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n const date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue, max = 3) {\n const viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nexport default function processOptions(options, datepicker) {\n const inOpts = Object.assign({}, options);\n const config = {};\n const locales = datepicker.constructor.locales;\n let {\n format,\n language,\n locale,\n maxDate,\n maxView,\n minDate,\n pickLevel,\n startView,\n weekStart,\n } = datepicker.config || {};\n\n if (inOpts.language) {\n let lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n const origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n\n if (inOpts.format) {\n const hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n const hasToValue = typeof inOpts.format.toValue === 'function';\n const validFormatString = reFormatTokens.test(inOpts.format);\n if ((hasToDisplay && hasToValue) || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n let minDt = minDate;\n let maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null\n ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null\n ? undefined\n : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => {\n const date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n const viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n const wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n let newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n\n let newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n\n let newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n const prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n const nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n const orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto',\n y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto',\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch(inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach((key) => {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n\n return config;\n}\n","import {optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst pickerTemplate = optimizeTemplateHTML(`
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
`);\n\nexport default pickerTemplate;\n","import {createTagRepeat, optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst daysTemplate = optimizeTemplateHTML(`
\n
${createTagRepeat('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
\n
${createTagRepeat('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
\n
`);\n\nexport default daysTemplate;\n","import {createTagRepeat, optimizeTemplateHTML} from '../../lib/utils.js';\n\nconst calendarWeeksTemplate = optimizeTemplateHTML(`
\n
\n
${createTagRepeat('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
\n
`);\n\nexport default calendarWeeksTemplate;\n","import {pushUnique} from '../../lib/utils.js';\nimport {parseHTML, replaceChildNodes} from '../../lib/dom.js';\n\n// Base class of the view classes\nexport default class View {\n constructor(picker, config) {\n Object.assign(this, config, {\n picker,\n element: parseHTML(`
`).firstChild,\n selected: [],\n });\n this.init(this.picker.datepicker.config);\n }\n\n init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n performBeforeHook(el, current, timeValue) {\n let result = this.beforeShow(new Date(timeValue));\n switch (typeof result) {\n case 'boolean':\n result = {enabled: result};\n break;\n case 'string':\n result = {classes: result};\n }\n\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n const extraClasses = result.classes.split(/\\s+/);\n el.classList.add(...extraClasses);\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n}\n","import {hasProperty, pushUnique} from '../../lib/utils.js';\nimport {today, dateValue, addDays, addWeeks, dayOfTheWeekOf, getWeek} from '../../lib/date.js';\nimport {formatDate} from '../../lib/date-format.js';\nimport {parseHTML, showElement, hideElement} from '../../lib/dom.js';\nimport daysTemplate from '../templates/daysTemplate.js';\nimport calendarWeeksTemplate from '../templates/calendarWeeksTemplate.js';\nimport View from './View.js';\n\nexport default class DaysView extends View {\n constructor(picker) {\n super(picker, {\n id: 0,\n name: 'days',\n cellClass: 'day',\n });\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n const inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n super.init(options);\n }\n\n setOptions(options) {\n let updateDOW;\n\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n const locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function'\n ? options.beforeShowDay\n : undefined;\n }\n\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n const weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild,\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach((el, index) => {\n const dow = (this.weekStart + index) % 7;\n el.textContent = this.dayNames[dow];\n el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n const viewYear = viewDate.getFullYear();\n const viewMonth = viewDate.getMonth();\n const firstOfMonth = dateValue(viewYear, viewMonth, 1);\n const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n render() {\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [...this.datesDisabled];\n\n const switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n const startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const current = addDays(this.start, index);\n const date = new Date(current);\n const day = date.getDay();\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n el.dataset.date = current;\n el.textContent = date.getDate();\n\n if (current < this.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > this.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (this.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed');\n }\n if (this.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed');\n pushUnique(this.disabled, current);\n }\n if (this.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (this.range) {\n const [rangeStart, rangeEnd] = this.range;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg')\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const [rangeStart, rangeEnd] = this.range || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach((el) => {\n const current = Number(el.dataset.date);\n const classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg')\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n const index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n}\n","import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js';\nimport {dateValue} from '../../lib/date.js';\nimport {parseHTML} from '../../lib/dom.js';\nimport View from './View.js';\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n\n const [[startY, startM], [endY, endM]] = range;\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [\n startY === thisYear ? startM : -1,\n endY === thisYear ? endM : 12,\n ];\n}\n\nexport default class MonthsView extends View {\n constructor(picker) {\n super(picker, {\n id: 1,\n name: 'months',\n cellClass: 'month',\n });\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix})));\n }\n super.init(options);\n }\n\n setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n const minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n const maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function'\n ? options.beforeShowMonth\n : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates.reduce((selected, timeValue) => {\n const date = new Date(timeValue);\n const year = date.getFullYear();\n const month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(timeValue => {\n const date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n render() {\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n\n const selected = this.selected[this.year] || [];\n const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n const isMinYear = this.year === this.minYear;\n const isMaxYear = this.year === this.maxYear;\n const range = computeMonthRange(this.range, this.year);\n\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const date = dateValue(this.year, index, 1);\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n if (this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = this.monthNames[index];\n\n if (\n yrOutOfRange\n || isMinYear && index < this.minMonth\n || isMaxYear && index > this.maxMonth\n ) {\n classList.add('disabled');\n }\n if (range) {\n const [rangeStart, rangeEnd] = range;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const selected = this.selected[this.year] || [];\n const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'dark:bg-blue-600', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n}","import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js';\nimport {dateValue, startOfYearPeriod} from '../../lib/date.js';\nimport {parseHTML} from '../../lib/dom.js';\nimport View from './View.js';\n\nfunction toTitleCase(word) {\n return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), '');\n}\n\n// Class representing the years and decades view elements\nexport default class YearsView extends View {\n constructor(picker, config) {\n super(picker, config);\n }\n\n init(options, onConstruction = true) {\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`;\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n super.init(options);\n }\n\n setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n const beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n updateFocus() {\n const viewDate = new Date(this.picker.viewDate);\n const first = startOfYearPeriod(viewDate, this.navStep);\n const last = first + 9 * this.step;\n\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n updateSelection() {\n const {dates, rangepicker} = this.picker.datepicker;\n this.selected = dates.reduce((years, timeValue) => {\n return pushUnique(years, startOfYearPeriod(timeValue, this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(timeValue => {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n render() {\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n\n this.picker.setViewSwitchLabel(`${this.first}-${this.last}`);\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n\n Array.from(this.grid.children).forEach((el, index) => {\n const classList = el.classList;\n const current = this.start + (index * this.step);\n const date = dateValue(current, 0, 1);\n\n el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`;\n if (this.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < this.minYear || current > this.maxYear) {\n classList.add('disabled');\n }\n if (this.range) {\n const [rangeStart, rangeEnd] = this.range;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n\n if (this.beforeShow) {\n this.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n refresh() {\n const [rangeStart, rangeEnd] = this.range || [];\n this.grid\n .querySelectorAll('.range, .range-start, .range-end, .selected, .focused')\n .forEach((el) => {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach((el) => {\n const current = Number(el.textContent);\n const classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (this.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', 'text-white', 'dark:bg-blue-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === this.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n refreshFocus() {\n const index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach((el) => {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n}\n","import {limitToRange} from '../lib/utils.js';\nimport {addMonths, addYears} from '../lib/date.js';\n\nexport function triggerDatepickerEvent(datepicker, type) {\n const detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker,\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {detail}));\n}\n\n// direction: -1 (to previous), 1 (to next)\nexport function goToPrevOrNext(datepicker, direction) {\n const {minDate, maxDate} = datepicker.config;\n const {currentView, viewDate} = datepicker.picker;\n let newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\n\nexport function switchView(datepicker) {\n const viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\n\nexport function unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({autohide: true});\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n","import {today, addMonths, addYears} from '../lib/date.js';\nimport {findElementInEventPath} from '../lib/event.js';\nimport {goToPrevOrNext, switchView} from './functions.js';\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n const picker = datepicker.picker;\n const viewDate = new Date(picker.viewDate);\n const viewId = picker.currentView.id;\n const newDate = viewId === 1\n ? addMonths(viewDate, selection - viewDate.getMonth())\n : addYears(viewDate, selection - viewDate.getFullYear());\n\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\n\nexport function onClickTodayBtn(datepicker) {\n const picker = datepicker.picker;\n const currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {render: false});\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\n\nexport function onClickClearBtn(datepicker) {\n datepicker.setDate({clear: true});\n}\n\nexport function onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\n\nexport function onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\n\nexport function onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nexport function onClickView(datepicker, ev) {\n const target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n\n const {id, isMinView} = datepicker.picker.currentView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\n\nexport function onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n","import {hasProperty, lastItemOf, isInRange, limitToRange} from '../lib/utils.js';\nimport {today} from '../lib/date.js';\nimport {parseHTML, showElement, hideElement, emptyChildNodes} from '../lib/dom.js';\nimport {registerListeners} from '../lib/event.js';\nimport pickerTemplate from './templates/pickerTemplate.js';\nimport DaysView from './views/DaysView.js';\nimport MonthsView from './views/MonthsView.js';\nimport YearsView from './views/YearsView.js';\nimport {triggerDatepickerEvent} from '../events/functions.js';\nimport {\n onClickTodayBtn,\n onClickClearBtn,\n onClickViewSwitch,\n onClickPrevBtn,\n onClickNextBtn,\n onClickView,\n onClickPicker,\n} from '../events/pickerListeners.js';\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n const prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach((node) => {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n const nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach((node) => {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n const {minDate, maxDate} = picker.datepicker.config;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n const {dates, config} = datepicker;\n const viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n const oldViewDate = new Date(picker.viewDate);\n const newViewDate = new Date(newDate);\n const {id, year, first, last} = picker.currentView;\n const viewYear = newViewDate.getFullYear();\n\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\n\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nexport default class Picker {\n constructor(datepicker) {\n this.datepicker = datepicker;\n\n const template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n const element = this.element = parseHTML(template).firstChild;\n const [header, main, footer] = element.firstChild.children;\n const title = header.firstElementChild;\n const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children;\n const [todayBtn, clearBtn] = footer.firstChild.children;\n const controls = {\n title,\n prevBtn,\n viewSwitch,\n nextBtn,\n todayBtn,\n clearBtn,\n };\n this.main = main;\n this.controls = controls;\n\n const elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(`datepicker-${elementClass}`);\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [\n [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}],\n [main, 'click', onClickView.bind(null, datepicker)],\n [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)],\n [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)],\n [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)],\n [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)],\n [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)],\n ]);\n\n // set up views\n this.views = [\n new DaysView(this),\n new MonthsView(this),\n new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}),\n new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}),\n ];\n this.currentView = this.views[datepicker.config.startView];\n\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n\n setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach((view) => {\n view.init(options, false);\n });\n this.currentView.render();\n }\n\n detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n\n show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n\n const datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n const inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n\n hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n\n place() {\n const {classList, style} = this.element;\n const {config, inputField} = this.datepicker;\n const container = config.container;\n const {\n width: calendarWidth,\n height: calendarHeight,\n } = this.element.getBoundingClientRect();\n const {\n left: containerLeft,\n top: containerTop,\n width: containerWidth,\n } = container.getBoundingClientRect();\n const {\n left: inputLeft,\n top: inputTop,\n width: inputWidth,\n height: inputHeight\n } = inputField.getBoundingClientRect();\n let {x: orientX, y: orientY} = config.orientation;\n let scrollTop;\n let left;\n let top;\n\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n\n classList.remove(\n 'datepicker-orient-top',\n 'datepicker-orient-bottom',\n 'datepicker-orient-right',\n 'datepicker-orient-left'\n );\n classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`);\n\n style.top = top ? `${top}px` : top;\n style.left = left ? `${left}px` : left;\n }\n\n setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n\n setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n\n setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n\n changeView(viewId) {\n const oldView = this.currentView;\n const newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach((view) => {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n update() {\n const newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach((view) => {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n render(quickRender = true) {\n const renderMethod = (quickRender && this._renderMethod) || 'render';\n delete this._renderMethod;\n\n this.currentView[renderMethod]();\n }\n}\n","import {isInRange} from '../lib/utils.js';\nimport {addDays, addMonths, addYears, startOfYearPeriod} from '../lib/date.js';\nimport {goToPrevOrNext, switchView, unfocus} from './functions.js';\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n const newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n const picker = datepicker.picker;\n const currentView = picker.currentView;\n const step = currentView.step || 1;\n let viewDate = picker.viewDate;\n let addFn;\n let testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = (date) => currentView.disabled.includes(date);\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = (date) => {\n const dt = new Date(date);\n const {year, disabled} = currentView;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = date => currentView.disabled.includes(startOfYearPeriod(date, step));\n }\n viewDate = findNextAvailableOne(\n viewDate,\n addFn,\n direction < 0 ? -step : step,\n testFn,\n currentView.minDate,\n currentView.maxDate\n );\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\n\nexport function onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n\n const picker = datepicker.picker;\n const {id, isMinView} = picker.currentView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide});\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\n\nexport function onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nexport function onMousedown(datepicker, ev) {\n const el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(() => {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\n\nexport function onClickInput(datepicker, ev) {\n const el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\n\nexport function onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n","import {findElementInEventPath} from '../lib/event.js';\nimport {unfocus} from './functions.js';\n\n// for the `document` to delegate the events from outside the picker/input field\nexport function onClickOutside(datepicker, ev) {\n const element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n const pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, el => el === element || el === pickerElem)) {\n return;\n }\n unfocus(datepicker);\n}\n","import {lastItemOf, stringToArray, isInRange} from './lib/utils.js';\nimport {today} from './lib/date.js';\nimport {parseDate, formatDate} from './lib/date-format.js';\nimport {registerListeners, unregisterListeners} from './lib/event.js';\nimport {locales} from './i18n/base-locales.js';\nimport defaultOptions from './options/defaultOptions.js';\nimport processOptions from './options/processOptions.js';\nimport Picker from './picker/Picker.js';\nimport {triggerDatepickerEvent} from './events/functions.js';\nimport {onKeydown, onFocus, onMousedown, onClickInput, onPaste} from './events/inputFieldListeners.js';\nimport {onClickOutside} from './events/otherListeners.js';\n\nfunction stringifyDates(dates, config) {\n return dates\n .map(dt => formatDate(dt, config.format, config.locale))\n .join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates, clear = false) {\n const {config, dates: origDates, rangepicker} = datepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n\n const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n let newDates = inputDates.reduce((dates, dt) => {\n let date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n const dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd\n ? dt.setMonth(dt.getMonth() + 1, 0)\n : dt.setDate(1);\n } else {\n date = rangeEnd\n ? dt.setFullYear(dt.getFullYear() + 1, 0, 0)\n : dt.setMonth(0, 1);\n }\n }\n if (\n isInRange(date, config.minDate, config.maxDate)\n && !dates.includes(date)\n && !config.datesDisabled.includes(date)\n && !config.daysOfWeekDisabled.includes(new Date(date).getDay())\n ) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce((dates, date) => {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(date => !newDates.includes(date)));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates\n ? newDates.slice(config.maxNumberOfDates * -1)\n : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker, mode = 3, quickRender = true) {\n const {config, picker, inputField} = datepicker;\n if (mode & 2) {\n const newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\n\nfunction setDate(datepicker, inputDates, options) {\n let {clear, render, autohide} = options;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n\n const newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nexport default class Datepicker {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n constructor(element, options = {}, rangepicker = undefined) {\n element.datepicker = this;\n this.element = element;\n\n // set up config\n const config = this.config = Object.assign({\n buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined,\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n const inline = this.inline = element.tagName !== 'INPUT';\n let inputField;\n let initialDates;\n\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n const container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n const index = rangepicker.inputs.indexOf(inputField);\n const datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get() {\n return rangepicker;\n },\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n const inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n\n const picker = this.picker = new Picker(this);\n\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n const onMousedownDocument = onClickOutside.bind(null, this);\n const listeners = [\n [inputField, 'keydown', onKeydown.bind(null, this)],\n [inputField, 'focus', onFocus.bind(null, this)],\n [inputField, 'mousedown', onMousedown.bind(null, this)],\n [inputField, 'click', onClickInput.bind(null, this)],\n [inputField, 'paste', onPaste.bind(null, this)],\n [document, 'mousedown', onMousedownDocument],\n [document, 'touchstart', onMousedownDocument],\n [window, 'resize', picker.place.bind(picker)]\n ];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n static formatDate(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n static parseDate(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n static get locales() {\n return locales;\n }\n\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n get active() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n get pickerElement() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n setOptions(options) {\n const picker = this.picker;\n const newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n getDate(format = undefined) {\n const callback = format\n ? date => formatDate(date, format, this.config.locale)\n : date => new Date(date);\n\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n setDate(...args) {\n const dates = [...args];\n const opts = {};\n const lastArg = lastItemOf(args);\n if (\n typeof lastArg === 'object'\n && !Array.isArray(lastArg)\n && !(lastArg instanceof Date)\n && lastArg\n ) {\n Object.assign(opts, dates.pop());\n }\n\n const inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n update(options = undefined) {\n if (this.inline) {\n return;\n }\n\n const opts = {clear: true, autohide: !!(options && options.autohide)};\n const inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n refresh(target = undefined, forceRender = false) {\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n\n let mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n exitEditMode(options = undefined) {\n if (this.inline || !this.editMode) {\n return;\n }\n const opts = Object.assign({update: false}, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n}\n","import {stripTime, today} from './date.js';\nimport {lastItemOf} from './utils.js';\n\n// pattern for format parts\nexport const reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nexport const reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nlet knownFormats = {};\n// parse funtions for date parts\nconst parseFns = {\n y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m(date, month, locale) {\n const newDate = new Date(date);\n let monthIndex = parseInt(month, 10) - 1;\n\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n\n const monthName = month.toLowerCase();\n const compareNames = name => name.toLowerCase().startsWith(monthName);\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex)\n ? newDate.setDate(0)\n : newDate.getTime();\n },\n d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n },\n};\n// format functions for date parts\nconst formatFns = {\n d(date) {\n return date.getDate();\n },\n dd(date) {\n return padZero(date.getDate(), 2);\n },\n D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m(date) {\n return date.getMonth() + 1;\n },\n mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y(date) {\n return date.getFullYear();\n },\n yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy(date) {\n return padZero(date.getFullYear(), 4);\n },\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\n\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\n\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n const separators = format.split(reFormatTokens);\n const parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n const partFormatters = parts.map(token => formatFns[token]);\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n const partParserKeys = Object.keys(parseFns).reduce((keys, key) => {\n const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key);\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n\n return knownFormats[format] = {\n parser(dateStr, locale) {\n const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => {\n if (part.length > 0 && parts[index]) {\n const token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce((origDate, key) => {\n const newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter(date, locale) {\n let dateStr = partFormatters.reduce((str, fn, index) => {\n return str += `${separators[index]}${fn(date, locale)}`;\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n },\n };\n}\n\nexport function parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n const date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n\n if (format && format.toValue) {\n const date = format.toValue(dateStr, format, locale);\n return isNaN(date) ? undefined : stripTime(date);\n }\n\n return parseFormatString(format).parser(dateStr, locale);\n}\n\nexport function formatDate(date, format, locale) {\n if (isNaN(date) || (!date && date !== 0)) {\n return '';\n }\n\n const dateObj = typeof date === 'number' ? new Date(date) : date;\n\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n\n return parseFormatString(format).formatter(dateObj, locale);\n}\n","export function stripTime(timeValue) {\n return new Date(timeValue).setHours(0, 0, 0, 0);\n}\n\nexport function today() {\n return new Date().setHours(0, 0, 0, 0);\n}\n\n// Get the time value of the start of given date or year, month and day\nexport function dateValue(...args) {\n switch (args.length) {\n case 0:\n return today();\n case 1:\n return stripTime(args[0]);\n }\n\n // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n const newDate = new Date(0);\n newDate.setFullYear(...args);\n return newDate.setHours(0, 0, 0, 0);\n}\n\nexport function addDays(date, amount) {\n const newDate = new Date(date);\n return newDate.setDate(newDate.getDate() + amount);\n}\n\nexport function addWeeks(date, amount) {\n return addDays(date, amount * 7);\n}\n\nexport function addMonths(date, amount) {\n // If the day of the date is not in the new month, the last day of the new\n // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03)\n const newDate = new Date(date);\n const monthsToSet = newDate.getMonth() + amount;\n let expectedMonth = monthsToSet % 12;\n if (expectedMonth < 0) {\n expectedMonth += 12;\n }\n\n const time = newDate.setMonth(monthsToSet);\n return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n}\n\nexport function addYears(date, amount) {\n // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n // new year will be returned.\n const newDate = new Date(date);\n const expectedMonth = newDate.getMonth();\n const time = newDate.setFullYear(newDate.getFullYear() + amount);\n return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n}\n\n// Calculate the distance bettwen 2 days of the week\nfunction dayDiff(day, from) {\n return (day - from + 7) % 7;\n}\n\n// Get the date of the specified day of the week of given base date\nexport function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) {\n const baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nexport function getWeek(date) {\n // start of ISO week is Monday\n const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nexport function startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n const year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n","const listenerRegistry = new WeakMap();\nconst {addEventListener, removeEventListener} = EventTarget.prototype;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nexport function registerListeners(keyObj, listeners) {\n let registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach((listener) => {\n addEventListener.call(...listener);\n registered.push(listener);\n });\n}\n\nexport function unregisterListeners(keyObj) {\n let listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach((listener) => {\n removeEventListener.call(...listener);\n });\n listenerRegistry.delete(keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n const getComposedPath = (node, path = []) => {\n path.push(node);\n\n let parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) { // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) { // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\n\nfunction findFromPath(path, criteria, currentTarget, index = 0) {\n const el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nexport function findElementInEventPath(ev, selector) {\n const criteria = typeof selector === 'function' ? selector : el => el.matches(selector);\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n","export function hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nexport function pushUnique(arr, ...items) {\n items.forEach((item) => {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\n\nexport function stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\n\nexport function isInRange(testVal, min, max) {\n const minOK = min === undefined || testVal >= min;\n const maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\n\nexport function limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\n\nexport function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') {\n const openTagSrc = Object.keys(attributes).reduce((src, attr) => {\n let val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return `${src} ${attr}=\"${val}\"`;\n }, tagName);\n html += `<${openTagSrc}>`;\n\n const next = index + 1;\n return next < repeat\n ? createTagRepeat(tagName, repeat, attributes, next, html)\n : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nexport function optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { initDatepickers } from './datepicker';\nimport Datepicker from 'flowbite-datepicker/Datepicker';\nimport DateRangePicker from 'flowbite-datepicker/DateRangePicker';\nimport Events from '../dom/events';\n\nconst turboLoadEvents = new Events('turbo:load', [initDatepickers]);\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [initDatepickers]);\n\nturboLoadEvents.init();\nturboFrameLoadEvents.init();\n\nexport default {\n Datepicker,\n DateRangePicker,\n};\n"],"names":["Datepicker","DateRangePicker","Events","getDatepickerOptions","datepickerEl","buttons","hasAttribute","autohide","format","orientation","title","options","todayBtn","clearBtn","getAttribute","initDatepickers","document","querySelectorAll","forEach","events","init","turboLoadEvents","turboFrameLoadEvents"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/datepicker.turbo.min.js b/node_modules/flowbite/dist/datepicker.turbo.min.js new file mode 100644 index 0000000..4f39e7b --- /dev/null +++ b/node_modules/flowbite/dist/datepicker.turbo.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Flowbite",[],t):"object"==typeof exports?exports.Flowbite=t():e.Flowbite=t()}(self,(function(){return function(){"use strict";var e={781:function(e,t,i){i.d(t,{initDatepickers:function(){return o}});var r=i(770),n=i(482),a=i(947),s=function(e){var t=e.hasAttribute("datepicker-buttons"),i=e.hasAttribute("datepicker-autohide"),r=e.hasAttribute("datepicker-format"),n=e.hasAttribute("datepicker-orientation"),a=e.hasAttribute("datepicker-title"),s={};return t&&(s.todayBtn=!0,s.clearBtn=!0),i&&(s.autohide=!0),r&&(s.format=e.getAttribute("datepicker-format")),n&&(s.orientation=e.getAttribute("datepicker-orientation")),a&&(s.title=e.getAttribute("datepicker-title")),s};function o(){document.querySelectorAll("[datepicker]").forEach((function(e){new r.Z(e,s(e))})),document.querySelectorAll("[inline-datepicker]").forEach((function(e){new r.Z(e,s(e))})),document.querySelectorAll("[date-rangepicker]").forEach((function(e){new n.Z(e,s(e))}))}new a.default("DOMContentLoaded",[o]).init()},482:function(e,t,i){i.d(t,{Z:function(){return c}});var r=i(698),n=i(963),a=i(770);function s(e){const t=Object.assign({},e);return delete t.inputs,delete t.allowOneSidedRange,delete t.maxNumberOfDates,t}function o(e,t,i,n){(0,r.cF)(e,[[i,"changeDate",t]]),new a.Z(i,n,e)}function d(e,t){if(e._updating)return;e._updating=!0;const i=t.target;if(void 0===i.datepicker)return;const r=e.datepickers,n={render:!1},a=e.inputs.indexOf(i),s=0===a?1:0,o=r[a].dates[0],d=r[s].dates[0];void 0!==o&&void 0!==d?0===a&&o>d?(r[0].setDate(d,n),r[1].setDate(o,n)):1===a&&o0?d(this,{target:this.inputs[0]}):a[1].dates.length>0&&d(this,{target:this.inputs[1]})}get dates(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}setOptions(e){this.allowOneSidedRange=!!e.allowOneSidedRange;const t=s(e);this.datepickers[0].setOptions(t),this.datepickers[1].setOptions(t)}destroy(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),(0,r.uV)(this),delete this.element.rangepicker}getDates(e){const t=e?t=>(0,n.p6)(t,e,this.datepickers[0].config.locale):e=>new Date(e);return this.dates.map((e=>void 0===e?e:t(e)))}setDates(e,t){const[i,r]=this.datepickers,n=this.dates;this._updating=!0,i.setDate(e),r.setDate(t),delete this._updating,r.dates[0]!==n[1]?d(this,{target:this.inputs[1]}):i.dates[0]!==n[0]&&d(this,{target:this.inputs[0]})}}},770:function(e,t,i){i.d(t,{Z:function(){return ae}});var r=i(105),n=i(560),a=i(963),s=i(698);const o={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};var d={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0};const c=document.createRange();function l(e){return c.createContextualFragment(e)}function h(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function u(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function g(e){e.firstChild&&(e.removeChild(e.firstChild),g(e))}const{language:f,format:p,weekStart:m}=d;function b(e,t){return e.length<6&&t>=0&&t<7?(0,r.$C)(e,t):e}function y(e){return(e+6)%7}function w(e,t,i,r){const n=(0,a.sG)(e,t,i);return void 0!==n?n:r}function k(e,t,i=3){const r=parseInt(e,10);return r>=0&&r<=i?r:t}function v(e,t){const i=Object.assign({},e),s={},o=t.constructor.locales;let{format:c,language:h,locale:u,maxDate:g,maxView:v,minDate:D,pickLevel:x,startView:M,weekStart:S}=t.config||{};if(i.language){let e;if(i.language!==h&&(o[i.language]?e=i.language:(e=i.language.split("-")[0],void 0===o[e]&&(e=!1))),delete i.language,e){h=s.language=e;const t=u||o[f];u=Object.assign({format:p,weekStart:m},o[f]),h!==f&&Object.assign(u,o[h]),s.locale=u,c===t.format&&(c=s.format=u.format),S===t.weekStart&&(S=s.weekStart=u.weekStart,s.weekEnd=y(u.weekStart))}}if(i.format){const e="function"==typeof i.format.toDisplay,t="function"==typeof i.format.toValue,r=a.CL.test(i.format);(e&&t||r)&&(c=s.format=i.format),delete i.format}let O=D,C=g;if(void 0!==i.minDate&&(O=null===i.minDate?(0,n.by)(0,0,1):w(i.minDate,c,u,O),delete i.minDate),void 0!==i.maxDate&&(C=null===i.maxDate?void 0:w(i.maxDate,c,u,C),delete i.maxDate),C{const i=(0,a.sG)(t,c,u);return void 0!==i?(0,r.$C)(e,i):e}),[]),delete i.datesDisabled),void 0!==i.defaultViewDate){const e=(0,a.sG)(i.defaultViewDate,c,u);void 0!==e&&(s.defaultViewDate=e),delete i.defaultViewDate}if(void 0!==i.weekStart){const e=Number(i.weekStart)%7;isNaN(e)||(S=s.weekStart=e,s.weekEnd=y(e)),delete i.weekStart}if(i.daysOfWeekDisabled&&(s.daysOfWeekDisabled=i.daysOfWeekDisabled.reduce(b,[]),delete i.daysOfWeekDisabled),i.daysOfWeekHighlighted&&(s.daysOfWeekHighlighted=i.daysOfWeekHighlighted.reduce(b,[]),delete i.daysOfWeekHighlighted),void 0!==i.maxNumberOfDates){const e=parseInt(i.maxNumberOfDates,10);e>=0&&(s.maxNumberOfDates=e,s.multidate=1!==e),delete i.maxNumberOfDates}i.dateDelimiter&&(s.dateDelimiter=String(i.dateDelimiter),delete i.dateDelimiter);let E=x;void 0!==i.pickLevel&&(E=k(i.pickLevel,2),delete i.pickLevel),E!==x&&(x=s.pickLevel=E);let F=v;void 0!==i.maxView&&(F=k(i.maxView,v),delete i.maxView),F=x>F?x:F,F!==v&&(v=s.maxView=F);let L=M;if(void 0!==i.startView&&(L=k(i.startView,L),delete i.startView),Lv&&(L=v),L!==M&&(s.startView=L),i.prevArrow){const e=l(i.prevArrow);e.childNodes.length>0&&(s.prevArrow=e.childNodes),delete i.prevArrow}if(i.nextArrow){const e=l(i.nextArrow);e.childNodes.length>0&&(s.nextArrow=e.childNodes),delete i.nextArrow}if(void 0!==i.disableTouchKeyboard&&(s.disableTouchKeyboard="ontouchstart"in document&&!!i.disableTouchKeyboard,delete i.disableTouchKeyboard),i.orientation){const e=i.orientation.toLowerCase().split(/\s+/g);s.orientation={x:e.find((e=>"left"===e||"right"===e))||"auto",y:e.find((e=>"top"===e||"bottom"===e))||"auto"},delete i.orientation}if(void 0!==i.todayBtnMode){switch(i.todayBtnMode){case 0:case 1:s.todayBtnMode=i.todayBtnMode}delete i.todayBtnMode}return Object.keys(i).forEach((e=>{void 0!==i[e]&&(0,r.l$)(d,e)&&(s[e]=i[e])})),s}var D=(0,r.zh)('');var x=(0,r.zh)(`
\n
${(0,r.em)("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
${(0,r.em)("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}
\n
`);var M=(0,r.zh)(`
\n
\n
${(0,r.em)("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
`);class S{constructor(e,t){Object.assign(this,t,{picker:e,element:l('
').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}performBeforeHook(e,t,i){let n=this.beforeShow(new Date(i));switch(typeof n){case"boolean":n={enabled:n};break;case"string":n={classes:n}}if(n){if(!1===n.enabled&&(e.classList.add("disabled"),(0,r.$C)(this.disabled,t)),n.classes){const i=n.classes.split(/\s+/);e.classList.add(...i),i.includes("disabled")&&(0,r.$C)(this.disabled,t)}n.content&&function(e,t){g(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(l(t)):"function"==typeof t.forEach&&t.forEach((t=>{e.appendChild(t)}))}(e,n.content)}}}class O extends S{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=l(x).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(e){let t;if((0,r.l$)(e,"minDate")&&(this.minDate=e.minDate),(0,r.l$)(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){const i=this.locale=e.locale;this.dayNames=i.daysMin,this.switchLabelFormat=i.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"==typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){const e=l(M).firstChild;this.calendarWeeks={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(u(this.dow),this.calendarWeeks&&u(this.calendarWeeks.dow)):(h(this.dow),this.calendarWeeks&&h(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach(((e,t)=>{const i=(this.weekStart+t)%7;e.textContent=this.dayNames[i],e.className=this.daysOfWeekDisabled.includes(i)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}))}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),i=e.getMonth(),r=(0,n.by)(t,i,1),a=(0,n.fr)(r,this.weekStart,this.weekStart);this.first=r,this.last=(0,n.by)(t,i+1,0),this.start=a,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){this.today=this.todayHighlight?(0,n.Lg)():void 0,this.disabled=[...this.datesDisabled];const e=(0,a.p6)(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const e=(0,n.fr)(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach(((t,i)=>{t.textContent=(0,n.Qk)((0,n.jh)(e,i))}))}Array.from(this.grid.children).forEach(((e,t)=>{const i=e.classList,a=(0,n.E4)(this.start,t),s=new Date(a),o=s.getDay();if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,e.dataset.date=a,e.textContent=s.getDate(),athis.last&&i.add("next","text-gray-500","dark:text-white"),this.today===a&&i.add("today","bg-gray-100","dark:bg-gray-600"),(athis.maxDate||this.disabled.includes(a))&&i.add("disabled","cursor-not-allowed"),this.daysOfWeekDisabled.includes(o)&&(i.add("disabled","cursor-not-allowed"),(0,r.$C)(this.disabled,a)),this.daysOfWeekHighlighted.includes(o)&&i.add("highlighted"),this.range){const[e,t]=this.range;a>e&&a{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","text-white","dark:bg-blue-600","dark:text-white","focused"),e.classList.add("text-gray-900","rounded-lg","dark:text-white")})),Array.from(this.grid.children).forEach((i=>{const r=Number(i.dataset.date),n=i.classList;n.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),r>e&&r{e.classList.remove("focused")})),this.grid.children[e].classList.add("focused")}}function C(e,t){if(!e||!e[0]||!e[1])return;const[[i,r],[n,a]]=e;return i>t||ne})))),super.init(e)}setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),(0,r.l$)(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if((0,r.l$)(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const t=new Date(e.maxDate);this.maxYear=t.getFullYear(),this.maxMonth=t.getMonth(),this.maxDate=(0,n.by)(this.maxYear,this.maxMonth+1,0)}void 0!==e.beforeShowMonth&&(this.beforeShow="function"==typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce(((e,t)=>{const i=new Date(t),n=i.getFullYear(),a=i.getMonth();return void 0===e[n]?e[n]=[a]:(0,r.$C)(e[n],a),e}),{}),t&&t.dates&&(this.range=t.dates.map((e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.yearthis.maxYear,i=this.year===this.minYear,r=this.year===this.maxYear,a=C(this.range,this.year);Array.from(this.grid.children).forEach(((s,o)=>{const d=s.classList,c=(0,n.by)(this.year,o,1);if(s.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(s.dataset.date=c),s.textContent=this.monthNames[o],(t||i&&othis.maxMonth)&&d.add("disabled"),a){const[e,t]=a;o>e&&o{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","dark:bg-blue-600","dark:text-white","text-white","focused"),e.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")})),Array.from(this.grid.children).forEach(((r,n)=>{const a=r.classList;n>t&&n{e.classList.remove("focused")})),this.grid.children[this.focused].classList.add("focused")}}class F extends S{constructor(e,t){super(e,t)}init(e,t=!0){var i;t&&(this.navStep=10*this.step,this.beforeShowOption=`beforeShow${i=this.cellClass,[...i].reduce(((e,t,i)=>e+(i?t:t.toUpperCase())),"")}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(l((0,r.em)("span",12)))),super.init(e)}setOptions(e){if((0,r.l$)(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=(0,n.ak)(e.minDate,this.step),this.minDate=(0,n.by)(this.minYear,0,1))),(0,r.l$)(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=(0,n.ak)(e.maxDate,this.step),this.maxDate=(0,n.by)(this.maxYear,11,31))),void 0!==e[this.beforeShowOption]){const t=e[this.beforeShowOption];this.beforeShow="function"==typeof t?t:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=(0,n.ak)(e,this.navStep),i=t+9*this.step;this.first=t,this.last=i,this.start=t-this.step,this.focused=(0,n.ak)(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce(((e,t)=>(0,r.$C)(e,(0,n.ak)(t,this.step))),[]),t&&t.dates&&(this.range=t.dates.map((e=>{if(void 0!==e)return(0,n.ak)(e,this.step)})))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach(((e,t)=>{const i=e.classList,r=this.start+t*this.step,a=(0,n.by)(r,0,1);if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(e.dataset.date=a),e.textContent=e.dataset.year=r,0===t?i.add("prev"):11===t&&i.add("next"),(rthis.maxYear)&&i.add("disabled"),this.range){const[e,t]=this.range;r>e&&r{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","text-white","dark:bg-blue-600","dark:text-white","focused")})),Array.from(this.grid.children).forEach((i=>{const r=Number(i.textContent),n=i.classList;r>e&&r{e.classList.remove("focused")})),this.grid.children[e].classList.add("focused")}}function L(e,t){const i={date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e};e.element.dispatchEvent(new CustomEvent(t,{detail:i}))}function V(e,t){const{minDate:i,maxDate:a}=e.config,{currentView:s,viewDate:o}=e.picker;let d;switch(s.id){case 0:d=(0,n.zI)(o,t);break;case 1:d=(0,n.Bc)(o,t);break;default:d=(0,n.Bc)(o,t*s.navStep)}d=(0,r.jG)(d,i,a),e.picker.changeFocus(d).render()}function B(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function A(e){e.config.updateOnBlur?e.update({autohide:!0}):(e.refresh("input"),e.hide())}function N(e,t){const i=e.picker,r=new Date(i.viewDate),a=i.currentView.id,s=1===a?(0,n.zI)(r,t-r.getMonth()):(0,n.Bc)(r,t-r.getFullYear());i.changeFocus(s).changeView(a-1).render()}function W(e){const t=e.picker,i=(0,n.Lg)();if(1===e.config.todayBtnMode){if(e.config.autohide)return void e.setDate(i);e.setDate(i,{render:!1}),t.update()}t.viewDate!==i&&t.changeFocus(i),t.changeView(0).render()}function Y(e){e.setDate({clear:!0})}function $(e){B(e)}function j(e){V(e,-1)}function _(e){V(e,1)}function H(e,t){const i=(0,s.He)(t,".datepicker-cell");if(!i||i.classList.contains("disabled"))return;const{id:r,isMinView:n}=e.picker.currentView;n?e.setDate(Number(i.dataset.date)):N(e,Number(1===r?i.dataset.month:i.dataset.year))}function T(e){e.inline||e.config.disableTouchKeyboard||e.inputField.focus()}function K(e,t){if(void 0!==t.title&&(t.title?(e.controls.title.textContent=t.title,u(e.controls.title)):(e.controls.title.textContent="",h(e.controls.title))),t.prevArrow){const i=e.controls.prevBtn;g(i),t.prevArrow.forEach((e=>{i.appendChild(e.cloneNode(!0))}))}if(t.nextArrow){const i=e.controls.nextBtn;g(i),t.nextArrow.forEach((e=>{i.appendChild(e.cloneNode(!0))}))}if(t.locale&&(e.controls.todayBtn.textContent=t.locale.today,e.controls.clearBtn.textContent=t.locale.clear),void 0!==t.todayBtn&&(t.todayBtn?u(e.controls.todayBtn):h(e.controls.todayBtn)),(0,r.l$)(t,"minDate")||(0,r.l$)(t,"maxDate")){const{minDate:t,maxDate:i}=e.datepicker.config;e.controls.todayBtn.disabled=!(0,r.mh)((0,n.Lg)(),t,i)}void 0!==t.clearBtn&&(t.clearBtn?u(e.controls.clearBtn):h(e.controls.clearBtn))}function I(e){const{dates:t,config:i}=e,n=t.length>0?(0,r.Jm)(t):i.defaultViewDate;return(0,r.jG)(n,i.minDate,i.maxDate)}function P(e,t){const i=new Date(e.viewDate),r=new Date(t),{id:n,year:a,first:s,last:o}=e.currentView,d=r.getFullYear();switch(e.viewDate=t,d!==i.getFullYear()&&L(e.datepicker,"changeYear"),r.getMonth()!==i.getMonth()&&L(e.datepicker,"changeMonth"),n){case 0:return to;case 1:return d!==a;default:return do}}function R(e){return window.getComputedStyle(e).direction}class z{constructor(e){this.datepicker=e;const t=D.replace(/%buttonClass%/g,e.config.buttonClass),i=this.element=l(t).firstChild,[r,n,a]=i.firstChild.children,o=r.firstElementChild,[d,c,h]=r.lastElementChild.children,[u,g]=a.firstChild.children,f={title:o,prevBtn:d,viewSwitch:c,nextBtn:h,todayBtn:u,clearBtn:g};this.main=n,this.controls=f;const p=e.inline?"inline":"dropdown";i.classList.add(`datepicker-${p}`),"dropdown"===p&&i.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),K(this,e.config),this.viewDate=I(e),(0,s.cF)(e,[[i,"click",T.bind(null,e),{capture:!0}],[n,"click",H.bind(null,e)],[f.viewSwitch,"click",$.bind(null,e)],[f.prevBtn,"click",j.bind(null,e)],[f.nextBtn,"click",_.bind(null,e)],[f.todayBtn,"click",W.bind(null,e)],[f.clearBtn,"click",Y.bind(null,e)]]),this.views=[new O(this),new E(this),new F(this,{id:2,name:"years",cellClass:"year",step:1}),new F(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}setOptions(e){K(this,e),this.views.forEach((t=>{t.init(e,!1)})),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;const e=this.datepicker;if(!e.inline){const t=R(e.inputField);t!==R(e.config.container)?this.element.dir=t:this.element.dir&&this.element.removeAttribute("dir"),this.place(),e.config.disableTouchKeyboard&&e.inputField.blur()}L(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,L(this.datepicker,"hide"))}place(){const{classList:e,style:t}=this.element,{config:i,inputField:r}=this.datepicker,n=i.container,{width:a,height:s}=this.element.getBoundingClientRect(),{left:o,top:d,width:c}=n.getBoundingClientRect(),{left:l,top:h,width:u,height:g}=r.getBoundingClientRect();let f,p,m,{x:b,y:y}=i.orientation;n===document.body?(f=window.scrollY,p=l+window.scrollX,m=h+f):(f=n.scrollTop,p=l-o,m=h-d+f),"auto"===b&&(p<0?(b="left",p=10):b=p+a>c||"rtl"===R(r)?"right":"left"),"right"===b&&(p-=a-u),"auto"===y&&(y=m-s{e.updateFocus()})),this}update(){const e=I(this.datepicker);return this._renderMethod=P(this,e)?"render":"refresh",this.views.forEach((e=>{e.updateFocus(),e.updateSelection()})),this}render(e=!0){const t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}function q(e,t,i,n,a,s){if((0,r.mh)(e,a,s)){if(n(e)){return q(t(e,i),t,i,n,a,s)}return e}}function J(e,t,i,r){const a=e.picker,s=a.currentView,o=s.step||1;let d,c,l=a.viewDate;switch(s.id){case 0:l=r?(0,n.E4)(l,7*i):t.ctrlKey||t.metaKey?(0,n.Bc)(l,i):(0,n.E4)(l,i),d=n.E4,c=e=>s.disabled.includes(e);break;case 1:l=(0,n.zI)(l,r?4*i:i),d=n.zI,c=e=>{const t=new Date(e),{year:i,disabled:r}=s;return t.getFullYear()===i&&r.includes(t.getMonth())};break;default:l=(0,n.Bc)(l,i*(r?4:1)*o),d=n.Bc,c=e=>s.disabled.includes((0,n.ak)(e,o))}l=q(l,d,i<0?-o:o,c,s.minDate,s.maxDate),void 0!==l&&a.changeFocus(l).render()}function G(e,t){if("Tab"===t.key)return void A(e);const i=e.picker,{id:r,isMinView:n}=i.currentView;if(i.active)if(e.editMode)switch(t.key){case"Escape":i.hide();break;case"Enter":e.exitEditMode({update:!0,autohide:e.config.autohide});break;default:return}else switch(t.key){case"Escape":i.hide();break;case"ArrowLeft":if(t.ctrlKey||t.metaKey)V(e,-1);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,-1,!1)}break;case"ArrowRight":if(t.ctrlKey||t.metaKey)V(e,1);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,1,!1)}break;case"ArrowUp":if(t.ctrlKey||t.metaKey)B(e);else{if(t.shiftKey)return void e.enterEditMode();J(e,t,-1,!0)}break;case"ArrowDown":if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();J(e,t,1,!0);break;case"Enter":n?e.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void e.enterEditMode();default:return void(1!==t.key.length||t.ctrlKey||t.metaKey||e.enterEditMode())}else switch(t.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":e.update();break;default:return}t.preventDefault(),t.stopPropagation()}function Z(e){e.config.showOnFocus&&!e._showing&&e.show()}function U(e,t){const i=t.target;(e.picker.active||e.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout((()=>{delete i._active,delete i._clicking}),2e3))}function Q(e,t){const i=t.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&e.enterEditMode(),delete i._active,e.config.showOnClick&&e.show())}function X(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function ee(e,t){const i=e.element;if(i!==document.activeElement)return;const r=e.picker.element;(0,s.He)(t,(e=>e===i||e===r))||A(e)}function te(e,t){return e.map((e=>(0,a.p6)(e,t.format,t.locale))).join(t.dateDelimiter)}function ie(e,t,i=!1){const{config:n,dates:s,rangepicker:o}=e;if(0===t.length)return i?[]:void 0;const d=o&&e===o.datepickers[1];let c=t.reduce(((e,t)=>{let i=(0,a.sG)(t,n.format,n.locale);if(void 0===i)return e;if(n.pickLevel>0){const e=new Date(i);i=1===n.pickLevel?d?e.setMonth(e.getMonth()+1,0):e.setDate(1):d?e.setFullYear(e.getFullYear()+1,0,0):e.setMonth(0,1)}return!(0,r.mh)(i,n.minDate,n.maxDate)||e.includes(i)||n.datesDisabled.includes(i)||n.daysOfWeekDisabled.includes(new Date(i).getDay())||e.push(i),e}),[]);return 0!==c.length?(n.multidate&&!i&&(c=c.reduce(((e,t)=>(s.includes(t)||e.push(t),e)),s.filter((e=>!c.includes(e))))),n.maxNumberOfDates&&c.length>n.maxNumberOfDates?c.slice(-1*n.maxNumberOfDates):c):void 0}function re(e,t=3,i=!0){const{config:r,picker:n,inputField:a}=e;if(2&t){const e=n.active?r.pickLevel:r.startView;n.update().changeView(e).render(i)}1&t&&a&&(a.value=te(e.dates,r))}function ne(e,t,i){let{clear:r,render:n,autohide:a}=i;void 0===n&&(n=!0),n?void 0===a&&(a=e.config.autohide):a=!1;const s=ie(e,t,r);s&&(s.toString()!==e.dates.toString()?(e.dates=s,re(e,n?3:1),L(e,"changeDate")):re(e,1),a&&e.hide())}class ae{constructor(e,t={},i){e.datepicker=this,this.element=e;const a=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:document.body,defaultViewDate:(0,n.Lg)(),maxDate:void 0,minDate:void 0},v(d,this));this._options=t,Object.assign(a,v(t,this));const o=this.inline="INPUT"!==e.tagName;let c,l;if(o)a.container=e,l=(0,r.W7)(e.dataset.date,a.dateDelimiter),delete e.dataset.date;else{const i=t.container?document.querySelector(t.container):null;i&&(a.container=i),c=this.inputField=e,c.classList.add("datepicker-input"),l=(0,r.W7)(c.value,a.dateDelimiter)}if(i){const e=i.inputs.indexOf(c),t=i.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,Object.defineProperty(this,"rangepicker",{get(){return i}})}this.dates=[];const h=ie(this,l);h&&h.length>0&&(this.dates=h),c&&(c.value=te(this.dates,a));const u=this.picker=new z(this);if(o)this.show();else{const e=ee.bind(null,this),t=[[c,"keydown",G.bind(null,this)],[c,"focus",Z.bind(null,this)],[c,"mousedown",U.bind(null,this)],[c,"click",Q.bind(null,this)],[c,"paste",X.bind(null,this)],[document,"mousedown",e],[document,"touchstart",e],[window,"resize",u.place.bind(u)]];(0,s.cF)(this,t)}}static formatDate(e,t,i){return(0,a.p6)(e,t,i&&o[i]||o.en)}static parseDate(e,t,i){return(0,a.sG)(e,t,i&&o[i]||o.en)}static get locales(){return o}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=this.picker,i=v(e,this);Object.assign(this._options,e),Object.assign(this.config,i),t.setOptions(i),re(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),(0,s.uV)(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(e){const t=e?t=>(0,a.p6)(t,e,this.config.locale):e=>new Date(e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const t=[...e],i={},n=(0,r.Jm)(e);"object"!=typeof n||Array.isArray(n)||n instanceof Date||!n||Object.assign(i,t.pop());ne(this,Array.isArray(t[0])?t[0]:t,i)}update(e){if(this.inline)return;const t={clear:!0,autohide:!(!e||!e.autohide)};ne(this,(0,r.W7)(this.inputField.value,this.config.dateDelimiter),t)}refresh(e,t=!1){let i;e&&"string"!=typeof e&&(t=e,e=void 0),i="picker"===e?2:"input"===e?1:3,re(this,i,!t)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700"))}exitEditMode(e){if(this.inline||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700"),t.update&&this.update(t)}}},963:function(e,t,i){i.d(t,{CL:function(){return a},p6:function(){return f},sG:function(){return g}});var r=i(560),n=i(105);const a=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,s=/[\s!-/:-@[-`{-~年月日]+/;let o={};const d={y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m(e,t,i){const r=new Date(e);let n=parseInt(t,10)-1;if(isNaN(n)){if(!t)return NaN;const e=t.toLowerCase(),r=t=>t.toLowerCase().startsWith(e);if(n=i.monthsShort.findIndex(r),n<0&&(n=i.months.findIndex(r)),n<0)return NaN}return r.setMonth(n),r.getMonth()!==l(n)?r.setDate(0):r.getTime()},d(e,t){return new Date(e).setDate(parseInt(t,10))}},c={d(e){return e.getDate()},dd(e){return h(e.getDate(),2)},D(e,t){return t.daysShort[e.getDay()]},DD(e,t){return t.days[e.getDay()]},m(e){return e.getMonth()+1},mm(e){return h(e.getMonth()+1,2)},M(e,t){return t.monthsShort[e.getMonth()]},MM(e,t){return t.months[e.getMonth()]},y(e){return e.getFullYear()},yy(e){return h(e.getFullYear(),2).slice(-2)},yyyy(e){return h(e.getFullYear(),4)}};function l(e){return e>-1?e%12:l(e+12)}function h(e,t){return e.toString().padStart(t,"0")}function u(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in o)return o[e];const t=e.split(a),i=e.match(new RegExp(a,"g"));if(0===t.length||!i)throw new Error("Invalid date format.");const l=i.map((e=>c[e])),h=Object.keys(d).reduce(((e,t)=>(i.find((e=>"D"!==e[0]&&e[0].toLowerCase()===t))&&e.push(t),e)),[]);return o[e]={parser(e,t){const n=e.split(s).reduce(((e,t,r)=>{if(t.length>0&&i[r]){const n=i[r][0];"M"===n?e.m=t:"D"!==n&&(e[n]=t)}return e}),{});return h.reduce(((e,i)=>{const r=d[i](e,n[i],t);return isNaN(r)?e:r}),(0,r.Lg)())},formatter(e,i){return l.reduce(((r,n,a)=>r+`${t[a]}${n(e,i)}`),"")+(0,n.Jm)(t)}}}function g(e,t,i){if(e instanceof Date||"number"==typeof e){const t=(0,r.xR)(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return(0,r.Lg)();if(t&&t.toValue){const n=t.toValue(e,t,i);return isNaN(n)?void 0:(0,r.xR)(n)}return u(t).parser(e,i)}}function f(e,t,i){if(isNaN(e)||!e&&0!==e)return"";const r="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,i):u(t).formatter(r,i)}},560:function(e,t,i){function r(e){return new Date(e).setHours(0,0,0,0)}function n(){return(new Date).setHours(0,0,0,0)}function a(...e){switch(e.length){case 0:return n();case 1:return r(e[0])}const t=new Date(0);return t.setFullYear(...e),t.setHours(0,0,0,0)}function s(e,t){const i=new Date(e);return i.setDate(i.getDate()+t)}function o(e,t){return s(e,7*t)}function d(e,t){const i=new Date(e),r=i.getMonth()+t;let n=r%12;n<0&&(n+=12);const a=i.setMonth(r);return i.getMonth()!==n?i.setDate(0):a}function c(e,t){const i=new Date(e),r=i.getMonth(),n=i.setFullYear(i.getFullYear()+t);return 1===r&&2===i.getMonth()?i.setDate(0):n}function l(e,t){return(e-t+7)%7}function h(e,t,i=0){const r=new Date(e).getDay();return s(e,l(t,i)-l(r,i))}function u(e){const t=h(e,4,1),i=h(new Date(t).setMonth(0,4),4,1);return Math.round((t-i)/6048e5)+1}function g(e,t){const i=new Date(e).getFullYear();return Math.floor(i/t)*t}i.d(t,{Bc:function(){return c},E4:function(){return s},Lg:function(){return n},Qk:function(){return u},ak:function(){return g},by:function(){return a},fr:function(){return h},jh:function(){return o},xR:function(){return r},zI:function(){return d}})},698:function(e,t,i){i.d(t,{He:function(){return c},cF:function(){return s},uV:function(){return o}});const r=new WeakMap,{addEventListener:n,removeEventListener:a}=EventTarget.prototype;function s(e,t){let i=r.get(e);i||(i=[],r.set(e,i)),t.forEach((e=>{n.call(...e),i.push(e)}))}function o(e){let t=r.get(e);t&&(t.forEach((e=>{a.call(...e)})),r.delete(e))}if(!Event.prototype.composedPath){const e=(t,i=[])=>{let r;return i.push(t),t.parentNode?r=t.parentNode:t.host?r=t.host:t.defaultView&&(r=t.defaultView),r?e(r,i):i};Event.prototype.composedPath=function(){return e(this.target)}}function d(e,t,i,r=0){const n=e[r];return t(n)?n:n!==i&&n.parentElement?d(e,t,i,r+1):void 0}function c(e,t){const i="function"==typeof t?t:e=>e.matches(t);return d(e.composedPath(),i,e.currentTarget)}},105:function(e,t,i){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n(e){return e[e.length-1]}function a(e,...t){return t.forEach((t=>{e.includes(t)||e.push(t)})),e}function s(e,t){return e?e.split(t):[]}function o(e,t,i){return(void 0===t||e>=t)&&(void 0===i||e<=i)}function d(e,t,i){return ei?i:e}function c(e,t,i={},r=0,n=""){n+=`<${Object.keys(i).reduce(((e,t)=>{let n=i[t];return"function"==typeof n&&(n=n(r)),`${e} ${t}="${n}"`}),e)}>`;const a=r+1;return a\s+/g,">").replace(/\s+ .tooltip-arrow:before { + border-style: solid; + border-color: #e5e7eb; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before { + border-top-width: 1px; + border-right-width: 1px; +} + +.tooltip[data-popper-placement^='top'] > .tooltip-arrow { + bottom: -4px; +} + +.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow { + top: -4px; +} + +.tooltip[data-popper-placement^='left'] > .tooltip-arrow { + right: -4px; +} + +.tooltip[data-popper-placement^='right'] > .tooltip-arrow { + left: -4px; +} + +.tooltip.invisible > .tooltip-arrow:before { + visibility: hidden; +} + +[data-popper-arrow],[data-popper-arrow]:before { + position: absolute; + width: 8px; + height: 8px; + background: inherit; +} + +[data-popper-arrow] { + visibility: hidden; +} + +[data-popper-arrow]:before { + content: ""; + visibility: visible; + transform: rotate(45deg); +} + +[data-popper-arrow]:after { + content: ""; + visibility: visible; + transform: rotate(45deg); + position: absolute; + width: 9px; + height: 9px; + background: inherit; +} + +[role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #4b5563; +} + +[role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #4b5563; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow] { + bottom: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow] { + top: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow] { + right: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow] { + left: -5px; +} + +[role="tooltip"].invisible > [data-popper-arrow]:before { + visibility: hidden; +} + +[role="tooltip"].invisible > [data-popper-arrow]:after { + visibility: hidden; +} + +[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +} + +[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #1C64F2; +} + +input::-moz-placeholder, textarea::-moz-placeholder { + color: #6B7280; + opacity: 1; +} + +input::placeholder,textarea::placeholder { + color: #6B7280; + opacity: 1; +} + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-date-and-time-value { + min-height: 1.5em; +} + +select:not([size]) { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e"); + background-position: right 0.75rem center; + background-repeat: no-repeat; + background-size: 0.75em 0.75em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[multiple] { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + print-color-adjust: unset; +} + +[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #1C64F2; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +} + +[type='checkbox'] { + border-radius: 0px; +} + +[type='radio'] { + border-radius: 100%; +} + +[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +} + +[type='checkbox']:checked,[type='radio']:checked,.dark [type='checkbox']:checked,.dark [type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 0.55em 0.55em; + background-position: center; + background-repeat: no-repeat; +} + +[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e"); + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +.dark [type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e"); + background-color: currentColor; + border-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +} + +[type='file']:focus { + outline: 1px auto inherit; +} + +input[type=file]::file-selector-button { + color: white; + background: #1F2937; + border: 0; + font-weight: 500; + font-size: 0.875rem; + cursor: pointer; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + padding-left: 2rem; + padding-right: 1rem; + -webkit-margin-start: -1rem; + margin-inline-start: -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +input[type=file]::file-selector-button:hover { + background: #374151; +} + +.dark input[type=file]::file-selector-button { + color: white; + background: #4B5563; +} + +.dark input[type=file]::file-selector-button:hover { + background: #6B7280; +} + +input[type="range"]::-webkit-slider-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-webkit-slider-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-webkit-slider-thumb { + background: #6B7280; +} + +input[type="range"]:focus::-webkit-slider-thumb { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1px; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +input[type="range"]::-moz-range-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-moz-range-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-moz-range-thumb { + background: #6B7280; +} + +input[type="range"]::-moz-range-progress { + background: #3F83F8; +} + +input[type="range"]::-ms-fill-lower { + background: #3F83F8; +} + +input[type="range"].range-sm::-webkit-slider-thumb { + height: 1rem; + width: 1rem; +} + +input[type="range"].range-lg::-webkit-slider-thumb { + height: 1.5rem; + width: 1.5rem; +} + +input[type="range"].range-sm::-moz-range-thumb { + height: 1rem; + width: 1rem; +} + +input[type="range"].range-lg::-moz-range-thumb { + height: 1.5rem; + width: 1.5rem; +} + +.toggle-bg:after { + content: ""; + position: absolute; + top: 0.125rem; + left: 0.125rem; + background: white; + border-color: #D1D5DB; + border-width: 1px; + border-radius: 9999px; + height: 1.25rem; + width: 1.25rem; + transition-property: background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter; + transition-duration: .15s; + box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); +} + +input:checked + .toggle-bg:after { + transform: translateX(100%);; + border-color: white; +} + +input:checked + .toggle-bg { + background: #1C64F2; + border-color: #1C64F2; +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} +.container { + width: 100%; +} +@media (min-width: 640px) { + + .container { + max-width: 640px; + } +} +@media (min-width: 768px) { + + .container { + max-width: 768px; + } +} +@media (min-width: 1024px) { + + .container { + max-width: 1024px; + } +} +@media (min-width: 1280px) { + + .container { + max-width: 1280px; + } +} +@media (min-width: 1536px) { + + .container { + max-width: 1536px; + } +} +.apexcharts-canvas .apexcharts-tooltip { + background-color: white; + color: #6B7280; + border: 0 !important; + border-radius: 0.25rem; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.dark .apexcharts-canvas .apexcharts-tooltip { + background-color: #374151; + color: #9CA3AF; + border-color: transparent; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-right: 0.75rem; + padding-left: 0.75rem; + margin-bottom: 0.75rem; + background-color: #F3F4F6; + border-bottom-color: #E5E7EB; + font-size: 0.875rem !important; + font-weight: 400; + color: #6B7280; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title { + background-color: #4B5563; + border-color: #6B7280; + color: #9CA3AF; +} +.apexcharts-canvas .apexcharts-xaxistooltip { + color: #6B7280; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-right: 0.75rem; + padding-left: 0.75rem; + border-color: transparent; + background-color: white; + border-radius: 0.25rem; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.dark .apexcharts-canvas .apexcharts-xaxistooltip { + color: #9CA3AF; + background-color: #374151; +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label { + color: #6B7280; + font-size: 0.875rem; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label { + color: #9CA3AF; +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value { + color: #111827; + font-size: 0.875rem; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value { + color: white; +} +.apexcharts-canvas .apexcharts-xaxistooltip-text { + font-weight: 400; + font-size: 0.875rem !important; +} +.apexcharts-canvas .apexcharts-xaxistooltip:after, .apexcharts-canvas .apexcharts-xaxistooltip:before { + border-bottom-color: white; +} +.apexcharts-canvas .apexcharts-xaxistooltip:after { + border-width: 8px; + margin-left: -8px; +} +.apexcharts-canvas .apexcharts-xaxistooltip:before { + border-width: 10px; + margin-left: -10px; +} +.dark .apexcharts-canvas .apexcharts-xaxistooltip:after, .dark .apexcharts-canvas .apexcharts-xaxistooltip:before { + border-bottom-color: #374151; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group { + padding: 0; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active { + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-bottom: 0.75rem; + background-color: white !important; + color: #6B7280 !important; +} +.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active { + background-color: #374151 !important; + color: #9CA3AF !important; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type { + padding-top: 0.75rem; +} +.apexcharts-canvas .apexcharts-legend { + padding: 0 !important; +} +.apexcharts-canvas .apexcharts-legend-text { + font-size: 0.75rem; + font-weight: 500 !important; + padding-left: 1.25rem; + color: #6B7280 !important; +} +.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover { + color: #111827 !important; +} +.dark .apexcharts-canvas .apexcharts-legend-text { + color: #9CA3AF !important; +} +.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover { + color: white !important; +} +.apexcharts-canvas .apexcharts-legend-series { + margin-left: 0.5rem; + margin-right: 0.5rem; + margin-bottom: 0.25rem !important; + display: flex; + align-items: center; +} +.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value { + fill: #111827 !important; + font-size: 1.875rem; + font-weight: 700; +} +.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value { + fill: white !important; +} +.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label { + fill: #6B7280 !important; + font-size: 1rem; + font-weight: 400; +} +.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label { + fill: #9CA3AF !important; +} +.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label { + font-size: 0.75rem !important; + font-weight: 600 !important; + text-shadow: none !important; + filter: none !important; +} +.apexcharts-gridline, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs { + stroke: #E5E7EB !important; +} +.dark .apexcharts-gridline, .dark .apexcharts-xcrosshairs, .dark .apexcharts-ycrosshairs { + stroke: #374151 !important; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} +.pointer-events-none { + pointer-events: none; +} +.visible { + visibility: visible; +} +.invisible { + visibility: hidden; +} +.collapse { + visibility: collapse; +} +.static { + position: static; +} +.fixed { + position: fixed; +} +.absolute { + position: absolute; +} +.relative { + position: relative; +} +.sticky { + position: sticky; +} +.inset-0 { + inset: 0px; +} +.inset-y-0 { + top: 0px; + bottom: 0px; +} +.-left-1 { + left: -0.25rem; +} +.-left-1\.5 { + left: -0.375rem; +} +.-left-14 { + left: -3.5rem; +} +.-left-3 { + left: -0.75rem; +} +.-left-4 { + left: -1rem; +} +.-left-\[17px\] { + left: -17px; +} +.-right-2 { + right: -0.5rem; +} +.-right-\[16px\] { + right: -16px; +} +.-right-\[17px\] { + right: -17px; +} +.-top-2 { + top: -0.5rem; +} +.-top-\[140px\] { + top: -140px; +} +.bottom-0 { + bottom: 0px; +} +.bottom-2 { + bottom: 0.5rem; +} +.bottom-2\.5 { + bottom: 0.625rem; +} +.bottom-4 { + bottom: 1rem; +} +.bottom-5 { + bottom: 1.25rem; +} +.bottom-6 { + bottom: 1.5rem; +} +.bottom-\[\*px\] { + bottom: *px; +} +.bottom-\[60px\] { + bottom: 60px; +} +.left-0 { + left: 0px; +} +.left-1 { + left: 0.25rem; +} +.left-1\/2 { + left: 50%; +} +.left-2 { + left: 0.5rem; +} +.left-2\.5 { + left: 0.625rem; +} +.left-5 { + left: 1.25rem; +} +.left-6 { + left: 1.5rem; +} +.left-7 { + left: 1.75rem; +} +.left-8 { + left: 2rem; +} +.left-auto { + left: auto; +} +.right-0 { + right: 0px; +} +.right-1\/2 { + right: 50%; +} +.right-2 { + right: 0.5rem; +} +.right-2\.5 { + right: 0.625rem; +} +.right-24 { + right: 6rem; +} +.right-3 { + right: 0.75rem; +} +.right-5 { + right: 1.25rem; +} +.right-6 { + right: 1.5rem; +} +.right-auto { + right: auto; +} +.top-0 { + top: 0px; +} +.top-1 { + top: 0.25rem; +} +.top-1\/2 { + top: 50%; +} +.top-2 { + top: 0.5rem; +} +.top-2\.5 { + top: 0.625rem; +} +.top-2\/4 { + top: 50%; +} +.top-28 { + top: 7rem; +} +.top-3 { + top: 0.75rem; +} +.top-4 { + top: 1rem; +} +.top-5 { + top: 1.25rem; +} +.top-6 { + top: 1.5rem; +} +.top-\[124px\] { + top: 124px; +} +.top-\[142px\] { + top: 142px; +} +.top-\[178px\] { + top: 178px; +} +.top-\[40px\] { + top: 40px; +} +.top-\[72px\] { + top: 72px; +} +.top-\[88px\] { + top: 88px; +} +.-z-10 { + z-index: -10; +} +.z-0 { + z-index: 0; +} +.z-10 { + z-index: 10; +} +.z-20 { + z-index: 20; +} +.z-30 { + z-index: 30; +} +.z-40 { + z-index: 40; +} +.z-50 { + z-index: 50; +} +.col-span-1 { + grid-column: span 1 / span 1; +} +.col-span-2 { + grid-column: span 2 / span 2; +} +.col-span-3 { + grid-column: span 3 / span 3; +} +.col-span-6 { + grid-column: span 6 / span 6; +} +.m-2 { + margin: 0.5rem; +} +.m-2\.5 { + margin: 0.625rem; +} +.m-4 { + margin: 1rem; +} +.-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; +} +.-mx-1\.5 { + margin-left: -0.375rem; + margin-right: -0.375rem; +} +.-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; +} +.-my-1\.5 { + margin-top: -0.375rem; + margin-bottom: -0.375rem; +} +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} +.mx-1\.5 { + margin-left: 0.375rem; + margin-right: 0.375rem; +} +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} +.mx-3 { + margin-left: 0.75rem; + margin-right: 0.75rem; +} +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} +.mx-auto { + margin-left: auto; + margin-right: auto; +} +.my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; +} +.my-12 { + margin-top: 3rem; + margin-bottom: 3rem; +} +.my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} +.my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; +} +.my-4 { + margin-top: 1rem; + margin-bottom: 1rem; +} +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} +.my-7 { + margin-top: 1.75rem; + margin-bottom: 1.75rem; +} +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} +.-mb-5 { + margin-bottom: -1.25rem; +} +.-mb-px { + margin-bottom: -1px; +} +.-ml-0 { + margin-left: -0px; +} +.-ml-0\.5 { + margin-left: -0.125rem; +} +.-ml-1 { + margin-left: -0.25rem; +} +.-mr-0 { + margin-right: -0px; +} +.-mr-0\.5 { + margin-right: -0.125rem; +} +.-mr-1 { + margin-right: -0.25rem; +} +.-mt-1 { + margin-top: -0.25rem; +} +.-mt-5 { + margin-top: -1.25rem; +} +.mb-0 { + margin-bottom: 0px; +} +.mb-1 { + margin-bottom: 0.25rem; +} +.mb-1\.5 { + margin-bottom: 0.375rem; +} +.mb-10 { + margin-bottom: 2.5rem; +} +.mb-2 { + margin-bottom: 0.5rem; +} +.mb-2\.5 { + margin-bottom: 0.625rem; +} +.mb-3 { + margin-bottom: 0.75rem; +} +.mb-4 { + margin-bottom: 1rem; +} +.mb-5 { + margin-bottom: 1.25rem; +} +.mb-6 { + margin-bottom: 1.5rem; +} +.mb-7 { + margin-bottom: 1.75rem; +} +.mb-8 { + margin-bottom: 2rem; +} +.mb-px { + margin-bottom: 1px; +} +.ml-0 { + margin-left: 0px; +} +.ml-1 { + margin-left: 0.25rem; +} +.ml-1\.5 { + margin-left: 0.375rem; +} +.ml-2 { + margin-left: 0.5rem; +} +.ml-2\.5 { + margin-left: 0.625rem; +} +.ml-3 { + margin-left: 0.75rem; +} +.ml-4 { + margin-left: 1rem; +} +.ml-6 { + margin-left: 1.5rem; +} +.ml-auto { + margin-left: auto; +} +.mr-1 { + margin-right: 0.25rem; +} +.mr-1\.5 { + margin-right: 0.375rem; +} +.mr-2 { + margin-right: 0.5rem; +} +.mr-2\.5 { + margin-right: 0.625rem; +} +.mr-3 { + margin-right: 0.75rem; +} +.mr-4 { + margin-right: 1rem; +} +.mr-5 { + margin-right: 1.25rem; +} +.mr-6 { + margin-right: 1.5rem; +} +.mr-8 { + margin-right: 2rem; +} +.mr-auto { + margin-right: auto; +} +.mt-0 { + margin-top: 0px; +} +.mt-1 { + margin-top: 0.25rem; +} +.mt-1\.5 { + margin-top: 0.375rem; +} +.mt-10 { + margin-top: 2.5rem; +} +.mt-14 { + margin-top: 3.5rem; +} +.mt-2 { + margin-top: 0.5rem; +} +.mt-2\.5 { + margin-top: 0.625rem; +} +.mt-3 { + margin-top: 0.75rem; +} +.mt-4 { + margin-top: 1rem; +} +.mt-5 { + margin-top: 1.25rem; +} +.mt-6 { + margin-top: 1.5rem; +} +.mt-7 { + margin-top: 1.75rem; +} +.mt-8 { + margin-top: 2rem; +} +.mt-\[2px\] { + margin-top: 2px; +} +.block { + display: block; +} +.inline-block { + display: inline-block; +} +.inline { + display: inline; +} +.flex { + display: flex; +} +.inline-flex { + display: inline-flex; +} +.table { + display: table; +} +.flow-root { + display: flow-root; +} +.grid { + display: grid; +} +.contents { + display: contents; +} +.hidden { + display: none; +} +.h-0 { + height: 0px; +} +.h-0\.5 { + height: 0.125rem; +} +.h-1 { + height: 0.25rem; +} +.h-1\.5 { + height: 0.375rem; +} +.h-10 { + height: 2.5rem; +} +.h-11 { + height: 2.75rem; +} +.h-12 { + height: 3rem; +} +.h-14 { + height: 3.5rem; +} +.h-16 { + height: 4rem; +} +.h-2 { + height: 0.5rem; +} +.h-2\.5 { + height: 0.625rem; +} +.h-20 { + height: 5rem; +} +.h-24 { + height: 6rem; +} +.h-28 { + height: 7rem; +} +.h-3 { + height: 0.75rem; +} +.h-3\.5 { + height: 0.875rem; +} +.h-36 { + height: 9rem; +} +.h-4 { + height: 1rem; +} +.h-48 { + height: 12rem; +} +.h-5 { + height: 1.25rem; +} +.h-56 { + height: 14rem; +} +.h-6 { + height: 1.5rem; +} +.h-64 { + height: 16rem; +} +.h-7 { + height: 1.75rem; +} +.h-72 { + height: 18rem; +} +.h-8 { + height: 2rem; +} +.h-80 { + height: 20rem; +} +.h-9 { + height: 2.25rem; +} +.h-96 { + height: 24rem; +} +.h-\[1\.1rem\] { + height: 1.1rem; +} +.h-\[140px\] { + height: 140px; +} +.h-\[156px\] { + height: 156px; +} +.h-\[172px\] { + height: 172px; +} +.h-\[17px\] { + height: 17px; +} +.h-\[18px\] { + height: 18px; +} +.h-\[193px\] { + height: 193px; +} +.h-\[213px\] { + height: 213px; +} +.h-\[24px\] { + height: 24px; +} +.h-\[32px\] { + height: 32px; +} +.h-\[41px\] { + height: 41px; +} +.h-\[426px\] { + height: 426px; +} +.h-\[454px\] { + height: 454px; +} +.h-\[46px\] { + height: 46px; +} +.h-\[48px\] { + height: 48px; +} +.h-\[52px\] { + height: 52px; +} +.h-\[55px\] { + height: 55px; +} +.h-\[56px\] { + height: 56px; +} +.h-\[572px\] { + height: 572px; +} +.h-\[5px\] { + height: 5px; +} +.h-\[600px\] { + height: 600px; +} +.h-\[63px\] { + height: 63px; +} +.h-\[64px\] { + height: 64px; +} +.h-\[78px\] { + height: 78px; +} +.h-\[calc\(100\%-1rem\)\] { + height: calc(100% - 1rem); +} +.h-\[calc\(100vh-5rem\)\] { + height: calc(100vh - 5rem); +} +.h-auto { + height: auto; +} +.h-full { + height: 100%; +} +.h-px { + height: 1px; +} +.h-screen { + height: 100vh; +} +.max-h-72 { + max-height: 18rem; +} +.max-h-\[48px\] { + max-height: 48px; +} +.max-h-full { + max-height: 100%; +} +.w-1 { + width: 0.25rem; +} +.w-1\/2 { + width: 50%; +} +.w-10 { + width: 2.5rem; +} +.w-11 { + width: 2.75rem; +} +.w-12 { + width: 3rem; +} +.w-14 { + width: 3.5rem; +} +.w-2 { + width: 0.5rem; +} +.w-2\.5 { + width: 0.625rem; +} +.w-2\/4 { + width: 50%; +} +.w-20 { + width: 5rem; +} +.w-24 { + width: 6rem; +} +.w-3 { + width: 0.75rem; +} +.w-3\.5 { + width: 0.875rem; +} +.w-32 { + width: 8rem; +} +.w-36 { + width: 9rem; +} +.w-4 { + width: 1rem; +} +.w-44 { + width: 11rem; +} +.w-48 { + width: 12rem; +} +.w-5 { + width: 1.25rem; +} +.w-52 { + width: 13rem; +} +.w-56 { + width: 14rem; +} +.w-6 { + width: 1.5rem; +} +.w-60 { + width: 15rem; +} +.w-64 { + width: 16rem; +} +.w-7 { + width: 1.75rem; +} +.w-72 { + width: 18rem; +} +.w-8 { + width: 2rem; +} +.w-80 { + width: 20rem; +} +.w-9 { + width: 2.25rem; +} +.w-96 { + width: 24rem; +} +.w-\[1\.1rem\] { + width: 1.1rem; +} +.w-\[148px\] { + width: 148px; +} +.w-\[188px\] { + width: 188px; +} +.w-\[208px\] { + width: 208px; +} +.w-\[272px\] { + width: 272px; +} +.w-\[300px\] { + width: 300px; +} +.w-\[3px\] { + width: 3px; +} +.w-\[48px\] { + width: 48px; +} +.w-\[52px\] { + width: 52px; +} +.w-\[56px\] { + width: 56px; +} +.w-\[6px\] { + width: 6px; +} +.w-\[calc\(100\%-2rem\)\] { + width: calc(100% - 2rem); +} +.w-auto { + width: auto; +} +.w-full { + width: 100%; +} +.min-w-0 { + min-width: 0px; +} +.min-w-max { + min-width: -moz-max-content; + min-width: max-content; +} +.max-w-2xl { + max-width: 42rem; +} +.max-w-2xs { + max-width: 16rem; +} +.max-w-4xl { + max-width: 56rem; +} +.max-w-7xl { + max-width: 80rem; +} +.max-w-8xl { + max-width: 90rem; +} +.max-w-\[128px\] { + max-width: 128px; +} +.max-w-\[133px\] { + max-width: 133px; +} +.max-w-\[300px\] { + max-width: 300px; +} +.max-w-\[301px\] { + max-width: 301px; +} +.max-w-\[330px\] { + max-width: 330px; +} +.max-w-\[341px\] { + max-width: 341px; +} +.max-w-\[351px\] { + max-width: 351px; +} +.max-w-\[360px\] { + max-width: 360px; +} +.max-w-\[380px\] { + max-width: 380px; +} +.max-w-\[400px\] { + max-width: 400px; +} +.max-w-\[440px\] { + max-width: 440px; +} +.max-w-\[450px\] { + max-width: 450px; +} +.max-w-\[460px\] { + max-width: 460px; +} +.max-w-\[480px\] { + max-width: 480px; +} +.max-w-\[48px\] { + max-width: 48px; +} +.max-w-\[500px\] { + max-width: 500px; +} +.max-w-\[540px\] { + max-width: 540px; +} +.max-w-\[640px\] { + max-width: 640px; +} +.max-w-\[83px\] { + max-width: 83px; +} +.max-w-full { + max-width: 100%; +} +.max-w-lg { + max-width: 32rem; +} +.max-w-md { + max-width: 28rem; +} +.max-w-none { + max-width: none; +} +.max-w-screen-md { + max-width: 768px; +} +.max-w-screen-xl { + max-width: 1280px; +} +.max-w-sm { + max-width: 24rem; +} +.max-w-xl { + max-width: 36rem; +} +.max-w-xs { + max-width: 20rem; +} +.flex-1 { + flex: 1 1 0%; +} +.flex-auto { + flex: 1 1 auto; +} +.flex-none { + flex: none; +} +.flex-shrink-0 { + flex-shrink: 0; +} +.shrink-0 { + flex-shrink: 0; +} +.grow { + flex-grow: 1; +} +.origin-\[0\] { + transform-origin: 0; +} +.-translate-x-1\/2 { + --tw-translate-x: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-x-full { + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-3 { + --tw-translate-y: -0.75rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-4 { + --tw-translate-y: -1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-6 { + --tw-translate-y: -1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-full { + --tw-translate-y: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-0 { + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-1\/2 { + --tw-translate-x: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-full { + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-1\/2 { + --tw-translate-y: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-1\/4 { + --tw-translate-y: 25%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-full { + --tw-translate-y: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-180 { + --tw-rotate: 180deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-45 { + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-90 { + --tw-rotate: 90deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.scale-75 { + --tw-scale-x: .75; + --tw-scale-y: .75; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.transform-none { + transform: none; +} +@keyframes pulse { + + 50% { + opacity: .5; + } +} +.animate-pulse { + animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} +@keyframes spin { + + to { + transform: rotate(360deg); + } +} +.animate-spin { + animation: spin 1s linear infinite; +} +.cursor-not-allowed { + cursor: not-allowed; +} +.cursor-pointer { + cursor: pointer; +} +.list-inside { + list-style-position: inside; +} +.list-decimal { + list-style-type: decimal; +} +.list-disc { + list-style-type: disc; +} +.list-none { + list-style-type: none; +} +.appearance-none { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} +.grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); +} +.grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} +.grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} +.grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); +} +.grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); +} +.grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); +} +.flex-row { + flex-direction: row; +} +.flex-col { + flex-direction: column; +} +.flex-wrap { + flex-wrap: wrap; +} +.items-start { + align-items: flex-start; +} +.items-end { + align-items: flex-end; +} +.items-center { + align-items: center; +} +.items-baseline { + align-items: baseline; +} +.justify-start { + justify-content: flex-start; +} +.justify-end { + justify-content: flex-end; +} +.justify-center { + justify-content: center; +} +.justify-between { + justify-content: space-between; +} +.gap-1 { + gap: 0.25rem; +} +.gap-12 { + gap: 3rem; +} +.gap-16 { + gap: 4rem; +} +.gap-2 { + gap: 0.5rem; +} +.gap-3 { + gap: 0.75rem; +} +.gap-4 { + gap: 1rem; +} +.gap-5 { + gap: 1.25rem; +} +.gap-6 { + gap: 1.5rem; +} +.gap-8 { + gap: 2rem; +} +.gap-x-16 { + -moz-column-gap: 4rem; + column-gap: 4rem; +} +.gap-x-4 { + -moz-column-gap: 1rem; + column-gap: 1rem; +} +.gap-y-3 { + row-gap: 0.75rem; +} +.-space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--tw-space-x-reverse))); +} +.-space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-1rem * var(--tw-space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--tw-space-x-reverse))); +} +.-space-x-px > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-1px * var(--tw-space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.25rem * var(--tw-space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-2\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.625rem * var(--tw-space-x-reverse)); + margin-left: calc(0.625rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1.25rem * var(--tw-space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1.5rem * var(--tw-space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); +} +.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.125rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.125rem * var(--tw-space-y-reverse)); +} +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} +.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); +} +.space-y-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); +} +.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.625rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.625rem * var(--tw-space-y-reverse)); +} +.space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); +} +.space-y-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1rem * var(--tw-space-y-reverse)); +} +.space-y-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); +} +.space-y-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); +} +.space-y-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(2rem * var(--tw-space-y-reverse)); +} +.divide-x > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(1px * var(--tw-divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(2px * var(--tw-divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-y > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); +} +.divide-gray-100 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-divide-opacity)); +} +.divide-gray-200 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-divide-opacity)); +} +.divide-gray-300 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-divide-opacity)); +} +.divide-gray-500 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-divide-opacity)); +} +.place-self-center { + place-self: center; +} +.self-center { + align-self: center; +} +.overflow-hidden { + overflow: hidden; +} +.overflow-x-auto { + overflow-x: auto; +} +.overflow-y-auto { + overflow-y: auto; +} +.overflow-x-hidden { + overflow-x: hidden; +} +.overflow-y-scroll { + overflow-y: scroll; +} +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.whitespace-normal { + white-space: normal; +} +.whitespace-nowrap { + white-space: nowrap; +} +.whitespace-pre-line { + white-space: pre-line; +} +.rounded { + border-radius: 0.25rem; +} +.rounded-\[2\.5rem\] { + border-radius: 2.5rem; +} +.rounded-\[2rem\] { + border-radius: 2rem; +} +.rounded-full { + border-radius: 9999px; +} +.rounded-lg { + border-radius: 0.5rem; +} +.rounded-md { + border-radius: 0.375rem; +} +.rounded-none { + border-radius: 0px; +} +.rounded-sm { + border-radius: 0.125rem; +} +.rounded-xl { + border-radius: 0.75rem; +} +.rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.rounded-b-\[1rem\] { + border-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; +} +.rounded-b-\[2\.5rem\] { + border-bottom-right-radius: 2.5rem; + border-bottom-left-radius: 2.5rem; +} +.rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} +.rounded-b-xl { + border-bottom-right-radius: 0.75rem; + border-bottom-left-radius: 0.75rem; +} +.rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; +} +.rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} +.rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} +.rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} +.rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; +} +.rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} +.rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; +} +.rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} +.rounded-t-\[2\.5rem\] { + border-top-left-radius: 2.5rem; + border-top-right-radius: 2.5rem; +} +.rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; +} +.rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; +} +.rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; +} +.rounded-t-xl { + border-top-left-radius: 0.75rem; + border-top-right-radius: 0.75rem; +} +.rounded-bl-lg { + border-bottom-left-radius: 0.5rem; +} +.rounded-tl-lg { + border-top-left-radius: 0.5rem; +} +.rounded-tr-lg { + border-top-right-radius: 0.5rem; +} +.border { + border-width: 1px; +} +.border-0 { + border-width: 0px; +} +.border-2 { + border-width: 2px; +} +.border-\[10px\] { + border-width: 10px; +} +.border-\[14px\] { + border-width: 14px; +} +.border-\[16px\] { + border-width: 16px; +} +.border-\[8px\] { + border-width: 8px; +} +.border-x { + border-left-width: 1px; + border-right-width: 1px; +} +.border-y { + border-top-width: 1px; + border-bottom-width: 1px; +} +.border-b { + border-bottom-width: 1px; +} +.border-b-0 { + border-bottom-width: 0px; +} +.border-b-2 { + border-bottom-width: 2px; +} +.border-l { + border-left-width: 1px; +} +.border-l-2 { + border-left-width: 2px; +} +.border-l-4 { + border-left-width: 4px; +} +.border-r { + border-right-width: 1px; +} +.border-r-0 { + border-right-width: 0px; +} +.border-t { + border-top-width: 1px; +} +.border-t-0 { + border-top-width: 0px; +} +.border-t-4 { + border-top-width: 4px; +} +.border-dashed { + border-style: dashed; +} +.\!border-blue-700 { + --tw-border-opacity: 1 !important; + border-color: rgb(26 86 219 / var(--tw-border-opacity)) !important; +} +.border-blue-100 { + --tw-border-opacity: 1; + border-color: rgb(225 239 254 / var(--tw-border-opacity)); +} +.border-blue-300 { + --tw-border-opacity: 1; + border-color: rgb(164 202 254 / var(--tw-border-opacity)); +} +.border-blue-400 { + --tw-border-opacity: 1; + border-color: rgb(118 169 250 / var(--tw-border-opacity)); +} +.border-blue-600 { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} +.border-blue-700 { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} +.border-blue-800 { + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} +.border-gray-100 { + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} +.border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} +.border-gray-300 { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} +.border-gray-500 { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} +.border-gray-700 { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} +.border-gray-800 { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity)); +} +.border-gray-900 { + --tw-border-opacity: 1; + border-color: rgb(17 24 39 / var(--tw-border-opacity)); +} +.border-green-300 { + --tw-border-opacity: 1; + border-color: rgb(132 225 188 / var(--tw-border-opacity)); +} +.border-green-400 { + --tw-border-opacity: 1; + border-color: rgb(49 196 141 / var(--tw-border-opacity)); +} +.border-green-500 { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} +.border-green-600 { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} +.border-green-700 { + --tw-border-opacity: 1; + border-color: rgb(4 108 78 / var(--tw-border-opacity)); +} +.border-green-800 { + --tw-border-opacity: 1; + border-color: rgb(3 84 63 / var(--tw-border-opacity)); +} +.border-indigo-400 { + --tw-border-opacity: 1; + border-color: rgb(141 162 251 / var(--tw-border-opacity)); +} +.border-pink-400 { + --tw-border-opacity: 1; + border-color: rgb(241 126 184 / var(--tw-border-opacity)); +} +.border-purple-400 { + --tw-border-opacity: 1; + border-color: rgb(172 148 250 / var(--tw-border-opacity)); +} +.border-purple-700 { + --tw-border-opacity: 1; + border-color: rgb(108 43 217 / var(--tw-border-opacity)); +} +.border-red-300 { + --tw-border-opacity: 1; + border-color: rgb(248 180 180 / var(--tw-border-opacity)); +} +.border-red-400 { + --tw-border-opacity: 1; + border-color: rgb(249 128 128 / var(--tw-border-opacity)); +} +.border-red-500 { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} +.border-red-600 { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} +.border-red-700 { + --tw-border-opacity: 1; + border-color: rgb(200 30 30 / var(--tw-border-opacity)); +} +.border-red-800 { + --tw-border-opacity: 1; + border-color: rgb(155 28 28 / var(--tw-border-opacity)); +} +.border-transparent { + border-color: transparent; +} +.border-white { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} +.border-yellow-300 { + --tw-border-opacity: 1; + border-color: rgb(250 202 21 / var(--tw-border-opacity)); +} +.border-yellow-400 { + --tw-border-opacity: 1; + border-color: rgb(227 160 8 / var(--tw-border-opacity)); +} +.border-yellow-800 { + --tw-border-opacity: 1; + border-color: rgb(114 59 19 / var(--tw-border-opacity)); +} +.border-l-gray-100 { + --tw-border-opacity: 1; + border-left-color: rgb(243 244 246 / var(--tw-border-opacity)); +} +.border-l-gray-50 { + --tw-border-opacity: 1; + border-left-color: rgb(249 250 251 / var(--tw-border-opacity)); +} +.bg-\[\#050708\] { + --tw-bg-opacity: 1; + background-color: rgb(5 7 8 / var(--tw-bg-opacity)); +} +.bg-\[\#1da1f2\] { + --tw-bg-opacity: 1; + background-color: rgb(29 161 242 / var(--tw-bg-opacity)); +} +.bg-\[\#24292F\] { + --tw-bg-opacity: 1; + background-color: rgb(36 41 47 / var(--tw-bg-opacity)); +} +.bg-\[\#2557D6\] { + --tw-bg-opacity: 1; + background-color: rgb(37 87 214 / var(--tw-bg-opacity)); +} +.bg-\[\#3b5998\] { + --tw-bg-opacity: 1; + background-color: rgb(59 89 152 / var(--tw-bg-opacity)); +} +.bg-\[\#4285F4\] { + --tw-bg-opacity: 1; + background-color: rgb(66 133 244 / var(--tw-bg-opacity)); +} +.bg-\[\#F7BE38\] { + --tw-bg-opacity: 1; + background-color: rgb(247 190 56 / var(--tw-bg-opacity)); +} +.bg-\[\#FF9119\] { + --tw-bg-opacity: 1; + background-color: rgb(255 145 25 / var(--tw-bg-opacity)); +} +.bg-\[\#hex\] { + background-color: #hex; +} +.bg-blue-100 { + --tw-bg-opacity: 1; + background-color: rgb(225 239 254 / var(--tw-bg-opacity)); +} +.bg-blue-200 { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} +.bg-blue-300 { + --tw-bg-opacity: 1; + background-color: rgb(164 202 254 / var(--tw-bg-opacity)); +} +.bg-blue-400 { + --tw-bg-opacity: 1; + background-color: rgb(118 169 250 / var(--tw-bg-opacity)); +} +.bg-blue-50 { + --tw-bg-opacity: 1; + background-color: rgb(235 245 255 / var(--tw-bg-opacity)); +} +.bg-blue-500 { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} +.bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} +.bg-blue-700 { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} +.bg-blue-800 { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} +.bg-blue-900 { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} +.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} +.bg-gray-300 { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} +.bg-gray-400 { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} +.bg-gray-50 { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} +.bg-gray-500 { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} +.bg-gray-600 { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} +.bg-gray-700 { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} +.bg-gray-800 { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} +.bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} +.bg-gray-900\/50 { + background-color: rgb(17 24 39 / 0.5); +} +.bg-green-100 { + --tw-bg-opacity: 1; + background-color: rgb(222 247 236 / var(--tw-bg-opacity)); +} +.bg-green-200 { + --tw-bg-opacity: 1; + background-color: rgb(188 240 218 / var(--tw-bg-opacity)); +} +.bg-green-300 { + --tw-bg-opacity: 1; + background-color: rgb(132 225 188 / var(--tw-bg-opacity)); +} +.bg-green-400 { + --tw-bg-opacity: 1; + background-color: rgb(49 196 141 / var(--tw-bg-opacity)); +} +.bg-green-50 { + --tw-bg-opacity: 1; + background-color: rgb(243 250 247 / var(--tw-bg-opacity)); +} +.bg-green-500 { + --tw-bg-opacity: 1; + background-color: rgb(14 159 110 / var(--tw-bg-opacity)); +} +.bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} +.bg-green-700 { + --tw-bg-opacity: 1; + background-color: rgb(4 108 78 / var(--tw-bg-opacity)); +} +.bg-green-800 { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} +.bg-green-900 { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} +.bg-indigo-100 { + --tw-bg-opacity: 1; + background-color: rgb(229 237 255 / var(--tw-bg-opacity)); +} +.bg-indigo-200 { + --tw-bg-opacity: 1; + background-color: rgb(205 219 254 / var(--tw-bg-opacity)); +} +.bg-indigo-300 { + --tw-bg-opacity: 1; + background-color: rgb(180 198 252 / var(--tw-bg-opacity)); +} +.bg-indigo-400 { + --tw-bg-opacity: 1; + background-color: rgb(141 162 251 / var(--tw-bg-opacity)); +} +.bg-indigo-50 { + --tw-bg-opacity: 1; + background-color: rgb(240 245 255 / var(--tw-bg-opacity)); +} +.bg-indigo-500 { + --tw-bg-opacity: 1; + background-color: rgb(104 117 245 / var(--tw-bg-opacity)); +} +.bg-indigo-600 { + --tw-bg-opacity: 1; + background-color: rgb(88 80 236 / var(--tw-bg-opacity)); +} +.bg-indigo-700 { + --tw-bg-opacity: 1; + background-color: rgb(81 69 205 / var(--tw-bg-opacity)); +} +.bg-indigo-800 { + --tw-bg-opacity: 1; + background-color: rgb(66 56 157 / var(--tw-bg-opacity)); +} +.bg-indigo-900 { + --tw-bg-opacity: 1; + background-color: rgb(54 47 120 / var(--tw-bg-opacity)); +} +.bg-orange-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 236 220 / var(--tw-bg-opacity)); +} +.bg-orange-300 { + --tw-bg-opacity: 1; + background-color: rgb(253 186 140 / var(--tw-bg-opacity)); +} +.bg-orange-50 { + --tw-bg-opacity: 1; + background-color: rgb(255 248 241 / var(--tw-bg-opacity)); +} +.bg-pink-100 { + --tw-bg-opacity: 1; + background-color: rgb(252 232 243 / var(--tw-bg-opacity)); +} +.bg-pink-200 { + --tw-bg-opacity: 1; + background-color: rgb(250 209 232 / var(--tw-bg-opacity)); +} +.bg-pink-300 { + --tw-bg-opacity: 1; + background-color: rgb(248 180 217 / var(--tw-bg-opacity)); +} +.bg-pink-400 { + --tw-bg-opacity: 1; + background-color: rgb(241 126 184 / var(--tw-bg-opacity)); +} +.bg-pink-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 242 248 / var(--tw-bg-opacity)); +} +.bg-pink-500 { + --tw-bg-opacity: 1; + background-color: rgb(231 70 148 / var(--tw-bg-opacity)); +} +.bg-pink-600 { + --tw-bg-opacity: 1; + background-color: rgb(214 31 105 / var(--tw-bg-opacity)); +} +.bg-pink-700 { + --tw-bg-opacity: 1; + background-color: rgb(191 18 93 / var(--tw-bg-opacity)); +} +.bg-pink-800 { + --tw-bg-opacity: 1; + background-color: rgb(153 21 75 / var(--tw-bg-opacity)); +} +.bg-pink-900 { + --tw-bg-opacity: 1; + background-color: rgb(117 26 61 / var(--tw-bg-opacity)); +} +.bg-purple-100 { + --tw-bg-opacity: 1; + background-color: rgb(237 235 254 / var(--tw-bg-opacity)); +} +.bg-purple-200 { + --tw-bg-opacity: 1; + background-color: rgb(220 215 254 / var(--tw-bg-opacity)); +} +.bg-purple-300 { + --tw-bg-opacity: 1; + background-color: rgb(202 191 253 / var(--tw-bg-opacity)); +} +.bg-purple-400 { + --tw-bg-opacity: 1; + background-color: rgb(172 148 250 / var(--tw-bg-opacity)); +} +.bg-purple-50 { + --tw-bg-opacity: 1; + background-color: rgb(246 245 255 / var(--tw-bg-opacity)); +} +.bg-purple-500 { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} +.bg-purple-600 { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} +.bg-purple-700 { + --tw-bg-opacity: 1; + background-color: rgb(108 43 217 / var(--tw-bg-opacity)); +} +.bg-purple-800 { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} +.bg-purple-900 { + --tw-bg-opacity: 1; + background-color: rgb(74 29 150 / var(--tw-bg-opacity)); +} +.bg-red-100 { + --tw-bg-opacity: 1; + background-color: rgb(253 232 232 / var(--tw-bg-opacity)); +} +.bg-red-200 { + --tw-bg-opacity: 1; + background-color: rgb(251 213 213 / var(--tw-bg-opacity)); +} +.bg-red-300 { + --tw-bg-opacity: 1; + background-color: rgb(248 180 180 / var(--tw-bg-opacity)); +} +.bg-red-400 { + --tw-bg-opacity: 1; + background-color: rgb(249 128 128 / var(--tw-bg-opacity)); +} +.bg-red-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 242 242 / var(--tw-bg-opacity)); +} +.bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(240 82 82 / var(--tw-bg-opacity)); +} +.bg-red-600 { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} +.bg-red-700 { + --tw-bg-opacity: 1; + background-color: rgb(200 30 30 / var(--tw-bg-opacity)); +} +.bg-red-800 { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} +.bg-red-900 { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} +.bg-teal-100 { + --tw-bg-opacity: 1; + background-color: rgb(213 245 246 / var(--tw-bg-opacity)); +} +.bg-teal-50 { + --tw-bg-opacity: 1; + background-color: rgb(237 250 250 / var(--tw-bg-opacity)); +} +.bg-teal-500 { + --tw-bg-opacity: 1; + background-color: rgb(6 148 162 / var(--tw-bg-opacity)); +} +.bg-transparent { + background-color: transparent; +} +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} +.bg-white\/30 { + background-color: rgb(255 255 255 / 0.3); +} +.bg-white\/50 { + background-color: rgb(255 255 255 / 0.5); +} +.bg-yellow-100 { + --tw-bg-opacity: 1; + background-color: rgb(253 246 178 / var(--tw-bg-opacity)); +} +.bg-yellow-200 { + --tw-bg-opacity: 1; + background-color: rgb(252 233 106 / var(--tw-bg-opacity)); +} +.bg-yellow-300 { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} +.bg-yellow-400 { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} +.bg-yellow-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 253 234 / var(--tw-bg-opacity)); +} +.bg-yellow-500 { + --tw-bg-opacity: 1; + background-color: rgb(194 120 3 / var(--tw-bg-opacity)); +} +.bg-yellow-600 { + --tw-bg-opacity: 1; + background-color: rgb(159 88 10 / var(--tw-bg-opacity)); +} +.bg-yellow-700 { + --tw-bg-opacity: 1; + background-color: rgb(142 75 16 / var(--tw-bg-opacity)); +} +.bg-yellow-800 { + --tw-bg-opacity: 1; + background-color: rgb(114 59 19 / var(--tw-bg-opacity)); +} +.bg-yellow-900 { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} +.bg-opacity-50 { + --tw-bg-opacity: 0.5; +} +.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/conference\.jpg\'\)\] { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/conference.jpg'); +} +.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern\.svg\'\)\] { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern.svg'); +} +.bg-gradient-to-b { + background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); +} +.bg-gradient-to-br { + background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); +} +.bg-gradient-to-r { + background-image: linear-gradient(to right, var(--tw-gradient-stops)); +} +.from-blue-50 { + --tw-gradient-from: #EBF5FF var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-blue-500 { + --tw-gradient-from: #3F83F8 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-cyan-400 { + --tw-gradient-from: #22d3ee var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-cyan-500 { + --tw-gradient-from: #06b6d4 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-green-400 { + --tw-gradient-from: #31C48D var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-lime-200 { + --tw-gradient-from: #d9f99d var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(217 249 157 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-pink-400 { + --tw-gradient-from: #F17EB8 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(241 126 184 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-pink-500 { + --tw-gradient-from: #E74694 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-purple-500 { + --tw-gradient-from: #9061F9 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-purple-600 { + --tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-red-200 { + --tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-red-400 { + --tw-gradient-from: #F98080 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(249 128 128 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-sky-400 { + --tw-gradient-from: #38bdf8 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(56 189 248 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-200 { + --tw-gradient-from: #AFECEF var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-300 { + --tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-400 { + --tw-gradient-from: #16BDCA var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(22 189 202 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.via-blue-600 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-cyan-500 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #06b6d4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-green-500 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #0E9F6E var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-lime-400 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(163 230 53 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #a3e635 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-pink-500 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #E74694 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-purple-600 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-red-300 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-red-500 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #F05252 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-teal-500 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #0694A2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.to-blue-500 { + --tw-gradient-to: #3F83F8 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-blue-600 { + --tw-gradient-to: #1C64F2 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-blue-700 { + --tw-gradient-to: #1A56DB var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-cyan-600 { + --tw-gradient-to: #0891b2 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-emerald-600 { + --tw-gradient-to: #059669 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-green-600 { + --tw-gradient-to: #057A55 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-lime-200 { + --tw-gradient-to: #d9f99d var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-lime-300 { + --tw-gradient-to: #bef264 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-lime-500 { + --tw-gradient-to: #84cc16 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-orange-400 { + --tw-gradient-to: #FF8A4C var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-pink-500 { + --tw-gradient-to: #E74694 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-pink-600 { + --tw-gradient-to: #D61F69 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-purple-700 { + --tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-red-600 { + --tw-gradient-to: #E02424 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-teal-600 { + --tw-gradient-to: #047481 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-transparent { + --tw-gradient-to: transparent var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.to-yellow-200 { + --tw-gradient-to: #FCE96A var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} +.bg-cover { + background-size: cover; +} +.bg-local { + background-attachment: local; +} +.bg-clip-text { + -webkit-background-clip: text; + background-clip: text; +} +.bg-center { + background-position: center; +} +.bg-no-repeat { + background-repeat: no-repeat; +} +.fill-blue-600 { + fill: #1C64F2; +} +.fill-gray-500 { + fill: #6B7280; +} +.fill-gray-600 { + fill: #4B5563; +} +.fill-green-500 { + fill: #0E9F6E; +} +.fill-pink-600 { + fill: #D61F69; +} +.fill-purple-600 { + fill: #7E3AF2; +} +.fill-red-600 { + fill: #E02424; +} +.fill-yellow-400 { + fill: #E3A008; +} +.object-cover { + -o-object-fit: cover; + object-fit: cover; +} +.\!p-0 { + padding: 0px !important; +} +.p-0 { + padding: 0px; +} +.p-0\.5 { + padding: 0.125rem; +} +.p-1 { + padding: 0.25rem; +} +.p-1\.5 { + padding: 0.375rem; +} +.p-2 { + padding: 0.5rem; +} +.p-2\.5 { + padding: 0.625rem; +} +.p-3 { + padding: 0.75rem; +} +.p-4 { + padding: 1rem; +} +.p-5 { + padding: 1.25rem; +} +.p-6 { + padding: 1.5rem; +} +.p-8 { + padding: 2rem; +} +.px-0 { + padding-left: 0px; + padding-right: 0px; +} +.px-0\.5 { + padding-left: 0.125rem; + padding-right: 0.125rem; +} +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} +.px-1\.5 { + padding-left: 0.375rem; + padding-right: 0.375rem; +} +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} +.px-2\.5 { + padding-left: 0.625rem; + padding-right: 0.625rem; +} +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} +.px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} +.py-0 { + padding-top: 0px; + padding-bottom: 0px; +} +.py-0\.5 { + padding-top: 0.125rem; + padding-bottom: 0.125rem; +} +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} +.py-1\.5 { + padding-top: 0.375rem; + padding-bottom: 0.375rem; +} +.py-12 { + padding-top: 3rem; + padding-bottom: 3rem; +} +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; +} +.py-24 { + padding-top: 6rem; + padding-bottom: 6rem; +} +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} +.py-3\.5 { + padding-top: 0.875rem; + padding-bottom: 0.875rem; +} +.py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} +.py-48 { + padding-top: 12rem; + padding-bottom: 12rem; +} +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} +.py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} +.py-px { + padding-top: 1px; + padding-bottom: 1px; +} +.pb-0 { + padding-bottom: 0px; +} +.pb-1 { + padding-bottom: 0.25rem; +} +.pb-1\.5 { + padding-bottom: 0.375rem; +} +.pb-10 { + padding-bottom: 2.5rem; +} +.pb-16 { + padding-bottom: 4rem; +} +.pb-2 { + padding-bottom: 0.5rem; +} +.pb-2\.5 { + padding-bottom: 0.625rem; +} +.pb-3 { + padding-bottom: 0.75rem; +} +.pb-4 { + padding-bottom: 1rem; +} +.pb-48 { + padding-bottom: 12rem; +} +.pb-5 { + padding-bottom: 1.25rem; +} +.pb-6 { + padding-bottom: 1.5rem; +} +.pb-8 { + padding-bottom: 2rem; +} +.pb-96 { + padding-bottom: 24rem; +} +.pl-0 { + padding-left: 0px; +} +.pl-10 { + padding-left: 2.5rem; +} +.pl-11 { + padding-left: 2.75rem; +} +.pl-2 { + padding-left: 0.5rem; +} +.pl-2\.5 { + padding-left: 0.625rem; +} +.pl-3 { + padding-left: 0.75rem; +} +.pl-3\.5 { + padding-left: 0.875rem; +} +.pl-4 { + padding-left: 1rem; +} +.pl-5 { + padding-left: 1.25rem; +} +.pl-8 { + padding-left: 2rem; +} +.pr-1 { + padding-right: 0.25rem; +} +.pr-3 { + padding-right: 0.75rem; +} +.pr-4 { + padding-right: 1rem; +} +.pt-0 { + padding-top: 0px; +} +.pt-10 { + padding-top: 2.5rem; +} +.pt-16 { + padding-top: 4rem; +} +.pt-2 { + padding-top: 0.5rem; +} +.pt-20 { + padding-top: 5rem; +} +.pt-24 { + padding-top: 6rem; +} +.pt-3 { + padding-top: 0.75rem; +} +.pt-32 { + padding-top: 8rem; +} +.pt-36 { + padding-top: 9rem; +} +.pt-4 { + padding-top: 1rem; +} +.pt-5 { + padding-top: 1.25rem; +} +.pt-52 { + padding-top: 13rem; +} +.pt-6 { + padding-top: 1.5rem; +} +.pt-60 { + padding-top: 15rem; +} +.pt-64 { + padding-top: 16rem; +} +.pt-8 { + padding-top: 2rem; +} +.pt-80 { + padding-top: 20rem; +} +.text-left { + text-align: left; +} +.text-center { + text-align: center; +} +.text-right { + text-align: right; +} +.text-justify { + text-align: justify; +} +.font-sans { + font-family: Inter, ui-sans-serif, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; +} +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} +.text-2xs { + font-size: 0.625rem; +} +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} +.text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; +} +.text-5xl { + font-size: 3rem; + line-height: 1; +} +.text-6xl { + font-size: 3.75rem; + line-height: 1; +} +.text-7xl { + font-size: 4.5rem; + line-height: 1; +} +.text-8xl { + font-size: 6rem; + line-height: 1; +} +.text-9xl { + font-size: 8rem; + line-height: 1; +} +.text-base { + font-size: 1rem; + line-height: 1.5rem; +} +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} +.text-xs { + font-size: 0.75rem; + line-height: 1rem; +} +.font-black { + font-weight: 900; +} +.font-bold { + font-weight: 700; +} +.font-extrabold { + font-weight: 800; +} +.font-extralight { + font-weight: 200; +} +.font-medium { + font-weight: 500; +} +.font-normal { + font-weight: 400; +} +.font-semibold { + font-weight: 600; +} +.font-thin { + font-weight: 100; +} +.uppercase { + text-transform: uppercase; +} +.lowercase { + text-transform: lowercase; +} +.italic { + font-style: italic; +} +.leading-6 { + line-height: 1.5rem; +} +.leading-9 { + line-height: 2.25rem; +} +.leading-loose { + line-height: 2; +} +.leading-none { + line-height: 1; +} +.leading-normal { + line-height: 1.5; +} +.leading-relaxed { + line-height: 1.625; +} +.leading-tight { + line-height: 1.25; +} +.tracking-normal { + letter-spacing: 0em; +} +.tracking-tight { + letter-spacing: -0.025em; +} +.tracking-tighter { + letter-spacing: -0.05em; +} +.tracking-wide { + letter-spacing: 0.025em; +} +.tracking-wider { + letter-spacing: 0.05em; +} +.tracking-widest { + letter-spacing: 0.1em; +} +.\!text-blue-700 { + --tw-text-opacity: 1 !important; + color: rgb(26 86 219 / var(--tw-text-opacity)) !important; +} +.text-\[\#626890\] { + --tw-text-opacity: 1; + color: rgb(98 104 144 / var(--tw-text-opacity)); +} +.text-\[\#ff2d20\] { + --tw-text-opacity: 1; + color: rgb(255 45 32 / var(--tw-text-opacity)); +} +.text-blue-100 { + --tw-text-opacity: 1; + color: rgb(225 239 254 / var(--tw-text-opacity)); +} +.text-blue-400 { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} +.text-blue-50 { + --tw-text-opacity: 1; + color: rgb(235 245 255 / var(--tw-text-opacity)); +} +.text-blue-500 { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} +.text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} +.text-blue-600\/100 { + color: rgb(28 100 242 / 1); +} +.text-blue-600\/25 { + color: rgb(28 100 242 / 0.25); +} +.text-blue-600\/50 { + color: rgb(28 100 242 / 0.5); +} +.text-blue-600\/75 { + color: rgb(28 100 242 / 0.75); +} +.text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} +.text-blue-800 { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} +.text-blue-900 { + --tw-text-opacity: 1; + color: rgb(35 56 118 / var(--tw-text-opacity)); +} +.text-gray-200 { + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} +.text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} +.text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} +.text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} +.text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} +.text-gray-700 { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} +.text-gray-800 { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} +.text-green-400 { + --tw-text-opacity: 1; + color: rgb(49 196 141 / var(--tw-text-opacity)); +} +.text-green-500 { + --tw-text-opacity: 1; + color: rgb(14 159 110 / var(--tw-text-opacity)); +} +.text-green-600 { + --tw-text-opacity: 1; + color: rgb(5 122 85 / var(--tw-text-opacity)); +} +.text-green-700 { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); +} +.text-green-800 { + --tw-text-opacity: 1; + color: rgb(3 84 63 / var(--tw-text-opacity)); +} +.text-green-900 { + --tw-text-opacity: 1; + color: rgb(1 71 55 / var(--tw-text-opacity)); +} +.text-indigo-400 { + --tw-text-opacity: 1; + color: rgb(141 162 251 / var(--tw-text-opacity)); +} +.text-indigo-700 { + --tw-text-opacity: 1; + color: rgb(81 69 205 / var(--tw-text-opacity)); +} +.text-indigo-800 { + --tw-text-opacity: 1; + color: rgb(66 56 157 / var(--tw-text-opacity)); +} +.text-orange-500 { + --tw-text-opacity: 1; + color: rgb(255 90 31 / var(--tw-text-opacity)); +} +.text-orange-600 { + --tw-text-opacity: 1; + color: rgb(208 56 1 / var(--tw-text-opacity)); +} +.text-orange-800 { + --tw-text-opacity: 1; + color: rgb(138 44 13 / var(--tw-text-opacity)); +} +.text-pink-400 { + --tw-text-opacity: 1; + color: rgb(241 126 184 / var(--tw-text-opacity)); +} +.text-pink-800 { + --tw-text-opacity: 1; + color: rgb(153 21 75 / var(--tw-text-opacity)); +} +.text-purple-400 { + --tw-text-opacity: 1; + color: rgb(172 148 250 / var(--tw-text-opacity)); +} +.text-purple-600 { + --tw-text-opacity: 1; + color: rgb(126 58 242 / var(--tw-text-opacity)); +} +.text-purple-700 { + --tw-text-opacity: 1; + color: rgb(108 43 217 / var(--tw-text-opacity)); +} +.text-purple-800 { + --tw-text-opacity: 1; + color: rgb(85 33 181 / var(--tw-text-opacity)); +} +.text-red-400 { + --tw-text-opacity: 1; + color: rgb(249 128 128 / var(--tw-text-opacity)); +} +.text-red-500 { + --tw-text-opacity: 1; + color: rgb(240 82 82 / var(--tw-text-opacity)); +} +.text-red-600 { + --tw-text-opacity: 1; + color: rgb(224 36 36 / var(--tw-text-opacity)); +} +.text-red-700 { + --tw-text-opacity: 1; + color: rgb(200 30 30 / var(--tw-text-opacity)); +} +.text-red-800 { + --tw-text-opacity: 1; + color: rgb(155 28 28 / var(--tw-text-opacity)); +} +.text-red-900 { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} +.text-sky-500 { + --tw-text-opacity: 1; + color: rgb(14 165 233 / var(--tw-text-opacity)); +} +.text-teal-600 { + --tw-text-opacity: 1; + color: rgb(4 116 129 / var(--tw-text-opacity)); +} +.text-transparent { + color: transparent; +} +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} +.text-yellow-300 { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} +.text-yellow-400 { + --tw-text-opacity: 1; + color: rgb(227 160 8 / var(--tw-text-opacity)); +} +.text-yellow-500 { + --tw-text-opacity: 1; + color: rgb(194 120 3 / var(--tw-text-opacity)); +} +.text-yellow-700 { + --tw-text-opacity: 1; + color: rgb(142 75 16 / var(--tw-text-opacity)); +} +.text-yellow-800 { + --tw-text-opacity: 1; + color: rgb(114 59 19 / var(--tw-text-opacity)); +} +.underline { + text-decoration-line: underline; +} +.line-through { + text-decoration-line: line-through; +} +.no-underline { + text-decoration-line: none; +} +.decoration-blue-400 { + text-decoration-color: #76A9FA; +} +.decoration-blue-500 { + text-decoration-color: #3F83F8; +} +.decoration-gray-500 { + text-decoration-color: #6B7280; +} +.decoration-green-500 { + text-decoration-color: #0E9F6E; +} +.decoration-indigo-500 { + text-decoration-color: #6875F5; +} +.decoration-red-500 { + text-decoration-color: #F05252; +} +.decoration-sky-500 { + text-decoration-color: #0ea5e9; +} +.decoration-solid { + text-decoration-style: solid; +} +.decoration-double { + text-decoration-style: double; +} +.decoration-dotted { + text-decoration-style: dotted; +} +.decoration-dashed { + text-decoration-style: dashed; +} +.decoration-wavy { + text-decoration-style: wavy; +} +.decoration-8 { + text-decoration-thickness: 8px; +} +.underline-offset-2 { + text-underline-offset: 2px; +} +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.placeholder-green-700::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(4 108 78 / var(--tw-placeholder-opacity)); +} +.placeholder-green-700::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(4 108 78 / var(--tw-placeholder-opacity)); +} +.placeholder-red-700::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(200 30 30 / var(--tw-placeholder-opacity)); +} +.placeholder-red-700::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(200 30 30 / var(--tw-placeholder-opacity)); +} +.opacity-0 { + opacity: 0; +} +.opacity-100 { + opacity: 1; +} +.opacity-20 { + opacity: 0.2; +} +.bg-blend-multiply { + background-blend-mode: multiply; +} +.shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-lg { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-md { + --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-xl { + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-blue-500\/50 { + --tw-shadow-color: rgb(63 131 248 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-cyan-500\/50 { + --tw-shadow-color: rgb(6 182 212 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-green-500\/50 { + --tw-shadow-color: rgb(14 159 110 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-lime-500\/50 { + --tw-shadow-color: rgb(132 204 22 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-pink-500\/50 { + --tw-shadow-color: rgb(231 70 148 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-purple-500\/50 { + --tw-shadow-color: rgb(144 97 249 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-red-500\/50 { + --tw-shadow-color: rgb(240 82 82 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-teal-500\/50 { + --tw-shadow-color: rgb(6 148 162 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.outline { + outline-style: solid; +} +.ring-0 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-1 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-2 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-8 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-inset { + --tw-ring-inset: inset; +} +.ring-black { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity)); +} +.ring-gray-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); +} +.ring-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} +.ring-opacity-0 { + --tw-ring-opacity: 0; +} +.blur { + --tw-blur: blur(8px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.blur-sm { + --tw-blur: blur(4px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.grayscale { + --tw-grayscale: grayscale(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.invert { + --tw-invert: invert(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-colors { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.duration-200 { + transition-duration: 200ms; +} +.duration-300 { + transition-duration: 300ms; +} +.duration-700 { + transition-duration: 700ms; +} +.duration-75 { + transition-duration: 75ms; +} +.ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +} +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} +.ease-linear { + transition-timing-function: linear; +} +.ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + +/* +“Have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.” +― Steve Jobs +*/ + +.first-letter\:float-left::first-letter { + float: left; +} + +.first-letter\:mr-3::first-letter { + margin-right: 0.75rem; +} + +.first-letter\:text-7xl::first-letter { + font-size: 4.5rem; + line-height: 1; +} + +.first-letter\:font-bold::first-letter { + font-weight: 700; +} + +.first-letter\:text-gray-900::first-letter { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.first-line\:uppercase::first-line { + text-transform: uppercase; +} + +.first-line\:tracking-widest::first-line { + letter-spacing: 0.1em; +} + +.after\:absolute::after { + content: var(--tw-content); + position: absolute; +} + +.after\:left-\[2px\]::after { + content: var(--tw-content); + left: 2px; +} + +.after\:left-\[4px\]::after { + content: var(--tw-content); + left: 4px; +} + +.after\:top-0::after { + content: var(--tw-content); + top: 0px; +} + +.after\:top-0\.5::after { + content: var(--tw-content); + top: 0.125rem; +} + +.after\:top-\[2px\]::after { + content: var(--tw-content); + top: 2px; +} + +.after\:mx-2::after { + content: var(--tw-content); + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.after\:mx-6::after { + content: var(--tw-content); + margin-left: 1.5rem; + margin-right: 1.5rem; +} + +.after\:inline-block::after { + content: var(--tw-content); + display: inline-block; +} + +.after\:hidden::after { + content: var(--tw-content); + display: none; +} + +.after\:h-1::after { + content: var(--tw-content); + height: 0.25rem; +} + +.after\:h-4::after { + content: var(--tw-content); + height: 1rem; +} + +.after\:h-5::after { + content: var(--tw-content); + height: 1.25rem; +} + +.after\:h-6::after { + content: var(--tw-content); + height: 1.5rem; +} + +.after\:w-4::after { + content: var(--tw-content); + width: 1rem; +} + +.after\:w-5::after { + content: var(--tw-content); + width: 1.25rem; +} + +.after\:w-6::after { + content: var(--tw-content); + width: 1.5rem; +} + +.after\:w-full::after { + content: var(--tw-content); + width: 100%; +} + +.after\:rounded-full::after { + content: var(--tw-content); + border-radius: 9999px; +} + +.after\:border::after { + content: var(--tw-content); + border-width: 1px; +} + +.after\:border-4::after { + content: var(--tw-content); + border-width: 4px; +} + +.after\:border-b::after { + content: var(--tw-content); + border-bottom-width: 1px; +} + +.after\:border-blue-100::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(225 239 254 / var(--tw-border-opacity)); +} + +.after\:border-gray-100::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} + +.after\:border-gray-200::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.after\:border-gray-300::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + +.after\:bg-white::after { + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.after\:text-gray-200::after { + content: var(--tw-content); + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} + +.after\:transition-all::after { + content: var(--tw-content); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.after\:content-\[\'\'\]::after { + --tw-content: ''; + content: var(--tw-content); +} + +.after\:content-\[\'\/\'\]::after { + --tw-content: '/'; + content: var(--tw-content); +} + +.hover\:border-gray-200:hover { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.hover\:border-gray-300:hover { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + +.hover\:bg-\[\#050708\]\/80:hover { + background-color: rgb(5 7 8 / 0.8); +} + +.hover\:bg-\[\#050708\]\/90:hover { + background-color: rgb(5 7 8 / 0.9); +} + +.hover\:bg-\[\#1da1f2\]\/90:hover { + background-color: rgb(29 161 242 / 0.9); +} + +.hover\:bg-\[\#24292F\]\/90:hover { + background-color: rgb(36 41 47 / 0.9); +} + +.hover\:bg-\[\#2557D6\]\/90:hover { + background-color: rgb(37 87 214 / 0.9); +} + +.hover\:bg-\[\#3b5998\]\/90:hover { + background-color: rgb(59 89 152 / 0.9); +} + +.hover\:bg-\[\#4285F4\]\/90:hover { + background-color: rgb(66 133 244 / 0.9); +} + +.hover\:bg-\[\#F7BE38\]\/90:hover { + background-color: rgb(247 190 56 / 0.9); +} + +.hover\:bg-\[\#FF9119\]\/80:hover { + background-color: rgb(255 145 25 / 0.8); +} + +.hover\:bg-blue-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(225 239 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-300:hover { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-50:hover { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(188 240 218 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} + +.hover\:bg-indigo-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(205 219 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-pink-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(250 209 232 / var(--tw-bg-opacity)); +} + +.hover\:bg-purple-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(220 215 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-purple-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(251 213 213 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} + +.hover\:bg-white:hover { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.hover\:bg-yellow-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(252 233 106 / var(--tw-bg-opacity)); +} + +.hover\:bg-yellow-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(194 120 3 / var(--tw-bg-opacity)); +} + +.hover\:bg-yellow-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} + +.hover\:bg-gradient-to-bl:hover { + background-image: linear-gradient(to bottom left, var(--tw-gradient-stops)); +} + +.hover\:bg-gradient-to-br:hover { + background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); +} + +.hover\:bg-gradient-to-l:hover { + background-image: linear-gradient(to left, var(--tw-gradient-stops)); +} + +.hover\:from-teal-200:hover { + --tw-gradient-from: #AFECEF var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:to-lime-200:hover { + --tw-gradient-to: #d9f99d var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.hover\:\!text-blue-700:hover { + --tw-text-opacity: 1 !important; + color: rgb(26 86 219 / var(--tw-text-opacity)) !important; +} + +.hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +.hover\:text-blue-800:hover { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} + +.hover\:text-blue-900:hover { + --tw-text-opacity: 1; + color: rgb(35 56 118 / var(--tw-text-opacity)); +} + +.hover\:text-gray-500:hover { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.hover\:text-gray-600:hover { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.hover\:text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +.hover\:text-gray-800:hover { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +.hover\:text-gray-900:hover { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.hover\:text-green-900:hover { + --tw-text-opacity: 1; + color: rgb(1 71 55 / var(--tw-text-opacity)); +} + +.hover\:text-indigo-900:hover { + --tw-text-opacity: 1; + color: rgb(54 47 120 / var(--tw-text-opacity)); +} + +.hover\:text-pink-900:hover { + --tw-text-opacity: 1; + color: rgb(117 26 61 / var(--tw-text-opacity)); +} + +.hover\:text-purple-900:hover { + --tw-text-opacity: 1; + color: rgb(74 29 150 / var(--tw-text-opacity)); +} + +.hover\:text-red-900:hover { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} + +.hover\:text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.hover\:text-yellow-900:hover { + --tw-text-opacity: 1; + color: rgb(99 49 18 / var(--tw-text-opacity)); +} + +.hover\:underline:hover { + text-decoration-line: underline; +} + +.hover\:no-underline:hover { + text-decoration-line: none; +} + +.hover\:bg-blend-soft-light:hover { + background-blend-mode: soft-light; +} + +.hover\:shadow:hover { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:blur-none:hover { + --tw-blur: blur(0); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.hover\:grayscale-0:hover { + --tw-grayscale: grayscale(0); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.focus\:z-10:focus { + z-index: 10; +} + +.focus\:border-blue-500:focus { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +.focus\:border-blue-600:focus { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +.focus\:border-gray-200:focus { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.focus\:border-green-500:focus { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +.focus\:border-green-600:focus { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} + +.focus\:border-red-500:focus { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +.focus\:border-red-600:focus { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} + +.focus\:bg-gray-100:focus { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.focus\:bg-gray-900:focus { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.focus\:text-blue-700:focus { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +.focus\:text-white:focus { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-0:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-4:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-\[\#050708\]\/50:focus { + --tw-ring-color: rgb(5 7 8 / 0.5); +} + +.focus\:ring-\[\#1da1f2\]\/50:focus { + --tw-ring-color: rgb(29 161 242 / 0.5); +} + +.focus\:ring-\[\#24292F\]\/50:focus { + --tw-ring-color: rgb(36 41 47 / 0.5); +} + +.focus\:ring-\[\#2557D6\]\/50:focus { + --tw-ring-color: rgb(37 87 214 / 0.5); +} + +.focus\:ring-\[\#3b5998\]\/50:focus { + --tw-ring-color: rgb(59 89 152 / 0.5); +} + +.focus\:ring-\[\#4285F4\]\/50:focus { + --tw-ring-color: rgb(66 133 244 / 0.5); +} + +.focus\:ring-\[\#F7BE38\]\/50:focus { + --tw-ring-color: rgb(247 190 56 / 0.5); +} + +.focus\:ring-\[\#FF9119\]\/50:focus { + --tw-ring-color: rgb(255 145 25 / 0.5); +} + +.focus\:ring-blue-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-600:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-700:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity)); +} + +.focus\:ring-cyan-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity)); +} + +.focus\:ring-cyan-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-100:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(243 244 246 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-50:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 250 251 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-700:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity)); +} + +.focus\:ring-lime-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity)); +} + +.focus\:ring-lime-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity)); +} + +.focus\:ring-orange-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 90 31 / var(--tw-ring-opacity)); +} + +.focus\:ring-pink-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity)); +} + +.focus\:ring-pink-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(144 97 249 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-100:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity)); +} + +.focus\:ring-teal-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity)); +} + +.focus\:ring-teal-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(6 148 162 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(194 120 3 / var(--tw-ring-opacity)); +} + +.group:hover .group-hover\:rotate-45 { + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.group:hover .group-hover\:bg-white\/50 { + background-color: rgb(255 255 255 / 0.5); +} + +.group:hover .group-hover\:bg-opacity-0 { + --tw-bg-opacity: 0; +} + +.group:hover .group-hover\:from-cyan-500 { + --tw-gradient-from: #06b6d4 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-green-400 { + --tw-gradient-from: #31C48D var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-pink-500 { + --tw-gradient-from: #E74694 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-purple-500 { + --tw-gradient-from: #9061F9 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-purple-600 { + --tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-red-200 { + --tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-teal-300 { + --tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:via-red-300 { + --tw-gradient-via-position: ; + --tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} + +.group:hover .group-hover\:to-blue-500 { + --tw-gradient-to: #3F83F8 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:to-blue-600 { + --tw-gradient-to: #1C64F2 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:to-lime-300 { + --tw-gradient-to: #bef264 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:to-orange-400 { + --tw-gradient-to: #FF8A4C var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:to-pink-500 { + --tw-gradient-to: #E74694 var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:to-yellow-200 { + --tw-gradient-to: #FCE96A var(--tw-gradient-to-position); + --tw-gradient-to-position: ; +} + +.group:hover .group-hover\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:opacity-100 { + opacity: 1; +} + +.group:focus .group-focus\:text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.group:focus .group-focus\:outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.group:focus .group-focus\:ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.group:focus .group-focus\:ring-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} + +.peer:checked ~ .peer-checked\:border-blue-600 { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-orange-500 { + --tw-bg-opacity: 1; + background-color: rgb(255 90 31 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-purple-600 { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-red-600 { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-teal-600 { + --tw-bg-opacity: 1; + background-color: rgb(4 116 129 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-yellow-400 { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:after\:translate-x-full::after { + content: var(--tw-content); + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:checked ~ .peer-checked\:after\:border-white::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:top-1\/2 { + top: 50%; +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:top-1\/2 { + top: 50%; +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:left-0 { + left: 0px; +} + +.peer:focus ~ .peer-focus\:top-1 { + top: 0.25rem; +} + +.peer:focus ~ .peer-focus\:top-2 { + top: 0.5rem; +} + +.peer:focus ~ .peer-focus\:-translate-y-3 { + --tw-translate-y: -0.75rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:-translate-y-4 { + --tw-translate-y: -1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:-translate-y-6 { + --tw-translate-y: -1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:scale-75 { + --tw-scale-x: .75; + --tw-scale-y: .75; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.peer:focus ~ .peer-focus\:font-medium { + font-weight: 500; +} + +.peer:focus ~ .peer-focus\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.peer:focus ~ .peer-focus\:outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.peer:focus ~ .peer-focus\:ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.peer:focus ~ .peer-focus\:ring-blue-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-green-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-orange-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(253 186 140 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-purple-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-red-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-teal-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-yellow-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:block) { + display: block; +} + +:is(.dark .dark\:inline-block) { + display: inline-block; +} + +:is(.dark .dark\:hidden) { + display: none; +} + +:is(.dark .dark\:divide-gray-600) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-divide-opacity)); +} + +:is(.dark .dark\:divide-gray-700) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-divide-opacity)); +} + +:is(.dark .dark\:\!border-blue-500) { + --tw-border-opacity: 1 !important; + border-color: rgb(63 131 248 / var(--tw-border-opacity)) !important; +} + +:is(.dark .dark\:border-blue-400) { + --tw-border-opacity: 1; + border-color: rgb(118 169 250 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-500) { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-600) { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-800) { + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-400) { + --tw-border-opacity: 1; + border-color: rgb(156 163 175 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-500) { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-600) { + --tw-border-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-700) { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-800) { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-900) { + --tw-border-opacity: 1; + border-color: rgb(17 24 39 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-400) { + --tw-border-opacity: 1; + border-color: rgb(49 196 141 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-500) { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-600) { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-800) { + --tw-border-opacity: 1; + border-color: rgb(3 84 63 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-purple-400) { + --tw-border-opacity: 1; + border-color: rgb(172 148 250 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-400) { + --tw-border-opacity: 1; + border-color: rgb(249 128 128 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-500) { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-600) { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-800) { + --tw-border-opacity: 1; + border-color: rgb(155 28 28 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-transparent) { + border-color: transparent; +} + +:is(.dark .dark\:border-white) { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-yellow-300) { + --tw-border-opacity: 1; + border-color: rgb(250 202 21 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-yellow-800) { + --tw-border-opacity: 1; + border-color: rgb(114 59 19 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-l-gray-700) { + --tw-border-opacity: 1; + border-left-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:bg-blue-200) { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-400) { + --tw-bg-opacity: 1; + background-color: rgb(118 169 250 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-500) { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-600) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-800) { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-900) { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-300) { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-400) { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-500) { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-600) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-700) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-800) { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-800\/30) { + background-color: rgb(31 41 55 / 0.3); +} + +:is(.dark .dark\:bg-gray-800\/50) { + background-color: rgb(31 41 55 / 0.5); +} + +:is(.dark .dark\:bg-gray-900) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-900\/60) { + background-color: rgb(17 24 39 / 0.6); +} + +:is(.dark .dark\:bg-green-100) { + --tw-bg-opacity: 1; + background-color: rgb(222 247 236 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-500) { + --tw-bg-opacity: 1; + background-color: rgb(14 159 110 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-600) { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-800) { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-900) { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-indigo-500) { + --tw-bg-opacity: 1; + background-color: rgb(104 117 245 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-indigo-900) { + --tw-bg-opacity: 1; + background-color: rgb(54 47 120 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-200) { + --tw-bg-opacity: 1; + background-color: rgb(252 217 189 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-400) { + --tw-bg-opacity: 1; + background-color: rgb(255 138 76 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-700) { + --tw-bg-opacity: 1; + background-color: rgb(180 52 3 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-pink-900) { + --tw-bg-opacity: 1; + background-color: rgb(117 26 61 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-500) { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-600) { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-900) { + --tw-bg-opacity: 1; + background-color: rgb(74 29 150 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-100) { + --tw-bg-opacity: 1; + background-color: rgb(253 232 232 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-500) { + --tw-bg-opacity: 1; + background-color: rgb(240 82 82 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-600) { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-800) { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-900) { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-white) { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-yellow-300) { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-yellow-900) { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-opacity-80) { + --tw-bg-opacity: 0.8; +} + +:is(.dark .dark\:bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern-dark\.svg\'\)\]) { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern-dark.svg'); +} + +:is(.dark .dark\:from-blue-900) { + --tw-gradient-from: #233876 var(--tw-gradient-from-position); + --tw-gradient-from-position: ; + --tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-from-position); + --tw-gradient-to-position: ; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +:is(.dark .dark\:fill-gray-300) { + fill: #D1D5DB; +} + +:is(.dark .dark\:fill-gray-400) { + fill: #9CA3AF; +} + +:is(.dark .dark\:\!text-blue-500) { + --tw-text-opacity: 1 !important; + color: rgb(63 131 248 / var(--tw-text-opacity)) !important; +} + +:is(.dark .dark\:text-blue-100) { + --tw-text-opacity: 1; + color: rgb(225 239 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-200) { + --tw-text-opacity: 1; + color: rgb(195 221 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-300) { + --tw-text-opacity: 1; + color: rgb(164 202 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-400) { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-500\/100) { + color: rgb(63 131 248 / 1); +} + +:is(.dark .dark\:text-blue-500\/25) { + color: rgb(63 131 248 / 0.25); +} + +:is(.dark .dark\:text-blue-500\/50) { + color: rgb(63 131 248 / 0.5); +} + +:is(.dark .dark\:text-blue-500\/75) { + color: rgb(63 131 248 / 0.75); +} + +:is(.dark .dark\:text-blue-600) { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-800) { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-100) { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-200) { + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-400) { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-500) { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-600) { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-700) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-800) { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-900) { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-200) { + --tw-text-opacity: 1; + color: rgb(188 240 218 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-300) { + --tw-text-opacity: 1; + color: rgb(132 225 188 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-400) { + --tw-text-opacity: 1; + color: rgb(49 196 141 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-500) { + --tw-text-opacity: 1; + color: rgb(14 159 110 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-600) { + --tw-text-opacity: 1; + color: rgb(5 122 85 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-300) { + --tw-text-opacity: 1; + color: rgb(180 198 252 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-400) { + --tw-text-opacity: 1; + color: rgb(141 162 251 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-500) { + --tw-text-opacity: 1; + color: rgb(104 117 245 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-200) { + --tw-text-opacity: 1; + color: rgb(252 217 189 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-300) { + --tw-text-opacity: 1; + color: rgb(253 186 140 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-900) { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-pink-300) { + --tw-text-opacity: 1; + color: rgb(248 180 217 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-pink-400) { + --tw-text-opacity: 1; + color: rgb(241 126 184 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-300) { + --tw-text-opacity: 1; + color: rgb(202 191 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-400) { + --tw-text-opacity: 1; + color: rgb(172 148 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-500) { + --tw-text-opacity: 1; + color: rgb(144 97 249 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-200) { + --tw-text-opacity: 1; + color: rgb(251 213 213 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-300) { + --tw-text-opacity: 1; + color: rgb(248 180 180 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-400) { + --tw-text-opacity: 1; + color: rgb(249 128 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-500) { + --tw-text-opacity: 1; + color: rgb(240 82 82 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-teal-300) { + --tw-text-opacity: 1; + color: rgb(126 220 226 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-yellow-300) { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-yellow-500) { + --tw-text-opacity: 1; + color: rgb(194 120 3 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:decoration-blue-600) { + text-decoration-color: #1C64F2; +} + +:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(156 163 175 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-gray-400)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(156 163 175 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-green-500)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(14 159 110 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-green-500)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(14 159 110 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-red-500)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(240 82 82 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-red-500)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(240 82 82 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:shadow-lg) { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +:is(.dark .dark\:shadow-sm-light) { + --tw-shadow: 0 2px 5px 0px rgba(255, 255, 255, 0.08); + --tw-shadow-colored: 0 2px 5px 0px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +:is(.dark .dark\:shadow-blue-800\/80) { + --tw-shadow-color: rgb(30 66 159 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-cyan-800\/80) { + --tw-shadow-color: rgb(21 94 117 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-gray-800) { + --tw-shadow-color: #1F2937; + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-green-800\/80) { + --tw-shadow-color: rgb(3 84 63 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-lime-800\/80) { + --tw-shadow-color: rgb(63 98 18 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-pink-800\/80) { + --tw-shadow-color: rgb(153 21 75 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-purple-800\/80) { + --tw-shadow-color: rgb(85 33 181 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-red-800\/80) { + --tw-shadow-color: rgb(155 28 28 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-teal-800\/80) { + --tw-shadow-color: rgb(5 80 92 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:ring-gray-500) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:ring-gray-900) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(17 24 39 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:ring-offset-gray-700) { + --tw-ring-offset-color: #374151; +} + +:is(.dark .dark\:ring-offset-gray-800) { + --tw-ring-offset-color: #1F2937; +} + +:is(.dark .dark\:first-letter\:text-gray-100)::first-letter { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:after\:border-blue-800)::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:after\:border-gray-700)::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:after\:text-gray-500)::after { + content: var(--tw-content); + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-500:hover) { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-600:hover) { + --tw-border-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-700:hover) { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:bg-\[\#050708\]\/30:hover) { + background-color: rgb(5 7 8 / 0.3); +} + +:is(.dark .dark\:hover\:bg-\[\#050708\]\/40:hover) { + background-color: rgb(5 7 8 / 0.4); +} + +:is(.dark .dark\:hover\:bg-\[\#FF9119\]\/80:hover) { + background-color: rgb(255 145 25 / 0.8); +} + +:is(.dark .dark\:hover\:bg-blue-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-200:hover) { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(4 108 78 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-indigo-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(66 56 157 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-pink-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(153 21 75 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(108 43 217 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(200 30 30 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-300:hover) { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-400:hover) { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(114 59 19 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:\!text-blue-500:hover) { + --tw-text-opacity: 1 !important; + color: rgb(63 131 248 / var(--tw-text-opacity)) !important; +} + +:is(.dark .dark\:hover\:text-blue-300:hover) { + --tw-text-opacity: 1; + color: rgb(164 202 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-400:hover) { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-500:hover) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-600:hover) { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-700:hover) { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-300:hover) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-400:hover) { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-800:hover) { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-900:hover) { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-green-300:hover) { + --tw-text-opacity: 1; + color: rgb(132 225 188 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-indigo-300:hover) { + --tw-text-opacity: 1; + color: rgb(180 198 252 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-pink-300:hover) { + --tw-text-opacity: 1; + color: rgb(248 180 217 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-purple-300:hover) { + --tw-text-opacity: 1; + color: rgb(202 191 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-red-300:hover) { + --tw-text-opacity: 1; + color: rgb(248 180 180 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-yellow-300:hover) { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:bg-blend-darken:hover) { + background-blend-mode: darken; +} + +:is(.dark .dark\:focus\:border-blue-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:border-green-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:border-red-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:bg-blue-600:focus) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:focus\:bg-gray-700:focus) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:focus\:text-white:focus) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:focus\:ring-\[\#050708\]\/50:focus) { + --tw-ring-color: rgb(5 7 8 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#2557D6\]\/50:focus) { + --tw-ring-color: rgb(37 87 214 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#F7BE38\]\/50:focus) { + --tw-ring-color: rgb(247 190 56 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#FF9119\]\/40:focus) { + --tw-ring-color: rgb(255 145 25 / 0.4); +} + +:is(.dark .dark\:focus\:ring-blue-500:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(35 56 118 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-cyan-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-400:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-500:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-700:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-green-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 122 85 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-green-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-lime-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-orange-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(208 56 1 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-pink-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 58 242 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-400:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(224 36 36 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(4 116 129 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-700:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(159 88 10 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-offset-gray-700:focus) { + --tw-ring-offset-color: #374151; +} + +:is(.dark .dark\:focus\:ring-offset-gray-800:focus) { + --tw-ring-offset-color: #1F2937; +} + +:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60) { + background-color: rgb(31 41 55 / 0.6); +} + +:is(.dark .group:hover .dark\:group-hover\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .group:hover .dark\:group-hover\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .group:hover .dark\:group-hover\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .group:focus .dark\:group-focus\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70) { + --tw-ring-color: rgb(31 41 55 / 0.7); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +.peer:focus ~ :is(.dark .peer-focus\:dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-blue-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-green-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-orange-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(138 44 13 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-purple-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-red-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-teal-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-yellow-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity)); +} + +@media (min-width: 640px) { + + .sm\:order-last { + order: 9999; + } + + .sm\:col-span-1 { + grid-column: span 1 / span 1; + } + + .sm\:col-span-3 { + grid-column: span 3 / span 3; + } + + .sm\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .sm\:mb-0 { + margin-bottom: 0px; + } + + .sm\:mb-4 { + margin-bottom: 1rem; + } + + .sm\:mb-5 { + margin-bottom: 1.25rem; + } + + .sm\:ml-2 { + margin-left: 0.5rem; + } + + .sm\:ml-4 { + margin-left: 1rem; + } + + .sm\:ml-64 { + margin-left: 16rem; + } + + .sm\:ml-auto { + margin-left: auto; + } + + .sm\:mt-0 { + margin-top: 0px; + } + + .sm\:block { + display: block; + } + + .sm\:flex { + display: flex; + } + + .sm\:inline-flex { + display: inline-flex; + } + + .sm\:grid { + display: grid; + } + + .sm\:hidden { + display: none; + } + + .sm\:h-4 { + height: 1rem; + } + + .sm\:h-64 { + height: 16rem; + } + + .sm\:h-7 { + height: 1.75rem; + } + + .sm\:h-9 { + height: 2.25rem; + } + + .sm\:h-96 { + height: 24rem; + } + + .sm\:w-4 { + width: 1rem; + } + + .sm\:w-96 { + width: 24rem; + } + + .sm\:w-auto { + width: auto; + } + + .sm\:translate-x-0 { + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + + .sm\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .sm\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .sm\:flex-row { + flex-direction: row; + } + + .sm\:items-center { + align-items: center; + } + + .sm\:justify-center { + justify-content: center; + } + + .sm\:justify-between { + justify-content: space-between; + } + + .sm\:gap-6 { + gap: 1.5rem; + } + + .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); + } + + .sm\:divide-x > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(1px * var(--tw-divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); + } + + .sm\:rounded-lg { + border-radius: 0.5rem; + } + + .sm\:border-b-0 { + border-bottom-width: 0px; + } + + .sm\:border-r { + border-right-width: 1px; + } + + .sm\:p-4 { + padding: 1rem; + } + + .sm\:p-6 { + padding: 1.5rem; + } + + .sm\:p-8 { + padding: 2rem; + } + + .sm\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .sm\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .sm\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .sm\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .sm\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .sm\:pb-4 { + padding-bottom: 1rem; + } + + .sm\:pl-2 { + padding-left: 0.5rem; + } + + .sm\:pl-4 { + padding-left: 1rem; + } + + .sm\:pr-4 { + padding-right: 1rem; + } + + .sm\:pr-8 { + padding-right: 2rem; + } + + .sm\:pt-4 { + padding-top: 1rem; + } + + .sm\:text-center { + text-align: center; + } + + .sm\:text-2xl { + font-size: 1.5rem; + line-height: 2rem; + } + + .sm\:text-base { + font-size: 1rem; + line-height: 1.5rem; + } + + .sm\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } + + .sm\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .sm\:text-xs { + font-size: 0.75rem; + line-height: 1rem; + } + + .sm\:ring-8 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + } + + .sm\:after\:inline-block::after { + content: var(--tw-content); + display: inline-block; + } + + .sm\:after\:hidden::after { + content: var(--tw-content); + display: none; + } + + .sm\:after\:content-\[\'\'\]::after { + --tw-content: ''; + content: var(--tw-content); + } +} + +@media (min-width: 768px) { + + .md\:relative { + position: relative; + } + + .md\:inset-0 { + inset: 0px; + } + + .md\:right-auto { + right: auto; + } + + .md\:top-auto { + top: auto; + } + + .md\:order-1 { + order: 1; + } + + .md\:order-2 { + order: 2; + } + + .md\:m-0 { + margin: 0px; + } + + .md\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .md\:my-0 { + margin-top: 0px; + margin-bottom: 0px; + } + + .md\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .md\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .md\:mb-0 { + margin-bottom: 0px; + } + + .md\:mb-12 { + margin-bottom: 3rem; + } + + .md\:ml-1 { + margin-left: 0.25rem; + } + + .md\:ml-2 { + margin-left: 0.5rem; + } + + .md\:mr-0 { + margin-right: 0px; + } + + .md\:mr-2 { + margin-right: 0.5rem; + } + + .md\:mr-24 { + margin-right: 6rem; + } + + .md\:mr-4 { + margin-right: 1rem; + } + + .md\:mr-6 { + margin-right: 1.5rem; + } + + .md\:mt-0 { + margin-top: 0px; + } + + .md\:mt-6 { + margin-top: 1.5rem; + } + + .md\:block { + display: block; + } + + .md\:inline { + display: inline; + } + + .md\:flex { + display: flex; + } + + .md\:inline-flex { + display: inline-flex; + } + + .md\:grid { + display: grid; + } + + .md\:hidden { + display: none; + } + + .md\:h-96 { + height: 24rem; + } + + .md\:h-\[21px\] { + height: 21px; + } + + .md\:h-\[262px\] { + height: 262px; + } + + .md\:h-\[278px\] { + height: 278px; + } + + .md\:h-\[294px\] { + height: 294px; + } + + .md\:h-\[42px\] { + height: 42px; + } + + .md\:h-\[654px\] { + height: 654px; + } + + .md\:h-\[682px\] { + height: 682px; + } + + .md\:h-\[8px\] { + height: 8px; + } + + .md\:h-\[95px\] { + height: 95px; + } + + .md\:h-auto { + height: auto; + } + + .md\:w-48 { + width: 12rem; + } + + .md\:w-64 { + width: 16rem; + } + + .md\:w-\[96px\] { + width: 96px; + } + + .md\:w-auto { + width: auto; + } + + .md\:w-full { + width: 100%; + } + + .md\:max-w-\[142px\] { + max-width: 142px; + } + + .md\:max-w-\[512px\] { + max-width: 512px; + } + + .md\:max-w-\[597px\] { + max-width: 597px; + } + + .md\:max-w-screen-md { + max-width: 768px; + } + + .md\:max-w-xl { + max-width: 36rem; + } + + .md\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .md\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .md\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .md\:flex-row { + flex-direction: row; + } + + .md\:items-center { + align-items: center; + } + + .md\:justify-between { + justify-content: space-between; + } + + .md\:gap-12 { + gap: 3rem; + } + + .md\:gap-6 { + gap: 1.5rem; + } + + .md\:gap-8 { + gap: 2rem; + } + + .md\:space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); + } + + .md\:rounded-none { + border-radius: 0px; + } + + .md\:rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + } + + .md\:rounded-t-none { + border-top-left-radius: 0px; + border-top-right-radius: 0px; + } + + .md\:rounded-br-lg { + border-bottom-right-radius: 0.5rem; + } + + .md\:rounded-tl-lg { + border-top-left-radius: 0.5rem; + } + + .md\:border-0 { + border-width: 0px; + } + + .md\:border-b-0 { + border-bottom-width: 0px; + } + + .md\:border-r { + border-right-width: 1px; + } + + .md\:bg-transparent { + background-color: transparent; + } + + .md\:bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + } + + .md\:p-0 { + padding: 0px; + } + + .md\:p-12 { + padding: 3rem; + } + + .md\:p-6 { + padding: 1.5rem; + } + + .md\:p-8 { + padding: 2rem; + } + + .md\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .md\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .md\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .md\:py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } + + .md\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .md\:pb-0 { + padding-bottom: 0px; + } + + .md\:pb-4 { + padding-bottom: 1rem; + } + + .md\:pr-4 { + padding-right: 1rem; + } + + .md\:pt-0 { + padding-top: 0px; + } + + .md\:text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; + } + + .md\:text-5xl { + font-size: 3rem; + line-height: 1; + } + + .md\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } + + .md\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .md\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .md\:font-medium { + font-weight: 500; + } + + .md\:text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .md\:text-green-700 { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); + } + + .md\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .md\:hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); + } + + .md\:hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .md\:hover\:text-green-700:hover { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:bg-gray-900) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); + } + + :is(.dark .md\:dark\:bg-transparent) { + background-color: transparent; + } + + :is(.dark .md\:dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:hover\:bg-transparent:hover) { + background-color: transparent; + } + + :is(.dark .md\:dark\:hover\:text-blue-500:hover) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } +} + +@media (min-width: 1024px) { + + .lg\:static { + position: static; + } + + .lg\:sticky { + position: sticky; + } + + .lg\:top-28 { + top: 7rem; + } + + .lg\:order-1 { + order: 1; + } + + .lg\:order-2 { + order: 2; + } + + .lg\:col-span-5 { + grid-column: span 5 / span 5; + } + + .lg\:col-span-7 { + grid-column: span 7 / span 7; + } + + .lg\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .lg\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .lg\:mb-0 { + margin-bottom: 0px; + } + + .lg\:mb-16 { + margin-bottom: 4rem; + } + + .lg\:mb-8 { + margin-bottom: 2rem; + } + + .lg\:mr-0 { + margin-right: 0px; + } + + .lg\:mt-0 { + margin-top: 0px; + } + + .lg\:mt-10 { + margin-top: 2.5rem; + } + + .lg\:block { + display: block; + } + + .lg\:flex { + display: flex; + } + + .lg\:grid { + display: grid; + } + + .lg\:hidden { + display: none; + } + + .lg\:h-12 { + height: 3rem; + } + + .lg\:h-4 { + height: 1rem; + } + + .lg\:h-5 { + height: 1.25rem; + } + + .lg\:h-6 { + height: 1.5rem; + } + + .lg\:h-\[calc\(100vh-3rem\)\] { + height: calc(100vh - 3rem); + } + + .lg\:h-auto { + height: auto; + } + + .lg\:max-h-full { + max-height: 100%; + } + + .lg\:w-12 { + width: 3rem; + } + + .lg\:w-4 { + width: 1rem; + } + + .lg\:w-48 { + width: 12rem; + } + + .lg\:w-5 { + width: 1.25rem; + } + + .lg\:w-6 { + width: 1.5rem; + } + + .lg\:w-96 { + width: 24rem; + } + + .lg\:w-auto { + width: auto; + } + + .lg\:max-w-7xl { + max-width: 80rem; + } + + .lg\:max-w-screen-lg { + max-width: 1024px; + } + + .lg\:max-w-xl { + max-width: 36rem; + } + + .lg\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .lg\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .lg\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .lg\:flex-row { + flex-direction: row; + } + + .lg\:gap-16 { + gap: 4rem; + } + + .lg\:gap-8 { + gap: 2rem; + } + + .lg\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .lg\:self-center { + align-self: center; + } + + .lg\:overflow-visible { + overflow: visible; + } + + .lg\:overflow-y-visible { + overflow-y: visible; + } + + .lg\:border-0 { + border-width: 0px; + } + + .lg\:bg-transparent { + background-color: transparent; + } + + .lg\:p-0 { + padding: 0px; + } + + .lg\:p-8 { + padding: 2rem; + } + + .lg\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .lg\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .lg\:px-36 { + padding-left: 9rem; + padding-right: 9rem; + } + + .lg\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .lg\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .lg\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .lg\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .lg\:py-0 { + padding-top: 0px; + padding-bottom: 0px; + } + + .lg\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .lg\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .lg\:py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } + + .lg\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .lg\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .lg\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .lg\:pb-16 { + padding-bottom: 4rem; + } + + .lg\:pb-20 { + padding-bottom: 5rem; + } + + .lg\:pl-0 { + padding-left: 0px; + } + + .lg\:pl-3 { + padding-left: 0.75rem; + } + + .lg\:pt-0 { + padding-top: 0px; + } + + .lg\:pt-2 { + padding-top: 0.5rem; + } + + .lg\:pt-8 { + padding-top: 2rem; + } + + .lg\:text-2xl { + font-size: 1.5rem; + line-height: 2rem; + } + + .lg\:text-6xl { + font-size: 3.75rem; + line-height: 1; + } + + .lg\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .lg\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .lg\:text-xs { + font-size: 0.75rem; + line-height: 1rem; + } + + .lg\:text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .lg\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .lg\:hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + :is(.dark .lg\:dark\:hover\:bg-transparent:hover) { + background-color: transparent; + } + + :is(.dark .lg\:dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } +} + +@media (min-width: 1280px) { + + .xl\:ml-16 { + margin-left: 4rem; + } + + .xl\:block { + display: block; + } + + .xl\:inline-flex { + display: inline-flex; + } + + .xl\:hidden { + display: none; + } + + .xl\:h-80 { + height: 20rem; + } + + .xl\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .xl\:gap-0 { + gap: 0px; + } + + .xl\:gap-16 { + gap: 4rem; + } + + .xl\:gap-24 { + gap: 6rem; + } + + .xl\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .xl\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .xl\:pb-24 { + padding-bottom: 6rem; + } + + .xl\:pl-4 { + padding-left: 1rem; + } + + .xl\:pt-24 { + padding-top: 6rem; + } + + .xl\:text-6xl { + font-size: 3.75rem; + line-height: 1; + } + + .xl\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .xl\:after\:mx-10::after { + content: var(--tw-content); + margin-left: 2.5rem; + margin-right: 2.5rem; + } +} + +@media (min-width: 1536px) { + + .\32xl\:block { + display: block; + } + + .\32xl\:h-96 { + height: 24rem; + } + + .\32xl\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .\32xl\:gap-x-2 { + -moz-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .\32xl\:space-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0px * var(--tw-space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); + } +} + +.\[\&\>div\]\:mx-auto>div { + margin-left: auto; + margin-right: auto; +} diff --git a/node_modules/flowbite/dist/flowbite.js b/node_modules/flowbite/dist/flowbite.js new file mode 100644 index 0000000..e127c7a --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.js @@ -0,0 +1,4434 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 647: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var Accordion = /** @class */ (function () { + function Accordion(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Accordion.prototype._init = function () { + var _this = this; + if (this._items.length) { + // show accordion item based on click + this._items.map(function (item) { + if (item.active) { + _this.open(item.id); + } + item.triggerEl.addEventListener('click', function () { + _this.toggle(item.id); + }); + }); + } + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.remove('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion(items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var Carousel = /** @class */ (function () { + function Carousel(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._init(); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype._init = function () { + var _this = this; + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this._getActiveItem()) { + this.slideTo(this._getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this._getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this._getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.right.el.classList.add('translate-x-full', 'z-10'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype._getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel(items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Collapse.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._triggerEl.addEventListener('click', function () { + _this.toggle(); + }); + } + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + new Collapse($targetEl, $triggerEl); + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Dial.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }); + }); + } + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Dismiss.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + this._triggerEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Drawer.prototype._init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + } + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + // add keyboard event listener to document + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + return Drawer; +}()); +var getDrawerInstance = function (id, instances) { + if (instances.some(function (drawerInstance) { return drawerInstance.id === id; })) { + return instances.find(function (drawerInstance) { return drawerInstance.id === id; }); + } +}; +function initDrawers() { + var drawerInstances = []; + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + // optional + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + if (!getDrawerInstance(drawerId, drawerInstances)) { + drawerInstances.push({ + id: drawerId, + object: new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge + ? edge === 'true' + ? true + : false + : Default.edge, + edgeOffset: edgeOffset + ? edgeOffset + : Default.edgeOffset, + }), + }); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_1) { + $triggerEl.addEventListener('click', function () { + drawer_1.object.toggle(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_2) { + $triggerEl.addEventListener('click', function () { + drawer_2.object.hide(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_3) { + $triggerEl.addEventListener('click', function () { + drawer_3.object.show(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Dropdown.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.toggle(); + }); + }); + } + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + if (ev === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._init(); + } + Modal.prototype._init = function () { + var _this = this; + if (this._targetEl) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + } + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('modal-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden) { + document.querySelector('[modal-backdrop]').remove(); + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + return Modal; +}()); +var getModalInstance = function (id, instances) { + if (instances.some(function (modalInstance) { return modalInstance.id === id; })) { + return instances.find(function (modalInstance) { return modalInstance.id === id; }); + } + return null; +}; +function initModals() { + var modalInstances = []; + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + if (!getModalInstance(modalId, modalInstances)) { + modalInstances.push({ + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // support pre v1.6.0 data-modal-toggle initialization + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + var modal_1 = getModalInstance(modalId, modalInstances); + if (!modal_1) { + modal_1 = { + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }; + modalInstances.push(modal_1); + } + $triggerEl.addEventListener('click', function () { + modal_1.object.toggle(); + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = getModalInstance(modalId, modalInstances); + if (modal_2) { + $triggerEl.addEventListener('click', function () { + if (modal_2.object.isHidden) { + modal_2.object.show(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = getModalInstance(modalId, modalInstances); + if (modal_3) { + $triggerEl.addEventListener('click', function () { + if (modal_3.object.isVisible) { + modal_3.object.hide(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Popover.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var Tabs = /** @class */ (function () { + function Tabs(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Tabs.prototype._init = function () { + var _this = this; + if (this._items.length) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this._setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function () { + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype._setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this._setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($triggerEl) { + var tabItems = []; + var defaultTabId = null; + $triggerEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs(tabItems, { + defaultTabId: defaultTabId, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Tooltip.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.hide(); + }); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +__webpack_require__(647); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +__webpack_require__(311); +var events_1 = __webpack_require__(947); +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +events.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.js.map b/node_modules/flowbite/dist/flowbite.js.map new file mode 100644 index 0000000..478cc98 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;ACVA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AACnC,uCAAuC,KAAK;AAC5C,wCAAwC,KAAK;AAC7C;;AAEA,aAAa,SAAS,YAAY,SAAS;AAC3C;;AAEA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxC+D,CAA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ACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;;AC9ByD;AACJ;AACM;AACR;AACZ,CAAC;AACxC;;AAEe;AACf;;AAEA,aAAa,kBAAkB;AAC/B,kBAAkB,eAAe;AACjC;AACA,cAAc,QAAG;AACjB,eAAe,QAAG;AAClB,kCAAkC,mBAAmB;AACrD;;AAEA,MAAM,gBAAgB;AACtB,SAAS,QAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BqD;AACtC;AACf;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;;AAEA;AACA;;ACT+C;AACE;AACN;AACK;AACjC;AACf,4CAA4C,WAAW;AACvD;AACA;AACA;;AAEA,MAAM,aAAa,UAAU,cAAc;AAC3C;AACA;;AAEA,yBAAyB,aAAa;AACtC;;ACfmD;AACJ;AACR;AACU;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;;AAEA;AACA;AACA;;AAEA,qBAAqB,eAAe;AACpC;AACA,YAAY,SAAS;AACrB,+DAA+D,cAAc;AAC7E;AACA;AACA,uCAAuC,aAAa;AACpD;;ACzBe;AACf,yBAAyB;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACPuC;AACY;AACA;AACI;AACJ;AACM;AACJ;AACM;AACI;AAChB;AACV;AACM;AACiB;AAChB;;AAE5C;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ,GAAG,gBAAgB,CAAC,eAAe,uBAAuB,SAAS,0EAA0E,gBAAgB,CAAC,eAAe,CAAC,kBAAkB;AACpO,EAAE;AACF;AACA;;;AAGA;AACA,wBAAwB,iBAAiB,CAAC,aAAa;AACvD,wDAAwD,gBAAgB;AACxE,4CAA4C,aAAa,YAAY,eAAe;;AAEpF,OAAO,SAAS;AAChB;AACA,IAAI;;;AAGJ;AACA,WAAW,SAAS,oBAAoB,QAAQ,oCAAoC,WAAW;AAC/F,GAAG;AACH,EAAE;AACF;;;AAGe;AACf;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAG;AACrB,oBAAoB,QAAG;AACvB,qBAAqB,QAAG;AACxB,mBAAmB,QAAG;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;ACrEqD;AACR;AACwB;AACF;AACpD;AACf;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD,8BAA8B,YAAY;AAC1C;AACA;AACA;;AAEA;AACA,SAAS,SAAG;AACZ;AACA;AACA;AACA;AACA;;AAEA,SAAS,MAAM;AACf;AACA;AACA;AACA;AACA;;AAEA,SAAS,KAAK;AACd;AACA;AACA;AACA;AACA;;AAEA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;;AAEzD;AACA;;AAEA;AACA,WAAW,KAAK;AAChB;AACA;;AAEA,WAAW,GAAG;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;ACrE8D;AACM;AACM;AACzB;AACI;AAC0D;AACxD;AACE;AACN,CAAC;;AAErC;AACf;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA,iGAAiG,oBAAoB;AACrH;AACA,sBAAsB,gBAAgB,gBAAgB,IAAI,GAAG,oBAAoB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA,yBAAyB,gBAAgB;;AAEzC,2BAA2B,YAAY,gBAAgB,KAAK;AAC5D,sBAAsB,SAAG,EAAE,MAAM;AACjC;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,SAAG,GAAG,IAAI;AAChD,qCAAqC,MAAM,GAAG,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,+BAA+B,KAAK,2CAA2C;AAC/E;;AAEA;AACA,6CAA6C,aAAa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AG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,qBAAqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,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L,CAAC,CAAC,CAAC;IACP,CAAC;IACL,aAAC;AAAD,CAAC;AAED,qBAAe,MAAM,CAAC;;;;;;;UClBtB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;ACNA,yBAAwB;AAExB,kBAAkB;AAClB,2CAAmE;AACnE,yCAAgE;AAChE,0CAAgE;AAChE,sCAAoD;AACpD,yCAA8D;AAC9D,wCAA0D;AAC1D,0CAAgE;AAChE,sCAAuD;AACvD,yCAA6D;AAC7D,sCAAmD;AACnD,yCAA6D;AAC7D,yBAA4B;AAC5B,wCAAkC;AAElC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,qBAAe;IACX,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,IAAI;IACJ,OAAO;IACP,MAAM;CACT,CAAC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///./src/flowbite.css?5b3c","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.umd.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","// extracted by mini-css-extract-plugin\nexport {};","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './flowbite.css';\n\n// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst events = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nevents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.min.css b/node_modules/flowbite/dist/flowbite.min.css new file mode 100644 index 0000000..591f2b0 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.min.css @@ -0,0 +1 @@ +/*! tailwindcss v3.3.0 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{background:inherit;height:8px;position:absolute;width:8px}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";transform:rotate(45deg);visibility:visible}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-color:#e5e7eb;border-style:solid}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-left-width:1px;border-top-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-right-width:1px;border-top-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{background:inherit;height:8px;position:absolute;width:8px}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:after,[data-popper-arrow]:before{content:"";transform:rotate(45deg);visibility:visible}[data-popper-arrow]:after{background:inherit;height:9px;position:absolute;width:9px}[role=tooltip]>[data-popper-arrow]:before{border-color:#e5e7eb;border-style:solid}.dark [role=tooltip]>[data-popper-arrow]:before{border-color:#4b5563;border-style:solid}[role=tooltip]>[data-popper-arrow]:after{border-color:#e5e7eb;border-style:solid}.dark [role=tooltip]>[data-popper-arrow]:after{border-color:#4b5563;border-style:solid}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-left-width:1px;border-top-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-right-width:1px;border-top-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:after,[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#1c64f2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#1c64f2;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3E%3C/svg%3E");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#1c64f2;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#1c64f2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}.dark [type=checkbox]:checked,.dark [type=radio]:checked,[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}.dark [type=radio]:checked,[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");background-size:1em 1em}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;border-color:transparent;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{-webkit-margin-start:-1rem;-webkit-margin-end:1rem;background:#1f2937;border:0;color:#fff;cursor:pointer;font-size:.875rem;font-weight:500;margin-inline-end:1rem;margin-inline-start:-1rem;padding:.625rem 1rem .625rem 2rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{background:#4b5563;color:#fff}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#1c64f2;border:0;border-radius:9999px;cursor:pointer;height:1.25rem;width:1.25rem}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1px;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}input[type=range]::-moz-range-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#1c64f2;border:0;border-radius:9999px;cursor:pointer;height:1.25rem;width:1.25rem}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}input[type=range].range-sm::-webkit-slider-thumb{height:1rem;width:1rem}input[type=range].range-lg::-webkit-slider-thumb{height:1.5rem;width:1.5rem}input[type=range].range-sm::-moz-range-thumb{height:1rem;width:1rem}input[type=range].range-lg::-moz-range-thumb{height:1.5rem;width:1.5rem}.toggle-bg:after{background:#fff;border-color:#d1d5db;border-radius:9999px;border-width:1px;box-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);content:"";height:1.25rem;left:.125rem;position:absolute;top:.125rem;transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;width:1.25rem}input:checked+.toggle-bg:after{border-color:#fff;transform:translateX(100%);}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(63,131,248,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(63,131,248,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.apexcharts-canvas .apexcharts-tooltip{background-color:#fff;border:0!important;border-radius:.25rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#6b7280}.dark .apexcharts-canvas .apexcharts-tooltip{background-color:#374151;border-color:transparent;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:#f3f4f6;border-bottom-color:#e5e7eb;color:#6b7280;font-size:.875rem!important;font-weight:400;margin-bottom:.75rem;padding:.5rem .75rem}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:#4b5563;border-color:#6b7280;color:#9ca3af}.apexcharts-canvas .apexcharts-xaxistooltip{background-color:#fff;border-color:transparent;border-radius:.25rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#6b7280;padding:.5rem .75rem}.dark .apexcharts-canvas .apexcharts-xaxistooltip{background-color:#374151;color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:#6b7280;font-size:.875rem}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#111827;font-size:.875rem}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#fff}.apexcharts-canvas .apexcharts-xaxistooltip-text{font-size:.875rem!important;font-weight:400}.apexcharts-canvas .apexcharts-xaxistooltip:after,.apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:#fff}.apexcharts-canvas .apexcharts-xaxistooltip:after{border-width:8px;margin-left:-8px}.apexcharts-canvas .apexcharts-xaxistooltip:before{border-width:10px;margin-left:-10px}.dark .apexcharts-canvas .apexcharts-xaxistooltip:after,.dark .apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:#374151}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group{padding:0}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:#fff!important;color:#6b7280!important;padding-bottom:.75rem;padding-left:.75rem;padding-right:.75rem}.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:#374151!important;color:#9ca3af!important}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type{padding-top:.75rem}.apexcharts-canvas .apexcharts-legend{padding:0!important}.apexcharts-canvas .apexcharts-legend-text{color:#6b7280!important;font-size:.75rem;font-weight:500!important;padding-left:1.25rem}.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#111827!important}.dark .apexcharts-canvas .apexcharts-legend-text{color:#9ca3af!important}.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#fff!important}.apexcharts-canvas .apexcharts-legend-series{align-items:center;display:flex;margin-bottom:.25rem!important;margin-left:.5rem;margin-right:.5rem}.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#111827!important;font-size:1.875rem;font-weight:700}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#fff!important}.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:#6b7280!important;font-size:1rem;font-weight:400}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:#9ca3af!important}.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label{filter:none!important;font-size:.75rem!important;font-weight:600!important;text-shadow:none!important}.apexcharts-gridline,.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{stroke:#e5e7eb!important}.dark .apexcharts-gridline,.dark .apexcharts-xcrosshairs,.dark .apexcharts-ycrosshairs{stroke:#374151!important}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-left-14{left:-3.5rem}.-left-3{left:-.75rem}.-left-4{left:-1rem}.-left-\[17px\]{left:-17px}.-right-2{right:-.5rem}.-right-\[16px\]{right:-16px}.-right-\[17px\]{right:-17px}.-top-2{top:-.5rem}.-top-\[140px\]{top:-140px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[\*px\]{bottom:*px}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-5{left:1.25rem}.left-6{left:1.5rem}.left-7{left:1.75rem}.left-8{left:2rem}.left-auto{left:auto}.right-0{right:0}.right-1\/2{right:50%}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-24{right:6rem}.right-3{right:.75rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.right-auto{right:auto}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-2\/4{top:50%}.top-28{top:7rem}.top-3{top:.75rem}.top-4{top:1rem}.top-5{top:1.25rem}.top-6{top:1.5rem}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.m-2{margin:.5rem}.m-2\.5{margin:.625rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1{margin-bottom:-.25rem;margin-top:-.25rem}.-my-1\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-bottom:2.5rem;margin-top:2.5rem}.my-12{margin-bottom:3rem;margin-top:3rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-7{margin-bottom:1.75rem;margin-top:1.75rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-mb-5{margin-bottom:-1.25rem}.-mb-px{margin-bottom:-1px}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-1{margin-left:-.25rem}.-mr-0{margin-right:0}.-mr-0\.5{margin-right:-.125rem}.-mr-1{margin-right:-.25rem}.-mt-1{margin-top:-.25rem}.-mt-5{margin-top:-1.25rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.mb-px{margin-bottom:1px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-2\.5{margin-left:.625rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-6{margin-right:1.5rem}.mr-8{margin-right:2rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[2px\]{margin-top:2px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.flow-root{display:flow-root}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-36{height:9rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[1\.1rem\]{height:1.1rem}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[46px\]{height:46px}.h-\[48px\]{height:48px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[56px\]{height:56px}.h-\[572px\]{height:572px}.h-\[5px\]{height:5px}.h-\[600px\]{height:600px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-\[78px\]{height:78px}.h-\[calc\(100\%-1rem\)\]{height:calc(100% - 1rem)}.h-\[calc\(100vh-5rem\)\]{height:calc(100vh - 5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-72{max-height:18rem}.max-h-\[48px\]{max-height:48px}.max-h-full{max-height:100%}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/4{width:50%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1\.1rem\]{width:1.1rem}.w-\[148px\]{width:148px}.w-\[188px\]{width:188px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-\[3px\]{width:3px}.w-\[48px\]{width:48px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[6px\]{width:6px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-2xs{max-width:16rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-8xl{max-width:90rem}.max-w-\[128px\]{max-width:128px}.max-w-\[133px\]{max-width:133px}.max-w-\[300px\]{max-width:300px}.max-w-\[301px\]{max-width:301px}.max-w-\[330px\]{max-width:330px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[360px\]{max-width:360px}.max-w-\[380px\]{max-width:380px}.max-w-\[400px\]{max-width:400px}.max-w-\[440px\]{max-width:440px}.max-w-\[450px\]{max-width:450px}.max-w-\[460px\]{max-width:460px}.max-w-\[480px\]{max-width:480px}.max-w-\[48px\]{max-width:48px}.max-w-\[500px\]{max-width:500px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[83px\]{max-width:83px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-screen-md{max-width:768px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\[0\]{transform-origin:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x:-100%}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.-translate-y-3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-4{--tw-translate-y:-1rem}.-translate-y-4,.-translate-y-6{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-6{--tw-translate-y:-1.5rem}.-translate-y-full{--tw-translate-y:-100%}.-translate-y-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-1\/2{--tw-translate-x:50%}.translate-x-1\/2,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-1\/2{--tw-translate-y:50%}.translate-y-1\/2,.translate-y-1\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/4{--tw-translate-y:25%}.translate-y-full{--tw-translate-y:100%}.rotate-180,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.scale-75,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-12{gap:3rem}.gap-16{gap:4rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-16{-moz-column-gap:4rem;column-gap:4rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-3{row-gap:.75rem}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.75rem*var(--tw-space-x-reverse))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1rem*var(--tw-space-x-reverse))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1px*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1px*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.625rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.625rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.25rem*var(--tw-space-x-reverse))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.625rem*var(--tw-space-y-reverse));margin-top:calc(.625rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(107 114 128/var(--tw-divide-opacity))}.place-self-center{place-self:center}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-b-\[1rem\]{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-left-radius:2.5rem;border-bottom-right-radius:2.5rem}.rounded-b-lg{border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-b-xl{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-l{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-l-lg{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl-lg{border-bottom-left-radius:.5rem}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-tr-lg{border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-\[10px\]{border-width:10px}.border-\[14px\]{border-width:14px}.border-\[16px\]{border-width:16px}.border-\[8px\]{border-width:8px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.\!border-blue-700{--tw-border-opacity:1!important;border-color:rgb(26 86 219/var(--tw-border-opacity))!important}.border-blue-100{--tw-border-opacity:1;border-color:rgb(225 239 254/var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(164 202 254/var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(118 169 250/var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(26 86 219/var(--tw-border-opacity))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.border-green-300{--tw-border-opacity:1;border-color:rgb(132 225 188/var(--tw-border-opacity))}.border-green-400{--tw-border-opacity:1;border-color:rgb(49 196 141/var(--tw-border-opacity))}.border-green-500{--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}.border-green-600{--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}.border-green-700{--tw-border-opacity:1;border-color:rgb(4 108 78/var(--tw-border-opacity))}.border-green-800{--tw-border-opacity:1;border-color:rgb(3 84 63/var(--tw-border-opacity))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(141 162 251/var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(241 126 184/var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(172 148 250/var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(108 43 217/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(248 180 180/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(249 128 128/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}.border-red-600{--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}.border-red-700{--tw-border-opacity:1;border-color:rgb(200 30 30/var(--tw-border-opacity))}.border-red-800{--tw-border-opacity:1;border-color:rgb(155 28 28/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(250 202 21/var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(227 160 8/var(--tw-border-opacity))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(114 59 19/var(--tw-border-opacity))}.border-l-gray-100{--tw-border-opacity:1;border-left-color:rgb(243 244 246/var(--tw-border-opacity))}.border-l-gray-50{--tw-border-opacity:1;border-left-color:rgb(249 250 251/var(--tw-border-opacity))}.bg-\[\#050708\]{--tw-bg-opacity:1;background-color:rgb(5 7 8/var(--tw-bg-opacity))}.bg-\[\#1da1f2\]{--tw-bg-opacity:1;background-color:rgb(29 161 242/var(--tw-bg-opacity))}.bg-\[\#24292F\]{--tw-bg-opacity:1;background-color:rgb(36 41 47/var(--tw-bg-opacity))}.bg-\[\#2557D6\]{--tw-bg-opacity:1;background-color:rgb(37 87 214/var(--tw-bg-opacity))}.bg-\[\#3b5998\]{--tw-bg-opacity:1;background-color:rgb(59 89 152/var(--tw-bg-opacity))}.bg-\[\#4285F4\]{--tw-bg-opacity:1;background-color:rgb(66 133 244/var(--tw-bg-opacity))}.bg-\[\#F7BE38\]{--tw-bg-opacity:1;background-color:rgb(247 190 56/var(--tw-bg-opacity))}.bg-\[\#FF9119\]{--tw-bg-opacity:1;background-color:rgb(255 145 25/var(--tw-bg-opacity))}.bg-\[\#hex\]{background-color:#hex}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(225 239 254/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(164 202 254/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(118 169 250/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(235 245 255/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-900\/50{background-color:rgba(17,24,39,.5)}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(222 247 236/var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(188 240 218/var(--tw-bg-opacity))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(132 225 188/var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(49 196 141/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(243 250 247/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(14 159 110/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(4 108 78/var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(229 237 255/var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(205 219 254/var(--tw-bg-opacity))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(180 198 252/var(--tw-bg-opacity))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(141 162 251/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(240 245 255/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(104 117 245/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(88 80 236/var(--tw-bg-opacity))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(81 69 205/var(--tw-bg-opacity))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(66 56 157/var(--tw-bg-opacity))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(54 47 120/var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(254 236 220/var(--tw-bg-opacity))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 140/var(--tw-bg-opacity))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 248 241/var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 232 243/var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(250 209 232/var(--tw-bg-opacity))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(248 180 217/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(241 126 184/var(--tw-bg-opacity))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(231 70 148/var(--tw-bg-opacity))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(214 31 105/var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(191 18 93/var(--tw-bg-opacity))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(153 21 75/var(--tw-bg-opacity))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(117 26 61/var(--tw-bg-opacity))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(237 235 254/var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(220 215 254/var(--tw-bg-opacity))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(202 191 253/var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(172 148 250/var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(246 245 255/var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(108 43 217/var(--tw-bg-opacity))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(74 29 150/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(253 232 232/var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(251 213 213/var(--tw-bg-opacity))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(248 180 180/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(249 128 128/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(253 242 242/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(240 82 82/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(200 30 30/var(--tw-bg-opacity))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(213 245 246/var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(237 250 250/var(--tw-bg-opacity))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(6 148 162/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/30{background-color:hsla(0,0%,100%,.3)}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(253 246 178/var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(252 233 106/var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(253 253 234/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(194 120 3/var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(159 88 10/var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(142 75 16/var(--tw-bg-opacity))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(114 59 19/var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/conference\.jpg\'\)\]{background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/conference.jpg)}.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern\.svg\'\)\]{background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern.svg)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:#ebf5ff var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(235,245,255,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from:#3f83f8 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(63,131,248,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from:#06b6d4 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-400{--tw-gradient-from:#31c48d var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(49,196,141,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-lime-200{--tw-gradient-from:#d9f99d var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:hsla(81,88%,80%,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-400{--tw-gradient-from:#f17eb8 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(241,126,184,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from:#e74694 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from:#9061f9 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(144,97,249,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from:#7e3af2 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-200{--tw-gradient-from:#fbd5d5 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:hsla(0,83%,91%,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-400{--tw-gradient-from:#f98080 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:hsla(0,91%,74%,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-400{--tw-gradient-from:#38bdf8 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(56,189,248,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from:#afecef var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(175,236,239,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from:#7edce2 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(126,220,226,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from:#16bdca var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(22,189,202,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-blue-600{--tw-gradient-via-position: ;--tw-gradient-to:rgba(28,100,242,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#1c64f2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-cyan-500{--tw-gradient-via-position: ;--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#06b6d4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-green-500{--tw-gradient-via-position: ;--tw-gradient-to:rgba(14,159,110,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#0e9f6e var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-lime-400{--tw-gradient-via-position: ;--tw-gradient-to:rgba(163,230,53,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#a3e635 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-pink-500{--tw-gradient-via-position: ;--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#e74694 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-purple-600{--tw-gradient-via-position: ;--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#7e3af2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-red-300{--tw-gradient-via-position: ;--tw-gradient-to:hsla(0,83%,84%,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#f8b4b4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-red-500{--tw-gradient-via-position: ;--tw-gradient-to:rgba(240,82,82,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#f05252 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-teal-500{--tw-gradient-via-position: ;--tw-gradient-to:rgba(6,148,162,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#0694a2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to:#3f83f8 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-blue-600{--tw-gradient-to:#1c64f2 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-blue-700{--tw-gradient-to:#1a56db var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-cyan-600{--tw-gradient-to:#0891b2 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-emerald-600{--tw-gradient-to:#059669 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-green-600{--tw-gradient-to:#057a55 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-lime-200{--tw-gradient-to:#d9f99d var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-lime-300{--tw-gradient-to:#bef264 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-lime-500{--tw-gradient-to:#84cc16 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-orange-400{--tw-gradient-to:#ff8a4c var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-pink-500{--tw-gradient-to:#e74694 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-pink-600{--tw-gradient-to:#d61f69 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-purple-700{--tw-gradient-to:#6c2bd9 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-red-600{--tw-gradient-to:#e02424 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-teal-600{--tw-gradient-to:#047481 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-yellow-200{--tw-gradient-to:#fce96a var(--tw-gradient-to-position);--tw-gradient-to-position: }.bg-cover{background-size:cover}.bg-local{background-attachment:local}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.fill-blue-600{fill:#1c64f2}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-24{padding-bottom:6rem;padding-top:6rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-48{padding-bottom:12rem;padding-top:12rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-px{padding-bottom:1px;padding-top:1px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-48{padding-bottom:12rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-96{padding-bottom:24rem}.pl-0{padding-left:0}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-24{padding-top:6rem}.pt-3{padding-top:.75rem}.pt-32{padding-top:8rem}.pt-36{padding-top:9rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-52{padding-top:13rem}.pt-6{padding-top:1.5rem}.pt-60{padding-top:15rem}.pt-64{padding-top:16rem}.pt-8{padding-top:2rem}.pt-80{padding-top:20rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-2xs{font-size:.625rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-blue-700{--tw-text-opacity:1!important;color:rgb(26 86 219/var(--tw-text-opacity))!important}.text-\[\#626890\]{--tw-text-opacity:1;color:rgb(98 104 144/var(--tw-text-opacity))}.text-\[\#ff2d20\]{--tw-text-opacity:1;color:rgb(255 45 32/var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity:1;color:rgb(225 239 254/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}.text-blue-50{--tw-text-opacity:1;color:rgb(235 245 255/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.text-blue-600\/100{color:#1c64f2}.text-blue-600\/25{color:rgba(28,100,242,.25)}.text-blue-600\/50{color:rgba(28,100,242,.5)}.text-blue-600\/75{color:rgba(28,100,242,.75)}.text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(35 56 118/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(49 196 141/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(14 159 110/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(5 122 85/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(3 84 63/var(--tw-text-opacity))}.text-green-900{--tw-text-opacity:1;color:rgb(1 71 55/var(--tw-text-opacity))}.text-indigo-400{--tw-text-opacity:1;color:rgb(141 162 251/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(81 69 205/var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity:1;color:rgb(66 56 157/var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity:1;color:rgb(255 90 31/var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgb(208 56 1/var(--tw-text-opacity))}.text-orange-800{--tw-text-opacity:1;color:rgb(138 44 13/var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity:1;color:rgb(241 126 184/var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity:1;color:rgb(153 21 75/var(--tw-text-opacity))}.text-purple-400{--tw-text-opacity:1;color:rgb(172 148 250/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(126 58 242/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(108 43 217/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(85 33 181/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(249 128 128/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(240 82 82/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(224 36 36/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(200 30 30/var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgb(155 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity:1;color:rgb(4 116 129/var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(227 160 8/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(194 120 3/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(142 75 16/var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity:1;color:rgb(114 59 19/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-blue-400{text-decoration-color:#76a9fa}.decoration-blue-500{text-decoration-color:#3f83f8}.decoration-gray-500{text-decoration-color:#6b7280}.decoration-green-500{text-decoration-color:#0e9f6e}.decoration-indigo-500{text-decoration-color:#6875f5}.decoration-red-500{text-decoration-color:#f05252}.decoration-sky-500{text-decoration-color:#0ea5e9}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.decoration-8{text-decoration-thickness:8px}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-green-700::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(4 108 78/var(--tw-placeholder-opacity))}.placeholder-green-700::placeholder{--tw-placeholder-opacity:1;color:rgb(4 108 78/var(--tw-placeholder-opacity))}.placeholder-red-700::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(200 30 30/var(--tw-placeholder-opacity))}.placeholder-red-700::placeholder{--tw-placeholder-opacity:1;color:rgb(200 30 30/var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.bg-blend-multiply{background-blend-mode:multiply}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color:rgba(63,131,248,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color:rgba(6,182,212,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color:rgba(14,159,110,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color:rgba(132,204,22,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color:rgba(231,70,148,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color:rgba(144,97,249,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color:rgba(240,82,82,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color:rgba(6,148,162,.5);--tw-shadow:var(--tw-shadow-colored)}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2,.ring-4{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.ring-opacity-0{--tw-ring-opacity:0}.blur{--tw-blur:blur(8px)}.blur,.blur-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur:blur(4px)}.grayscale{--tw-grayscale:grayscale(100%)}.grayscale,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.first-letter\:float-left:first-letter{float:left}.first-letter\:mr-3:first-letter{margin-right:.75rem}.first-letter\:text-7xl:first-letter{font-size:4.5rem;line-height:1}.first-letter\:font-bold:first-letter{font-weight:700}.first-letter\:text-gray-900:first-letter{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.first-line\:uppercase:first-line{text-transform:uppercase}.first-line\:tracking-widest:first-line{letter-spacing:.1em}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:left-\[4px\]:after{content:var(--tw-content);left:4px}.after\:top-0:after{content:var(--tw-content);top:0}.after\:top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:mx-2:after{content:var(--tw-content);margin-left:.5rem;margin-right:.5rem}.after\:mx-6:after{content:var(--tw-content);margin-left:1.5rem;margin-right:1.5rem}.after\:inline-block:after{content:var(--tw-content);display:inline-block}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-1:after{content:var(--tw-content);height:.25rem}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:h-6:after{content:var(--tw-content);height:1.5rem}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:w-6:after{content:var(--tw-content);width:1.5rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:border:after{border-width:1px;content:var(--tw-content)}.after\:border-4:after{border-width:4px;content:var(--tw-content)}.after\:border-b:after{border-bottom-width:1px;content:var(--tw-content)}.after\:border-blue-100:after{--tw-border-opacity:1;border-color:rgb(225 239 254/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-100:after{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-200:after{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-300:after{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));content:var(--tw-content)}.after\:bg-white:after{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.after\:text-gray-200:after{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity));content:var(--tw-content)}.after\:transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:bg-\[\#050708\]\/80:hover{background-color:rgba(5,7,8,.8)}.hover\:bg-\[\#050708\]\/90:hover{background-color:rgba(5,7,8,.9)}.hover\:bg-\[\#1da1f2\]\/90:hover{background-color:rgba(29,161,242,.9)}.hover\:bg-\[\#24292F\]\/90:hover{background-color:rgba(36,41,47,.9)}.hover\:bg-\[\#2557D6\]\/90:hover{background-color:rgba(37,87,214,.9)}.hover\:bg-\[\#3b5998\]\/90:hover{background-color:rgba(59,89,152,.9)}.hover\:bg-\[\#4285F4\]\/90:hover{background-color:rgba(66,133,244,.9)}.hover\:bg-\[\#F7BE38\]\/90:hover{background-color:rgba(247,190,56,.9)}.hover\:bg-\[\#FF9119\]\/80:hover{background-color:rgba(255,145,25,.8)}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(225 239 254/var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(188 240 218/var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(205 219 254/var(--tw-bg-opacity))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(250 209 232/var(--tw-bg-opacity))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(220 215 254/var(--tw-bg-opacity))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(251 213 213/var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(252 233 106/var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(194 120 3/var(--tw-bg-opacity))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from:#afecef var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(175,236,239,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to:#d9f99d var(--tw-gradient-to-position);--tw-gradient-to-position: }.hover\:\!text-blue-700:hover{--tw-text-opacity:1!important;color:rgb(26 86 219/var(--tw-text-opacity))!important}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(35 56 118/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(1 71 55/var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(54 47 120/var(--tw-text-opacity))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(117 26 61/var(--tw-text-opacity))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(74 29 150/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(99 49 18/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:bg-blend-soft-light:hover{background-blend-mode:soft-light}.hover\:shadow:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:blur-none:hover{--tw-blur:blur(0)}.hover\:blur-none:hover,.hover\:grayscale-0:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:grayscale-0:hover{--tw-grayscale:grayscale(0)}.focus\:z-10:focus{z-index:10}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}.focus\:border-blue-600:focus{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.focus\:border-gray-200:focus{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.focus\:border-green-500:focus{--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}.focus\:border-green-600:focus{--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}.focus\:border-red-600:focus{--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus\:bg-gray-900:focus{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.focus\:text-blue-700:focus{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.focus\:text-white:focus{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-\[\#050708\]\/50:focus{--tw-ring-color:rgba(5,7,8,.5)}.focus\:ring-\[\#1da1f2\]\/50:focus{--tw-ring-color:rgba(29,161,242,.5)}.focus\:ring-\[\#24292F\]\/50:focus{--tw-ring-color:rgba(36,41,47,.5)}.focus\:ring-\[\#2557D6\]\/50:focus{--tw-ring-color:rgba(37,87,214,.5)}.focus\:ring-\[\#3b5998\]\/50:focus{--tw-ring-color:rgba(59,89,152,.5)}.focus\:ring-\[\#4285F4\]\/50:focus{--tw-ring-color:rgba(66,133,244,.5)}.focus\:ring-\[\#F7BE38\]\/50:focus{--tw-ring-color:rgba(247,190,56,.5)}.focus\:ring-\[\#FF9119\]\/50:focus{--tw-ring-color:rgba(255,145,25,.5)}.focus\:ring-blue-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(195 221 253/var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(118 169 250/var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(63 131 248/var(--tw-ring-opacity))}.focus\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(28 100 242/var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(26 86 219/var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity))}.focus\:ring-gray-100:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity))}.focus\:ring-gray-50:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.focus\:ring-gray-700:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(188 240 218/var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(132 225 188/var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(49 196 141/var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 159 110/var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity))}.focus\:ring-orange-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(255 90 31/var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(250 209 232/var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 217/var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 215 254/var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(202 191 253/var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(144 97 249/var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(253 232 232/var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 180/var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 128 128/var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(240 82 82/var(--tw-ring-opacity))}.focus\:ring-teal-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(126 220 226/var(--tw-ring-opacity))}.focus\:ring-teal-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(6 148 162/var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(250 202 21/var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(227 160 8/var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(194 120 3/var(--tw-ring-opacity))}.group:hover .group-hover\:rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-white\/50{background-color:hsla(0,0%,100%,.5)}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity:0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from:#06b6d4 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from:#31c48d var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(49,196,141,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from:#e74694 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from:#9061f9 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(144,97,249,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from:#7e3af2 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from:#fbd5d5 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:hsla(0,83%,91%,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from:#7edce2 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(126,220,226,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-via-position: ;--tw-gradient-to:hsla(0,83%,84%,0) var(--tw-gradient-to-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),#f8b4b4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to:#3f83f8 var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:to-blue-600{--tw-gradient-to:#1c64f2 var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:to-lime-300{--tw-gradient-to:#bef264 var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:to-orange-400{--tw-gradient-to:#ff8a4c var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:to-pink-500{--tw-gradient-to:#e74694 var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:to-yellow-200{--tw-gradient-to:#fce96a var(--tw-gradient-to-position);--tw-gradient-to-position: }.group:hover .group-hover\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.peer:checked~.peer-checked\:border-blue-600{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(255 90 31/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(4 116 129/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--tw-translate-x:100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:left-0{left:0}.peer:focus~.peer-focus\:top-1{top:.25rem}.peer:focus~.peer-focus\:top-2{top:.5rem}.peer:focus~.peer-focus\:-translate-y-3{--tw-translate-y:-0.75rem}.peer:focus~.peer-focus\:-translate-y-3,.peer:focus~.peer-focus\:-translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:-translate-y-4{--tw-translate-y:-1rem}.peer:focus~.peer-focus\:-translate-y-6{--tw-translate-y:-1.5rem}.peer:focus~.peer-focus\:-translate-y-6,.peer:focus~.peer-focus\:scale-75{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.peer:focus~.peer-focus\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:focus~.peer-focus\:font-medium{font-weight:500}.peer:focus~.peer-focus\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(132 225 188/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 140/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(202 191 253/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 180/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(126 220 226/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(250 202 21/var(--tw-ring-opacity))}:is(.dark .dark\:block){display:block}:is(.dark .dark\:inline-block){display:inline-block}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:divide-gray-600)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(75 85 99/var(--tw-divide-opacity))}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}:is(.dark .dark\:\!border-blue-500){--tw-border-opacity:1!important;border-color:rgb(63 131 248/var(--tw-border-opacity))!important}:is(.dark .dark\:border-blue-400){--tw-border-opacity:1;border-color:rgb(118 169 250/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-500){--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-600){--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-800){--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-400){--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}:is(.dark .dark\:border-green-400){--tw-border-opacity:1;border-color:rgb(49 196 141/var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}:is(.dark .dark\:border-green-600){--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}:is(.dark .dark\:border-green-800){--tw-border-opacity:1;border-color:rgb(3 84 63/var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity:1;border-color:rgb(172 148 250/var(--tw-border-opacity))}:is(.dark .dark\:border-red-400){--tw-border-opacity:1;border-color:rgb(249 128 128/var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}:is(.dark .dark\:border-red-600){--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}:is(.dark .dark\:border-red-800){--tw-border-opacity:1;border-color:rgb(155 28 28/var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-white){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:border-yellow-300){--tw-border-opacity:1;border-color:rgb(250 202 21/var(--tw-border-opacity))}:is(.dark .dark\:border-yellow-800){--tw-border-opacity:1;border-color:rgb(114 59 19/var(--tw-border-opacity))}:is(.dark .dark\:border-l-gray-700){--tw-border-opacity:1;border-left-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-400){--tw-bg-opacity:1;background-color:rgb(118 169 250/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:rgba(31,41,55,.3)}:is(.dark .dark\:bg-gray-800\/50){background-color:rgba(31,41,55,.5)}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-900\/60){background-color:rgba(17,24,39,.6)}:is(.dark .dark\:bg-green-100){--tw-bg-opacity:1;background-color:rgb(222 247 236/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity:1;background-color:rgb(14 159 110/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-900){--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity:1;background-color:rgb(104 117 245/var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-900){--tw-bg-opacity:1;background-color:rgb(54 47 120/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-200){--tw-bg-opacity:1;background-color:rgb(252 217 189/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-400){--tw-bg-opacity:1;background-color:rgb(255 138 76/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity:1;background-color:rgb(180 52 3/var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-900){--tw-bg-opacity:1;background-color:rgb(117 26 61/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-900){--tw-bg-opacity:1;background-color:rgb(74 29 150/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-100){--tw-bg-opacity:1;background-color:rgb(253 232 232/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity:1;background-color:rgb(240 82 82/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-900){--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}:is(.dark .dark\:bg-white){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-300){--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-900){--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity:0.8}:is(.dark .dark\:bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern-dark\.svg\'\)\]){background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern-dark.svg)}:is(.dark .dark\:from-blue-900){--tw-gradient-from:#233876 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to:rgba(35,56,118,0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-gray-400){fill:#9ca3af}:is(.dark .dark\:\!text-blue-500){--tw-text-opacity:1!important;color:rgb(63 131 248/var(--tw-text-opacity))!important}:is(.dark .dark\:text-blue-100){--tw-text-opacity:1;color:rgb(225 239 254/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-200){--tw-text-opacity:1;color:rgb(195 221 253/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-300){--tw-text-opacity:1;color:rgb(164 202 254/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-400){--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500\/100){color:#3f83f8}:is(.dark .dark\:text-blue-500\/25){color:rgba(63,131,248,.25)}:is(.dark .dark\:text-blue-500\/50){color:rgba(63,131,248,.5)}:is(.dark .dark\:text-blue-500\/75){color:rgba(63,131,248,.75)}:is(.dark .dark\:text-blue-600){--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-700){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-900){--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity:1;color:rgb(188 240 218/var(--tw-text-opacity))}:is(.dark .dark\:text-green-300){--tw-text-opacity:1;color:rgb(132 225 188/var(--tw-text-opacity))}:is(.dark .dark\:text-green-400){--tw-text-opacity:1;color:rgb(49 196 141/var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity:1;color:rgb(14 159 110/var(--tw-text-opacity))}:is(.dark .dark\:text-green-600){--tw-text-opacity:1;color:rgb(5 122 85/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-300){--tw-text-opacity:1;color:rgb(180 198 252/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-400){--tw-text-opacity:1;color:rgb(141 162 251/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity:1;color:rgb(104 117 245/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-200){--tw-text-opacity:1;color:rgb(252 217 189/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-300){--tw-text-opacity:1;color:rgb(253 186 140/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-900){--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}:is(.dark .dark\:text-pink-300){--tw-text-opacity:1;color:rgb(248 180 217/var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity:1;color:rgb(241 126 184/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-300){--tw-text-opacity:1;color:rgb(202 191 253/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-400){--tw-text-opacity:1;color:rgb(172 148 250/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity:1;color:rgb(144 97 249/var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity:1;color:rgb(251 213 213/var(--tw-text-opacity))}:is(.dark .dark\:text-red-300){--tw-text-opacity:1;color:rgb(248 180 180/var(--tw-text-opacity))}:is(.dark .dark\:text-red-400){--tw-text-opacity:1;color:rgb(249 128 128/var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity:1;color:rgb(240 82 82/var(--tw-text-opacity))}:is(.dark .dark\:text-teal-300){--tw-text-opacity:1;color:rgb(126 220 226/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity:1;color:rgb(194 120 3/var(--tw-text-opacity))}:is(.dark .dark\:decoration-blue-600){text-decoration-color:#1c64f2}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-green-500)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(14 159 110/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-green-500)::placeholder{--tw-placeholder-opacity:1;color:rgb(14 159 110/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-red-500)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(240 82 82/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-red-500)::placeholder{--tw-placeholder-opacity:1;color:rgb(240 82 82/var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-sm-light){--tw-shadow:0 2px 5px 0px hsla(0,0%,100%,.08);--tw-shadow-colored:0 2px 5px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color:rgba(30,66,159,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color:rgba(21,94,117,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-gray-800){--tw-shadow-color:#1f2937;--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color:rgba(3,84,63,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color:rgba(63,98,18,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color:rgba(153,21,75,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color:rgba(85,33,181,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color:rgba(155,28,28,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color:rgba(5,80,92,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}:is(.dark .dark\:ring-gray-900){--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color:#374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color:#1f2937}:is(.dark .dark\:first-letter\:text-gray-100):first-letter{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:after\:border-blue-800):after{--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity));content:var(--tw-content)}:is(.dark .dark\:after\:border-gray-700):after{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity));content:var(--tw-content)}:is(.dark .dark\:after\:text-gray-500):after{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity));content:var(--tw-content)}:is(.dark .dark\:hover\:border-gray-500:hover){--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-gray-700:hover){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:hover\:bg-\[\#050708\]\/30:hover){background-color:rgba(5,7,8,.3)}:is(.dark .dark\:hover\:bg-\[\#050708\]\/40:hover){background-color:rgba(5,7,8,.4)}:is(.dark .dark\:hover\:bg-\[\#FF9119\]\/80:hover){background-color:rgba(255,145,25,.8)}:is(.dark .dark\:hover\:bg-blue-500:hover){--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-800:hover){--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-200:hover){--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-500:hover){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity:1;background-color:rgb(4 108 78/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-800:hover){--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-indigo-800:hover){--tw-bg-opacity:1;background-color:rgb(66 56 157/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-800:hover){--tw-bg-opacity:1;background-color:rgb(153 21 75/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity:1;background-color:rgb(108 43 217/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-800:hover){--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity:1;background-color:rgb(200 30 30/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-800:hover){--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-800:hover){--tw-bg-opacity:1;background-color:rgb(114 59 19/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:\!text-blue-500:hover){--tw-text-opacity:1!important;color:rgb(63 131 248/var(--tw-text-opacity))!important}:is(.dark .dark\:hover\:text-blue-300:hover){--tw-text-opacity:1;color:rgb(164 202 254/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-400:hover){--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-600:hover){--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-700:hover){--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-400:hover){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-800:hover){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-green-300:hover){--tw-text-opacity:1;color:rgb(132 225 188/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-indigo-300:hover){--tw-text-opacity:1;color:rgb(180 198 252/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-pink-300:hover){--tw-text-opacity:1;color:rgb(248 180 217/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-purple-300:hover){--tw-text-opacity:1;color:rgb(202 191 253/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-red-300:hover){--tw-text-opacity:1;color:rgb(248 180 180/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-yellow-300:hover){--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-blend-darken:hover){background-blend-mode:darken}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-green-500:focus){--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-red-500:focus){--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}:is(.dark .dark\:focus\:bg-blue-600:focus){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:focus\:bg-gray-700:focus){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-\[\#050708\]\/50:focus){--tw-ring-color:rgba(5,7,8,.5)}:is(.dark .dark\:focus\:ring-\[\#2557D6\]\/50:focus){--tw-ring-color:rgba(37,87,214,.5)}:is(.dark .dark\:focus\:ring-\[\#F7BE38\]\/50:focus){--tw-ring-color:rgba(247,190,56,.5)}:is(.dark .dark\:focus\:ring-\[\#FF9119\]\/40:focus){--tw-ring-color:rgba(255,145,25,.4)}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(63 131 248/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(28 100 242/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(30 66 159/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(35 56 118/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-400:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(5 122 85/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(3 84 63/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-orange-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(208 56 1/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(153 21 75/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(126 58 242/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(85 33 181/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(74 29 150/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(249 128 128/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(224 36 36/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(155 28 28/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(119 29 29/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(4 116 129/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(3 102 114/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(5 80 92/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(159 88 10/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(114 59 19/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(99 49 18/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color:#374151}:is(.dark .dark\:focus\:ring-offset-gray-800:focus){--tw-ring-offset-color:#1f2937}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:rgba(31,41,55,.6)}:is(.dark .group:hover .dark\:group-hover\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .group:hover .dark\:group-hover\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color:rgba(31,41,55,.7)}:is(.dark .peer:checked~.dark\:peer-checked\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .peer:checked~.dark\:peer-checked\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.peer:focus~:is(.dark .peer-focus\:dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-blue-800){--tw-ring-opacity:1;--tw-ring-color:rgb(30 66 159/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-green-800){--tw-ring-opacity:1;--tw-ring-color:rgb(3 84 63/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-orange-800){--tw-ring-opacity:1;--tw-ring-color:rgb(138 44 13/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-purple-800){--tw-ring-opacity:1;--tw-ring-color:rgb(85 33 181/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-red-800){--tw-ring-opacity:1;--tw-ring-color:rgb(155 28 28/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-teal-800){--tw-ring-opacity:1;--tw-ring-color:rgb(5 80 92/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-yellow-800){--tw-ring-opacity:1;--tw-ring-color:rgb(114 59 19/var(--tw-ring-opacity))}@media (min-width:640px){.sm\:order-last{order:9999}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mb-0{margin-bottom:0}.sm\:mb-4{margin-bottom:1rem}.sm\:mb-5{margin-bottom:1.25rem}.sm\:ml-2{margin-left:.5rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-64{margin-left:16rem}.sm\:ml-auto{margin-left:auto}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-4{height:1rem}.sm\:h-64{height:16rem}.sm\:h-7{height:1.75rem}.sm\:h-9{height:2.25rem}.sm\:h-96{height:24rem}.sm\:w-4{width:1rem}.sm\:w-96{width:24rem}.sm\:w-auto{width:auto}.sm\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.sm\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.sm\:rounded-lg{border-radius:.5rem}.sm\:border-b-0{border-bottom-width:0}.sm\:border-r{border-right-width:1px}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:py-16{padding-bottom:4rem;padding-top:4rem}.sm\:py-4{padding-top:1rem}.sm\:pb-4,.sm\:py-4{padding-bottom:1rem}.sm\:pl-2{padding-left:.5rem}.sm\:pl-4{padding-left:1rem}.sm\:pr-4{padding-right:1rem}.sm\:pr-8{padding-right:2rem}.sm\:pt-4{padding-top:1rem}.sm\:text-center{text-align:center}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.sm\:after\:inline-block:after{content:var(--tw-content);display:inline-block}.sm\:after\:hidden:after{content:var(--tw-content);display:none}.sm\:after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}}@media (min-width:768px){.md\:relative{position:relative}.md\:inset-0{inset:0}.md\:right-auto{right:auto}.md\:top-auto{top:auto}.md\:order-1{order:1}.md\:order-2{order:2}.md\:m-0{margin:0}.md\:mx-2{margin-left:.5rem;margin-right:.5rem}.md\:my-0{margin-bottom:0;margin-top:0}.md\:my-10{margin-bottom:2.5rem;margin-top:2.5rem}.md\:my-12{margin-bottom:3rem;margin-top:3rem}.md\:mb-0{margin-bottom:0}.md\:mb-12{margin-bottom:3rem}.md\:ml-1{margin-left:.25rem}.md\:ml-2{margin-left:.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mr-24{margin-right:6rem}.md\:mr-4{margin-right:1rem}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:mt-6{margin-top:1.5rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-96{height:24rem}.md\:h-\[21px\]{height:21px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[42px\]{height:42px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-\[8px\]{height:8px}.md\:h-\[95px\]{height:95px}.md\:h-auto{height:auto}.md\:w-48{width:12rem}.md\:w-64{width:16rem}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:w-full{width:100%}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.md\:max-w-screen-md{max-width:768px}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-12{gap:3rem}.md\:gap-6{gap:1.5rem}.md\:gap-8{gap:2rem}.md\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem}.md\:rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.md\:rounded-br-lg{border-bottom-right-radius:.5rem}.md\:rounded-tl-lg{border-top-left-radius:.5rem}.md\:border-0{border-width:0}.md\:border-b-0{border-bottom-width:0}.md\:border-r{border-right-width:1px}.md\:bg-transparent{background-color:transparent}.md\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.md\:p-0{padding:0}.md\:p-12{padding:3rem}.md\:p-6{padding:1.5rem}.md\:p-8{padding:2rem}.md\:px-5{padding-left:1.25rem;padding-right:1.25rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-2{padding-bottom:.5rem;padding-top:.5rem}.md\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.md\:py-8{padding-bottom:2rem;padding-top:2rem}.md\:pb-0{padding-bottom:0}.md\:pb-4{padding-bottom:1rem}.md\:pr-4{padding-right:1rem}.md\:pt-0{padding-top:0}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.md\:text-green-700{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.md\:hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.md\:hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .md\:dark\:bg-transparent){background-color:transparent}:is(.dark .md\:dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .md\:dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-blue-500:hover){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}}@media (min-width:1024px){.lg\:static{position:static}.lg\:sticky{position:sticky}.lg\:top-28{top:7rem}.lg\:order-1{order:1}.lg\:order-2{order:2}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:my-12{margin-bottom:3rem;margin-top:3rem}.lg\:my-8{margin-bottom:2rem;margin-top:2rem}.lg\:mb-0{margin-bottom:0}.lg\:mb-16{margin-bottom:4rem}.lg\:mb-8{margin-bottom:2rem}.lg\:mr-0{margin-right:0}.lg\:mt-0{margin-top:0}.lg\:mt-10{margin-top:2.5rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-12{height:3rem}.lg\:h-4{height:1rem}.lg\:h-5{height:1.25rem}.lg\:h-6{height:1.5rem}.lg\:h-\[calc\(100vh-3rem\)\]{height:calc(100vh - 3rem)}.lg\:h-auto{height:auto}.lg\:max-h-full{max-height:100%}.lg\:w-12{width:3rem}.lg\:w-4{width:1rem}.lg\:w-48{width:12rem}.lg\:w-5{width:1.25rem}.lg\:w-6{width:1.5rem}.lg\:w-96{width:24rem}.lg\:w-auto{width:auto}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-screen-lg{max-width:1024px}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:gap-16{gap:4rem}.lg\:gap-8{gap:2rem}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.lg\:self-center{align-self:center}.lg\:overflow-visible{overflow:visible}.lg\:overflow-y-visible{overflow-y:visible}.lg\:border-0{border-width:0}.lg\:bg-transparent{background-color:transparent}.lg\:p-0{padding:0}.lg\:p-8{padding:2rem}.lg\:px-12{padding-left:3rem;padding-right:3rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-36{padding-left:9rem;padding-right:9rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-48{padding-left:12rem;padding-right:12rem}.lg\:px-5{padding-left:1.25rem;padding-right:1.25rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-0{padding-bottom:0;padding-top:0}.lg\:py-16{padding-bottom:4rem;padding-top:4rem}.lg\:py-2{padding-bottom:.5rem;padding-top:.5rem}.lg\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.lg\:py-4{padding-bottom:1rem;padding-top:1rem}.lg\:py-56{padding-bottom:14rem;padding-top:14rem}.lg\:py-8{padding-bottom:2rem;padding-top:2rem}.lg\:pb-16{padding-bottom:4rem}.lg\:pb-20{padding-bottom:5rem}.lg\:pl-0{padding-left:0}.lg\:pl-3{padding-left:.75rem}.lg\:pt-0{padding-top:0}.lg\:pt-2{padding-top:.5rem}.lg\:pt-8{padding-top:2rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}.lg\:text-xs{font-size:.75rem;line-height:1rem}.lg\:text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.lg\:hover\:bg-transparent:hover{background-color:transparent}.lg\:hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}:is(.dark .lg\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .lg\:dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}}@media (min-width:1280px){.xl\:ml-16{margin-left:4rem}.xl\:block{display:block}.xl\:inline-flex{display:inline-flex}.xl\:hidden{display:none}.xl\:h-80{height:20rem}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:gap-0{gap:0}.xl\:gap-16{gap:4rem}.xl\:gap-24{gap:6rem}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:px-48{padding-left:12rem;padding-right:12rem}.xl\:pb-24{padding-bottom:6rem}.xl\:pl-4{padding-left:1rem}.xl\:pt-24{padding-top:6rem}.xl\:text-6xl{font-size:3.75rem;line-height:1}.xl\:text-sm{font-size:.875rem;line-height:1.25rem}.xl\:after\:mx-10:after{content:var(--tw-content);margin-left:2.5rem;margin-right:2.5rem}}@media (min-width:1536px){.\32xl\:block{display:block}.\32xl\:h-96{height:24rem}.\32xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.\32xl\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.\32xl\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)));margin-right:calc(0px*var(--tw-space-x-reverse))}}.\[\&\>div\]\:mx-auto>div{margin-left:auto;margin-right:auto} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.min.js b/node_modules/flowbite/dist/flowbite.min.js new file mode 100644 index 0000000..cd4e4a1 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={647:function(t,e,i){i.r(e)},853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return E},afterRead:function(){return _},afterWrite:function(){return x},applyStyles:function(){return S},arrow:function(){return Z},auto:function(){return a},basePlacements:function(){return c},beforeMain:function(){return b},beforeRead:function(){return m},beforeWrite:function(){return L},bottom:function(){return o},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return St},createPopperBase:function(){return Pt},createPopperLite:function(){return Dt},detectOverflow:function(){return yt},end:function(){return d},eventListeners:function(){return ot},flip:function(){return _t},hide:function(){return Et},left:function(){return s},main:function(){return w},modifierPhases:function(){return k},offset:function(){return Lt},placements:function(){return v},popper:function(){return f},popperGenerator:function(){return jt},popperOffsets:function(){return Ot},preventOverflow:function(){return xt},read:function(){return y},reference:function(){return h},right:function(){return r},start:function(){return l},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return O}});var n="top",o="bottom",r="right",s="left",a="auto",c=[n,o,r,s],l="start",d="end",u="clippingParents",p="viewport",f="popper",h="reference",g=c.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+d])}),[]),v=[].concat(c,[a]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+d])}),[]),m="beforeRead",y="read",_="afterRead",b="beforeMain",w="main",E="afterMain",L="beforeWrite",O="write",x="afterWrite",k=[m,y,_,b,w,E,L,O,x];function A(t){return t?(t.nodeName||"").toLowerCase():null}function T(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function C(t){return t instanceof T(t).Element||t instanceof Element}function j(t){return t instanceof T(t).HTMLElement||t instanceof HTMLElement}function P(t){return"undefined"!=typeof ShadowRoot&&(t instanceof T(t).ShadowRoot||t instanceof ShadowRoot)}var S={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];j(o)&&A(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});j(n)&&A(n)&&(Object.assign(n.style,r),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function D(t){return t.split("-")[0]}var I=Math.max,M=Math.min,q=Math.round;function H(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(H())}function V(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=1,r=1;e&&j(t)&&(o=t.offsetWidth>0&&q(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&q(n.height)/t.offsetHeight||1);var s=(C(t)?T(t):window).visualViewport,a=!B()&&i,c=(n.left+(a&&s?s.offsetLeft:0))/o,l=(n.top+(a&&s?s.offsetTop:0))/r,d=n.width/o,u=n.height/r;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c,x:c,y:l}}function W(t){var e=V(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function z(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&P(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function R(t){return T(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(A(t))>=0}function N(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function K(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(P(t)?t.host:null)||N(t)}function U(t){return j(t)&&"fixed"!==R(t).position?t.offsetParent:null}function X(t){for(var e=T(t),i=U(t);i&&F(i)&&"static"===R(i).position;)i=U(i);return i&&("html"===A(i)||"body"===A(i)&&"static"===R(i).position)?e:i||function(t){var e=/firefox/i.test(H());if(/Trident/i.test(H())&&j(t)&&"fixed"===R(t).position)return null;var i=K(t);for(P(i)&&(i=i.host);j(i)&&["html","body"].indexOf(A(i))<0;){var n=R(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,i){return I(t,M(e,i))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Z={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,a=t.name,l=t.options,d=i.elements.arrow,u=i.modifiersData.popperOffsets,p=D(i.placement),f=Y(p),h=[s,r].indexOf(p)>=0?"height":"width";if(d&&u){var g=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,c))}(l.padding,i),v=W(d),m="y"===f?n:s,y="y"===f?o:r,_=i.rects.reference[h]+i.rects.reference[f]-u[f]-i.rects.popper[h],b=u[f]-i.rects.reference[f],w=X(d),E=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,L=_/2-b/2,O=g[m],x=E-v[h]-g[y],k=E/2-v[h]/2+L,A=G(O,k,x),T=f;i.modifiersData[a]=((e={})[T]=A,e.centerOffset=A-k,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&z(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,a=t.popperRect,c=t.placement,l=t.variation,u=t.offsets,p=t.position,f=t.gpuAcceleration,h=t.adaptive,g=t.roundOffsets,v=t.isFixed,m=u.x,y=void 0===m?0:m,_=u.y,b=void 0===_?0:_,w="function"==typeof g?g({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var E=u.hasOwnProperty("x"),L=u.hasOwnProperty("y"),O=s,x=n,k=window;if(h){var A=X(i),C="clientHeight",j="clientWidth";if(A===T(i)&&"static"!==R(A=N(i)).position&&"absolute"===p&&(C="scrollHeight",j="scrollWidth"),c===n||(c===s||c===r)&&l===d)x=o,b-=(v&&A===k&&k.visualViewport?k.visualViewport.height:A[C])-a.height,b*=f?1:-1;if(c===s||(c===n||c===o)&&l===d)O=r,y-=(v&&A===k&&k.visualViewport?k.visualViewport.width:A[j])-a.width,y*=f?1:-1}var P,S=Object.assign({position:p},h&&tt),D=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:q(e*n)/n||0,y:q(i*n)/n||0}}({x:y,y:b}):{x:y,y:b};return y=D.x,b=D.y,f?Object.assign({},S,((P={})[x]=L?"0":"",P[O]=E?"0":"",P.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",P)):Object.assign({},S,((e={})[x]=L?b+"px":"",e[O]=E?y+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,o=void 0===n||n,r=i.adaptive,s=void 0===r||r,a=i.roundOffsets,c=void 0===a||a,l={placement:D(e.placement),variation:$(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,o=n.scroll,r=void 0===o||o,s=n.resize,a=void 0===s||s,c=T(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),a&&c.addEventListener("resize",i.update,nt),function(){r&&l.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),a&&c.removeEventListener("resize",i.update,nt)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var at={start:"end",end:"start"};function ct(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function lt(t){var e=T(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return V(N(t)).left+lt(t).scrollLeft}function ut(t){var e=R(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function pt(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:j(t)&&ut(t)?t:pt(K(t))}function ft(t,e){var i;void 0===e&&(e=[]);var n=pt(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),r=T(n),s=o?[r].concat(r.visualViewport||[],ut(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(ft(K(s)))}function ht(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===p?ht(function(t,e){var i=T(t),n=N(t),o=i.visualViewport,r=n.clientWidth,s=n.clientHeight,a=0,c=0;if(o){r=o.width,s=o.height;var l=B();(l||!l&&"fixed"===e)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:r,height:s,x:a+dt(t),y:c}}(t,i)):C(e)?function(t,e){var i=V(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ht(function(t){var e,i=N(t),n=lt(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=I(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=I(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+dt(t),c=-n.scrollTop;return"rtl"===R(o||i).direction&&(a+=I(i.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:c}}(N(t)))}function vt(t,e,i,n){var o="clippingParents"===e?function(t){var e=ft(K(t)),i=["absolute","fixed"].indexOf(R(t).position)>=0&&j(t)?X(t):t;return C(i)?e.filter((function(t){return C(t)&&z(t,i)&&"body"!==A(t)})):[]}(t):[].concat(e),r=[].concat(o,[i]),s=r[0],a=r.reduce((function(e,i){var o=gt(t,i,n);return e.top=I(o.top,e.top),e.right=M(o.right,e.right),e.bottom=M(o.bottom,e.bottom),e.left=I(o.left,e.left),e}),gt(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e,i=t.reference,a=t.element,c=t.placement,u=c?D(c):null,p=c?$(c):null,f=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2;switch(u){case n:e={x:f,y:i.y-a.height};break;case o:e={x:f,y:i.y+i.height};break;case r:e={x:i.x+i.width,y:h};break;case s:e={x:i.x-a.width,y:h};break;default:e={x:i.x,y:i.y}}var g=u?Y(u):null;if(null!=g){var v="y"===g?"height":"width";switch(p){case l:e[g]=e[g]-(i[v]/2-a[v]/2);break;case d:e[g]=e[g]+(i[v]/2-a[v]/2)}}return e}function yt(t,e){void 0===e&&(e={});var i=e,s=i.placement,a=void 0===s?t.placement:s,l=i.strategy,d=void 0===l?t.strategy:l,g=i.boundary,v=void 0===g?u:g,m=i.rootBoundary,y=void 0===m?p:m,_=i.elementContext,b=void 0===_?f:_,w=i.altBoundary,E=void 0!==w&&w,L=i.padding,O=void 0===L?0:L,x=J("number"!=typeof O?O:Q(O,c)),k=b===f?h:f,A=t.rects.popper,T=t.elements[E?k:b],j=vt(C(T)?T:T.contextElement||N(t.elements.popper),v,y,d),P=V(t.elements.reference),S=mt({reference:P,element:A,strategy:"absolute",placement:a}),D=ht(Object.assign({},A,S)),I=b===f?D:P,M={top:j.top-I.top+x.top,bottom:I.bottom-j.bottom+x.bottom,left:j.left-I.left+x.left,right:I.right-j.right+x.right},q=t.modifiersData.offset;if(b===f&&q){var H=q[a];Object.keys(M).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,i=[n,o].indexOf(t)>=0?"y":"x";M[t]+=H[i]*e}))}return M}var _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,d=t.name;if(!e.modifiersData[d]._skip){for(var u=i.mainAxis,p=void 0===u||u,f=i.altAxis,h=void 0===f||f,m=i.fallbackPlacements,y=i.padding,_=i.boundary,b=i.rootBoundary,w=i.altBoundary,E=i.flipVariations,L=void 0===E||E,O=i.allowedAutoPlacements,x=e.options.placement,k=D(x),A=m||(k===x||!L?[st(x)]:function(t){if(D(t)===a)return[];var e=st(t);return[ct(t),e,ct(e)]}(x)),T=[x].concat(A).reduce((function(t,i){return t.concat(D(i)===a?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=i.boundary,r=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,d=void 0===l?v:l,u=$(n),p=u?a?g:g.filter((function(t){return $(t)===u})):c,f=p.filter((function(t){return d.indexOf(t)>=0}));0===f.length&&(f=p);var h=f.reduce((function(e,i){return e[i]=yt(t,{placement:i,boundary:o,rootBoundary:r,padding:s})[D(i)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:i,boundary:_,rootBoundary:b,padding:y,flipVariations:L,allowedAutoPlacements:O}):i)}),[]),C=e.rects.reference,j=e.rects.popper,P=new Map,S=!0,I=T[0],M=0;M=0,W=V?"width":"height",z=yt(e,{placement:q,boundary:_,rootBoundary:b,altBoundary:w,padding:y}),R=V?B?r:s:B?o:n;C[W]>j[W]&&(R=st(R));var F=st(R),N=[];if(p&&N.push(z[H]<=0),h&&N.push(z[R]<=0,z[F]<=0),N.every((function(t){return t}))){I=q,S=!1;break}P.set(q,N)}if(S)for(var K=function(t){var e=T.find((function(e){var i=P.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},U=L?3:1;U>0;U--){if("break"===K(U))break}e.placement!==I&&(e.modifiersData[d]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,r,o,s].some((function(e){return t[e]>=0}))}var Et={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),a=yt(e,{altBoundary:!0}),c=bt(s,n),l=bt(a,o,r),d=wt(c),u=wt(l);e.modifiersData[i]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}};var Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,o=t.name,a=i.offset,c=void 0===a?[0,0]:a,l=v.reduce((function(t,i){return t[i]=function(t,e,i){var o=D(t),a=[s,n].indexOf(o)>=0?-1:1,c="function"==typeof i?i(Object.assign({},e,{placement:t})):i,l=c[0],d=c[1];return l=l||0,d=(d||0)*a,[s,r].indexOf(o)>=0?{x:d,y:l}:{x:l,y:d}}(i,e.rects,c),t}),{}),d=l[e.placement],u=d.x,p=d.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=p),e.modifiersData[o]=l}};var Ot={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,a=t.name,c=i.mainAxis,d=void 0===c||c,u=i.altAxis,p=void 0!==u&&u,f=i.boundary,h=i.rootBoundary,g=i.altBoundary,v=i.padding,m=i.tether,y=void 0===m||m,_=i.tetherOffset,b=void 0===_?0:_,w=yt(e,{boundary:f,rootBoundary:h,padding:v,altBoundary:g}),E=D(e.placement),L=$(e.placement),O=!L,x=Y(E),k="x"===x?"y":"x",A=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,j="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,P="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(A){if(d){var H,B="y"===x?n:s,V="y"===x?o:r,z="y"===x?"height":"width",R=A[x],F=R+w[B],N=R-w[V],K=y?-C[z]/2:0,U=L===l?T[z]:C[z],J=L===l?-C[z]:-T[z],Q=e.elements.arrow,Z=y&&Q?W(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[V],nt=G(0,T[z],Z[z]),ot=O?T[z]/2-K-nt-et-P.mainAxis:U-nt-et-P.mainAxis,rt=O?-T[z]/2+K+nt+it+P.mainAxis:J+nt+it+P.mainAxis,st=e.elements.arrow&&X(e.elements.arrow),at=st?"y"===x?st.clientTop||0:st.clientLeft||0:0,ct=null!=(H=null==S?void 0:S[x])?H:0,lt=R+rt-ct,dt=G(y?M(F,R+ot-ct-at):F,R,y?I(N,lt):N);A[x]=dt,q[x]=dt-R}if(p){var ut,pt="x"===x?n:s,ft="x"===x?o:r,ht=A[k],gt="y"===k?"height":"width",vt=ht+w[pt],mt=ht-w[ft],_t=-1!==[n,s].indexOf(E),bt=null!=(ut=null==S?void 0:S[k])?ut:0,wt=_t?vt:ht-T[gt]-C[gt]-bt+P.altAxis,Et=_t?ht+T[gt]+C[gt]-bt-P.altAxis:mt,Lt=y&&_t?function(t,e,i){var n=G(t,e,i);return n>i?i:n}(wt,ht,Et):G(y?wt:vt,ht,y?Et:mt);A[k]=Lt,q[k]=Lt-ht}e.modifiersData[a]=q}},requiresIfExists:["offset"]};function kt(t,e,i){void 0===i&&(i=!1);var n,o,r=j(e),s=j(e)&&function(t){var e=t.getBoundingClientRect(),i=q(e.width)/t.offsetWidth||1,n=q(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=N(e),c=V(t,s,i),l={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!i)&&(("body"!==A(e)||ut(a))&&(l=(n=e)!==T(n)&&j(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:lt(n)),j(e)?((d=V(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):a&&(d.x=dt(a))),{x:c.left+l.scrollLeft-d.x,y:c.top+l.scrollTop-d.y,width:c.width,height:c.height}}function At(t){var e=new Map,i=new Set,n=[];function o(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||o(t)})),n}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var t=arguments.length,e=new Array(t),i=0;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './flowbite.css';\n\n// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst events = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nevents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","items","this","_items","_init","active","open","id","triggerEl","toggle","getItem","classList","remove","targetEl","iconEl","close","initAccordions","querySelectorAll","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","_activeItem","_indicators","_intervalDuration","_intervalInstance","el","_getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","initCarousels","$carouselEl","slide","from","$carouselItemEl","$indicatorEl","parseInt","carousel","Carousel","carouselNextEl","carouselPrevEl","onCollapse","onExpand","_targetEl","_triggerEl","_visible","hasAttribute","collapse","expand","initCollapses","targetId","$targetEl","getElementById","Collapse","console","error","triggerType","onShow","onHide","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","showEvents","ev","show","hideEvents","matches","hide","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","setTimeout","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_getPlacementClasses","base","c","event","inactive","_destroyBackdropEl","_createBackdrop","backdropEl","createElement","append","getDrawerInstance","instances","drawerInstance","initDrawers","drawerInstances","drawerId","$drawerEl","object","Drawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","getModalInstance","modalInstance","modalInstances","modalId","$modalEl","Modal","_setupKeydownListener","_removeKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","_activeTab","getTab","_setActiveTab","tab","getActiveTab","t","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","init","eventFunction","Events","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","d","definition","o","defineProperty","enumerable","obj","prop","prototype","r","Symbol","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.js b/node_modules/flowbite/dist/flowbite.phoenix.js new file mode 100644 index 0000000..4ead6dc --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.js @@ -0,0 +1,4438 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var Accordion = /** @class */ (function () { + function Accordion(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Accordion.prototype._init = function () { + var _this = this; + if (this._items.length) { + // show accordion item based on click + this._items.map(function (item) { + if (item.active) { + _this.open(item.id); + } + item.triggerEl.addEventListener('click', function () { + _this.toggle(item.id); + }); + }); + } + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.remove('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion(items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var Carousel = /** @class */ (function () { + function Carousel(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._init(); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype._init = function () { + var _this = this; + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this._getActiveItem()) { + this.slideTo(this._getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this._getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this._getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.right.el.classList.add('translate-x-full', 'z-10'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype._getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel(items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Collapse.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._triggerEl.addEventListener('click', function () { + _this.toggle(); + }); + } + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + new Collapse($targetEl, $triggerEl); + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Dial.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }); + }); + } + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Dismiss.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + this._triggerEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Drawer.prototype._init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + } + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + // add keyboard event listener to document + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + return Drawer; +}()); +var getDrawerInstance = function (id, instances) { + if (instances.some(function (drawerInstance) { return drawerInstance.id === id; })) { + return instances.find(function (drawerInstance) { return drawerInstance.id === id; }); + } +}; +function initDrawers() { + var drawerInstances = []; + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + // optional + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + if (!getDrawerInstance(drawerId, drawerInstances)) { + drawerInstances.push({ + id: drawerId, + object: new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge + ? edge === 'true' + ? true + : false + : Default.edge, + edgeOffset: edgeOffset + ? edgeOffset + : Default.edgeOffset, + }), + }); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_1) { + $triggerEl.addEventListener('click', function () { + drawer_1.object.toggle(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_2) { + $triggerEl.addEventListener('click', function () { + drawer_2.object.hide(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_3) { + $triggerEl.addEventListener('click', function () { + drawer_3.object.show(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Dropdown.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.toggle(); + }); + }); + } + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + if (ev === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._init(); + } + Modal.prototype._init = function () { + var _this = this; + if (this._targetEl) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + } + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('modal-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden) { + document.querySelector('[modal-backdrop]').remove(); + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + return Modal; +}()); +var getModalInstance = function (id, instances) { + if (instances.some(function (modalInstance) { return modalInstance.id === id; })) { + return instances.find(function (modalInstance) { return modalInstance.id === id; }); + } + return null; +}; +function initModals() { + var modalInstances = []; + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + if (!getModalInstance(modalId, modalInstances)) { + modalInstances.push({ + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // support pre v1.6.0 data-modal-toggle initialization + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + var modal_1 = getModalInstance(modalId, modalInstances); + if (!modal_1) { + modal_1 = { + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }; + modalInstances.push(modal_1); + } + $triggerEl.addEventListener('click', function () { + modal_1.object.toggle(); + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = getModalInstance(modalId, modalInstances); + if (modal_2) { + $triggerEl.addEventListener('click', function () { + if (modal_2.object.isHidden) { + modal_2.object.show(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = getModalInstance(modalId, modalInstances); + if (modal_3) { + $triggerEl.addEventListener('click', function () { + if (modal_3.object.isVisible) { + modal_3.object.hide(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Popover.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var Tabs = /** @class */ (function () { + function Tabs(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Tabs.prototype._init = function () { + var _this = this; + if (this._items.length) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this._setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function () { + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype._setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this._setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($triggerEl) { + var tabItems = []; + var defaultTabId = null; + $triggerEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs(tabItems, { + defaultTabId: defaultTabId, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Tooltip.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.hide(); + }); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +__webpack_require__(311); +var events_1 = __webpack_require__(947); +var liveViewLoadEvents = new events_1.default('phx:page-loading-stop', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +regularViewLoadEvents.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.js.map b/node_modules/flowbite/dist/flowbite.phoenix.js.map new file mode 100644 index 0000000..4896d72 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.phoenix.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AACnC,uCAAuC,KAAK;AAC5C,wCAAwC,KAAK;AAC7C;;AAEA,aAAa,SAAS,YAAY,SAAS;AAC3C;;AAEA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxC+D,CAAC;AAChE;;A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qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;;AC9ByD;AACJ;AACM;AACR;AACZ,CAAC;AACxC;;AAEe;AACf;;AAEA,aAAa,kBAAkB;AAC/B,kBAAkB,eAAe;AACjC;AACA,cAAc,QAAG;AACjB,eAAe,QAAG;AAClB,kCAAkC,mBAAmB;AACrD;;AAEA,MAAM,gBAAgB;AACtB,SAAS,QAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BqD;AACtC;AACf;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;;AAEA;AACA;;ACT+C;AACE;AACN;AACK;AACjC;AACf,4CAA4C,WAAW;AACvD;AACA;AACA;;AAEA,MAAM,aAAa,UAAU,cAAc;AAC3C;AACA;;AAEA,yBAAyB,aAAa;AACtC;;ACfmD;AACJ;AACR;AACU;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;;AAEA;AACA;AACA;;AAEA,qBAAqB,eAAe;AACpC;AACA,YAAY,SAAS;AACrB,+DAA+D,cAAc;AAC7E;AACA;AACA,uCAAuC,aAAa;AACpD;;ACzBe;AACf,yBAAyB;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACPuC;AACY;AACA;AACI;AACJ;AACM;AACJ;AACM;AACI;AAChB;AACV;AACM;AACiB;AAChB;;AAE5C;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ,GAAG,gBAAgB,CAAC,eAAe,uBAAuB,SAAS,0EAA0E,gBAAgB,CAAC,eAAe,CAAC,kBAAkB;AACpO,EAAE;AACF;AACA;;;AAGA;AACA,wBAAwB,iBAAiB,CAAC,aAAa;AACvD,wDAAwD,gBAAgB;AACxE,4CAA4C,aAAa,YAAY,eAAe;;AAEpF,OAAO,SAAS;AAChB;AACA,IAAI;;;AAGJ;AACA,WAAW,SAAS,oBAAoB,QAAQ,oCAAoC,WAAW;AAC/F,GAAG;AACH,EAAE;AACF;;;AAGe;AACf;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAG;AACrB,oBAAoB,QAAG;AACvB,qBAAqB,QAAG;AACxB,mBAAmB,QAAG;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;ACrEqD;AACR;AACwB;AACF;AACpD;AACf;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD,8BAA8B,YAAY;AAC1C;AACA;AACA;;AAEA;AACA,SAAS,SAAG;AACZ;AACA;AACA;AACA;AACA;;AAEA,SAAS,MAAM;AACf;AACA;AACA;AACA;AACA;;AAEA,SAAS,KAAK;AACd;AACA;AACA;AACA;AACA;;AAEA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;;AAEzD;AACA;;AAEA;AACA,WAAW,KAAK;AAChB;AACA;;AAEA,WAAW,GAAG;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;ACrE8D;AACM;AACM;AACzB;AACI;AAC0D;AACxD;AACE;AACN,CAAC;;AAErC;AACf;AACA;AACA;;AAEA;AACA;AACA;A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AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA,iGAAiG,oBAAoB;AACrH;AACA,sBAAsB,gBAAgB,gBAAgB,IAAI,GAAG,oBAAoB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA,yBAAyB,gBAAgB;;AAEzC,2BAA2B,YAAY,gBAAgB,KAAK;AAC5D,sBAAsB,SAAG,EAAE,MAAM;AACjC;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,SAAG,GAAG,IAAI;AAChD,qCAAqC,MAAM,GAAG,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,+BAA+B,KAAK,2CAA2C;AAC/E;;AAEA;AACA,6CAA6C,aAAa;AAC1D;AAC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AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,qBAAqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,kBAAkB,aA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:///webpack/universalModuleDefinition","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.phoenix.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst liveViewLoadEvents = new Events('phx:page-loading-stop', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nliveViewLoadEvents.init();\n\nconst regularViewLoadEvents = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nregularViewLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.min.js b/node_modules/flowbite/dist/flowbite.phoenix.min.js new file mode 100644 index 0000000..7a06472 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return E},afterRead:function(){return _},afterWrite:function(){return x},applyStyles:function(){return D},arrow:function(){return Z},auto:function(){return a},basePlacements:function(){return c},beforeMain:function(){return b},beforeRead:function(){return m},beforeWrite:function(){return L},bottom:function(){return o},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return Dt},createPopperBase:function(){return Pt},createPopperLite:function(){return St},detectOverflow:function(){return yt},end:function(){return d},eventListeners:function(){return ot},flip:function(){return _t},hide:function(){return Et},left:function(){return s},main:function(){return w},modifierPhases:function(){return k},offset:function(){return Lt},placements:function(){return v},popper:function(){return f},popperGenerator:function(){return jt},popperOffsets:function(){return Ot},preventOverflow:function(){return xt},read:function(){return y},reference:function(){return h},right:function(){return r},start:function(){return l},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return O}});var n="top",o="bottom",r="right",s="left",a="auto",c=[n,o,r,s],l="start",d="end",u="clippingParents",p="viewport",f="popper",h="reference",g=c.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+d])}),[]),v=[].concat(c,[a]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+d])}),[]),m="beforeRead",y="read",_="afterRead",b="beforeMain",w="main",E="afterMain",L="beforeWrite",O="write",x="afterWrite",k=[m,y,_,b,w,E,L,O,x];function A(t){return t?(t.nodeName||"").toLowerCase():null}function T(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function C(t){return t instanceof T(t).Element||t instanceof Element}function j(t){return t instanceof T(t).HTMLElement||t instanceof HTMLElement}function P(t){return"undefined"!=typeof ShadowRoot&&(t instanceof T(t).ShadowRoot||t instanceof ShadowRoot)}var D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];j(o)&&A(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});j(n)&&A(n)&&(Object.assign(n.style,r),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function S(t){return t.split("-")[0]}var I=Math.max,M=Math.min,q=Math.round;function H(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(H())}function V(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=1,r=1;e&&j(t)&&(o=t.offsetWidth>0&&q(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&q(n.height)/t.offsetHeight||1);var s=(C(t)?T(t):window).visualViewport,a=!B()&&i,c=(n.left+(a&&s?s.offsetLeft:0))/o,l=(n.top+(a&&s?s.offsetTop:0))/r,d=n.width/o,u=n.height/r;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c,x:c,y:l}}function W(t){var e=V(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function z(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&P(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function R(t){return T(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(A(t))>=0}function N(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function K(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(P(t)?t.host:null)||N(t)}function U(t){return j(t)&&"fixed"!==R(t).position?t.offsetParent:null}function X(t){for(var e=T(t),i=U(t);i&&F(i)&&"static"===R(i).position;)i=U(i);return i&&("html"===A(i)||"body"===A(i)&&"static"===R(i).position)?e:i||function(t){var e=/firefox/i.test(H());if(/Trident/i.test(H())&&j(t)&&"fixed"===R(t).position)return null;var i=K(t);for(P(i)&&(i=i.host);j(i)&&["html","body"].indexOf(A(i))<0;){var n=R(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,i){return I(t,M(e,i))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Z={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,a=t.name,l=t.options,d=i.elements.arrow,u=i.modifiersData.popperOffsets,p=S(i.placement),f=Y(p),h=[s,r].indexOf(p)>=0?"height":"width";if(d&&u){var g=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,c))}(l.padding,i),v=W(d),m="y"===f?n:s,y="y"===f?o:r,_=i.rects.reference[h]+i.rects.reference[f]-u[f]-i.rects.popper[h],b=u[f]-i.rects.reference[f],w=X(d),E=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,L=_/2-b/2,O=g[m],x=E-v[h]-g[y],k=E/2-v[h]/2+L,A=G(O,k,x),T=f;i.modifiersData[a]=((e={})[T]=A,e.centerOffset=A-k,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&z(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,a=t.popperRect,c=t.placement,l=t.variation,u=t.offsets,p=t.position,f=t.gpuAcceleration,h=t.adaptive,g=t.roundOffsets,v=t.isFixed,m=u.x,y=void 0===m?0:m,_=u.y,b=void 0===_?0:_,w="function"==typeof g?g({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var E=u.hasOwnProperty("x"),L=u.hasOwnProperty("y"),O=s,x=n,k=window;if(h){var A=X(i),C="clientHeight",j="clientWidth";if(A===T(i)&&"static"!==R(A=N(i)).position&&"absolute"===p&&(C="scrollHeight",j="scrollWidth"),c===n||(c===s||c===r)&&l===d)x=o,b-=(v&&A===k&&k.visualViewport?k.visualViewport.height:A[C])-a.height,b*=f?1:-1;if(c===s||(c===n||c===o)&&l===d)O=r,y-=(v&&A===k&&k.visualViewport?k.visualViewport.width:A[j])-a.width,y*=f?1:-1}var P,D=Object.assign({position:p},h&&tt),S=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:q(e*n)/n||0,y:q(i*n)/n||0}}({x:y,y:b}):{x:y,y:b};return y=S.x,b=S.y,f?Object.assign({},D,((P={})[x]=L?"0":"",P[O]=E?"0":"",P.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",P)):Object.assign({},D,((e={})[x]=L?b+"px":"",e[O]=E?y+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,o=void 0===n||n,r=i.adaptive,s=void 0===r||r,a=i.roundOffsets,c=void 0===a||a,l={placement:S(e.placement),variation:$(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,o=n.scroll,r=void 0===o||o,s=n.resize,a=void 0===s||s,c=T(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),a&&c.addEventListener("resize",i.update,nt),function(){r&&l.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),a&&c.removeEventListener("resize",i.update,nt)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var at={start:"end",end:"start"};function ct(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function lt(t){var e=T(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return V(N(t)).left+lt(t).scrollLeft}function ut(t){var e=R(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function pt(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:j(t)&&ut(t)?t:pt(K(t))}function ft(t,e){var i;void 0===e&&(e=[]);var n=pt(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),r=T(n),s=o?[r].concat(r.visualViewport||[],ut(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(ft(K(s)))}function ht(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===p?ht(function(t,e){var i=T(t),n=N(t),o=i.visualViewport,r=n.clientWidth,s=n.clientHeight,a=0,c=0;if(o){r=o.width,s=o.height;var l=B();(l||!l&&"fixed"===e)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:r,height:s,x:a+dt(t),y:c}}(t,i)):C(e)?function(t,e){var i=V(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ht(function(t){var e,i=N(t),n=lt(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=I(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=I(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+dt(t),c=-n.scrollTop;return"rtl"===R(o||i).direction&&(a+=I(i.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:c}}(N(t)))}function vt(t,e,i,n){var o="clippingParents"===e?function(t){var e=ft(K(t)),i=["absolute","fixed"].indexOf(R(t).position)>=0&&j(t)?X(t):t;return C(i)?e.filter((function(t){return C(t)&&z(t,i)&&"body"!==A(t)})):[]}(t):[].concat(e),r=[].concat(o,[i]),s=r[0],a=r.reduce((function(e,i){var o=gt(t,i,n);return e.top=I(o.top,e.top),e.right=M(o.right,e.right),e.bottom=M(o.bottom,e.bottom),e.left=I(o.left,e.left),e}),gt(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e,i=t.reference,a=t.element,c=t.placement,u=c?S(c):null,p=c?$(c):null,f=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2;switch(u){case n:e={x:f,y:i.y-a.height};break;case o:e={x:f,y:i.y+i.height};break;case r:e={x:i.x+i.width,y:h};break;case s:e={x:i.x-a.width,y:h};break;default:e={x:i.x,y:i.y}}var g=u?Y(u):null;if(null!=g){var v="y"===g?"height":"width";switch(p){case l:e[g]=e[g]-(i[v]/2-a[v]/2);break;case d:e[g]=e[g]+(i[v]/2-a[v]/2)}}return e}function yt(t,e){void 0===e&&(e={});var i=e,s=i.placement,a=void 0===s?t.placement:s,l=i.strategy,d=void 0===l?t.strategy:l,g=i.boundary,v=void 0===g?u:g,m=i.rootBoundary,y=void 0===m?p:m,_=i.elementContext,b=void 0===_?f:_,w=i.altBoundary,E=void 0!==w&&w,L=i.padding,O=void 0===L?0:L,x=J("number"!=typeof O?O:Q(O,c)),k=b===f?h:f,A=t.rects.popper,T=t.elements[E?k:b],j=vt(C(T)?T:T.contextElement||N(t.elements.popper),v,y,d),P=V(t.elements.reference),D=mt({reference:P,element:A,strategy:"absolute",placement:a}),S=ht(Object.assign({},A,D)),I=b===f?S:P,M={top:j.top-I.top+x.top,bottom:I.bottom-j.bottom+x.bottom,left:j.left-I.left+x.left,right:I.right-j.right+x.right},q=t.modifiersData.offset;if(b===f&&q){var H=q[a];Object.keys(M).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,i=[n,o].indexOf(t)>=0?"y":"x";M[t]+=H[i]*e}))}return M}var _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,d=t.name;if(!e.modifiersData[d]._skip){for(var u=i.mainAxis,p=void 0===u||u,f=i.altAxis,h=void 0===f||f,m=i.fallbackPlacements,y=i.padding,_=i.boundary,b=i.rootBoundary,w=i.altBoundary,E=i.flipVariations,L=void 0===E||E,O=i.allowedAutoPlacements,x=e.options.placement,k=S(x),A=m||(k===x||!L?[st(x)]:function(t){if(S(t)===a)return[];var e=st(t);return[ct(t),e,ct(e)]}(x)),T=[x].concat(A).reduce((function(t,i){return t.concat(S(i)===a?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=i.boundary,r=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,d=void 0===l?v:l,u=$(n),p=u?a?g:g.filter((function(t){return $(t)===u})):c,f=p.filter((function(t){return d.indexOf(t)>=0}));0===f.length&&(f=p);var h=f.reduce((function(e,i){return e[i]=yt(t,{placement:i,boundary:o,rootBoundary:r,padding:s})[S(i)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:i,boundary:_,rootBoundary:b,padding:y,flipVariations:L,allowedAutoPlacements:O}):i)}),[]),C=e.rects.reference,j=e.rects.popper,P=new Map,D=!0,I=T[0],M=0;M=0,W=V?"width":"height",z=yt(e,{placement:q,boundary:_,rootBoundary:b,altBoundary:w,padding:y}),R=V?B?r:s:B?o:n;C[W]>j[W]&&(R=st(R));var F=st(R),N=[];if(p&&N.push(z[H]<=0),h&&N.push(z[R]<=0,z[F]<=0),N.every((function(t){return t}))){I=q,D=!1;break}P.set(q,N)}if(D)for(var K=function(t){var e=T.find((function(e){var i=P.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},U=L?3:1;U>0;U--){if("break"===K(U))break}e.placement!==I&&(e.modifiersData[d]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,r,o,s].some((function(e){return t[e]>=0}))}var Et={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),a=yt(e,{altBoundary:!0}),c=bt(s,n),l=bt(a,o,r),d=wt(c),u=wt(l);e.modifiersData[i]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}};var Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,o=t.name,a=i.offset,c=void 0===a?[0,0]:a,l=v.reduce((function(t,i){return t[i]=function(t,e,i){var o=S(t),a=[s,n].indexOf(o)>=0?-1:1,c="function"==typeof i?i(Object.assign({},e,{placement:t})):i,l=c[0],d=c[1];return l=l||0,d=(d||0)*a,[s,r].indexOf(o)>=0?{x:d,y:l}:{x:l,y:d}}(i,e.rects,c),t}),{}),d=l[e.placement],u=d.x,p=d.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=p),e.modifiersData[o]=l}};var Ot={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,a=t.name,c=i.mainAxis,d=void 0===c||c,u=i.altAxis,p=void 0!==u&&u,f=i.boundary,h=i.rootBoundary,g=i.altBoundary,v=i.padding,m=i.tether,y=void 0===m||m,_=i.tetherOffset,b=void 0===_?0:_,w=yt(e,{boundary:f,rootBoundary:h,padding:v,altBoundary:g}),E=S(e.placement),L=$(e.placement),O=!L,x=Y(E),k="x"===x?"y":"x",A=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,j="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,P="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(A){if(d){var H,B="y"===x?n:s,V="y"===x?o:r,z="y"===x?"height":"width",R=A[x],F=R+w[B],N=R-w[V],K=y?-C[z]/2:0,U=L===l?T[z]:C[z],J=L===l?-C[z]:-T[z],Q=e.elements.arrow,Z=y&&Q?W(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[V],nt=G(0,T[z],Z[z]),ot=O?T[z]/2-K-nt-et-P.mainAxis:U-nt-et-P.mainAxis,rt=O?-T[z]/2+K+nt+it+P.mainAxis:J+nt+it+P.mainAxis,st=e.elements.arrow&&X(e.elements.arrow),at=st?"y"===x?st.clientTop||0:st.clientLeft||0:0,ct=null!=(H=null==D?void 0:D[x])?H:0,lt=R+rt-ct,dt=G(y?M(F,R+ot-ct-at):F,R,y?I(N,lt):N);A[x]=dt,q[x]=dt-R}if(p){var ut,pt="x"===x?n:s,ft="x"===x?o:r,ht=A[k],gt="y"===k?"height":"width",vt=ht+w[pt],mt=ht-w[ft],_t=-1!==[n,s].indexOf(E),bt=null!=(ut=null==D?void 0:D[k])?ut:0,wt=_t?vt:ht-T[gt]-C[gt]-bt+P.altAxis,Et=_t?ht+T[gt]+C[gt]-bt-P.altAxis:mt,Lt=y&&_t?function(t,e,i){var n=G(t,e,i);return n>i?i:n}(wt,ht,Et):G(y?wt:vt,ht,y?Et:mt);A[k]=Lt,q[k]=Lt-ht}e.modifiersData[a]=q}},requiresIfExists:["offset"]};function kt(t,e,i){void 0===i&&(i=!1);var n,o,r=j(e),s=j(e)&&function(t){var e=t.getBoundingClientRect(),i=q(e.width)/t.offsetWidth||1,n=q(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=N(e),c=V(t,s,i),l={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!i)&&(("body"!==A(e)||ut(a))&&(l=(n=e)!==T(n)&&j(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:lt(n)),j(e)?((d=V(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):a&&(d.x=dt(a))),{x:c.left+l.scrollLeft-d.x,y:c.top+l.scrollTop-d.y,width:c.width,height:c.height}}function At(t){var e=new Map,i=new Set,n=[];function o(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||o(t)})),n}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var t=arguments.length,e=new Array(t),i=0;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst liveViewLoadEvents = new Events('phx:page-loading-stop', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nliveViewLoadEvents.init();\n\nconst regularViewLoadEvents = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nregularViewLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","items","this","_items","_init","active","open","id","triggerEl","toggle","getItem","classList","remove","targetEl","iconEl","close","initAccordions","querySelectorAll","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","_activeItem","_indicators","_intervalDuration","_intervalInstance","el","_getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","initCarousels","$carouselEl","slide","from","$carouselItemEl","$indicatorEl","parseInt","carousel","Carousel","carouselNextEl","carouselPrevEl","onCollapse","onExpand","_targetEl","_triggerEl","_visible","hasAttribute","collapse","expand","initCollapses","targetId","$targetEl","getElementById","Collapse","console","error","triggerType","onShow","onHide","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","showEvents","ev","show","hideEvents","matches","hide","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","setTimeout","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_getPlacementClasses","base","c","event","inactive","_destroyBackdropEl","_createBackdrop","backdropEl","createElement","append","getDrawerInstance","instances","drawerInstance","initDrawers","drawerInstances","drawerId","$drawerEl","object","Drawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","getModalInstance","modalInstance","modalInstances","modalId","$modalEl","Modal","_setupKeydownListener","_removeKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","_activeTab","getTab","_setActiveTab","tab","getActiveTab","t","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","init","eventFunction","Events","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","d","definition","o","defineProperty","enumerable","obj","prop","prototype","r","Symbol","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.js b/node_modules/flowbite/dist/flowbite.turbo.js new file mode 100644 index 0000000..ac78acb --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.js @@ -0,0 +1,4438 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var Accordion = /** @class */ (function () { + function Accordion(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Accordion.prototype._init = function () { + var _this = this; + if (this._items.length) { + // show accordion item based on click + this._items.map(function (item) { + if (item.active) { + _this.open(item.id); + } + item.triggerEl.addEventListener('click', function () { + _this.toggle(item.id); + }); + }); + } + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.remove('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion(items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var Carousel = /** @class */ (function () { + function Carousel(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._init(); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype._init = function () { + var _this = this; + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this._getActiveItem()) { + this.slideTo(this._getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this._getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this._getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.right.el.classList.add('translate-x-full', 'z-10'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype._getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel(items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Collapse.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._triggerEl.addEventListener('click', function () { + _this.toggle(); + }); + } + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + new Collapse($targetEl, $triggerEl); + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Dial.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }); + }); + } + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Dismiss.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + this._triggerEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Drawer.prototype._init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + } + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + // add keyboard event listener to document + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + return Drawer; +}()); +var getDrawerInstance = function (id, instances) { + if (instances.some(function (drawerInstance) { return drawerInstance.id === id; })) { + return instances.find(function (drawerInstance) { return drawerInstance.id === id; }); + } +}; +function initDrawers() { + var drawerInstances = []; + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + // optional + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + if (!getDrawerInstance(drawerId, drawerInstances)) { + drawerInstances.push({ + id: drawerId, + object: new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge + ? edge === 'true' + ? true + : false + : Default.edge, + edgeOffset: edgeOffset + ? edgeOffset + : Default.edgeOffset, + }), + }); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_1) { + $triggerEl.addEventListener('click', function () { + drawer_1.object.toggle(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_2) { + $triggerEl.addEventListener('click', function () { + drawer_2.object.hide(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_3) { + $triggerEl.addEventListener('click', function () { + drawer_3.object.show(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Dropdown.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.toggle(); + }); + }); + } + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + if (ev === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._init(); + } + Modal.prototype._init = function () { + var _this = this; + if (this._targetEl) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + } + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('modal-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden) { + document.querySelector('[modal-backdrop]').remove(); + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + return Modal; +}()); +var getModalInstance = function (id, instances) { + if (instances.some(function (modalInstance) { return modalInstance.id === id; })) { + return instances.find(function (modalInstance) { return modalInstance.id === id; }); + } + return null; +}; +function initModals() { + var modalInstances = []; + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + if (!getModalInstance(modalId, modalInstances)) { + modalInstances.push({ + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // support pre v1.6.0 data-modal-toggle initialization + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + var modal_1 = getModalInstance(modalId, modalInstances); + if (!modal_1) { + modal_1 = { + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }; + modalInstances.push(modal_1); + } + $triggerEl.addEventListener('click', function () { + modal_1.object.toggle(); + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = getModalInstance(modalId, modalInstances); + if (modal_2) { + $triggerEl.addEventListener('click', function () { + if (modal_2.object.isHidden) { + modal_2.object.show(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = getModalInstance(modalId, modalInstances); + if (modal_3) { + $triggerEl.addEventListener('click', function () { + if (modal_3.object.isVisible) { + modal_3.object.hide(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Popover.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var Tabs = /** @class */ (function () { + function Tabs(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Tabs.prototype._init = function () { + var _this = this; + if (this._items.length) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this._setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function () { + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype._setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this._setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($triggerEl) { + var tabItems = []; + var defaultTabId = null; + $triggerEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs(tabItems, { + defaultTabId: defaultTabId, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Tooltip.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.hide(); + }); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +__webpack_require__(311); +var events_1 = __webpack_require__(947); +var turboLoadEvents = new events_1.default('turbo:load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new events_1.default('turbo:frame-load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +turboFrameLoadEvents.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.js.map b/node_modules/flowbite/dist/flowbite.turbo.js.map new file mode 100644 index 0000000..1d25895 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.turbo.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AAC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;AACA;AACA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA,sBAAsB;AACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;;AC9ByD;AACJ;AACM;AACR;AACZ,CAAC;AACxC;;AAEe;AACf;;AAEA,aAAa,kBAAkB;AAC/B,kBAAkB,eAAe;AACjC;AACA,cAAc,QAAG;AACjB,eAAe,QAAG;AAClB,kCAAkC,mBAAmB;AACrD;;AAEA,MAAM,gBAAgB;AACtB,SAAS,QAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BqD;AACtC;AACf;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;;AAEA;AACA;;ACT+C;AACE;AACN;AACK;AACjC;AACf,4CAA4C,WAAW;AACvD;AACA;AACA;;AAEA,MAAM,aAAa,UAAU,cAAc;AAC3C;AACA;;AAEA,yBAAyB,aAAa;AACtC;;ACfmD;AACJ;AACR;AACU;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;;AAEA;AACA;AACA;;AAEA,qBAAqB,eAAe;AACpC;AACA,YAAY,SAAS;AACrB,+DAA+D,cAAc;AAC7E;AACA;AACA,uCAAuC,aAAa;AACpD;;ACzBe;AACf,yBAAyB;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACPuC;AACY;AACA;AACI;AACJ;AACM;AACJ;AACM;AACI;AAChB;AACV;AACM;AACiB;AAChB;;AAE5C;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ,GAAG,gBAAgB,CAAC,eAAe,uBAAuB,SAAS,0EAA0E,gBAAgB,CAAC,eAAe,CAAC,kBAAkB;AACpO,EAAE;AACF;AACA;;;AAGA;AACA,wBAAwB,iBAAiB,CAAC,aAAa;AACvD,wDAAwD,gBAAgB;AACxE,4CAA4C,aAAa,YAAY,eAAe;;AAEpF,OAAO,SAAS;AAChB;AACA,IAAI;;;AAGJ;AACA,WAAW,SAAS,oBAAoB,QAAQ,oCAAoC,WAAW;AAC/F,GAAG;AACH,EAAE;AACF;;;AAGe;AACf;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAG;AACrB,oBAAoB,QAAG;AACvB,qBAAqB,QAAG;AACxB,mBAAmB,QAAG;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;ACrEqD;AACR;AACwB;AACF;AACpD;AACf;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD,8BAA8B,YAAY;AAC1C;AACA;AACA;;AAEA;AACA,SAAS,SAAG;AACZ;AACA;AACA;AACA;AACA;;AAEA,SAAS,MAAM;AACf;AACA;AACA;AACA;AACA;;AAEA,SAAS,KAAK;AACd;AACA;AACA;AACA;AACA;;AAEA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAA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AAChB,CAAC;;AAErD;AACA,MAAM,gBAAgB,gBAAgB,IAAI;AAC1C;AACA;;AAEA,0BAA0B,oBAAoB;AAC9C,UAAU,6BAA6B,gCAAgC,6BAA6B;AACpG;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA,iGAAiG,oBAAoB;AACrH;AACA,sBAAsB,gBAAgB,gBAAgB,IAAI,GAAG,oBAAoB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA,yBAAyB,gBAAgB;;AAEzC,2BAA2B,YAAY,gBAAgB,KAAK;AAC5D,sBAAsB,SAAG,EAAE,MAAM;AACjC;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AA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;AAC5B;;AAEA,QAAQ,aAAa;AACrB,gBAAgB,qBAAqB;AACrC;AACA;AACA,MAAM;AACN,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzD6C,CAAC;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,qBAAqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,kBAAkB,aAAa;AAC/B,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,6CAA6C,KAAK;;AAElD;AACA,sEAAsE;AACtE,SAAS;AACT;;AAEA,4BAA4B,uCAAuC;AACnE,cAAc,KAAqC,EAAE,EAO1C;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAqC,EAAE,EAE1C;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACO,mDAAmD;;;;AChQU;AACT;AACF;AACA;AACJ;AACV;AACJ;AACsB;AACpB;AACF;AACvC,wBAAwB,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW,EAAE,gBAAM,EAAE,cAAI,EAAE,yBAAe,EAAE,eAAK,EAAE,cAAI;AAC7H,IAAI,mBAAY,gBAAgB,eAAe;AAC/C;AACA,CAAC,GAAG;;AAEuE,CAAC;;AAER,CAAC;;;;ACjBD;AACT;AACF;AACA;AACJ;AACrD,IAAI,4BAAgB,IAAI,cAAc,EAAE,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oBAAoB,CAAC,IAAI,EAAE,CAAC;AAE5B,qBAAe;IACX,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,IAAI;IACJ,OAAO;IACP,MAAM;CACT,CAAC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.turbo.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst turboLoadEvents = new Events('turbo:load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nturboFrameLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.min.js b/node_modules/flowbite/dist/flowbite.turbo.min.js new file mode 100644 index 0000000..65c47ff --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return E},afterRead:function(){return _},afterWrite:function(){return x},applyStyles:function(){return D},arrow:function(){return Z},auto:function(){return a},basePlacements:function(){return c},beforeMain:function(){return b},beforeRead:function(){return m},beforeWrite:function(){return L},bottom:function(){return o},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return Dt},createPopperBase:function(){return Pt},createPopperLite:function(){return St},detectOverflow:function(){return yt},end:function(){return d},eventListeners:function(){return ot},flip:function(){return _t},hide:function(){return Et},left:function(){return s},main:function(){return w},modifierPhases:function(){return k},offset:function(){return Lt},placements:function(){return v},popper:function(){return f},popperGenerator:function(){return jt},popperOffsets:function(){return Ot},preventOverflow:function(){return xt},read:function(){return y},reference:function(){return h},right:function(){return r},start:function(){return l},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return O}});var n="top",o="bottom",r="right",s="left",a="auto",c=[n,o,r,s],l="start",d="end",u="clippingParents",p="viewport",f="popper",h="reference",g=c.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+d])}),[]),v=[].concat(c,[a]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+d])}),[]),m="beforeRead",y="read",_="afterRead",b="beforeMain",w="main",E="afterMain",L="beforeWrite",O="write",x="afterWrite",k=[m,y,_,b,w,E,L,O,x];function A(t){return t?(t.nodeName||"").toLowerCase():null}function T(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function C(t){return t instanceof T(t).Element||t instanceof Element}function j(t){return t instanceof T(t).HTMLElement||t instanceof HTMLElement}function P(t){return"undefined"!=typeof ShadowRoot&&(t instanceof T(t).ShadowRoot||t instanceof ShadowRoot)}var D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];j(o)&&A(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});j(n)&&A(n)&&(Object.assign(n.style,r),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function S(t){return t.split("-")[0]}var I=Math.max,M=Math.min,q=Math.round;function H(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(H())}function V(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=1,r=1;e&&j(t)&&(o=t.offsetWidth>0&&q(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&q(n.height)/t.offsetHeight||1);var s=(C(t)?T(t):window).visualViewport,a=!B()&&i,c=(n.left+(a&&s?s.offsetLeft:0))/o,l=(n.top+(a&&s?s.offsetTop:0))/r,d=n.width/o,u=n.height/r;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c,x:c,y:l}}function W(t){var e=V(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function z(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&P(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function R(t){return T(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(A(t))>=0}function N(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function K(t){return"html"===A(t)?t:t.assignedSlot||t.parentNode||(P(t)?t.host:null)||N(t)}function U(t){return j(t)&&"fixed"!==R(t).position?t.offsetParent:null}function X(t){for(var e=T(t),i=U(t);i&&F(i)&&"static"===R(i).position;)i=U(i);return i&&("html"===A(i)||"body"===A(i)&&"static"===R(i).position)?e:i||function(t){var e=/firefox/i.test(H());if(/Trident/i.test(H())&&j(t)&&"fixed"===R(t).position)return null;var i=K(t);for(P(i)&&(i=i.host);j(i)&&["html","body"].indexOf(A(i))<0;){var n=R(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,i){return I(t,M(e,i))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Z={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,a=t.name,l=t.options,d=i.elements.arrow,u=i.modifiersData.popperOffsets,p=S(i.placement),f=Y(p),h=[s,r].indexOf(p)>=0?"height":"width";if(d&&u){var g=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,c))}(l.padding,i),v=W(d),m="y"===f?n:s,y="y"===f?o:r,_=i.rects.reference[h]+i.rects.reference[f]-u[f]-i.rects.popper[h],b=u[f]-i.rects.reference[f],w=X(d),E=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,L=_/2-b/2,O=g[m],x=E-v[h]-g[y],k=E/2-v[h]/2+L,A=G(O,k,x),T=f;i.modifiersData[a]=((e={})[T]=A,e.centerOffset=A-k,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&z(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,a=t.popperRect,c=t.placement,l=t.variation,u=t.offsets,p=t.position,f=t.gpuAcceleration,h=t.adaptive,g=t.roundOffsets,v=t.isFixed,m=u.x,y=void 0===m?0:m,_=u.y,b=void 0===_?0:_,w="function"==typeof g?g({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var E=u.hasOwnProperty("x"),L=u.hasOwnProperty("y"),O=s,x=n,k=window;if(h){var A=X(i),C="clientHeight",j="clientWidth";if(A===T(i)&&"static"!==R(A=N(i)).position&&"absolute"===p&&(C="scrollHeight",j="scrollWidth"),c===n||(c===s||c===r)&&l===d)x=o,b-=(v&&A===k&&k.visualViewport?k.visualViewport.height:A[C])-a.height,b*=f?1:-1;if(c===s||(c===n||c===o)&&l===d)O=r,y-=(v&&A===k&&k.visualViewport?k.visualViewport.width:A[j])-a.width,y*=f?1:-1}var P,D=Object.assign({position:p},h&&tt),S=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:q(e*n)/n||0,y:q(i*n)/n||0}}({x:y,y:b}):{x:y,y:b};return y=S.x,b=S.y,f?Object.assign({},D,((P={})[x]=L?"0":"",P[O]=E?"0":"",P.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",P)):Object.assign({},D,((e={})[x]=L?b+"px":"",e[O]=E?y+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,o=void 0===n||n,r=i.adaptive,s=void 0===r||r,a=i.roundOffsets,c=void 0===a||a,l={placement:S(e.placement),variation:$(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,o=n.scroll,r=void 0===o||o,s=n.resize,a=void 0===s||s,c=T(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),a&&c.addEventListener("resize",i.update,nt),function(){r&&l.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),a&&c.removeEventListener("resize",i.update,nt)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var at={start:"end",end:"start"};function ct(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function lt(t){var e=T(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return V(N(t)).left+lt(t).scrollLeft}function ut(t){var e=R(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function pt(t){return["html","body","#document"].indexOf(A(t))>=0?t.ownerDocument.body:j(t)&&ut(t)?t:pt(K(t))}function ft(t,e){var i;void 0===e&&(e=[]);var n=pt(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),r=T(n),s=o?[r].concat(r.visualViewport||[],ut(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(ft(K(s)))}function ht(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===p?ht(function(t,e){var i=T(t),n=N(t),o=i.visualViewport,r=n.clientWidth,s=n.clientHeight,a=0,c=0;if(o){r=o.width,s=o.height;var l=B();(l||!l&&"fixed"===e)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:r,height:s,x:a+dt(t),y:c}}(t,i)):C(e)?function(t,e){var i=V(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ht(function(t){var e,i=N(t),n=lt(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=I(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=I(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+dt(t),c=-n.scrollTop;return"rtl"===R(o||i).direction&&(a+=I(i.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:c}}(N(t)))}function vt(t,e,i,n){var o="clippingParents"===e?function(t){var e=ft(K(t)),i=["absolute","fixed"].indexOf(R(t).position)>=0&&j(t)?X(t):t;return C(i)?e.filter((function(t){return C(t)&&z(t,i)&&"body"!==A(t)})):[]}(t):[].concat(e),r=[].concat(o,[i]),s=r[0],a=r.reduce((function(e,i){var o=gt(t,i,n);return e.top=I(o.top,e.top),e.right=M(o.right,e.right),e.bottom=M(o.bottom,e.bottom),e.left=I(o.left,e.left),e}),gt(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e,i=t.reference,a=t.element,c=t.placement,u=c?S(c):null,p=c?$(c):null,f=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2;switch(u){case n:e={x:f,y:i.y-a.height};break;case o:e={x:f,y:i.y+i.height};break;case r:e={x:i.x+i.width,y:h};break;case s:e={x:i.x-a.width,y:h};break;default:e={x:i.x,y:i.y}}var g=u?Y(u):null;if(null!=g){var v="y"===g?"height":"width";switch(p){case l:e[g]=e[g]-(i[v]/2-a[v]/2);break;case d:e[g]=e[g]+(i[v]/2-a[v]/2)}}return e}function yt(t,e){void 0===e&&(e={});var i=e,s=i.placement,a=void 0===s?t.placement:s,l=i.strategy,d=void 0===l?t.strategy:l,g=i.boundary,v=void 0===g?u:g,m=i.rootBoundary,y=void 0===m?p:m,_=i.elementContext,b=void 0===_?f:_,w=i.altBoundary,E=void 0!==w&&w,L=i.padding,O=void 0===L?0:L,x=J("number"!=typeof O?O:Q(O,c)),k=b===f?h:f,A=t.rects.popper,T=t.elements[E?k:b],j=vt(C(T)?T:T.contextElement||N(t.elements.popper),v,y,d),P=V(t.elements.reference),D=mt({reference:P,element:A,strategy:"absolute",placement:a}),S=ht(Object.assign({},A,D)),I=b===f?S:P,M={top:j.top-I.top+x.top,bottom:I.bottom-j.bottom+x.bottom,left:j.left-I.left+x.left,right:I.right-j.right+x.right},q=t.modifiersData.offset;if(b===f&&q){var H=q[a];Object.keys(M).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,i=[n,o].indexOf(t)>=0?"y":"x";M[t]+=H[i]*e}))}return M}var _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,d=t.name;if(!e.modifiersData[d]._skip){for(var u=i.mainAxis,p=void 0===u||u,f=i.altAxis,h=void 0===f||f,m=i.fallbackPlacements,y=i.padding,_=i.boundary,b=i.rootBoundary,w=i.altBoundary,E=i.flipVariations,L=void 0===E||E,O=i.allowedAutoPlacements,x=e.options.placement,k=S(x),A=m||(k===x||!L?[st(x)]:function(t){if(S(t)===a)return[];var e=st(t);return[ct(t),e,ct(e)]}(x)),T=[x].concat(A).reduce((function(t,i){return t.concat(S(i)===a?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=i.boundary,r=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,d=void 0===l?v:l,u=$(n),p=u?a?g:g.filter((function(t){return $(t)===u})):c,f=p.filter((function(t){return d.indexOf(t)>=0}));0===f.length&&(f=p);var h=f.reduce((function(e,i){return e[i]=yt(t,{placement:i,boundary:o,rootBoundary:r,padding:s})[S(i)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:i,boundary:_,rootBoundary:b,padding:y,flipVariations:L,allowedAutoPlacements:O}):i)}),[]),C=e.rects.reference,j=e.rects.popper,P=new Map,D=!0,I=T[0],M=0;M=0,W=V?"width":"height",z=yt(e,{placement:q,boundary:_,rootBoundary:b,altBoundary:w,padding:y}),R=V?B?r:s:B?o:n;C[W]>j[W]&&(R=st(R));var F=st(R),N=[];if(p&&N.push(z[H]<=0),h&&N.push(z[R]<=0,z[F]<=0),N.every((function(t){return t}))){I=q,D=!1;break}P.set(q,N)}if(D)for(var K=function(t){var e=T.find((function(e){var i=P.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},U=L?3:1;U>0;U--){if("break"===K(U))break}e.placement!==I&&(e.modifiersData[d]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,r,o,s].some((function(e){return t[e]>=0}))}var Et={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),a=yt(e,{altBoundary:!0}),c=bt(s,n),l=bt(a,o,r),d=wt(c),u=wt(l);e.modifiersData[i]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}};var Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,o=t.name,a=i.offset,c=void 0===a?[0,0]:a,l=v.reduce((function(t,i){return t[i]=function(t,e,i){var o=S(t),a=[s,n].indexOf(o)>=0?-1:1,c="function"==typeof i?i(Object.assign({},e,{placement:t})):i,l=c[0],d=c[1];return l=l||0,d=(d||0)*a,[s,r].indexOf(o)>=0?{x:d,y:l}:{x:l,y:d}}(i,e.rects,c),t}),{}),d=l[e.placement],u=d.x,p=d.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=p),e.modifiersData[o]=l}};var Ot={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,a=t.name,c=i.mainAxis,d=void 0===c||c,u=i.altAxis,p=void 0!==u&&u,f=i.boundary,h=i.rootBoundary,g=i.altBoundary,v=i.padding,m=i.tether,y=void 0===m||m,_=i.tetherOffset,b=void 0===_?0:_,w=yt(e,{boundary:f,rootBoundary:h,padding:v,altBoundary:g}),E=S(e.placement),L=$(e.placement),O=!L,x=Y(E),k="x"===x?"y":"x",A=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,j="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,P="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(A){if(d){var H,B="y"===x?n:s,V="y"===x?o:r,z="y"===x?"height":"width",R=A[x],F=R+w[B],N=R-w[V],K=y?-C[z]/2:0,U=L===l?T[z]:C[z],J=L===l?-C[z]:-T[z],Q=e.elements.arrow,Z=y&&Q?W(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[V],nt=G(0,T[z],Z[z]),ot=O?T[z]/2-K-nt-et-P.mainAxis:U-nt-et-P.mainAxis,rt=O?-T[z]/2+K+nt+it+P.mainAxis:J+nt+it+P.mainAxis,st=e.elements.arrow&&X(e.elements.arrow),at=st?"y"===x?st.clientTop||0:st.clientLeft||0:0,ct=null!=(H=null==D?void 0:D[x])?H:0,lt=R+rt-ct,dt=G(y?M(F,R+ot-ct-at):F,R,y?I(N,lt):N);A[x]=dt,q[x]=dt-R}if(p){var ut,pt="x"===x?n:s,ft="x"===x?o:r,ht=A[k],gt="y"===k?"height":"width",vt=ht+w[pt],mt=ht-w[ft],_t=-1!==[n,s].indexOf(E),bt=null!=(ut=null==D?void 0:D[k])?ut:0,wt=_t?vt:ht-T[gt]-C[gt]-bt+P.altAxis,Et=_t?ht+T[gt]+C[gt]-bt-P.altAxis:mt,Lt=y&&_t?function(t,e,i){var n=G(t,e,i);return n>i?i:n}(wt,ht,Et):G(y?wt:vt,ht,y?Et:mt);A[k]=Lt,q[k]=Lt-ht}e.modifiersData[a]=q}},requiresIfExists:["offset"]};function kt(t,e,i){void 0===i&&(i=!1);var n,o,r=j(e),s=j(e)&&function(t){var e=t.getBoundingClientRect(),i=q(e.width)/t.offsetWidth||1,n=q(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=N(e),c=V(t,s,i),l={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!i)&&(("body"!==A(e)||ut(a))&&(l=(n=e)!==T(n)&&j(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:lt(n)),j(e)?((d=V(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):a&&(d.x=dt(a))),{x:c.left+l.scrollLeft-d.x,y:c.top+l.scrollTop-d.y,width:c.width,height:c.height}}function At(t){var e=new Map,i=new Set,n=[];function o(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||o(t)})),n}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var t=arguments.length,e=new Array(t),i=0;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport { AccordionInterface } from './interface';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nclass Accordion implements AccordionInterface {\n _items: AccordionItem[];\n _options: AccordionOptions;\n\n constructor(\n items: AccordionItem[] = [],\n options: AccordionOptions = Default\n ) {\n this._items = items;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n private _init() {\n if (this._items.length) {\n // show accordion item based on click\n this._items.map((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n item.triggerEl.addEventListener('click', () => {\n this.toggle(item.id);\n });\n });\n }\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.remove('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion(items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport { CarouselInterface } from './interface';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nclass Carousel implements CarouselInterface {\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n\n constructor(\n items: CarouselItem[] = [],\n options: CarouselOptions = Default\n ) {\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._init();\n }\n\n /**\n * initialize carousel and items based on active one\n */\n _init() {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this._getActiveItem()) {\n this.slideTo(this._getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this._getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this._getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-10');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n _getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel(items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport { CollapseInterface } from './interface';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nclass Collapse implements CollapseInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._triggerEl.addEventListener('click', () => {\n this.toggle();\n });\n }\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport { DialInterface } from './interface';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dial implements DialInterface {\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default\n ) {\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n });\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport { DismissInterface } from './interface';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nclass Dismiss implements DismissInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._triggerEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerInstance, DrawerOptions, PlacementClasses } from './types';\nimport { DrawerInterface } from './interface';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Drawer implements DrawerInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._init();\n }\n\n _init() {\n // set initial accessibility attributes\n if (this._targetEl) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n }\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n // add keyboard event listener to document\n document.addEventListener('keydown', (event) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n });\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (this._visible) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n}\n\nconst getDrawerInstance = (id: string, instances: DrawerInstance[]) => {\n if (instances.some((drawerInstance) => drawerInstance.id === id)) {\n return instances.find((drawerInstance) => drawerInstance.id === id);\n }\n};\n\nexport function initDrawers() {\n const drawerInstances = [] as DrawerInstance[];\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n // optional\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n if (!getDrawerInstance(drawerId, drawerInstances)) {\n drawerInstances.push({\n id: drawerId,\n object: new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge\n ? edge === 'true'\n ? true\n : false\n : Default.edge,\n edgeOffset: edgeOffset\n ? edgeOffset\n : Default.edgeOffset,\n } as DrawerOptions),\n });\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInstance = getDrawerInstance(\n drawerId,\n drawerInstances\n );\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.toggle();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.hide();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer = getDrawerInstance(drawerId, drawerInstances);\n\n if (drawer) {\n $triggerEl.addEventListener('click', () => {\n drawer.object.show();\n });\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport { DropdownInterface } from './interface';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Dropdown implements DropdownInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default\n ) {\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.toggle();\n });\n });\n }\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n if (ev === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n });\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalInstance, ModalOptions } from './types';\nimport { ModalInterface } from './interface';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses:\n 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nclass Modal implements ModalInterface {\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default\n ) {\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._init();\n }\n\n _init() {\n if (this._targetEl) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n }\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('modal-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden) {\n document.querySelector('[modal-backdrop]').remove();\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n}\n\nconst getModalInstance = (id: string, instances: ModalInstance[]) => {\n if (instances.some((modalInstance) => modalInstance.id === id)) {\n return instances.find((modalInstance) => modalInstance.id === id);\n }\n return null;\n};\n\nexport function initModals() {\n const modalInstances = [] as ModalInstance[];\n\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n if (!getModalInstance(modalId, modalInstances)) {\n modalInstances.push({\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n });\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // support pre v1.6.0 data-modal-toggle initialization\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n\n let modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (!modal) {\n modal = {\n id: modalId,\n object: new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement\n ? placement\n : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n ),\n };\n modalInstances.push(modal);\n }\n\n $triggerEl.addEventListener('click', () => {\n modal.object.toggle();\n });\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isHidden) {\n modal.object.show();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInstance = getModalInstance(\n modalId,\n modalInstances\n );\n\n if (modal) {\n $triggerEl.addEventListener('click', () => {\n if (modal.object.isVisible) {\n modal.object.hide();\n }\n });\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport { PopoverInterface } from './interface';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Popover implements PopoverInterface {\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n this._targetEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n this._targetEl.addEventListener(ev, () => {\n setTimeout(() => {\n if (!this._triggerEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport { TabsInterface } from './interface';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nclass Tabs implements TabsInterface {\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n\n constructor(items: TabItem[] = [], options: TabsOptions = Default) {\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._init();\n }\n\n _init() {\n if (this._items.length) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this._setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', () => {\n this.show(tab.id);\n });\n });\n }\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n _setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this._setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($triggerEl) => {\n const tabItems: TabItem[] = [];\n let defaultTabId = null;\n $triggerEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n new Tabs(tabItems, {\n defaultTabId: defaultTabId,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport { TooltipInterface } from './interface';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nclass Tooltip implements TooltipInterface {\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default\n ) {\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = this._createPopperInstance();\n this._visible = false;\n this._init();\n }\n\n _init() {\n if (this._triggerEl) {\n this._setupEventListeners();\n }\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.show();\n });\n });\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, () => {\n this.hide();\n });\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport './components/index';\nimport Events from './dom/events';\n\nconst turboLoadEvents = new Events('turbo:load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n]);\nturboFrameLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","items","this","_items","_init","active","open","id","triggerEl","toggle","getItem","classList","remove","targetEl","iconEl","close","initAccordions","querySelectorAll","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","_activeItem","_indicators","_intervalDuration","_intervalInstance","el","_getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","initCarousels","$carouselEl","slide","from","$carouselItemEl","$indicatorEl","parseInt","carousel","Carousel","carouselNextEl","carouselPrevEl","onCollapse","onExpand","_targetEl","_triggerEl","_visible","hasAttribute","collapse","expand","initCollapses","targetId","$targetEl","getElementById","Collapse","console","error","triggerType","onShow","onHide","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","showEvents","ev","show","hideEvents","matches","hide","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","setTimeout","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_getPlacementClasses","base","c","event","inactive","_destroyBackdropEl","_createBackdrop","backdropEl","createElement","append","getDrawerInstance","instances","drawerInstance","initDrawers","drawerInstances","drawerId","$drawerEl","object","Drawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","getModalInstance","modalInstance","modalInstances","modalId","$modalEl","Modal","_setupKeydownListener","_removeKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","_activeTab","getTab","_setActiveTab","tab","getActiveTab","t","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","init","eventFunction","Events","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","d","definition","o","defineProperty","enumerable","obj","prop","prototype","r","Symbol","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts new file mode 100644 index 0000000..4ea151a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts @@ -0,0 +1,15 @@ +import type { AccordionItem, AccordionOptions } from './types'; +import { AccordionInterface } from './interface'; +declare class Accordion implements AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + constructor(items?: AccordionItem[], options?: AccordionOptions); + private _init; + getItem(id: string): AccordionItem; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; +} +export declare function initAccordions(): void; +export default Accordion; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map new file mode 100644 index 0000000..a7f1f0f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAWjD,cAAM,SAAU,YAAW,kBAAkB;IACzC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;gBAGvB,KAAK,GAAE,aAAa,EAAO,EAC3B,OAAO,GAAE,gBAA0B;IAOvC,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,IAAI,CAAC,EAAE,EAAE,MAAM;IA2Cf,MAAM,CAAC,EAAE,EAAE,MAAM;IAajB,KAAK,CAAC,EAAE,EAAE,MAAM;CAqBnB;AAED,wBAAgB,cAAc,SA2C7B;AAOD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.js b/node_modules/flowbite/lib/cjs/components/accordion/index.js new file mode 100644 index 0000000..0089ea2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.js @@ -0,0 +1,151 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initAccordions = void 0; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var Accordion = /** @class */ (function () { + function Accordion(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Accordion.prototype._init = function () { + var _this = this; + if (this._items.length) { + // show accordion item based on click + this._items.map(function (item) { + if (item.active) { + _this.open(item.id); + } + item.triggerEl.addEventListener('click', function () { + _this.toggle(item.id); + }); + }); + } + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.remove('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion(items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports.default = Accordion; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.js.map b/node_modules/flowbite/lib/cjs/components/accordion/index.js.map new file mode 100644 index 0000000..b35b518 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAqB;IAC9B,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,4DAA4D;IAC3E,eAAe,EAAE,kCAAkC;IACnD,MAAM,EAAE,cAAO,CAAC;IAChB,OAAO,EAAE,cAAO,CAAC;IACjB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAII,mBACI,KAA2B,EAC3B,OAAmC;QADnC,sBAAA,EAAA,UAA2B;QAC3B,wBAAA,EAAA,iBAAmC;QAEnC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAEO,yBAAK,GAAb;QAAA,iBAaC;QAZG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACpB,qCAAqC;YACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,IAAI;gBACjB,IAAI,IAAI,CAAC,M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AC3D,oCAAoC;YACpC,IAAI,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,YAAY,EAAE;gBACzD,IAAM,IAAI,GAAG;oBACT,EAAE,EAAE,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC;oBACpD,SAAS,EAAE,UAAU;oBACrB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAC5B,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC,CACnD;oBACD,MAAM,EAAE,UAAU,CAAC,aAAa,CAC5B,uBAAuB,CAC1B;oBACD,MAAM,EACF,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;wBAC/C,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,KAAK;iBACD,CAAC;gBACnB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;QACL,CAAC,CAAC,CAAC;QAEP,IAAI,SAAS,CAAC,KAAK,EAAE;YACjB,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;YAChD,aAAa,EAAE,aAAa;gBACxB,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,OAAO,CAAC,aAAa;YAC3B,eAAe,EAAE,eAAe;gBAC5B,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,OAAO,CAAC,eAAe;SACZ,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACP,CAAC;AA3CD,wCA2CC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;CAC1C;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts new file mode 100644 index 0000000..ebeacd9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts @@ -0,0 +1,10 @@ +import { AccordionItem, AccordionOptions } from './types'; +export declare interface AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + getItem(id: string): AccordionItem | undefined; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map new file mode 100644 index 0000000..cfc63e5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG1D,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACvC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.js b/node_modules/flowbite/lib/cjs/components/accordion/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map b/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map new file mode 100644 index 0000000..a7ef24a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts new file mode 100644 index 0000000..c8fb43a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts @@ -0,0 +1,17 @@ +import { AccordionInterface } from './interface'; +export declare type AccordionItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; + iconEl?: HTMLElement | null; + active?: boolean; +}; +export declare type AccordionOptions = { + alwaysOpen?: boolean; + activeClasses?: string; + inactiveClasses?: string; + onOpen?: (accordion: AccordionInterface, item: AccordionItem) => void; + onClose?: (accordion: AccordionInterface, item: AccordionItem) => void; + onToggle?: (accordion: AccordionInterface, item: AccordionItem) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map new file mode 100644 index 0000000..c130ff7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3E,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.js b/node_modules/flowbite/lib/cjs/components/accordion/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.js.map b/node_modules/flowbite/lib/cjs/components/accordion/types.js.map new file mode 100644 index 0000000..e0f0c46 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts new file mode 100644 index 0000000..0361e3e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts @@ -0,0 +1,54 @@ +import type { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +import { CarouselInterface } from './interface'; +declare class Carousel implements CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + constructor(items?: CarouselItem[], options?: CarouselOptions); + /** + * initialize carousel and items based on active one + */ + _init(): void; + getItem(position: number): CarouselItem; + /** + * Slide to the element based on id + * @param {*} position + */ + slideTo(position: number): void; + /** + * Based on the currently active item it will go to the next position + */ + next(): void; + /** + * Based on the currently active item it will go to the previous position + */ + prev(): void; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + _rotate(rotationItems: RotationItems): void; + /** + * Set an interval to cycle through the carousel items + */ + cycle(): void; + /** + * Clears the cycling interval + */ + pause(): void; + /** + * Get the currently active item + */ + _getActiveItem(): CarouselItem; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + _setActiveItem(item: CarouselItem): void; +} +export declare function initCarousels(): void; +export default Carousel; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map new file mode 100644 index 0000000..76e86e7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;gBAGtB,KAAK,GAAE,YAAY,EAAO,EAC1B,OAAO,GAAE,eAAyB;IAetC;;OAEG;IACH,KAAK;IAwBL,OAAO,CAAC,QAAQ,EAAE,MAAM;IAIxB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM;IAuBxB;;OAEG;IACH,IAAI;IAiBJ;;OAEG;IACH,IAAI;IAiBJ;;;OAGG;IACH,OAAO,CAAC,aAAa,EAAE,aAAa;IAqCpC;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,cAAc;IAId;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY;CAwBpC;AAED,wBAAgB,aAAa,SA0E5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.js b/node_modules/flowbite/lib/cjs/components/carousel/index.js new file mode 100644 index 0000000..db90e01 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.js @@ -0,0 +1,246 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCarousels = void 0; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var Carousel = /** @class */ (function () { + function Carousel(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._init(); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype._init = function () { + var _this = this; + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this._getActiveItem()) { + this.slideTo(this._getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this._getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this._getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.right.el.classList.add('translate-x-full', 'z-10'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype._getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel(items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports.default = Carousel; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.js.map b/node_modules/flowbite/lib/cjs/components/carousel/index.js.map new file mode 100644 index 0000000..9b08e6a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,IAAM,OAAO,GAAoB;IAC7B,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE;QACR,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,2BAA2B;QAC1C,eAAe,EACX,uEAAuE;KAC9E;IACD,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAQI,kBACI,KAA0B,EAC1B,OAAkC;QADlC,sBAAA,EAAA,UAA0B;QAC1B,wBAAA,EAAA,iBAAkC;QAElC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB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AG,WAAW,CAAC,aAAa,CAC5C,sBAAsB,CACzB,CAAC;QAEF,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;QAED,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AA1ED,sCA0EC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts new file mode 100644 index 0000000..edb6114 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts @@ -0,0 +1,20 @@ +import { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +export declare interface CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + _init(): void; + getItem(position: number): CarouselItem; + _getActiveItem(): CarouselItem; + _setActiveItem(item: CarouselItem): void; + slideTo(position: number): void; + next(): void; + prev(): void; + _rotate(rotationItems: RotationItems): void; + cycle(): void; + pause(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map new file mode 100644 index 0000000..423a855 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAE1B,KAAK,IAAI,IAAI,CAAC;IAEd,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;IAExC,cAAc,IAAI,YAAY,CAAC;IAC/B,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAEzC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5C,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.js b/node_modules/flowbite/lib/cjs/components/carousel/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map b/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map new file mode 100644 index 0000000..3c63595 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts new file mode 100644 index 0000000..8ae7d3d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts @@ -0,0 +1,27 @@ +import { CarouselInterface } from './interface'; +export declare type CarouselItem = { + position: number; + el: HTMLElement; +}; +export declare type IndicatorItem = { + position: number; + el: HTMLElement; +}; +export declare type RotationItems = { + left: CarouselItem; + middle: CarouselItem; + right: CarouselItem; +}; +export declare type CarouselOptions = { + defaultPosition?: number; + indicators?: { + items?: IndicatorItem[]; + activeClasses?: string; + inactiveClasses?: string; + }; + interval?: number; + onNext?: (carousel: CarouselInterface) => void; + onPrev?: (carousel: CarouselInterface) => void; + onChange?: (carousel: CarouselInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map new file mode 100644 index 0000000..8cb376d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.js b/node_modules/flowbite/lib/cjs/components/carousel/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.js.map b/node_modules/flowbite/lib/cjs/components/carousel/types.js.map new file mode 100644 index 0000000..72b8fbd --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts new file mode 100644 index 0000000..5e9ce95 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts @@ -0,0 +1,16 @@ +import type { CollapseOptions } from './types'; +import { CollapseInterface } from './interface'; +declare class Collapse implements CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: CollapseOptions); + _init(): void; + collapse(): void; + expand(): void; + toggle(): void; +} +export declare function initCollapses(): void; +export default Collapse; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map new file mode 100644 index 0000000..a530d7f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,eAAyB;IAStC,KAAK;IAgBL,QAAQ;IAWR,MAAM;IAWN,MAAM;CAST;AAED,wBAAgB,aAAa,SAmB5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.js b/node_modules/flowbite/lib/cjs/components/collapse/index.js new file mode 100644 index 0000000..2ff4a0d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.js @@ -0,0 +1,98 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCollapses = void 0; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Collapse.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._triggerEl.addEventListener('click', function () { + _this.toggle(); + }); + } + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + new Collapse($targetEl, $triggerEl); + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports.default = Collapse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.js.map b/node_modules/flowbite/lib/cjs/components/collapse/index.js.map new file mode 100644 index 0000000..d16391e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAoB;IAC7B,UAAU,EAAE,cAAO,CAAC;IACpB,QAAQ,EAAE,cAAO,CAAC;IAClB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAMI,kBACI,QAAmC,EACnC,SAAoC,EACpC,OAAkC;QAFlC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAkC;QAElC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,wBAAK,GAAL;QAAA,iBAcC;QAbG,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE;gBAC/C,IAAI,CAAC,QAAQ;oBACT,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC;aAChE;iBAAM;gBACH,2EAA2E;gBAC3E,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC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,sBAAsB,CAAC,CAAC;QACjE,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,CAC5B,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,wEAAoE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAnBD,sCAmBC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts new file mode 100644 index 0000000..326fc39 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts @@ -0,0 +1,12 @@ +import { CollapseOptions } from './types'; +export declare interface CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + _init(): void; + collapse(): void; + expand(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map new file mode 100644 index 0000000..cdf74c2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.js b/node_modules/flowbite/lib/cjs/components/collapse/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map b/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map new file mode 100644 index 0000000..b82a2f4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts new file mode 100644 index 0000000..3f3094e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts @@ -0,0 +1,7 @@ +import { CollapseInterface } from './interface'; +export declare type CollapseOptions = { + onCollapse?: (collapse: CollapseInterface) => void; + onExpand?: (collapse: CollapseInterface) => void; + onToggle?: (collapse: CollapseInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map new file mode 100644 index 0000000..ba058f8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.js b/node_modules/flowbite/lib/cjs/components/collapse/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.js.map b/node_modules/flowbite/lib/cjs/components/collapse/types.js.map new file mode 100644 index 0000000..c1e2361 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.d.ts b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts new file mode 100644 index 0000000..c333938 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts @@ -0,0 +1,23 @@ +import type { DialOptions, DialTriggerType } from './types'; +import { DialInterface } from './interface'; +declare class Dial implements DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + constructor(parentEl?: HTMLElement | null, triggerEl?: HTMLElement | null, targetEl?: HTMLElement | null, options?: DialOptions); + _init(): void; + hide(): void; + show(): void; + toggle(): void; + isHidden(): boolean; + isVisible(): boolean; + _getTriggerEventTypes(triggerType: DialTriggerType): { + showEvents: string[]; + hideEvents: string[]; + }; +} +export declare function initDials(): void; +export default Dial; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map new file mode 100644 index 0000000..1b1cd71 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,cAAM,IAAK,YAAW,aAAa;IAC/B,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,WAAqB;IAUlC,KAAK;IAuBL,IAAI;IAWJ,IAAI;IAWJ,MAAM;IAQN,QAAQ;IAIR,SAAS;IAIT,qBAAqB,CAAC,WAAW,EAAE,eAAe;;;;CAwBrD;AAED,wBAAgB,SAAS,SAgCxB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.js b/node_modules/flowbite/lib/cjs/components/dial/index.js new file mode 100644 index 0000000..7d78f95 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.js @@ -0,0 +1,142 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDials = void 0; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Dial.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }); + }); + } + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports.default = Dial; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.js.map b/node_modules/flowbite/lib/cjs/components/dial/index.js.map new file mode 100644 index 0000000..89a3d09 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAgB;IACzB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAOI,cACI,QAAmC,EACnC,SAAoC,EACpC,QAAmC,EACnC,O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AS,CAAC;CAChC;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts new file mode 100644 index 0000000..de0133b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts @@ -0,0 +1,16 @@ +import { DialOptions, DialTriggerEventTypes, DialTriggerType } from './types'; +export declare interface DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + _init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _getTriggerEventTypes(triggerType: DialTriggerType): DialTriggerEventTypes; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map new file mode 100644 index 0000000..cfa626e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE9E,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,qBAAqB,CAAC,WAAW,EAAE,eAAe,GAAG,qBAAqB,CAAC;CAC9E"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.js b/node_modules/flowbite/lib/cjs/components/dial/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.js.map b/node_modules/flowbite/lib/cjs/components/dial/interface.js.map new file mode 100644 index 0000000..83f6457 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.d.ts b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts new file mode 100644 index 0000000..2f4877c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts @@ -0,0 +1,13 @@ +import { DialInterface } from './interface'; +export declare type DialTriggerType = 'click' | 'hover' | 'none'; +export declare type DialTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DialOptions = { + triggerType?: DialTriggerType; + onShow?: (dial: DialInterface) => void; + onHide?: (dial: DialInterface) => void; + onToggle?: (dial: DialInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map new file mode 100644 index 0000000..da04793 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.js b/node_modules/flowbite/lib/cjs/components/dial/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.js.map b/node_modules/flowbite/lib/cjs/components/dial/types.js.map new file mode 100644 index 0000000..0613f16 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts new file mode 100644 index 0000000..ac75c1d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts @@ -0,0 +1,13 @@ +import type { DismissOptions } from './types'; +import { DismissInterface } from './interface'; +declare class Dismiss implements DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: DismissOptions); + _init(): void; + hide(): void; +} +export declare function initDismisses(): void; +export default Dismiss; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map new file mode 100644 index 0000000..5df9d15 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAS/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;gBAGrB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAQrC,KAAK;IAQL,IAAI;CAcP;AAED,wBAAgB,aAAa,SAa5B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.js b/node_modules/flowbite/lib/cjs/components/dismiss/index.js new file mode 100644 index 0000000..eb71eb9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.js @@ -0,0 +1,68 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDismisses = void 0; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Dismiss.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + this._triggerEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports.default = Dismiss; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map new file mode 100644 index 0000000..080b679 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAmB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE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Q,GAAG,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;QAChE,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,UAAU,EAAE;YACZ,IAAI,OAAO,CAAC,UAAyB,EAAE,UAAyB,CAAC,CAAC;SACrE;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,QAAQ,uEAAmE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sCAaC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts new file mode 100644 index 0000000..e9b8f51 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts @@ -0,0 +1,9 @@ +import { DismissOptions } from './types'; +export declare interface DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + _init(): void; + hide(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map new file mode 100644 index 0000000..c9c3828 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IAEzB,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;CAChB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.js b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map new file mode 100644 index 0000000..6b664d5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts new file mode 100644 index 0000000..c659c00 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts @@ -0,0 +1,8 @@ +import { DismissInterface } from './interface'; +export declare type DismissOptions = { + transition?: string; + duration?: number; + timing?: string; + onHide?: (dismiss: DismissInterface, targetEl: HTMLElement) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map new file mode 100644 index 0000000..2ccb43e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACvE,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.js b/node_modules/flowbite/lib/cjs/components/dismiss/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map new file mode 100644 index 0000000..8ceeeb5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts new file mode 100644 index 0000000..eecffb5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts @@ -0,0 +1,21 @@ +import type { DrawerOptions, PlacementClasses } from './types'; +import { DrawerInterface } from './interface'; +declare class Drawer implements DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, options?: DrawerOptions); + _init(): void; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + isHidden(): boolean; + isVisible(): boolean; +} +export declare function initDrawers(): void; +export default Drawer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map new file mode 100644 index 0000000..9776f54 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAe9C,cAAM,MAAO,YAAW,eAAe;IACnC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,aAAuB;IAQpC,KAAK;IAwBL,IAAI;IA+CJ,IAAI;IA8CJ,MAAM;IAQN,eAAe;IAcf,kBAAkB;IAMlB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAyCzD,QAAQ;IAIR,SAAS;CAGZ;AAQD,wBAAgB,WAAW,SA+H1B;AAOD,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.js b/node_modules/flowbite/lib/cjs/components/drawer/index.js new file mode 100644 index 0000000..e57682d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.js @@ -0,0 +1,314 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDrawers = void 0; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Drawer.prototype._init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + } + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + // add keyboard event listener to document + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + return Drawer; +}()); +var getDrawerInstance = function (id, instances) { + if (instances.some(function (drawerInstance) { return drawerInstance.id === id; })) { + return instances.find(function (drawerInstance) { return drawerInstance.id === id; }); + } +}; +function initDrawers() { + var drawerInstances = []; + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + // optional + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + if (!getDrawerInstance(drawerId, drawerInstances)) { + drawerInstances.push({ + id: drawerId, + object: new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge + ? edge === 'true' + ? true + : false + : Default.edge, + edgeOffset: edgeOffset + ? edgeOffset + : Default.edgeOffset, + }), + }); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_1) { + $triggerEl.addEventListener('click', function () { + drawer_1.object.toggle(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_2) { + $triggerEl.addEventListener('click', function () { + drawer_2.object.hide(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_3) { + $triggerEl.addEventListener('click', function () { + drawer_3.object.show(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports.default = Drawer; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.js.map b/node_modules/flowbite/lib/cjs/components/drawer/index.js.map new file mode 100644 index 0000000..14dfd5f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":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FAAyF,CACtH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,mGAAgG,CAC7H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;IAEP,QAAQ,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;QAC/D,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QAC7D,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,SAAS,EAAE;YACX,IAAM,QAAM,GAAG,iBAAiB,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;YAE5D,IAAI,QAAM,EAAE;gBACR,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE;oBACjC,QAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACzB,CAAC,CAAC,CAAC;aACN;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,4FAAyF,CACtH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,oGAAiG,CAC9H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AA/HD,kCA+HC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;CACpC;AAED,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts new file mode 100644 index 0000000..a69c8f1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts @@ -0,0 +1,17 @@ +import { DrawerOptions, PlacementClasses } from './types'; +export declare interface DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + _init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map new file mode 100644 index 0000000..367b357 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,eAAe;IAEpC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAGlB,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,eAAe,IAAI,IAAI,CAAC;IACxB,kBAAkB,IAAI,IAAI,CAAC;IAC3B,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC7D"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.js b/node_modules/flowbite/lib/cjs/components/drawer/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map b/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map new file mode 100644 index 0000000..91cef96 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts new file mode 100644 index 0000000..abc766f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts @@ -0,0 +1,22 @@ +import { DrawerInterface } from './interface'; +export declare type DrawerOptions = { + placement?: string; + bodyScrolling?: boolean; + backdrop?: boolean; + edge?: boolean; + edgeOffset?: string; + backdropClasses?: string; + onShow?: (drawer: DrawerInterface) => void; + onHide?: (drawer: DrawerInterface) => void; + onToggle?: (drawer: DrawerInterface) => void; +}; +export declare type PlacementClasses = { + base: string[]; + active: string[]; + inactive: string[]; +}; +export declare type DrawerInstance = { + id: string; + object: DrawerInterface; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map new file mode 100644 index 0000000..ee84e44 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,eAAe,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.js b/node_modules/flowbite/lib/cjs/components/drawer/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.js.map b/node_modules/flowbite/lib/cjs/components/drawer/types.js.map new file mode 100644 index 0000000..b9d5343 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts new file mode 100644 index 0000000..d0efbf5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts @@ -0,0 +1,29 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { DropdownOptions } from './types'; +import { DropdownInterface } from './interface'; +declare class Dropdown implements DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + constructor(targetElement?: HTMLElement | null, triggerElement?: HTMLElement | null, options?: DropdownOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + toggle(): void; + isVisible(): boolean; + show(): void; + hide(): void; +} +export declare function initDropdowns(): void; +export default Dropdown; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map new file mode 100644 index 0000000..51a311c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAchD,cAAM,QAAS,YAAW,iBAAiB;IACvC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;gBAG3D,aAAa,GAAE,WAAW,GAAG,IAAW,EACxC,cAAc,GAAE,WAAW,GAAG,IAAW,EACzC,OAAO,GAAE,eAAyB;IAUtC,KAAK;IAML,oBAAoB;IA+CpB,qBAAqB;IAiBrB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IA+BpD,iBAAiB;;;;IAyBjB,MAAM;IASN,SAAS;IAIT,IAAI;IAuBJ,IAAI;CAoBP;AAED,wBAAgB,aAAa,SAmD5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.js b/node_modules/flowbite/lib/cjs/components/dropdown/index.js new file mode 100644 index 0000000..1278c0c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.js @@ -0,0 +1,254 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Dropdown.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.toggle(); + }); + }); + } + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + if (ev === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports.default = Dropdown; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map new file mode 100644 index 0000000..e52532f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,uCAA8C;AAQ9C,IAAM,OAAO,GAAoB;IAC7B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,OAAO;IACpB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;IAClB,KAAK,EAAE,GAAG;IACV,uBAAuB,EAAE,KAAK;IAC9B,MAAM,EAAE,cAAO,CAA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C;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts new file mode 100644 index 0000000..95a1241 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts @@ -0,0 +1,22 @@ +import { DropdownOptions, DropdownTriggerType, DropdownTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _init(): void; + _createPopperInstance(): PopperInstance; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: DropdownTriggerType): DropdownTriggerEventTypes; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map new file mode 100644 index 0000000..eef9c76 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,KAAK,IAAI,IAAI,CAAC;IACd,qBAAqB,IAAI,cAAc,CAAC;IACxC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,mBAAmB,GACjC,yBAAyB,CAAC;IAC7B,SAAS,IAAI,OAAO,CAAC;IACrB,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;CAChB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.js b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map new file mode 100644 index 0000000..d4c8eb1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts new file mode 100644 index 0000000..47c79fb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts @@ -0,0 +1,19 @@ +import { DropdownInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type DropdownTriggerType = 'click' | 'hover' | 'none'; +export declare type DropdownTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DropdownOptions = { + placement?: Placement; + triggerType?: DropdownTriggerType; + offsetSkidding?: number; + offsetDistance?: number; + ignoreClickOutsideClass?: string | boolean; + delay?: number; + onShow?: (tooltip: DropdownInterface) => void; + onHide?: (tooltip: DropdownInterface) => void; + onToggle?: (tooltip: DropdownInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map new file mode 100644 index 0000000..f74ca43 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAErE,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG;IAC5C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.js b/node_modules/flowbite/lib/cjs/components/dropdown/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map new file mode 100644 index 0000000..de3d7a3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.d.ts b/node_modules/flowbite/lib/cjs/components/index.d.ts new file mode 100644 index 0000000..3d22df6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.d.ts @@ -0,0 +1,2 @@ +export declare function initFlowbite(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/index.d.ts.map new file mode 100644 index 0000000..69c6ef6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAYA,wBAAgB,YAAY,SAY3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.js b/node_modules/flowbite/lib/cjs/components/index.js new file mode 100644 index 0000000..b099106 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initFlowbite = void 0; +var accordion_1 = require("./accordion"); +var carousel_1 = require("./carousel"); +var collapse_1 = require("./collapse"); +var dial_1 = require("./dial"); +var dismiss_1 = require("./dismiss"); +var drawer_1 = require("./drawer"); +var dropdown_1 = require("./dropdown"); +var modal_1 = require("./modal"); +var popover_1 = require("./popover"); +var tabs_1 = require("./tabs"); +var tooltip_1 = require("./tooltip"); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.js.map b/node_modules/flowbite/lib/cjs/components/index.js.map new file mode 100644 index 0000000..2d35df4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAC7C,uCAA2C;AAC3C,uCAA2C;AAC3C,+BAAmC;AACnC,qCAA0C;AAC1C,mCAAuC;AACvC,uCAA2C;AAC3C,iCAAqC;AACrC,qCAAyC;AACzC,+BAAkC;AAClC,qCAAyC;AAEzC,SAAgB,YAAY;IACxB,IAAA,0BAAc,GAAE,CAAC;IACjB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,uBAAa,GAAE,CAAC;IAChB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,kBAAU,GAAE,CAAC;IACb,IAAA,oBAAW,GAAE,CAAC;IACd,IAAA,eAAQ,GAAE,CAAC;IACX,IAAA,sBAAY,GAAE,CAAC;IACf,IAAA,sBAAY,GAAE,CAAC;IACf,IAAA,gBAAS,GAAE,CAAC;AAChB,CAAC;AAZD,oCAYC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.d.ts b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts new file mode 100644 index 0000000..be91df7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts @@ -0,0 +1,26 @@ +import type { ModalOptions } from './types'; +import { ModalInterface } from './interface'; +declare class Modal implements ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, options?: ModalOptions); + _init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _removeModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isVisible(): boolean; + isHidden(): boolean; +} +export declare function initModals(): void; +export default Modal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map new file mode 100644 index 0000000..8c64578 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAa7C,cAAM,KAAM,YAAW,cAAc;IACjC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;gBAGtD,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,YAAsB;IASnC,KAAK;IAQL,eAAe;IAYf,kBAAkB;IAMlB,8BAA8B;IAwB9B,+BAA+B;IAe/B,mBAAmB,CAAC,MAAM,EAAE,WAAW;IASvC,oBAAoB;IA+BpB,MAAM;IAWN,IAAI;IAuBJ,IAAI;IAsBJ,SAAS;IAIT,QAAQ;CAGX;AASD,wBAAgB,UAAU,SAgIzB;AAOD,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.js b/node_modules/flowbite/lib/cjs/components/modal/index.js new file mode 100644 index 0000000..b4e98f0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.js @@ -0,0 +1,274 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initModals = void 0; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._init(); + } + Modal.prototype._init = function () { + var _this = this; + if (this._targetEl) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + } + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('modal-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden) { + document.querySelector('[modal-backdrop]').remove(); + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + return Modal; +}()); +var getModalInstance = function (id, instances) { + if (instances.some(function (modalInstance) { return modalInstance.id === id; })) { + return instances.find(function (modalInstance) { return modalInstance.id === id; }); + } + return null; +}; +function initModals() { + var modalInstances = []; + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + if (!getModalInstance(modalId, modalInstances)) { + modalInstances.push({ + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // support pre v1.6.0 data-modal-toggle initialization + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + var modal_1 = getModalInstance(modalId, modalInstances); + if (!modal_1) { + modal_1 = { + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }; + modalInstances.push(modal_1); + } + $triggerEl.addEventListener('click', function () { + modal_1.object.toggle(); + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = getModalInstance(modalId, modalInstances); + if (modal_2) { + $triggerEl.addEventListener('click', function () { + if (modal_2.object.isHidden) { + modal_2.object.show(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = getModalInstance(modalId, modalInstances); + if (modal_3) { + $triggerEl.addEventListener('click', function () { + if (modal_3.object.isVisible) { + modal_3.object.hide(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports.default = Modal; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.js.map b/node_modules/flowbite/lib/cjs/components/modal/index.js.map new file mode 100644 index 0000000..716af94 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAiB;IAC1B,SAAS,EAAE,QAAQ;IACnB,eAAe,EACX,iEAAiE;IACrE,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAQI,eACI,QAAmC,EACnC,OAA+B;QAD/B,yBAAA,EAAA,eAAmC;QACnC,wBAAA,EAAA,iBAA+B;QAE/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,qBAAK,GAAL;QAAA,iBAMC;QALG,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,UAAC,CAAC;gBAC9B,KAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAED,+BAAe,GAAf;;QACI,IAAI,IAAI,CAAC,SAAS,EAAE;Y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AC7H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;IAEH,4CAA4C;IAC5C,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;QAC9D,IAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAC3D,IAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAElD,IAAI,QAAQ,EAAE;YACV,IAAM,OAAK,GAAkB,gBAAgB,CACzC,OAAO,EACP,cAAc,CACjB,CAAC;YAEF,IAAI,OAAK,EAAE;gBACP,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE;oBACjC,IAAI,OAAK,CAAC,MAAM,CAAC,SAAS,EAAE;wBACxB,OAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;qBACvB;gBACL,CAAC,CAAC,CAAC;aACN;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,2FAAwF,CACnH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,qGAAkG,CAC7H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAhID,gCAgIC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;CAClC;AAED,kBAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts new file mode 100644 index 0000000..2df722b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts @@ -0,0 +1,21 @@ +import { ModalOptions } from './types'; +export declare interface ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isHidden(): boolean; + isVisible(): boolean; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map new file mode 100644 index 0000000..6fa46f7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,cAAc;IAEnC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAG9B,QAAQ,EAAE,YAAY,CAAC;IAGvB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEhC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,qBAAqB,EAAE,kCAAkC,CAAC;IAG1D,KAAK,IAAI,IAAI,CAAC;IAGd,eAAe,IAAI,IAAI,CAAC;IAGxB,kBAAkB,IAAI,IAAI,CAAC;IAG3B,8BAA8B,IAAI,IAAI,CAAC;IAGvC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAG/C,oBAAoB,IAAI,MAAM,EAAE,CAAC;IAGjC,MAAM,IAAI,IAAI,CAAC;IAGf,IAAI,IAAI,IAAI,CAAC;IAGb,IAAI,IAAI,IAAI,CAAC;IAGb,QAAQ,IAAI,OAAO,CAAC;IAGpB,SAAS,IAAI,OAAO,CAAC;CACxB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.js b/node_modules/flowbite/lib/cjs/components/modal/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.js.map b/node_modules/flowbite/lib/cjs/components/modal/interface.js.map new file mode 100644 index 0000000..5de1079 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.d.ts b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts new file mode 100644 index 0000000..5dccfb1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts @@ -0,0 +1,17 @@ +import { ModalInterface } from './interface'; +export declare type modalBackdrop = 'static' | 'dynamic'; +export declare type modalPlacement = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; +export declare type ModalOptions = { + placement?: modalPlacement; + backdropClasses?: string; + backdrop?: modalBackdrop; + closable?: boolean; + onShow?: (modal: ModalInterface) => void; + onHide?: (modal: ModalInterface) => void; + onToggle?: (modal: ModalInterface) => void; +}; +export declare type ModalInstance = { + id: string; + object: ModalInterface; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map new file mode 100644 index 0000000..2754732 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzD,MAAM,CAAC,OAAO,MAAM,cAAc,GAC5B,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,QAAQ,GACR,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,cAAc,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.js b/node_modules/flowbite/lib/cjs/components/modal/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.js.map b/node_modules/flowbite/lib/cjs/components/modal/types.js.map new file mode 100644 index 0000000..e049979 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.d.ts b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts new file mode 100644 index 0000000..33732b6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts @@ -0,0 +1,32 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { PopoverOptions } from './types'; +import { PopoverInterface } from './interface'; +declare class Popover implements PopoverInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: PopoverOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +export declare function initPopovers(): void; +export default Popover; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map new file mode 100644 index 0000000..67e916e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAW/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAUrC,KAAK;IAML,oBAAoB;IA6BpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IASN,IAAI;IA6BJ,IAAI;CAyBP;AAED,wBAAgB,YAAY,SA2B3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.js b/node_modules/flowbite/lib/cjs/components/popover/index.js new file mode 100644 index 0000000..fa0f48a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.js @@ -0,0 +1,222 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Popover.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports.default = Popover; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.js.map b/node_modules/flowbite/lib/cjs/components/popover/index.js.map new file mode 100644 index 0000000..54e2d46 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,uCAA8C;AAQ9C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IASI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC;QAFjC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QAEjC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE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tC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts new file mode 100644 index 0000000..851a5a9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts @@ -0,0 +1,22 @@ +import { PopoverOptions, PopoverTriggerType, PopoverTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface PopoverInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: PopoverTriggerType): PopoverTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map new file mode 100644 index 0000000..8527eea --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.js b/node_modules/flowbite/lib/cjs/components/popover/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.js.map b/node_modules/flowbite/lib/cjs/components/popover/interface.js.map new file mode 100644 index 0000000..495553d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.d.ts b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts new file mode 100644 index 0000000..1b8512f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts @@ -0,0 +1,16 @@ +import { PopoverInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type PopoverTriggerType = 'click' | 'hover' | 'none'; +export declare type PopoverTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type PopoverOptions = { + placement?: Placement; + offset?: number; + triggerType?: PopoverTriggerType; + onShow?: (tooltip: PopoverInterface) => void; + onHide?: (tooltip: PopoverInterface) => void; + onToggle?: (tooltip: PopoverInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map new file mode 100644 index 0000000..83d1cf6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.js b/node_modules/flowbite/lib/cjs/components/popover/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.js.map b/node_modules/flowbite/lib/cjs/components/popover/types.js.map new file mode 100644 index 0000000..8f2e0e4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts new file mode 100644 index 0000000..fd62e63 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts @@ -0,0 +1,16 @@ +import type { TabItem, TabsOptions } from './types'; +import { TabsInterface } from './interface'; +declare class Tabs implements TabsInterface { + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + constructor(items?: TabItem[], options?: TabsOptions); + _init(): void; + getActiveTab(): TabItem; + _setActiveTab(tab: TabItem): void; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; +} +export declare function initTabs(): void; +export default Tabs; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map new file mode 100644 index 0000000..bafbd71 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAW5C,cAAM,IAAK,YAAW,aAAa;IAC/B,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;gBAEV,KAAK,GAAE,OAAO,EAAO,EAAE,OAAO,GAAE,WAAqB;IAOjE,KAAK;IAmBL,YAAY;IAIZ,aAAa,CAAC,GAAG,EAAE,OAAO;IAI1B,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ;CAmCrC;AAED,wBAAgB,QAAQ,SA0BvB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.js b/node_modules/flowbite/lib/cjs/components/tabs/index.js new file mode 100644 index 0000000..94c6a31 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.js @@ -0,0 +1,115 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initTabs = void 0; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var Tabs = /** @class */ (function () { + function Tabs(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Tabs.prototype._init = function () { + var _this = this; + if (this._items.length) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this._setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function () { + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype._setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this._setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($triggerEl) { + var tabItems = []; + var defaultTabId = null; + $triggerEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs(tabItems, { + defaultTabId: defaultTabId, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports.default = Tabs; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.js.map b/node_modules/flowbite/lib/cjs/components/tabs/index.js.map new file mode 100644 index 0000000..ddb8dff --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,IAAM,OAAO,GAAgB;IACzB,YAAY,EAAE,IAAI;IAClB,aAAa,EACT,oHAAoH;IACxH,eAAe,EACX,kKAAkK;IACtK,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF;IAKI,cAAY,KAAqB,EAAE,OAA8B;QAArD,sBAAA,EAAA,UAAqB;QAAE,wBAAA,EAAA,iBAA8B;QAC7D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACrE,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,oBAAK,GAAL;QAAA,iBAiBC;QAhBG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACpB,uDAAuD;YACvD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAClB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;aACtC;YAED,mCAAmC;YACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;Y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,UAAU;gBACrB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAC5B,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAC9C;aACJ,CAAC;YACF,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAEnB,IAAI,QAAQ,EAAE;gBACV,YAAY,GAAG,GAAG,CAAC,EAAE,CAAC;aACzB;QACL,CAAC,CAAC,CAAC;QACP,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,YAAY,EAAE,YAAY;SACd,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACP,CAAC;AA1BD,4BA0BC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAC9B;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts new file mode 100644 index 0000000..9e07566 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts @@ -0,0 +1,12 @@ +import { TabItem, TabsOptions } from './types'; +export declare interface TabsInterface { + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + _init(): void; + _setActiveTab(tab: TabItem): void; + getActiveTab(): TabItem; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map new file mode 100644 index 0000000..3cd72bd --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IAEtB,KAAK,IAAI,IAAI,CAAC;IACd,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/C"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.js b/node_modules/flowbite/lib/cjs/components/tabs/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map b/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map new file mode 100644 index 0000000..6fc7bb2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts new file mode 100644 index 0000000..342be0d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts @@ -0,0 +1,13 @@ +import { TabsInterface } from './interface'; +export declare type TabsOptions = { + defaultTabId?: string; + activeClasses?: string; + inactiveClasses?: string; + onShow?: (tabs: TabsInterface, tab: TabItem) => void; +}; +export declare type TabItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map new file mode 100644 index 0000000..da457a9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.js b/node_modules/flowbite/lib/cjs/components/tabs/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.js.map b/node_modules/flowbite/lib/cjs/components/tabs/types.js.map new file mode 100644 index 0000000..a4a4aff --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts new file mode 100644 index 0000000..041a7da --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts @@ -0,0 +1,32 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { TooltipOptions } from './types'; +import { TooltipInterface } from './interface'; +declare class Tooltip implements TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: TooltipOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +export declare function initTooltips(): void; +export default Tooltip; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map new file mode 100644 index 0000000..fc88084 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAUrC,KAAK;IAML,oBAAoB;IAcpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IAQN,IAAI;IA6BJ,IAAI;CAyBP;AAED,wBAAgB,YAAY,SAyB3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.js b/node_modules/flowbite/lib/cjs/components/tooltip/index.js new file mode 100644 index 0000000..9371df2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.js @@ -0,0 +1,204 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Tooltip.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.hide(); + }); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports.default = Tooltip; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map new file mode 100644 index 0000000..7cc12c6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,uCAA8C;AAQ9C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IASI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC;QAFjC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QAEjC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;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AAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;aACV,CACtB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,SAAS,uEAAmE,CAC/G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAzBD,oCAyBC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts new file mode 100644 index 0000000..f081b33 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts @@ -0,0 +1,23 @@ +import { TooltipOptions, TooltipTriggerType, TooltipTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: TooltipTriggerType): TooltipTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map new file mode 100644 index 0000000..b395e6b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,KAAK,IAAI,IAAI,CAAC;IACd,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.js b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map new file mode 100644 index 0000000..8a5f072 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts new file mode 100644 index 0000000..1ba5bb3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts @@ -0,0 +1,15 @@ +import { TooltipInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type TooltipTriggerType = 'click' | 'hover' | 'none'; +export declare type TooltipTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type TooltipOptions = { + placement?: Placement; + triggerType?: TooltipTriggerType; + onShow?: (tooltip: TooltipInterface) => void; + onHide?: (tooltip: TooltipInterface) => void; + onToggle?: (tooltip: TooltipInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map new file mode 100644 index 0000000..048bf1d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.js b/node_modules/flowbite/lib/cjs/components/tooltip/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map new file mode 100644 index 0000000..cd09cf9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.d.ts b/node_modules/flowbite/lib/cjs/config/global.d.ts new file mode 100644 index 0000000..8937b76 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.d.ts @@ -0,0 +1,39 @@ +import Accordion from '../components/accordion'; +import Carousel from '../components/carousel'; +import Collapse from '../components/collapse'; +import Dial from '../components/dial'; +import Dismiss from '../components/dismiss'; +import Drawer from '../components/drawer'; +import Dropdown from '../components/dropdown'; +import Modal from '../components/modal'; +import Popover from '../components/popover'; +import Tabs from '../components/tabs'; +import Tooltip from '../components/tooltip'; +declare global { + interface Window { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Dismiss: typeof Dismiss; + Drawer: typeof Drawer; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + initAccordions: () => void; + initCarousels: () => void; + initCollapses: () => void; + initDials: () => void; + initDismisses: () => void; + initDrawers: () => void; + initDropdowns: () => void; + initModals: () => void; + initPopovers: () => void; + initTabs: () => void; + initTooltips: () => void; + initFlowbite: () => void; + } +} +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.d.ts.map b/node_modules/flowbite/lib/cjs/config/global.d.ts.map new file mode 100644 index 0000000..b57ae87 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,OAAO,SAAS,CAAC;QAC5B,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,KAAK,EAAE,OAAO,KAAK,CAAC;QACpB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,cAAc,EAAE,MAAM,IAAI,CAAC;QAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;QACtB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;QACxB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;QACrB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,YAAY,EAAE,MAAM,IAAI,CAAC;KAC5B;CACJ"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.js b/node_modules/flowbite/lib/cjs/config/global.js new file mode 100644 index 0000000..74429bb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.js.map b/node_modules/flowbite/lib/cjs/config/global.js.map new file mode 100644 index 0000000..52ccc1e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.d.ts b/node_modules/flowbite/lib/cjs/dom/events.d.ts new file mode 100644 index 0000000..3bbb83b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.d.ts @@ -0,0 +1,8 @@ +declare class Events { + private _eventType; + private _eventFunctions; + constructor(eventType: string, eventFunctions?: EventListener[]); + init(): void; +} +export default Events; +//# sourceMappingURL=events.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.d.ts.map b/node_modules/flowbite/lib/cjs/dom/events.d.ts.map new file mode 100644 index 0000000..de90c16 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA,cAAM,MAAM;IACR,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,SAAS,EAAE,MAAM,EAAE,cAAc,GAAE,aAAa,EAAO;IAKnE,IAAI;CAOP;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.js b/node_modules/flowbite/lib/cjs/dom/events.js new file mode 100644 index 0000000..3d7d94c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports.default = Events; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.js.map b/node_modules/flowbite/lib/cjs/dom/events.js.map new file mode 100644 index 0000000..369511c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.js.map @@ -0,0 +1 @@ +{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":";;AAAA;IAII,gBAAY,SAAiB,EAAE,cAAoC;QAApC,+BAAA,EAAA,mBAAoC;QAC/D,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAED,qBAAI,GAAJ;QAAA,iBAMC;QALG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAC,aAAa;YACvC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBAC/B,MAAM,CAAC,gBAAgB,CAAC,KAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;aAC3D;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,aAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.d.ts b/node_modules/flowbite/lib/cjs/index.d.ts new file mode 100644 index 0000000..5660236 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.d.ts @@ -0,0 +1,47 @@ +import './components/index'; +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.d.ts.map b/node_modules/flowbite/lib/cjs/index.d.ts.map new file mode 100644 index 0000000..8997bca --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,oBAAoB,CAAC;AAmB5B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AA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;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.js b/node_modules/flowbite/lib/cjs/index.js new file mode 100644 index 0000000..35c567d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.js @@ -0,0 +1,119 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initFlowbite = exports.initTooltips = exports.initTabs = exports.initPopovers = exports.initModals = exports.initDropdowns = exports.initDrawers = exports.initDismisses = exports.initDials = exports.initCollapses = exports.initCarousels = exports.initAccordions = exports.Tooltip = exports.Tabs = exports.Popover = exports.Modal = exports.Dropdown = exports.Drawer = exports.Dismiss = exports.Dial = exports.Collapse = exports.Carousel = exports.Accordion = void 0; +var events_1 = require("./dom/events"); +var accordion_1 = require("./components/accordion"); +var collapse_1 = require("./components/collapse"); +var carousel_1 = require("./components/carousel"); +var dismiss_1 = require("./components/dismiss"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var drawer_1 = require("./components/drawer"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +var popover_1 = require("./components/popover"); +var dial_1 = require("./components/dial"); +require("./components/index"); +// setup events for data attributes +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +events.init(); +// export all components +var accordion_2 = require("./components/accordion"); +Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_2.default; } }); +var carousel_2 = require("./components/carousel"); +Object.defineProperty(exports, "Carousel", { enumerable: true, get: function () { return carousel_2.default; } }); +var collapse_2 = require("./components/collapse"); +Object.defineProperty(exports, "Collapse", { enumerable: true, get: function () { return collapse_2.default; } }); +var dial_2 = require("./components/dial"); +Object.defineProperty(exports, "Dial", { enumerable: true, get: function () { return dial_2.default; } }); +var dismiss_2 = require("./components/dismiss"); +Object.defineProperty(exports, "Dismiss", { enumerable: true, get: function () { return dismiss_2.default; } }); +var drawer_2 = require("./components/drawer"); +Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_2.default; } }); +var dropdown_2 = require("./components/dropdown"); +Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return dropdown_2.default; } }); +var modal_2 = require("./components/modal"); +Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return modal_2.default; } }); +var popover_2 = require("./components/popover"); +Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_2.default; } }); +var tabs_2 = require("./components/tabs"); +Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return tabs_2.default; } }); +var tooltip_2 = require("./components/tooltip"); +Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return tooltip_2.default; } }); +// export all types +__exportStar(require("./components/accordion/types"), exports); +__exportStar(require("./components/carousel/types"), exports); +__exportStar(require("./components/collapse/types"), exports); +__exportStar(require("./components/dial/types"), exports); +__exportStar(require("./components/dismiss/types"), exports); +__exportStar(require("./components/drawer/types"), exports); +__exportStar(require("./components/dropdown/types"), exports); +__exportStar(require("./components/modal/types"), exports); +__exportStar(require("./components/popover/types"), exports); +__exportStar(require("./components/tabs/types"), exports); +__exportStar(require("./components/tooltip/types"), exports); +// export all interfaces +__exportStar(require("./components/accordion/interface"), exports); +__exportStar(require("./components/carousel/interface"), exports); +__exportStar(require("./components/collapse/interface"), exports); +__exportStar(require("./components/dial/interface"), exports); +__exportStar(require("./components/dismiss/interface"), exports); +__exportStar(require("./components/drawer/interface"), exports); +__exportStar(require("./components/dropdown/interface"), exports); +__exportStar(require("./components/modal/interface"), exports); +__exportStar(require("./components/popover/interface"), exports); +__exportStar(require("./components/tabs/interface"), exports); +__exportStar(require("./components/tooltip/interface"), exports); +// export init functions +var accordion_3 = require("./components/accordion"); +Object.defineProperty(exports, "initAccordions", { enumerable: true, get: function () { return accordion_3.initAccordions; } }); +var carousel_3 = require("./components/carousel"); +Object.defineProperty(exports, "initCarousels", { enumerable: true, get: function () { return carousel_3.initCarousels; } }); +var collapse_3 = require("./components/collapse"); +Object.defineProperty(exports, "initCollapses", { enumerable: true, get: function () { return collapse_3.initCollapses; } }); +var dial_3 = require("./components/dial"); +Object.defineProperty(exports, "initDials", { enumerable: true, get: function () { return dial_3.initDials; } }); +var dismiss_3 = require("./components/dismiss"); +Object.defineProperty(exports, "initDismisses", { enumerable: true, get: function () { return dismiss_3.initDismisses; } }); +var drawer_3 = require("./components/drawer"); +Object.defineProperty(exports, "initDrawers", { enumerable: true, get: function () { return drawer_3.initDrawers; } }); +var dropdown_3 = require("./components/dropdown"); +Object.defineProperty(exports, "initDropdowns", { enumerable: true, get: function () { return dropdown_3.initDropdowns; } }); +var modal_3 = require("./components/modal"); +Object.defineProperty(exports, "initModals", { enumerable: true, get: function () { return modal_3.initModals; } }); +var popover_3 = require("./components/popover"); +Object.defineProperty(exports, "initPopovers", { enumerable: true, get: function () { return popover_3.initPopovers; } }); +var tabs_3 = require("./components/tabs"); +Object.defineProperty(exports, "initTabs", { enumerable: true, get: function () { return tabs_3.initTabs; } }); +var tooltip_3 = require("./components/tooltip"); +Object.defineProperty(exports, "initTooltips", { enumerable: true, get: function () { return tooltip_3.initTooltips; } }); +// export all init functions +var index_1 = require("./components/index"); +Object.defineProperty(exports, "initFlowbite", { enumerable: true, get: function () { return index_1.initFlowbite; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.js.map b/node_modules/flowbite/lib/cjs/index.js.map new file mode 100644 index 0000000..fbee404 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAkC;AAClC,oDAAwD;AACxD,kDAAsD;AACtD,kDAAsD;AACtD,gDAAqD;AACrD,kDAAsD;AACtD,4CAAgD;AAChD,8CAAkD;AAClD,0CAA6C;AAC7C,gDAAoD;AACpD,gDAAoD;AACpD,0CAA8C;AAC9C,8BAA4B;AAE5B,mCAAmC;AACnC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,wBAAwB;AACxB,oDAA8D;AAArD,sGAAA,OAAO,OAAa;AAC7B,kDAA4D;AAAnD,oGAAA,OAAO,OAAY;AAC5B,kDAA4D;AAAnD,oGAAA,OAAO,OAAY;AAC5B,0CAAoD;AAA3C,4FAAA,OAAO,OAAQ;AACxB,gDAA0D;AAAjD,kGAAA,OAAO,OAAW;AAC3B,8CAAwD;AAA/C,gGAAA,OAAO,OAAU;AAC1B,kDAA4D;AAAnD,oGAAA,OAAO,OAAY;AAC5B,4CAAsD;AAA7C,8FAAA,OAAO,OAAS;AACzB,gDAA0D;AAAjD,kGAAA,OAAO,OAAW;AAC3B,0CAAoD;AAA3C,4FAAA,OAAO,OAAQ;AACxB,gDAA0D;AAAjD,kGAAA,OAAO,OAAW;AAE3B,mBAAmB;AACnB,+DAA6C;AAC7C,8DAA4C;AAC5C,8DAA4C;AAC5C,0DAAwC;AACxC,6DAA2C;AAC3C,4DAA0C;AAC1C,8DAA4C;AAC5C,2DAAyC;AACzC,6DAA2C;AAC3C,0DAAwC;AACxC,6DAA2C;AAE3C,wBAAwB;AACxB,mEAAiD;AACjD,kEAAgD;AAChD,kEAAgD;AAChD,8DAA4C;AAC5C,iEAA+C;AAC/C,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,8DAA4C;AAC5C,iEAA+C;AAE/C,wBAAwB;AACxB,oDAAwD;AAA/C,2GAAA,cAAc,OAAA;AACvB,kDAAsD;AAA7C,yGAAA,aAAa,OAAA;AACtB,kDAAsD;AAA7C,yGAAA,aAAa,OAAA;AACtB,0CAA8C;AAArC,iGAAA,SAAS,OAAA;AAClB,gDAAqD;AAA5C,wGAAA,aAAa,OAAA;AACtB,8CAAkD;AAAzC,qGAAA,WAAW,OAAA;AACpB,kDAAsD;AAA7C,yGAAA,aAAa,OAAA;AACtB,4CAAgD;AAAvC,mGAAA,UAAU,OAAA;AACnB,gDAAoD;AAA3C,uGAAA,YAAY,OAAA;AACrB,0CAA6C;AAApC,gGAAA,QAAQ,OAAA;AACjB,gDAAoD;AAA3C,uGAAA,YAAY,OAAA;AAErB,4BAA4B;AAC5B,4CAAkD;AAAzC,qGAAA,YAAY,OAAA"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.d.ts b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts new file mode 100644 index 0000000..9bec6d4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts @@ -0,0 +1,29 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.phoenix.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map new file mode 100644 index 0000000..0e05cf0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.d.ts","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAgClC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.js b/node_modules/flowbite/lib/cjs/index.phoenix.js new file mode 100644 index 0000000..4fcfed0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +require("./components/index"); +var events_1 = require("./dom/events"); +var liveViewLoadEvents = new events_1.default('phx:page-loading-stop', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +regularViewLoadEvents.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.js.map b/node_modules/flowbite/lib/cjs/index.phoenix.js.map new file mode 100644 index 0000000..ce03836 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.js","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":";;AAAA,kBAAkB;AAClB,oDAAmE;AACnE,kDAAgE;AAChE,kDAAgE;AAChE,0CAAoD;AACpD,gDAA8D;AAC9D,8CAA0D;AAC1D,kDAAgE;AAChE,4CAAuD;AACvD,gDAA6D;AAC7D,0CAAmD;AACnD,gDAA6D;AAC7D,8BAA4B;AAC5B,uCAAkC;AAElC,IAAM,kBAAkB,GAAG,IAAI,gBAAM,CAAC,uBAAuB,EAAE;IAC3D,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAE1B,IAAM,qBAAqB,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC7C,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.d.ts b/node_modules/flowbite/lib/cjs/index.turbo.d.ts new file mode 100644 index 0000000..413a593 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.d.ts @@ -0,0 +1,29 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.turbo.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map b/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map new file mode 100644 index 0000000..4b913c1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.d.ts","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAgClC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.js b/node_modules/flowbite/lib/cjs/index.turbo.js new file mode 100644 index 0000000..b55d5d7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +require("./components/index"); +var events_1 = require("./dom/events"); +var turboLoadEvents = new events_1.default('turbo:load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new events_1.default('turbo:frame-load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +turboFrameLoadEvents.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.js.map b/node_modules/flowbite/lib/cjs/index.turbo.js.map new file mode 100644 index 0000000..5bb7dff --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.js","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":";;AAAA,kBAAkB;AAClB,oDAAmE;AACnE,kDAAgE;AAChE,kDAAgE;AAChE,0CAAoD;AACpD,gDAA8D;AAC9D,8CAA0D;AAC1D,kDAAgE;AAChE,4CAAuD;AACvD,gDAA6D;AAC7D,0CAAmD;AACnD,gDAA6D;AAC7D,8BAA4B;AAC5B,uCAAkC;AAElC,IAAM,eAAe,GAAG,IAAI,gBAAM,CAAC,YAAY,EAAE;IAC7C,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,eAAe,CAAC,IAAI,EAAE,CAAC;AAEvB,IAAM,oBAAoB,GAAG,IAAI,gBAAM,CAAC,kBAAkB,EAAE;IACxD,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,oBAAoB,CAAC,IAAI,EAAE,CAAC;AAE5B,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.d.ts b/node_modules/flowbite/lib/cjs/index.umd.d.ts new file mode 100644 index 0000000..98f6048 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.d.ts @@ -0,0 +1,30 @@ +import './flowbite.css'; +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.umd.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.d.ts.map b/node_modules/flowbite/lib/cjs/index.umd.d.ts.map new file mode 100644 index 0000000..60b4ec2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.d.ts","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAGxB,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAiBlC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.js b/node_modules/flowbite/lib/cjs/index.umd.js new file mode 100644 index 0000000..a8352da --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +require("./flowbite.css"); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +require("./components/index"); +var events_1 = require("./dom/events"); +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, +]); +events.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.umd.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.js.map b/node_modules/flowbite/lib/cjs/index.umd.js.map new file mode 100644 index 0000000..f1c353a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":";;AAAA,0BAAwB;AAExB,kBAAkB;AAClB,oDAAmE;AACnE,kDAAgE;AAChE,kDAAgE;AAChE,0CAAoD;AACpD,gDAA8D;AAC9D,8CAA0D;AAC1D,kDAAgE;AAChE,4CAAuD;AACvD,gDAA6D;AAC7D,0CAAmD;AACnD,gDAA6D;AAC7D,8BAA4B;AAC5B,uCAAkC;AAElC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.d.ts b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts new file mode 100644 index 0000000..4ea151a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts @@ -0,0 +1,15 @@ +import type { AccordionItem, AccordionOptions } from './types'; +import { AccordionInterface } from './interface'; +declare class Accordion implements AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + constructor(items?: AccordionItem[], options?: AccordionOptions); + private _init; + getItem(id: string): AccordionItem; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; +} +export declare function initAccordions(): void; +export default Accordion; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map new file mode 100644 index 0000000..a7f1f0f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAWjD,cAAM,SAAU,YAAW,kBAAkB;IACzC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;gBAGvB,KAAK,GAAE,aAAa,EAAO,EAC3B,OAAO,GAAE,gBAA0B;IAOvC,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,IAAI,CAAC,EAAE,EAAE,MAAM;IA2Cf,MAAM,CAAC,EAAE,EAAE,MAAM;IAajB,KAAK,CAAC,EAAE,EAAE,MAAM;CAqBnB;AAED,wBAAgB,cAAc,SA2C7B;AAOD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.js b/node_modules/flowbite/lib/esm/components/accordion/index.js new file mode 100644 index 0000000..a82f735 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.js @@ -0,0 +1,147 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var Accordion = /** @class */ (function () { + function Accordion(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Accordion.prototype._init = function () { + var _this = this; + if (this._items.length) { + // show accordion item based on click + this._items.map(function (item) { + if (item.active) { + _this.open(item.id); + } + item.triggerEl.addEventListener('click', function () { + _this.toggle(item.id); + }); + }); + } + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.remove('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + return Accordion; +}()); +export function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion(items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +export default Accordion; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.js.map b/node_modules/flowbite/lib/esm/components/accordion/index.js.map new file mode 100644 index 0000000..2cd99c7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAqB;IAC9B,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,4DAA4D;IAC3E,eAAe,EAAE,kCAAkC;IACnD,MAAM,EAAE,cAAO,CAAC;I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AAC,OAAO,CAAC,aAAa;YAC3B,eAAe,EAAE,eAAe;gBAC5B,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,OAAO,CAAC,eAAe;SACZ,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;CAC1C;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts new file mode 100644 index 0000000..ebeacd9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts @@ -0,0 +1,10 @@ +import { AccordionItem, AccordionOptions } from './types'; +export declare interface AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + getItem(id: string): AccordionItem | undefined; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map new file mode 100644 index 0000000..cfc63e5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG1D,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACvC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.js b/node_modules/flowbite/lib/esm/components/accordion/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.js.map b/node_modules/flowbite/lib/esm/components/accordion/interface.js.map new file mode 100644 index 0000000..a7ef24a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.d.ts b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts new file mode 100644 index 0000000..c8fb43a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts @@ -0,0 +1,17 @@ +import { AccordionInterface } from './interface'; +export declare type AccordionItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; + iconEl?: HTMLElement | null; + active?: boolean; +}; +export declare type AccordionOptions = { + alwaysOpen?: boolean; + activeClasses?: string; + inactiveClasses?: string; + onOpen?: (accordion: AccordionInterface, item: AccordionItem) => void; + onClose?: (accordion: AccordionInterface, item: AccordionItem) => void; + onToggle?: (accordion: AccordionInterface, item: AccordionItem) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map new file mode 100644 index 0000000..c130ff7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3E,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.js b/node_modules/flowbite/lib/esm/components/accordion/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.js.map b/node_modules/flowbite/lib/esm/components/accordion/types.js.map new file mode 100644 index 0000000..e0f0c46 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.d.ts b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts new file mode 100644 index 0000000..0361e3e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts @@ -0,0 +1,54 @@ +import type { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +import { CarouselInterface } from './interface'; +declare class Carousel implements CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + constructor(items?: CarouselItem[], options?: CarouselOptions); + /** + * initialize carousel and items based on active one + */ + _init(): void; + getItem(position: number): CarouselItem; + /** + * Slide to the element based on id + * @param {*} position + */ + slideTo(position: number): void; + /** + * Based on the currently active item it will go to the next position + */ + next(): void; + /** + * Based on the currently active item it will go to the previous position + */ + prev(): void; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + _rotate(rotationItems: RotationItems): void; + /** + * Set an interval to cycle through the carousel items + */ + cycle(): void; + /** + * Clears the cycling interval + */ + pause(): void; + /** + * Get the currently active item + */ + _getActiveItem(): CarouselItem; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + _setActiveItem(item: CarouselItem): void; +} +export declare function initCarousels(): void; +export default Carousel; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map new file mode 100644 index 0000000..76e86e7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;gBAGtB,KAAK,GAAE,YAAY,EAAO,EAC1B,OAAO,GAAE,eAAyB;IAetC;;OAEG;IACH,KAAK;IAwBL,OAAO,CAAC,QAAQ,EAAE,MAAM;IAIxB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM;IAuBxB;;OAEG;IACH,IAAI;IAiBJ;;OAEG;IACH,IAAI;IAiBJ;;;OAGG;IACH,OAAO,CAAC,aAAa,EAAE,aAAa;IAqCpC;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,cAAc;IAId;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY;CAwBpC;AAED,wBAAgB,aAAa,SA0E5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.js b/node_modules/flowbite/lib/esm/components/carousel/index.js new file mode 100644 index 0000000..48181f2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.js @@ -0,0 +1,242 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var Carousel = /** @class */ (function () { + function Carousel(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._init(); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype._init = function () { + var _this = this; + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this._getActiveItem()) { + this.slideTo(this._getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this._getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this._getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.right.el.classList.add('translate-x-full', 'z-10'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype._getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + return Carousel; +}()); +export function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel(items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +export default Carousel; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.js.map b/node_modules/flowbite/lib/esm/components/carousel/index.js.map new file mode 100644 index 0000000..116a49d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":";;;;;;;;;;;AASA,IAAM,OAAO,GAAoB;IAC7B,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE;QACR,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,2BAA2B;QAC1C,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KAAK,EAAE,UAAU;aACpB;YACD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ;SAChC,CAAC,CAAC;QAEtB,IAAI,KAAK,EAAE;YACP,QAAQ,CAAC,KAAK,EAAE,CAAC;SACpB;QAED,qBAAqB;QACrB,IAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAC5C,sBAAsB,CACzB,CAAC;QACF,IAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAC5C,sBAAsB,CACzB,CAAC;QAEF,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;QAED,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts new file mode 100644 index 0000000..edb6114 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts @@ -0,0 +1,20 @@ +import { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +export declare interface CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + _init(): void; + getItem(position: number): CarouselItem; + _getActiveItem(): CarouselItem; + _setActiveItem(item: CarouselItem): void; + slideTo(position: number): void; + next(): void; + prev(): void; + _rotate(rotationItems: RotationItems): void; + cycle(): void; + pause(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map new file mode 100644 index 0000000..423a855 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAE1B,KAAK,IAAI,IAAI,CAAC;IAEd,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;IAExC,cAAc,IAAI,YAAY,CAAC;IAC/B,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAEzC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5C,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.js b/node_modules/flowbite/lib/esm/components/carousel/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.js.map b/node_modules/flowbite/lib/esm/components/carousel/interface.js.map new file mode 100644 index 0000000..3c63595 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.d.ts b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts new file mode 100644 index 0000000..8ae7d3d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts @@ -0,0 +1,27 @@ +import { CarouselInterface } from './interface'; +export declare type CarouselItem = { + position: number; + el: HTMLElement; +}; +export declare type IndicatorItem = { + position: number; + el: HTMLElement; +}; +export declare type RotationItems = { + left: CarouselItem; + middle: CarouselItem; + right: CarouselItem; +}; +export declare type CarouselOptions = { + defaultPosition?: number; + indicators?: { + items?: IndicatorItem[]; + activeClasses?: string; + inactiveClasses?: string; + }; + interval?: number; + onNext?: (carousel: CarouselInterface) => void; + onPrev?: (carousel: CarouselInterface) => void; + onChange?: (carousel: CarouselInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map new file mode 100644 index 0000000..8cb376d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.js b/node_modules/flowbite/lib/esm/components/carousel/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.js.map b/node_modules/flowbite/lib/esm/components/carousel/types.js.map new file mode 100644 index 0000000..72b8fbd --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.d.ts b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts new file mode 100644 index 0000000..5e9ce95 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts @@ -0,0 +1,16 @@ +import type { CollapseOptions } from './types'; +import { CollapseInterface } from './interface'; +declare class Collapse implements CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: CollapseOptions); + _init(): void; + collapse(): void; + expand(): void; + toggle(): void; +} +export declare function initCollapses(): void; +export default Collapse; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map new file mode 100644 index 0000000..a530d7f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,eAAyB;IAStC,KAAK;IAgBL,QAAQ;IAWR,MAAM;IAWN,MAAM;CAST;AAED,wBAAgB,aAAa,SAmB5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.js b/node_modules/flowbite/lib/esm/components/collapse/index.js new file mode 100644 index 0000000..873e5ce --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.js @@ -0,0 +1,94 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Collapse.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._triggerEl.addEventListener('click', function () { + _this.toggle(); + }); + } + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + return Collapse; +}()); +export function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + new Collapse($targetEl, $triggerEl); + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +export default Collapse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.js.map b/node_modules/flowbite/lib/esm/components/collapse/index.js.map new file mode 100644 index 0000000..62f86e4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAoB;IAC7B,UAAU,EAAE,cAAO,CAAC;IACpB,QAAQ,EAAE,cAAO,CAAC;IAClB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAMI,kBACI,QAAmC,EACnC,SAAoC,EACpC,OAAkC;QAFlC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAkC;QAElC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,wBAAK,GAAL;QAAA,iBAcC;QAbG,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE;gBAC/C,IAAI,CAAC,QAAQ;oBACT,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC;aAChE;iBAAM;gBACH,2EAA2E;gBAC3E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AAC,wBAAwB,CAAC;SAC1C,OAAO,CAAC,UAAC,UAAU;QAChB,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACjE,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,CAC5B,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,wEAAoE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts new file mode 100644 index 0000000..326fc39 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts @@ -0,0 +1,12 @@ +import { CollapseOptions } from './types'; +export declare interface CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + _init(): void; + collapse(): void; + expand(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map new file mode 100644 index 0000000..cdf74c2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.js b/node_modules/flowbite/lib/esm/components/collapse/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.js.map b/node_modules/flowbite/lib/esm/components/collapse/interface.js.map new file mode 100644 index 0000000..b82a2f4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.d.ts b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts new file mode 100644 index 0000000..3f3094e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts @@ -0,0 +1,7 @@ +import { CollapseInterface } from './interface'; +export declare type CollapseOptions = { + onCollapse?: (collapse: CollapseInterface) => void; + onExpand?: (collapse: CollapseInterface) => void; + onToggle?: (collapse: CollapseInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map new file mode 100644 index 0000000..ba058f8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.js b/node_modules/flowbite/lib/esm/components/collapse/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.js.map b/node_modules/flowbite/lib/esm/components/collapse/types.js.map new file mode 100644 index 0000000..c1e2361 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.d.ts b/node_modules/flowbite/lib/esm/components/dial/index.d.ts new file mode 100644 index 0000000..c333938 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.d.ts @@ -0,0 +1,23 @@ +import type { DialOptions, DialTriggerType } from './types'; +import { DialInterface } from './interface'; +declare class Dial implements DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + constructor(parentEl?: HTMLElement | null, triggerEl?: HTMLElement | null, targetEl?: HTMLElement | null, options?: DialOptions); + _init(): void; + hide(): void; + show(): void; + toggle(): void; + isHidden(): boolean; + isVisible(): boolean; + _getTriggerEventTypes(triggerType: DialTriggerType): { + showEvents: string[]; + hideEvents: string[]; + }; +} +export declare function initDials(): void; +export default Dial; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map new file mode 100644 index 0000000..1b1cd71 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,cAAM,IAAK,YAAW,aAAa;IAC/B,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,WAAqB;IAUlC,KAAK;IAuBL,IAAI;IAWJ,IAAI;IAWJ,MAAM;IAQN,QAAQ;IAIR,SAAS;IAIT,qBAAqB,CAAC,WAAW,EAAE,eAAe;;;;CAwBrD;AAED,wBAAgB,SAAS,SAgCxB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.js b/node_modules/flowbite/lib/esm/components/dial/index.js new file mode 100644 index 0000000..8c8d9ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.js @@ -0,0 +1,138 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Dial.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }); + }); + } + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + return Dial; +}()); +export function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +export default Dial; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.js.map b/node_modules/flowbite/lib/esm/components/dial/index.js.map new file mode 100644 index 0000000..a98ad1c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAgB;IACzB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAOI,cACI,QAAmC,EACnC,SAAoC,EACpC,QAAmC,EACnC,OAA8B;QAH9B,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,yBAAA,EAAA,eAAmC;QACnC,wBAA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AE,EAAE;iBACjB,CAAC;YACN;gBACI,OAAO;oBACH,UAAU,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;oBACnC,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC;iBACrC,CAAC;SACT;IACL,CAAC;IACL,WAAC;AAAD,CAAC,AA1GD,IA0GC;AAED,MAAM,UAAU,SAAS;IACrB,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,UAAC,SAAS;QAC5D,IAAM,UAAU,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAEjE,IAAI,UAAU,EAAE;YACZ,IAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;YAC3D,IAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAEhD,IAAI,OAAO,EAAE;gBACT,IAAM,WAAW,GACb,UAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;gBACjD,IAAI,IAAI,CACJ,SAAwB,EACxB,UAAyB,EACzB,OAAsB,EACtB;oBACI,WAAW,EAAE,WAAW;wBACpB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,OAAO,CAAC,WAAW;iBACb,CACnB,CAAC;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,uBAAgB,MAAM,sGAAmG,CAC5H,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uBAAgB,SAAS,CAAC,EAAE,+FAA4F,CAC3H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;CAChC;AAED,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.d.ts b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts new file mode 100644 index 0000000..de0133b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts @@ -0,0 +1,16 @@ +import { DialOptions, DialTriggerEventTypes, DialTriggerType } from './types'; +export declare interface DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + _init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _getTriggerEventTypes(triggerType: DialTriggerType): DialTriggerEventTypes; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map new file mode 100644 index 0000000..cfa626e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE9E,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,qBAAqB,CAAC,WAAW,EAAE,eAAe,GAAG,qBAAqB,CAAC;CAC9E"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.js b/node_modules/flowbite/lib/esm/components/dial/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.js.map b/node_modules/flowbite/lib/esm/components/dial/interface.js.map new file mode 100644 index 0000000..83f6457 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.d.ts b/node_modules/flowbite/lib/esm/components/dial/types.d.ts new file mode 100644 index 0000000..2f4877c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.d.ts @@ -0,0 +1,13 @@ +import { DialInterface } from './interface'; +export declare type DialTriggerType = 'click' | 'hover' | 'none'; +export declare type DialTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DialOptions = { + triggerType?: DialTriggerType; + onShow?: (dial: DialInterface) => void; + onHide?: (dial: DialInterface) => void; + onToggle?: (dial: DialInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map new file mode 100644 index 0000000..da04793 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.js b/node_modules/flowbite/lib/esm/components/dial/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.js.map b/node_modules/flowbite/lib/esm/components/dial/types.js.map new file mode 100644 index 0000000..0613f16 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts new file mode 100644 index 0000000..ac75c1d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts @@ -0,0 +1,13 @@ +import type { DismissOptions } from './types'; +import { DismissInterface } from './interface'; +declare class Dismiss implements DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: DismissOptions); + _init(): void; + hide(): void; +} +export declare function initDismisses(): void; +export default Dismiss; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map new file mode 100644 index 0000000..5df9d15 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAS/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;gBAGrB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAQrC,KAAK;IAQL,IAAI;CAcP;AAED,wBAAgB,aAAa,SAa5B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.js b/node_modules/flowbite/lib/esm/components/dismiss/index.js new file mode 100644 index 0000000..8538787 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.js @@ -0,0 +1,64 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Dismiss.prototype._init = function () { + var _this = this; + if (this._triggerEl) { + this._triggerEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + return Dismiss; +}()); +export function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +export default Dismiss; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.js.map b/node_modules/flowbite/lib/esm/components/dismiss/index.js.map new file mode 100644 index 0000000..1efc3f0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAmB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF;IAKI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC;QAFjC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QAEjC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,y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C,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts new file mode 100644 index 0000000..e9b8f51 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts @@ -0,0 +1,9 @@ +import { DismissOptions } from './types'; +export declare interface DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + _init(): void; + hide(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map new file mode 100644 index 0000000..c9c3828 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IAEzB,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;CAChB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.js b/node_modules/flowbite/lib/esm/components/dismiss/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map b/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map new file mode 100644 index 0000000..6b664d5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts new file mode 100644 index 0000000..c659c00 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts @@ -0,0 +1,8 @@ +import { DismissInterface } from './interface'; +export declare type DismissOptions = { + transition?: string; + duration?: number; + timing?: string; + onHide?: (dismiss: DismissInterface, targetEl: HTMLElement) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map new file mode 100644 index 0000000..2ccb43e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACvE,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.js b/node_modules/flowbite/lib/esm/components/dismiss/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.js.map b/node_modules/flowbite/lib/esm/components/dismiss/types.js.map new file mode 100644 index 0000000..8ceeeb5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.d.ts b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts new file mode 100644 index 0000000..eecffb5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts @@ -0,0 +1,21 @@ +import type { DrawerOptions, PlacementClasses } from './types'; +import { DrawerInterface } from './interface'; +declare class Drawer implements DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, options?: DrawerOptions); + _init(): void; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + isHidden(): boolean; + isVisible(): boolean; +} +export declare function initDrawers(): void; +export default Drawer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map new file mode 100644 index 0000000..9776f54 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAe9C,cAAM,MAAO,YAAW,eAAe;IACnC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,aAAuB;IAQpC,KAAK;IAwBL,IAAI;IA+CJ,IAAI;IA8CJ,MAAM;IAQN,eAAe;IAcf,kBAAkB;IAMlB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAyCzD,QAAQ;IAIR,SAAS;CAGZ;AAQD,wBAAgB,WAAW,SA+H1B;AAOD,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.js b/node_modules/flowbite/lib/esm/components/drawer/index.js new file mode 100644 index 0000000..0f063f0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.js @@ -0,0 +1,310 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._init(); + } + Drawer.prototype._init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + } + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + // add keyboard event listener to document + document.addEventListener('keydown', function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + return Drawer; +}()); +var getDrawerInstance = function (id, instances) { + if (instances.some(function (drawerInstance) { return drawerInstance.id === id; })) { + return instances.find(function (drawerInstance) { return drawerInstance.id === id; }); + } +}; +export function initDrawers() { + var drawerInstances = []; + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + // optional + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + if (!getDrawerInstance(drawerId, drawerInstances)) { + drawerInstances.push({ + id: drawerId, + object: new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge + ? edge === 'true' + ? true + : false + : Default.edge, + edgeOffset: edgeOffset + ? edgeOffset + : Default.edgeOffset, + }), + }); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_1) { + $triggerEl.addEventListener('click', function () { + drawer_1.object.toggle(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_2) { + $triggerEl.addEventListener('click', function () { + drawer_2.object.hide(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = getDrawerInstance(drawerId, drawerInstances); + if (drawer_3) { + $triggerEl.addEventListener('click', function () { + drawer_3.object.show(); + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +export default Drawer; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.js.map b/node_modules/flowbite/lib/esm/components/drawer/index.js.map new file mode 100644 index 0000000..91d007a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAkB;IAC3B,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,KAAK;IACX,UAAU,EAAE,eAAe;IAC3B,eAAe,EACX,iEAAiE;IACrE,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAMI,gBACI,QAAmC,EACnC,OAAgC;QADhC,yBAAA,EAAA,eAAmC;QACnC,wBAAA,EAAA,iBAAgC;QAEhC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,C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CAAC,OAAO,EAAE;oBACjC,QAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACzB,CAAC,CAAC,CAAC;aACN;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,4FAAyF,CACtH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,oGAAiG,CAC9H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;CACpC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts new file mode 100644 index 0000000..a69c8f1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts @@ -0,0 +1,17 @@ +import { DrawerOptions, PlacementClasses } from './types'; +export declare interface DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + _init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map new file mode 100644 index 0000000..367b357 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,eAAe;IAEpC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAGlB,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,eAAe,IAAI,IAAI,CAAC;IACxB,kBAAkB,IAAI,IAAI,CAAC;IAC3B,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC7D"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.js b/node_modules/flowbite/lib/esm/components/drawer/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.js.map b/node_modules/flowbite/lib/esm/components/drawer/interface.js.map new file mode 100644 index 0000000..91cef96 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.d.ts b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts new file mode 100644 index 0000000..abc766f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts @@ -0,0 +1,22 @@ +import { DrawerInterface } from './interface'; +export declare type DrawerOptions = { + placement?: string; + bodyScrolling?: boolean; + backdrop?: boolean; + edge?: boolean; + edgeOffset?: string; + backdropClasses?: string; + onShow?: (drawer: DrawerInterface) => void; + onHide?: (drawer: DrawerInterface) => void; + onToggle?: (drawer: DrawerInterface) => void; +}; +export declare type PlacementClasses = { + base: string[]; + active: string[]; + inactive: string[]; +}; +export declare type DrawerInstance = { + id: string; + object: DrawerInterface; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map new file mode 100644 index 0000000..ee84e44 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,eAAe,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.js b/node_modules/flowbite/lib/esm/components/drawer/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.js.map b/node_modules/flowbite/lib/esm/components/drawer/types.js.map new file mode 100644 index 0000000..b9d5343 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts new file mode 100644 index 0000000..d0efbf5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts @@ -0,0 +1,29 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { DropdownOptions } from './types'; +import { DropdownInterface } from './interface'; +declare class Dropdown implements DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + constructor(targetElement?: HTMLElement | null, triggerElement?: HTMLElement | null, options?: DropdownOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + toggle(): void; + isVisible(): boolean; + show(): void; + hide(): void; +} +export declare function initDropdowns(): void; +export default Dropdown; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map new file mode 100644 index 0000000..51a311c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAchD,cAAM,QAAS,YAAW,iBAAiB;IACvC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;gBAG3D,aAAa,GAAE,WAAW,GAAG,IAAW,EACxC,cAAc,GAAE,WAAW,GAAG,IAAW,EACzC,OAAO,GAAE,eAAyB;IAUtC,KAAK;IAML,oBAAoB;IA+CpB,qBAAqB;IAiBrB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IA+BpD,iBAAiB;;;;IAyBjB,MAAM;IASN,SAAS;IAIT,IAAI;IAuBJ,IAAI;CAoBP;AAED,wBAAgB,aAAa,SAmD5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.js b/node_modules/flowbite/lib/esm/components/dropdown/index.js new file mode 100644 index 0000000..cbd50d2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.js @@ -0,0 +1,250 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Dropdown.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.toggle(); + }); + }); + } + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + if (ev === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + return Dropdown; +}()); +export function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +export default Dropdown; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.js.map b/node_modules/flowbite/lib/esm/components/dropdown/index.js.map new file mode 100644 index 0000000..cb46e51 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,IAAM,OAAO,GAAoB;IAC7B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,OAAO;IACpB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;IAClB,KAAK,EAAE,GAAG;IACV,uBAAuB,EAAE,KAAK;IAC9B,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAQI,kBACI,aAAwC,EACxC,cAAyC,EACzC,OAAkC;QAFlC,8BAAA,EAAA,oBAAwC;QACxC,+BAAA,EAAA,qBAAyC;QACzC,wBAAA,EAAA,iBAAkC;QAElC,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC;QACjC,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,wBAAK,GAAL;QACI,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC/B;IACL,CAAC;IAED,uCAAoB,GAApB;QAAA,iBA6CC;QA5CG,IAA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AAC,CAAC,QAAQ,CAAC,cAAc,CAAC;oBAC1B,CAAC,CAAC,OAAO,CAAC,cAAc;gBAC5B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK;gBAC9C,uBAAuB,EAAE,uBAAuB;oBAC5C,CAAC,CAAC,uBAAuB;oBACzB,CAAC,CAAC,OAAO,CAAC,uBAAuB;aACrB,CACvB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yCAAiC,UAAU,wEAAoE,CAClH,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts new file mode 100644 index 0000000..95a1241 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts @@ -0,0 +1,22 @@ +import { DropdownOptions, DropdownTriggerType, DropdownTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _init(): void; + _createPopperInstance(): PopperInstance; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: DropdownTriggerType): DropdownTriggerEventTypes; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map new file mode 100644 index 0000000..eef9c76 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,KAAK,IAAI,IAAI,CAAC;IACd,qBAAqB,IAAI,cAAc,CAAC;IACxC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,mBAAmB,GACjC,yBAAyB,CAAC;IAC7B,SAAS,IAAI,OAAO,CAAC;IACrB,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;CAChB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.js b/node_modules/flowbite/lib/esm/components/dropdown/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map b/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map new file mode 100644 index 0000000..d4c8eb1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts new file mode 100644 index 0000000..47c79fb --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts @@ -0,0 +1,19 @@ +import { DropdownInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type DropdownTriggerType = 'click' | 'hover' | 'none'; +export declare type DropdownTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DropdownOptions = { + placement?: Placement; + triggerType?: DropdownTriggerType; + offsetSkidding?: number; + offsetDistance?: number; + ignoreClickOutsideClass?: string | boolean; + delay?: number; + onShow?: (tooltip: DropdownInterface) => void; + onHide?: (tooltip: DropdownInterface) => void; + onToggle?: (tooltip: DropdownInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map new file mode 100644 index 0000000..f74ca43 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAErE,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG;IAC5C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.js b/node_modules/flowbite/lib/esm/components/dropdown/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.js.map b/node_modules/flowbite/lib/esm/components/dropdown/types.js.map new file mode 100644 index 0000000..de3d7a3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.d.ts b/node_modules/flowbite/lib/esm/components/index.d.ts new file mode 100644 index 0000000..3d22df6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.d.ts @@ -0,0 +1,2 @@ +export declare function initFlowbite(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.d.ts.map b/node_modules/flowbite/lib/esm/components/index.d.ts.map new file mode 100644 index 0000000..69c6ef6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAYA,wBAAgB,YAAY,SAY3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.js b/node_modules/flowbite/lib/esm/components/index.js new file mode 100644 index 0000000..ac570a9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.js @@ -0,0 +1,28 @@ +import { initAccordions } from './accordion'; +import { initCarousels } from './carousel'; +import { initCollapses } from './collapse'; +import { initDials } from './dial'; +import { initDismisses } from './dismiss'; +import { initDrawers } from './drawer'; +import { initDropdowns } from './dropdown'; +import { initModals } from './modal'; +import { initPopovers } from './popover'; +import { initTabs } from './tabs'; +import { initTooltips } from './tooltip'; +export function initFlowbite() { + initAccordions(); + initCollapses(); + initCarousels(); + initDismisses(); + initDropdowns(); + initModals(); + initDrawers(); + initTabs(); + initTooltips(); + initPopovers(); + initDials(); +} +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.js.map b/node_modules/flowbite/lib/esm/components/index.js.map new file mode 100644 index 0000000..661c695 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,UAAU,YAAY;IACxB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,SAAS,EAAE,CAAC;AAChB,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.d.ts b/node_modules/flowbite/lib/esm/components/modal/index.d.ts new file mode 100644 index 0000000..be91df7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.d.ts @@ -0,0 +1,26 @@ +import type { ModalOptions } from './types'; +import { ModalInterface } from './interface'; +declare class Modal implements ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, options?: ModalOptions); + _init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _removeModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isVisible(): boolean; + isHidden(): boolean; +} +export declare function initModals(): void; +export default Modal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map new file mode 100644 index 0000000..8c64578 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAa7C,cAAM,KAAM,YAAW,cAAc;IACjC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;gBAGtD,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,YAAsB;IASnC,KAAK;IAQL,eAAe;IAYf,kBAAkB;IAMlB,8BAA8B;IAwB9B,+BAA+B;IAe/B,mBAAmB,CAAC,MAAM,EAAE,WAAW;IASvC,oBAAoB;IA+BpB,MAAM;IAWN,IAAI;IAuBJ,IAAI;IAsBJ,SAAS;IAIT,QAAQ;CAGX;AASD,wBAAgB,UAAU,SAgIzB;AAOD,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.js b/node_modules/flowbite/lib/esm/components/modal/index.js new file mode 100644 index 0000000..5894a1b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.js @@ -0,0 +1,270 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._init(); + } + Modal.prototype._init = function () { + var _this = this; + if (this._targetEl) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + } + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('modal-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden) { + document.querySelector('[modal-backdrop]').remove(); + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + return Modal; +}()); +var getModalInstance = function (id, instances) { + if (instances.some(function (modalInstance) { return modalInstance.id === id; })) { + return instances.find(function (modalInstance) { return modalInstance.id === id; }); + } + return null; +}; +export function initModals() { + var modalInstances = []; + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + if (!getModalInstance(modalId, modalInstances)) { + modalInstances.push({ + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // support pre v1.6.0 data-modal-toggle initialization + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + var modal_1 = getModalInstance(modalId, modalInstances); + if (!modal_1) { + modal_1 = { + id: modalId, + object: new Modal($modalEl, { + placement: placement + ? placement + : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }), + }; + modalInstances.push(modal_1); + } + $triggerEl.addEventListener('click', function () { + modal_1.object.toggle(); + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = getModalInstance(modalId, modalInstances); + if (modal_2) { + $triggerEl.addEventListener('click', function () { + if (modal_2.object.isHidden) { + modal_2.object.show(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = getModalInstance(modalId, modalInstances); + if (modal_3) { + $triggerEl.addEventListener('click', function () { + if (modal_3.object.isVisible) { + modal_3.object.hide(); + } + }); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +export default Modal; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.js.map b/node_modules/flowbite/lib/esm/components/modal/index.js.map new file mode 100644 index 0000000..6b645b9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAiB;IAC1B,SAAS,EAAE,QAAQ;IACnB,eAAe,EACX,iEAAiE;IACrE,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IAQI,eACI,QAAmC,EACnC,OAA+B;QAD/B,yBAAA,EAAA,eAAmC;QACnC,wBAAA,EAAA,iBAA+B;QAE/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,SAAS,GA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K,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;CAClC;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.d.ts b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts new file mode 100644 index 0000000..2df722b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts @@ -0,0 +1,21 @@ +import { ModalOptions } from './types'; +export declare interface ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isHidden(): boolean; + isVisible(): boolean; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map new file mode 100644 index 0000000..6fa46f7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,cAAc;IAEnC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAG9B,QAAQ,EAAE,YAAY,CAAC;IAGvB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEhC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,qBAAqB,EAAE,kCAAkC,CAAC;IAG1D,KAAK,IAAI,IAAI,CAAC;IAGd,eAAe,IAAI,IAAI,CAAC;IAGxB,kBAAkB,IAAI,IAAI,CAAC;IAG3B,8BAA8B,IAAI,IAAI,CAAC;IAGvC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAG/C,oBAAoB,IAAI,MAAM,EAAE,CAAC;IAGjC,MAAM,IAAI,IAAI,CAAC;IAGf,IAAI,IAAI,IAAI,CAAC;IAGb,IAAI,IAAI,IAAI,CAAC;IAGb,QAAQ,IAAI,OAAO,CAAC;IAGpB,SAAS,IAAI,OAAO,CAAC;CACxB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.js b/node_modules/flowbite/lib/esm/components/modal/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.js.map b/node_modules/flowbite/lib/esm/components/modal/interface.js.map new file mode 100644 index 0000000..5de1079 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.d.ts b/node_modules/flowbite/lib/esm/components/modal/types.d.ts new file mode 100644 index 0000000..5dccfb1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.d.ts @@ -0,0 +1,17 @@ +import { ModalInterface } from './interface'; +export declare type modalBackdrop = 'static' | 'dynamic'; +export declare type modalPlacement = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; +export declare type ModalOptions = { + placement?: modalPlacement; + backdropClasses?: string; + backdrop?: modalBackdrop; + closable?: boolean; + onShow?: (modal: ModalInterface) => void; + onHide?: (modal: ModalInterface) => void; + onToggle?: (modal: ModalInterface) => void; +}; +export declare type ModalInstance = { + id: string; + object: ModalInterface; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map new file mode 100644 index 0000000..2754732 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzD,MAAM,CAAC,OAAO,MAAM,cAAc,GAC5B,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,QAAQ,GACR,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,cAAc,CAAC;CAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.js b/node_modules/flowbite/lib/esm/components/modal/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.js.map b/node_modules/flowbite/lib/esm/components/modal/types.js.map new file mode 100644 index 0000000..e049979 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.d.ts b/node_modules/flowbite/lib/esm/components/popover/index.d.ts new file mode 100644 index 0000000..33732b6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.d.ts @@ -0,0 +1,32 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { PopoverOptions } from './types'; +import { PopoverInterface } from './interface'; +declare class Popover implements PopoverInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: PopoverOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +export declare function initPopovers(): void; +export default Popover; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map new file mode 100644 index 0000000..67e916e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAW/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAUrC,KAAK;IAML,oBAAoB;IA6BpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IASN,IAAI;IA6BJ,IAAI;CAyBP;AAED,wBAAgB,YAAY,SA2B3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.js b/node_modules/flowbite/lib/esm/components/popover/index.js new file mode 100644 index 0000000..ea4eb6d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.js @@ -0,0 +1,218 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Popover.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + _this._targetEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + _this._targetEl.addEventListener(ev, function () { + setTimeout(function () { + if (!_this._triggerEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }); + }); + }; + Popover.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Popover; +}()); +export function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +export default Popover; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.js.map b/node_modules/flowbite/lib/esm/components/popover/index.js.map new file mode 100644 index 0000000..f25289c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IASI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAi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AAK,CACT,wCAAgC,SAAS,uEAAmE,CAC/G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.d.ts b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts new file mode 100644 index 0000000..851a5a9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts @@ -0,0 +1,22 @@ +import { PopoverOptions, PopoverTriggerType, PopoverTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface PopoverInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: PopoverTriggerType): PopoverTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map new file mode 100644 index 0000000..8527eea --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.js b/node_modules/flowbite/lib/esm/components/popover/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.js.map b/node_modules/flowbite/lib/esm/components/popover/interface.js.map new file mode 100644 index 0000000..495553d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.d.ts b/node_modules/flowbite/lib/esm/components/popover/types.d.ts new file mode 100644 index 0000000..1b8512f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.d.ts @@ -0,0 +1,16 @@ +import { PopoverInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type PopoverTriggerType = 'click' | 'hover' | 'none'; +export declare type PopoverTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type PopoverOptions = { + placement?: Placement; + offset?: number; + triggerType?: PopoverTriggerType; + onShow?: (tooltip: PopoverInterface) => void; + onHide?: (tooltip: PopoverInterface) => void; + onToggle?: (tooltip: PopoverInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map new file mode 100644 index 0000000..83d1cf6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.js b/node_modules/flowbite/lib/esm/components/popover/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.js.map b/node_modules/flowbite/lib/esm/components/popover/types.js.map new file mode 100644 index 0000000..8f2e0e4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.d.ts b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts new file mode 100644 index 0000000..fd62e63 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts @@ -0,0 +1,16 @@ +import type { TabItem, TabsOptions } from './types'; +import { TabsInterface } from './interface'; +declare class Tabs implements TabsInterface { + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + constructor(items?: TabItem[], options?: TabsOptions); + _init(): void; + getActiveTab(): TabItem; + _setActiveTab(tab: TabItem): void; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; +} +export declare function initTabs(): void; +export default Tabs; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map new file mode 100644 index 0000000..bafbd71 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAW5C,cAAM,IAAK,YAAW,aAAa;IAC/B,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;gBAEV,KAAK,GAAE,OAAO,EAAO,EAAE,OAAO,GAAE,WAAqB;IAOjE,KAAK;IAmBL,YAAY;IAIZ,aAAa,CAAC,GAAG,EAAE,OAAO;IAI1B,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ;CAmCrC;AAED,wBAAgB,QAAQ,SA0BvB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.js b/node_modules/flowbite/lib/esm/components/tabs/index.js new file mode 100644 index 0000000..2e9a4cc --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.js @@ -0,0 +1,111 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var Tabs = /** @class */ (function () { + function Tabs(items, options) { + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._init(); + } + Tabs.prototype._init = function () { + var _this = this; + if (this._items.length) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this._setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function () { + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype._setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this._setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + return Tabs; +}()); +export function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($triggerEl) { + var tabItems = []; + var defaultTabId = null; + $triggerEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs(tabItems, { + defaultTabId: defaultTabId, + }); + }); +} +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +export default Tabs; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.js.map b/node_modules/flowbite/lib/esm/components/tabs/index.js.map new file mode 100644 index 0000000..cefce57 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,OAAO,GAAgB;IACzB,YAAY,EAAE,IAAI;IAClB,aAAa,EACT,oHAAoH;IACxH,eAAe,EACX,kKAAkK;IACtK,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF;IAKI,cAAY,KAAqB,EAAE,OAA8B;QAArD,sBAAA,EAAA,UAAqB;QAAE,wBAAA,EAAA,iBAA8B;QAC7D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACrE,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,oBAAK,GAAL;QAAA,iBAiBC;QAhBG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACpB,uDAAuD;YACvD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAClB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;aACtC;YAED,mCAAmC;YACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE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AAkB,CAAC;gBAC/C,SAAS,EAAE,UAAU;gBACrB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAC5B,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAC9C;aACJ,CAAC;YACF,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAEnB,IAAI,QAAQ,EAAE;gBACV,YAAY,GAAG,GAAG,CAAC,EAAE,CAAC;aACzB;QACL,CAAC,CAAC,CAAC;QACP,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,YAAY,EAAE,YAAY;SACd,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAC9B;AAED,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts new file mode 100644 index 0000000..9e07566 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts @@ -0,0 +1,12 @@ +import { TabItem, TabsOptions } from './types'; +export declare interface TabsInterface { + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + _init(): void; + _setActiveTab(tab: TabItem): void; + getActiveTab(): TabItem; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map new file mode 100644 index 0000000..3cd72bd --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IAEtB,KAAK,IAAI,IAAI,CAAC;IACd,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/C"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.js b/node_modules/flowbite/lib/esm/components/tabs/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.js.map b/node_modules/flowbite/lib/esm/components/tabs/interface.js.map new file mode 100644 index 0000000..6fc7bb2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.d.ts b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts new file mode 100644 index 0000000..342be0d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts @@ -0,0 +1,13 @@ +import { TabsInterface } from './interface'; +export declare type TabsOptions = { + defaultTabId?: string; + activeClasses?: string; + inactiveClasses?: string; + onShow?: (tabs: TabsInterface, tab: TabItem) => void; +}; +export declare type TabItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map new file mode 100644 index 0000000..da457a9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.js b/node_modules/flowbite/lib/esm/components/tabs/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.js.map b/node_modules/flowbite/lib/esm/components/tabs/types.js.map new file mode 100644 index 0000000..a4a4aff --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts new file mode 100644 index 0000000..041a7da --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts @@ -0,0 +1,32 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { TooltipOptions } from './types'; +import { TooltipInterface } from './interface'; +declare class Tooltip implements TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: TooltipOptions); + _init(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; +} +export declare function initTooltips(): void; +export default Tooltip; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map new file mode 100644 index 0000000..fc88084 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;gBAGd,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB;IAUrC,KAAK;IAML,oBAAoB;IAcpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IAQN,IAAI;IA6BJ,IAAI;CAyBP;AAED,wBAAgB,YAAY,SAyB3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.js b/node_modules/flowbite/lib/esm/components/tooltip/index.js new file mode 100644 index 0000000..2fa8da8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.js @@ -0,0 +1,200 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = this._createPopperInstance(); + this._visible = false; + this._init(); + } + Tooltip.prototype._init = function () { + if (this._triggerEl) { + this._setupEventListeners(); + } + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.show(); + }); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, function () { + _this.hide(); + }); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + return Tooltip; +}()); +export function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +export default Tooltip; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.js.map b/node_modules/flowbite/lib/esm/components/tooltip/index.js.map new file mode 100644 index 0000000..75e62ba --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF;IASI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC;QAFjC,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QAEjC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,uBAAK,GAAL;QACI,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC/B;IACL,CAAC;IAED,sCAAoB,GAApB;QAAA,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AAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts new file mode 100644 index 0000000..f081b33 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts @@ -0,0 +1,23 @@ +import { TooltipOptions, TooltipTriggerType, TooltipTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: TooltipTriggerType): TooltipTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map new file mode 100644 index 0000000..b395e6b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,KAAK,IAAI,IAAI,CAAC;IACd,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.js b/node_modules/flowbite/lib/esm/components/tooltip/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map b/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map new file mode 100644 index 0000000..8a5f072 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts new file mode 100644 index 0000000..1ba5bb3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts @@ -0,0 +1,15 @@ +import { TooltipInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type TooltipTriggerType = 'click' | 'hover' | 'none'; +export declare type TooltipTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type TooltipOptions = { + placement?: Placement; + triggerType?: TooltipTriggerType; + onShow?: (tooltip: TooltipInterface) => void; + onHide?: (tooltip: TooltipInterface) => void; + onToggle?: (tooltip: TooltipInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map new file mode 100644 index 0000000..048bf1d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.js b/node_modules/flowbite/lib/esm/components/tooltip/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.js.map b/node_modules/flowbite/lib/esm/components/tooltip/types.js.map new file mode 100644 index 0000000..cd09cf9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.d.ts b/node_modules/flowbite/lib/esm/config/global.d.ts new file mode 100644 index 0000000..8937b76 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.d.ts @@ -0,0 +1,39 @@ +import Accordion from '../components/accordion'; +import Carousel from '../components/carousel'; +import Collapse from '../components/collapse'; +import Dial from '../components/dial'; +import Dismiss from '../components/dismiss'; +import Drawer from '../components/drawer'; +import Dropdown from '../components/dropdown'; +import Modal from '../components/modal'; +import Popover from '../components/popover'; +import Tabs from '../components/tabs'; +import Tooltip from '../components/tooltip'; +declare global { + interface Window { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Dismiss: typeof Dismiss; + Drawer: typeof Drawer; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + initAccordions: () => void; + initCarousels: () => void; + initCollapses: () => void; + initDials: () => void; + initDismisses: () => void; + initDrawers: () => void; + initDropdowns: () => void; + initModals: () => void; + initPopovers: () => void; + initTabs: () => void; + initTooltips: () => void; + initFlowbite: () => void; + } +} +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.d.ts.map b/node_modules/flowbite/lib/esm/config/global.d.ts.map new file mode 100644 index 0000000..b57ae87 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,OAAO,SAAS,CAAC;QAC5B,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,KAAK,EAAE,OAAO,KAAK,CAAC;QACpB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,cAAc,EAAE,MAAM,IAAI,CAAC;QAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;QACtB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;QACxB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;QACrB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,YAAY,EAAE,MAAM,IAAI,CAAC;KAC5B;CACJ"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.js b/node_modules/flowbite/lib/esm/config/global.js new file mode 100644 index 0000000..a8d4563 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.js.map b/node_modules/flowbite/lib/esm/config/global.js.map new file mode 100644 index 0000000..52ccc1e --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.d.ts b/node_modules/flowbite/lib/esm/dom/events.d.ts new file mode 100644 index 0000000..3bbb83b --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.d.ts @@ -0,0 +1,8 @@ +declare class Events { + private _eventType; + private _eventFunctions; + constructor(eventType: string, eventFunctions?: EventListener[]); + init(): void; +} +export default Events; +//# sourceMappingURL=events.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.d.ts.map b/node_modules/flowbite/lib/esm/dom/events.d.ts.map new file mode 100644 index 0000000..de90c16 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA,cAAM,MAAM;IACR,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,SAAS,EAAE,MAAM,EAAE,cAAc,GAAE,aAAa,EAAO;IAKnE,IAAI;CAOP;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.js b/node_modules/flowbite/lib/esm/dom/events.js new file mode 100644 index 0000000..3d335f6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.js @@ -0,0 +1,18 @@ +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +export default Events; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.js.map b/node_modules/flowbite/lib/esm/dom/events.js.map new file mode 100644 index 0000000..727d3ef --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.js.map @@ -0,0 +1 @@ +{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA;IAII,gBAAY,SAAiB,EAAE,cAAoC;QAApC,+BAAA,EAAA,mBAAoC;QAC/D,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAED,qBAAI,GAAJ;QAAA,iBAMC;QALG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAC,aAAa;YACvC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBAC/B,MAAM,CAAC,gBAAgB,CAAC,KAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;aAC3D;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,aAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.d.ts b/node_modules/flowbite/lib/esm/index.d.ts new file mode 100644 index 0000000..5660236 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.d.ts @@ -0,0 +1,47 @@ +import './components/index'; +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.d.ts.map b/node_modules/flowbite/lib/esm/index.d.ts.map new file mode 100644 index 0000000..8997bca --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,oBAAoB,CAAC;AAmB5B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG1D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.js b/node_modules/flowbite/lib/esm/index.js new file mode 100644 index 0000000..5511f9c --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.js @@ -0,0 +1,79 @@ +import Events from './dom/events'; +import { initAccordions } from './components/accordion'; +import { initCollapses } from './components/collapse'; +import { initCarousels } from './components/carousel'; +import { initDismisses } from './components/dismiss'; +import { initDropdowns } from './components/dropdown'; +import { initModals } from './components/modal'; +import { initDrawers } from './components/drawer'; +import { initTabs } from './components/tabs'; +import { initTooltips } from './components/tooltip'; +import { initPopovers } from './components/popover'; +import { initDials } from './components/dial'; +import './components/index'; +// setup events for data attributes +var events = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +events.init(); +// export all components +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +// export all types +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +// export all interfaces +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +// export init functions +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +// export all init functions +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.js.map b/node_modules/flowbite/lib/esm/index.js.map new file mode 100644 index 0000000..f6ee034 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,oBAAoB,CAAC;AAE5B,mCAAmC;AACnC,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;IAC9B,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,wBAAwB;AACxB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAA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CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.d.ts b/node_modules/flowbite/lib/esm/index.phoenix.d.ts new file mode 100644 index 0000000..9bec6d4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.d.ts @@ -0,0 +1,29 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.phoenix.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map b/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map new file mode 100644 index 0000000..0e05cf0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.d.ts","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAgClC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.js b/node_modules/flowbite/lib/esm/index.phoenix.js new file mode 100644 index 0000000..f0b94d7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.js @@ -0,0 +1,57 @@ +// core components +import Accordion, { initAccordions } from './components/accordion'; +import Carousel, { initCarousels } from './components/carousel'; +import Collapse, { initCollapses } from './components/collapse'; +import Dial, { initDials } from './components/dial'; +import Dismiss, { initDismisses } from './components/dismiss'; +import Drawer, { initDrawers } from './components/drawer'; +import Dropdown, { initDropdowns } from './components/dropdown'; +import Modal, { initModals } from './components/modal'; +import Popover, { initPopovers } from './components/popover'; +import Tabs, { initTabs } from './components/tabs'; +import Tooltip, { initTooltips } from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +var liveViewLoadEvents = new Events('phx:page-loading-stop', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +regularViewLoadEvents.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + Events: Events, +}; +//# sourceMappingURL=index.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.js.map b/node_modules/flowbite/lib/esm/index.phoenix.js.map new file mode 100644 index 0000000..76890b7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.js","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,IAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,uBAAuB,EAAE;IAC3D,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;CACZ,CAAC,CAAC;AACH,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAE1B,IAAM,qBAAqB,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;IAC7C,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;CACZ,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,eAAe;IACX,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.d.ts b/node_modules/flowbite/lib/esm/index.turbo.d.ts new file mode 100644 index 0000000..413a593 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.d.ts @@ -0,0 +1,29 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.turbo.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.d.ts.map b/node_modules/flowbite/lib/esm/index.turbo.d.ts.map new file mode 100644 index 0000000..4b913c1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.d.ts","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAgClC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.js b/node_modules/flowbite/lib/esm/index.turbo.js new file mode 100644 index 0000000..39db2f2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.js @@ -0,0 +1,57 @@ +// core components +import Accordion, { initAccordions } from './components/accordion'; +import Carousel, { initCarousels } from './components/carousel'; +import Collapse, { initCollapses } from './components/collapse'; +import Dial, { initDials } from './components/dial'; +import Dismiss, { initDismisses } from './components/dismiss'; +import Drawer, { initDrawers } from './components/drawer'; +import Dropdown, { initDropdowns } from './components/dropdown'; +import Modal, { initModals } from './components/modal'; +import Popover, { initPopovers } from './components/popover'; +import Tabs, { initTabs } from './components/tabs'; +import Tooltip, { initTooltips } from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +var turboLoadEvents = new Events('turbo:load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new Events('turbo:frame-load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +turboFrameLoadEvents.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + Events: Events, +}; +//# sourceMappingURL=index.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.js.map b/node_modules/flowbite/lib/esm/index.turbo.js.map new file mode 100644 index 0000000..d518165 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.js","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,w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IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.d.ts b/node_modules/flowbite/lib/esm/index.umd.d.ts new file mode 100644 index 0000000..98f6048 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.d.ts @@ -0,0 +1,30 @@ +import './flowbite.css'; +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.umd.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.d.ts.map b/node_modules/flowbite/lib/esm/index.umd.d.ts.map new file mode 100644 index 0000000..60b4ec2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.d.ts","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAGxB,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AAiBlC,wBAaE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.js b/node_modules/flowbite/lib/esm/index.umd.js new file mode 100644 index 0000000..a9f35c7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.js @@ -0,0 +1,44 @@ +import './flowbite.css'; +// core components +import Accordion, { initAccordions } from './components/accordion'; +import Carousel, { initCarousels } from './components/carousel'; +import Collapse, { initCollapses } from './components/collapse'; +import Dial, { initDials } from './components/dial'; +import Dismiss, { initDismisses } from './components/dismiss'; +import Drawer, { initDrawers } from './components/drawer'; +import Dropdown, { initDropdowns } from './components/dropdown'; +import Modal, { initModals } from './components/modal'; +import Popover, { initPopovers } from './components/popover'; +import Tabs, { initTabs } from './components/tabs'; +import Tooltip, { initTooltips } from './components/tooltip'; +import './components/index'; +import Events from './dom/events'; +var events = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, +]); +events.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + Events: Events, +}; +//# sourceMappingURL=index.umd.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.js.map b/node_modules/flowbite/lib/esm/index.umd.js.map new file mode 100644 index 0000000..5eca6de --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,kBAAkB;AAClB,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;IAC9B,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,eAAe;IACX,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/package.json b/node_modules/flowbite/package.json new file mode 100644 index 0000000..1f0b774 --- /dev/null +++ b/node_modules/flowbite/package.json @@ -0,0 +1,121 @@ +{ + "name": "flowbite", + "version": "1.8.1", + "description": "The most popular library of interactive components built with Tailwind CSS", + "keywords": [ + "flowbite", + "typescript", + "javascript", + "webpack", + "html", + "css", + "component library", + "ui components", + "tailwind", + "tailwind css", + "tailwind components", + "tailwind elements", + "tailwind library", + "tailwind sections", + "tailwind css", + "tailwind ui", + "tailwind react", + "tailwind vue", + "tailwind angular", + "tailwind svelte", + "tailwind django", + "Tailwind ruby on rails", + "tailwind laravel", + "tailwind nuxt", + "tailwind next", + "tailwind astro", + "tailwind flask", + "eslint", + "prettier", + "cjs", + "esm", + "umd" + ], + "license": "MIT", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/esm/index.d.ts", + "style": "dist/flowbite.min.css", + "repository": "https://github.com/themesberg/flowbite.git", + "bugs": "https://github.com/themesberg/flowbite/issues", + "homepage": "https://flowbite.com", + "contributors": [ + "Zoltán Szőgyényi (https://twitter.com/zoltanszogyenyi)", + "Robert Tanislav (https://twitter.com/roberttanislav)" + ], + "author": "Bergside Inc.", + "scripts": { + "start": "NODE_ENV=development run-p start:*", + "start:hugo": "hugo server -D", + "start:webpack": "webpack --mode=development --watch", + "build": "NODE_ENV=production && HUGO_ENV=production && run-s build:webpack build:hugo", + "build:hugo": "hugo", + "build:webpack": "webpack --mode=production", + "build:css:min": "NPM_ENV=production npx postcss src/flowbite.css > dist/flowbite.min.css", + "build:css": "NPM_ENV=development npx postcss src/flowbite.css > dist/flowbite.css", + "build:js": "run-s build:webpack", + "copy:js:dist": "copyfiles --flat static/flowbite.js dist && copyfiles --flat static/flowbite.js.map dist && copyfiles --flat static/flowbite.min.js.map dist && copyfiles --flat static/flowbite.min.js dist && copyfiles --flat static/flowbite.turbo.js dist && copyfiles --flat static/flowbite.turbo.min.js dist && copyfiles --flat static/flowbite.turbo.js.map dist && copyfiles --flat static/flowbite.turbo.min.js.map dist && copyfiles --flat static/flowbite.phoenix.js dist && copyfiles --flat static/flowbite.phoenix.min.js dist && copyfiles --flat static/flowbite.phoenix.js.map dist && copyfiles --flat static/flowbite.phoenix.min.js.map dist && copyfiles --flat static/datepicker.js dist && copyfiles --flat static/datepicker.min.js dist && copyfiles --flat static/datepicker.js.map dist && copyfiles --flat static/datepicker.turbo.js dist && copyfiles --flat static/datepicker.turbo.min.js dist && copyfiles --flat static/datepicker.turbo.js.map dist", + "build:dist": "mkdir -p dist && run-s build:css:min build:css build:js copy:js:dist", + "build:lib": "tsc --outDir lib/cjs && tsc -m es6 --outDir lib/esm", + "clean:lib": "shx rm -rf lib", + "clean:dist": "shx rm -rf dist", + "build:npm": "run-s clean:lib build:lib clean:dist build:dist", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore" + }, + "devDependencies": { + "@babel/core": "^7.14.8", + "@babel/preset-env": "^7.14.8", + "@docsearch/js": "^3.0.0-alpha.42", + "@typescript-eslint/eslint-plugin": "^5.46.1", + "@typescript-eslint/parser": "^5.46.1", + "autoprefixer": "^10.3.3", + "babel-loader": "^8.2.2", + "copyfiles": "^2.4.1", + "core-js": "^3.8.1", + "css-loader": "^5.2.7", + "css-minimizer-webpack-plugin": "^3.0.2", + "cssnano": "^5.0.8", + "eslint": "^8.29.0", + "eslint-config-prettier": "^8.0.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-tailwindcss": "^3.7.1", + "file-loader": "^6.2.0", + "flowbite-datepicker": "^1.2.2", + "mini-css-extract-plugin": "^1.3.3", + "npm-run-all": "^4.1.5", + "postcss": "^8.3.6", + "postcss-cli": "^8.3.1", + "postcss-loader": "^4.3.0", + "postcss-preset-env": "^6.7.0", + "prettier": "^2.8.1", + "prettier-plugin-tailwindcss": "^0.2.1", + "shx": "^0.3.4", + "source-map-loader": "^2.0.0", + "style-loader": "^2.0.0", + "tailwindcss": "^3.3.0", + "terser-webpack-plugin": "^5.3.6", + "ts-loader": "^9.4.2", + "typescript": "^4.9.4", + "webpack": "^5.47.0", + "webpack-cli": "^4.7.2", + "webpack-dev-server": "^4.11.1", + "windicss": "^3.5.6", + "yarn": "^1.22.10" + }, + "dependencies": { + "@popperjs/core": "^2.9.3", + "mini-svg-data-uri": "^1.4.3" + }, + "files": [ + "lib", + "dist", + "plugin.d.ts", + "plugin.js", + "plugin-windicss.js" + ] +} diff --git a/node_modules/flowbite/plugin-windicss.js b/node_modules/flowbite/plugin-windicss.js new file mode 100644 index 0000000..c9bd26e --- /dev/null +++ b/node_modules/flowbite/plugin-windicss.js @@ -0,0 +1,588 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const svgToDataUri = require('mini-svg-data-uri'); +const plugin = require('windicss/plugin'); +const defaultTheme = require('windicss/defaultTheme'); +const colors = require('windicss/colors'); +const [baseFontSize, { lineHeight: baseLineHeight }] = + defaultTheme.fontSize.base; +const { spacing, borderWidth, borderRadius } = defaultTheme; + +module.exports = plugin( + function ({ addBase, theme }) { + addBase({ + [[ + "[type='text']", + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ]]: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': theme('colors.gray.500', colors.gray[500]), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': theme('colors.blue.600', colors.blue[600]), + }, + }, + [['input::placeholder', 'textarea::placeholder']]: { + color: theme('colors.gray.500', colors.gray[500]), + opacity: '1', + }, + ['::-webkit-datetime-edit-fields-wrapper']: { + padding: '0', + }, + ['::-webkit-date-and-time-value']: { + 'min-height': '1.5em', + }, + ['select']: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[2]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `1.5em 1.5em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + ['[multiple]']: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + [[`[type='checkbox']`, `[type='radio']`]]: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: theme('colors.blue.600', colors.blue[600]), + 'background-color': '#fff', + 'border-color': theme('colors.gray.500', colors.gray[500]), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + [`[type='checkbox']`]: { + 'border-radius': borderRadius['none'], + }, + [`[type='radio']`]: { + 'border-radius': '100%', + }, + [[`[type='checkbox']:focus`, `[type='radio']:focus`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme('colors.blue.600', colors.blue[600]), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + [[ + `[type='checkbox']:checked`, + `[type='radio']:checked`, + `.dark [type='checkbox']:checked`, + `.dark [type='radio']:checked`, + ]]: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [`[type='checkbox']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + }, + [`[type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + }, + [`[type='checkbox']:indeterminate`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [[ + `[type='checkbox']:indeterminate:hover`, + `[type='checkbox']:indeterminate:focus`, + ]]: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + [`[type='file']`]: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + [`[type='file']:focus`]: { + outline: `1px auto inherit`, + }, + [[`input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.800', colors.gray[800]), + border: 0, + 'font-weight': theme('fontWeight.medium'), + 'font-size': theme('fontSize.sm'), + cursor: 'pointer', + 'padding-top': spacing[2.5], + 'padding-bottom': spacing[2.5], + 'padding-left': spacing[8], + 'padding-right': spacing[4], + 'margin-inline-start': '-1rem', + 'margin-inline-end': '1rem', + '&:hover': { + background: theme('colors.gray.700', colors.gray[700]), + }, + }, + [[`.dark input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.600', colors.gray[600]), + '&:hover': { + background: theme('colors.gray.500', colors.gray[500]), + }, + }, + [[`input[type="range"]::-webkit-slider-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]:focus::-webkit-slider-thumb`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-offset-shadow': + 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)', + '--tw-ring-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + 'box-shadow': + 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)', + '--tw-ring-opacity': 1, + '--tw-ring-color': 'rgb(164 202 254 / var(--tw-ring-opacity))', + }, + [[`input[type="range"]::-moz-range-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]::-moz-range-progress`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"]::-ms-fill-lower`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"].range-sm::-webkit-slider-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-webkit-slider-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + [[`input[type="range"].range-sm::-moz-range-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-moz-range-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + // remove from v2.x+ + ['.toggle-bg:after']: { + content: '""', + position: 'absolute', + top: spacing[0.5], + left: spacing[0.5], + background: 'white', + 'border-color': theme('colors.gray.300', colors.gray[300]), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.full, + height: theme('height.5'), + width: theme('width.5'), + 'transition-property': + 'background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter', + 'transition-duration': '.15s', + 'box-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + }, + ['input:checked + .toggle-bg:after']: { + transform: 'translateX(100%);', + 'border-color': 'white', + }, + ['input:checked + .toggle-bg']: { + background: theme('colors.blue.600', colors.gray[600]), + 'border-color': theme('colors.blue.600', colors.gray[600]), + }, + // remove from v2.x+ END + [['.tooltip-arrow', '.tooltip-arrow:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['.tooltip-arrow']: { + visibility: 'hidden', + }, + ['.tooltip-arrow:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + [`[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before`]: + { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`.tooltip[data-popper-placement^='top'] > .tooltip-arrow`]: { + bottom: '-4px', + }, + [`.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow`]: { + top: '-4px', + }, + [`.tooltip[data-popper-placement^='left'] > .tooltip-arrow`]: { + right: '-4px', + }, + [`.tooltip[data-popper-placement^='right'] > .tooltip-arrow`]: { + left: '-4px', + }, + ['.tooltip.invisible > .tooltip-arrow:before']: { + visibility: 'hidden', + }, + [['[data-popper-arrow]', '[data-popper-arrow]:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['[data-popper-arrow]']: { + visibility: 'hidden', + }, + ['[data-popper-arrow]:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + ['[data-popper-arrow]:after']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + position: 'absolute', + width: '9px', + height: '9px', + background: 'inherit', + }, + [`[role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]`]: + { + bottom: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]`]: + { + top: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]`]: + { + right: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]`]: + { + left: '-5px', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:before']: { + visibility: 'hidden', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:after']: { + visibility: 'hidden', + }, + }); + }, + { + darkMode: 'class', // or 'media' or 'class', + theme: { + extend: { + height: { + modal: 'calc(100% - 2rem)', + }, + boxShadow: { + 'sm-light': '0 2px 5px 0px rgba(255, 255, 255, 0.08)', + }, + colors: { + transparent: 'transparent', + white: '#ffffff', + black: '#000000', + gray: { + 50: '#F9FAFB', + 100: '#F3F4F6', + 200: '#E5E7EB', + 300: '#D1D5DB', + 400: '#9CA3AF', + 500: '#6B7280', + 600: '#4B5563', + 700: '#374151', + 800: '#1F2937', + 900: '#111827', + }, + red: { + 50: '#FDF2F2', + 100: '#FDE8E8', + 200: '#FBD5D5', + 300: '#F8B4B4', + 400: '#F98080', + 500: '#F05252', + 600: '#E02424', + 700: '#C81E1E', + 800: '#9B1C1C', + 900: '#771D1D', + }, + orange: { + 50: '#FFF8F1', + 100: '#FEECDC', + 200: '#FCD9BD', + 300: '#FDBA8C', + 400: '#FF8A4C', + 500: '#FF5A1F', + 600: '#D03801', + 700: '#B43403', + 800: '#8A2C0D', + 900: '#771D1D', + }, + yellow: { + 50: '#FDFDEA', + 100: '#FDF6B2', + 200: '#FCE96A', + 300: '#FACA15', + 400: '#E3A008', + 500: '#C27803', + 600: '#9F580A', + 700: '#8E4B10', + 800: '#723B13', + 900: '#633112', + }, + green: { + 50: '#F3FAF7', + 100: '#DEF7EC', + 200: '#BCF0DA', + 300: '#84E1BC', + 400: '#31C48D', + 500: '#0E9F6E', + 600: '#057A55', + 700: '#046C4E', + 800: '#03543F', + 900: '#014737', + }, + teal: { + 50: '#EDFAFA', + 100: '#D5F5F6', + 200: '#AFECEF', + 300: '#7EDCE2', + 400: '#16BDCA', + 500: '#0694A2', + 600: '#047481', + 700: '#036672', + 800: '#05505C', + 900: '#014451', + }, + blue: { + 50: '#EBF5FF', + 100: '#E1EFFE', + 200: '#C3DDFD', + 300: '#A4CAFE', + 400: '#76A9FA', + 500: '#3F83F8', + 600: '#1C64F2', + 700: '#1A56DB', + 800: '#1E429F', + 900: '#233876', + }, + indigo: { + 50: '#F0F5FF', + 100: '#E5EDFF', + 200: '#CDDBFE', + 300: '#B4C6FC', + 400: '#8DA2FB', + 500: '#6875F5', + 600: '#5850EC', + 700: '#5145CD', + 800: '#42389D', + 900: '#362F78', + }, + purple: { + 50: '#F6F5FF', + 100: '#EDEBFE', + 200: '#DCD7FE', + 300: '#CABFFD', + 400: '#AC94FA', + 500: '#9061F9', + 600: '#7E3AF2', + 700: '#6C2BD9', + 800: '#5521B5', + 900: '#4A1D96', + }, + pink: { + 50: '#FDF2F8', + 100: '#FCE8F3', + 200: '#FAD1E8', + 300: '#F8B4D9', + 400: '#F17EB8', + 500: '#E74694', + 600: '#D61F69', + 700: '#BF125D', + 800: '#99154B', + 900: '#751A3D', + }, + }, + }, + }, + } +); diff --git a/node_modules/flowbite/plugin.d.ts b/node_modules/flowbite/plugin.d.ts new file mode 100644 index 0000000..a693e7f --- /dev/null +++ b/node_modules/flowbite/plugin.d.ts @@ -0,0 +1,2 @@ +declare const plugin: { handler: () => void }; +export = plugin; diff --git a/node_modules/flowbite/plugin.js b/node_modules/flowbite/plugin.js new file mode 100644 index 0000000..29bfc9a --- /dev/null +++ b/node_modules/flowbite/plugin.js @@ -0,0 +1,970 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const svgToDataUri = require('mini-svg-data-uri'); +const plugin = require('tailwindcss/plugin'); +const defaultTheme = require('tailwindcss/defaultTheme'); +const colors = require('tailwindcss/colors'); +const [baseFontSize, { lineHeight: baseLineHeight }] = + defaultTheme.fontSize.base; +const { spacing, borderWidth, borderRadius, boxShadow } = defaultTheme; + +module.exports = plugin.withOptions( + function (options = {}) { + // Enable forms and tooltip by default if not specified in options + const { charts = false, forms = true, tooltips = true } = options; + + return function ({ addBase, addComponents, theme }) { + // tooltip and popover styles + if (tooltips) { + addBase({ + // remove from v2.x+ END + [['.tooltip-arrow', '.tooltip-arrow:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + [['.tooltip-arrow']]: { + visibility: 'hidden', + }, + [['.tooltip-arrow:before']]: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + [`[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before`]: + { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`.tooltip[data-popper-placement^='top'] > .tooltip-arrow`]: + { + bottom: '-4px', + }, + [`.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow`]: + { + top: '-4px', + }, + [`.tooltip[data-popper-placement^='left'] > .tooltip-arrow`]: + { + right: '-4px', + }, + [`.tooltip[data-popper-placement^='right'] > .tooltip-arrow`]: + { + left: '-4px', + }, + ['.tooltip.invisible > .tooltip-arrow:before']: { + visibility: 'hidden', + }, + [['[data-popper-arrow]', '[data-popper-arrow]:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['[data-popper-arrow]']: { + visibility: 'hidden', + }, + ['[data-popper-arrow]:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + ['[data-popper-arrow]:after']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + position: 'absolute', + width: '9px', + height: '9px', + background: 'inherit', + }, + [`[role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]`]: + { + bottom: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]`]: + { + top: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]`]: + { + right: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]`]: + { + left: '-5px', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:before']: + { + visibility: 'hidden', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:after']: + { + visibility: 'hidden', + }, + }); + } + + // form styles + if (forms) { + addBase({ + [[ + "[type='text']", + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ]]: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': theme( + 'colors.gray.500', + colors.gray[500] + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + }, + }, + [['input::placeholder', 'textarea::placeholder']]: { + color: theme('colors.gray.500', colors.gray[500]), + opacity: '1', + }, + ['::-webkit-datetime-edit-fields-wrapper']: { + padding: '0', + }, + ['::-webkit-date-and-time-value']: { + 'min-height': '1.5em', + }, + ['select:not([size])']: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[3]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `0.75em 0.75em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + ['[multiple]']: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + [[`[type='checkbox']`, `[type='radio']`]]: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: theme('colors.blue.600', colors.blue[600]), + 'background-color': '#fff', + 'border-color': theme( + 'colors.gray.500', + colors.gray[500] + ), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + [`[type='checkbox']`]: { + 'border-radius': borderRadius['none'], + }, + [`[type='radio']`]: { + 'border-radius': '100%', + }, + [[`[type='checkbox']:focus`, `[type='radio']:focus`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + [[ + `[type='checkbox']:checked`, + `[type='radio']:checked`, + `.dark [type='checkbox']:checked`, + `.dark [type='radio']:checked`, + ]]: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `0.55em 0.55em`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [`[type='checkbox']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-repeat': `no-repeat`, + 'background-size': `0.55em 0.55em`, + 'print-color-adjust': `exact`, + }, + [`[type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-size': `1em 1em`, + }, + [`.dark [type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-size': `1em 1em`, + }, + [`[type='checkbox']:indeterminate`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-color': `currentColor`, + 'border-color': `transparent`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + 'background-size': `0.55em 0.55em`, + 'print-color-adjust': `exact`, + }, + [[ + `[type='checkbox']:indeterminate:hover`, + `[type='checkbox']:indeterminate:focus`, + ]]: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + [`[type='file']`]: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + [`[type='file']:focus`]: { + outline: `1px auto inherit`, + }, + [[`input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.800', colors.gray[800]), + border: 0, + 'font-weight': theme('fontWeight.medium'), + 'font-size': theme('fontSize.sm'), + cursor: 'pointer', + 'padding-top': spacing[2.5], + 'padding-bottom': spacing[2.5], + 'padding-left': spacing[8], + 'padding-right': spacing[4], + 'margin-inline-start': '-1rem', + 'margin-inline-end': '1rem', + '&:hover': { + background: theme( + 'colors.gray.700', + colors.gray[700] + ), + }, + }, + [[`.dark input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.600', colors.gray[600]), + '&:hover': { + background: theme( + 'colors.gray.500', + colors.gray[500] + ), + }, + }, + [[`input[type="range"]::-webkit-slider-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[ + `.dark input[type="range"]:disabled::-webkit-slider-thumb`, + ]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]:focus::-webkit-slider-thumb`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-offset-shadow': + 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)', + '--tw-ring-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + 'box-shadow': + 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)', + '--tw-ring-opacity': 1, + '--tw-ring-color': + 'rgb(164 202 254 / var(--tw-ring-opacity))', + }, + [[`input[type="range"]::-moz-range-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-moz-range-thumb`]]: + { + background: theme( + 'colors.gray.500', + colors.gray[500] + ), + }, + [[`input[type="range"]::-moz-range-progress`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"]::-ms-fill-lower`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"].range-sm::-webkit-slider-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-webkit-slider-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + [[`input[type="range"].range-sm::-moz-range-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-moz-range-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + // remove from v2.x+ + [['.toggle-bg:after']]: { + content: '""', + position: 'absolute', + top: spacing[0.5], + left: spacing[0.5], + background: 'white', + 'border-color': theme( + 'colors.gray.300', + colors.gray[300] + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.full, + height: theme('height.5'), + width: theme('width.5'), + 'transition-property': + 'background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter', + 'transition-duration': '.15s', + 'box-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + }, + [['input:checked + .toggle-bg:after']]: { + transform: 'translateX(100%);', + 'border-color': 'white', + }, + [['input:checked + .toggle-bg']]: { + background: theme('colors.blue.600', colors.gray[600]), + 'border-color': theme( + 'colors.blue.600', + colors.gray[600] + ), + }, + }); + } + + // chart styles + if (charts) { + addComponents({ + '.apexcharts-canvas .apexcharts-tooltip': { + backgroundColor: 'white', + color: `${theme('colors.gray.500', colors.gray[500])}`, + border: '0 !important', + borderRadius: `${theme( + 'borderRadius.DEFAULT', + borderRadius.DEFAULT + )}`, + // padding: `${theme('spacing.3', spacing[3])}`, + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip': { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + color: `${theme('colors.gray.400', colors.gray[400])}`, + borderColor: 'transparent', + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title': + { + paddingTop: `${theme('spacing.2', spacing[2])}`, + paddingBottom: `${theme('spacing.2', spacing[2])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingLeft: `${theme('spacing.3', spacing[3])}`, + marginBottom: `${theme('spacing.3', spacing[3])}`, + backgroundColor: `${theme( + 'colors.gray.100', + colors.gray[100] + )}`, + borderBottomColor: `${theme( + 'colors.gray.200', + colors.gray[200] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )} !important`, + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title': + { + backgroundColor: `${theme( + 'colors.gray.600', + colors.gray[600] + )}`, + borderColor: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.apexcharts-canvas .apexcharts-xaxistooltip': { + color: `${theme('colors.gray.500', colors.gray[500])}`, + paddingTop: `${theme('spacing.2', spacing[2])}`, + paddingBottom: `${theme('spacing.2', spacing[2])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingLeft: `${theme('spacing.3', spacing[3])}`, + borderColor: `transparent`, + backgroundColor: 'white', + borderRadius: `${theme( + 'borderRadius.DEFAULT', + borderRadius.DEFAULT + )}`, + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.dark .apexcharts-canvas .apexcharts-xaxistooltip': { + color: `${theme('colors.gray.400', colors.gray[400])}`, + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label': + { + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label': + { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value': + { + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value': + { + color: 'white', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip-text': { + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )} !important`, + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:after, .apexcharts-canvas .apexcharts-xaxistooltip:before': + { + borderBottomColor: 'white', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:after': { + borderWidth: '8px', + marginLeft: '-8px', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:before': { + borderWidth: '10px', + marginLeft: '-10px', + }, + '.dark .apexcharts-canvas .apexcharts-xaxistooltip:after, .dark .apexcharts-canvas .apexcharts-xaxistooltip:before': + { + borderBottomColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group': + { + padding: '0', + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active': + { + paddingLeft: `${theme('spacing.3', spacing[3])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingBottom: `${theme('spacing.3', spacing[3])}`, + backgroundColor: 'white !important', + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active': + { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )} !important`, + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type': + { + paddingTop: `${theme('spacing.3', spacing[3])}`, + }, + '.apexcharts-canvas .apexcharts-legend': { + padding: '0 !important', + }, + '.apexcharts-canvas .apexcharts-legend-text': { + fontSize: `${theme( + 'fontSize.xs', + defaultTheme.fontSize.xs + )}`, + fontWeight: `${theme( + 'fontWeight.medium', + defaultTheme.fontWeight.medium + )} !important`, + paddingLeft: `${theme('spacing.5', spacing[5])}`, + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + }, + '.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover': + { + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-legend-text': { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover': + { + color: `white !important`, + }, + '.apexcharts-canvas .apexcharts-legend-series': { + marginLeft: `${theme('spacing.2', spacing[2])}`, + marginRight: `${theme('spacing.2', spacing[2])}`, + marginBottom: `${theme( + 'spacing.1', + spacing[1] + )} !important`, + display: 'flex', + alignItems: 'center', + }, + '.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value': + { + fill: `${theme( + 'colors.gray.900', + colors.gray[900] + )} !important`, + fontSize: `${theme('fontSize.3xl')}`, + fontWeight: `${theme( + 'fontWeight.bold', + defaultTheme.fontWeight.bold + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value': + { + fill: `white !important`, + }, + '.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label': + { + fill: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + fontSize: `${theme('fontSize.base')}`, + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label': + { + fill: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label': + { + fontSize: `${theme('fontSize.xs')} !important`, + fontWeight: `${theme( + 'fontWeight.semibold', + defaultTheme.fontWeight.semibold + )} !important`, + textShadow: `${theme( + 'boxShadow.none', + boxShadow.none + )} !important`, + filter: `none !important`, + }, + '.apexcharts-gridline, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs': + { + stroke: `${theme( + 'colors.gray.200', + colors.gray[200] + )} !important`, + }, + '.dark .apexcharts-gridline, .dark .apexcharts-xcrosshairs, .dark .apexcharts-ycrosshairs': + { + stroke: `${theme( + 'colors.gray.700', + colors.gray[700] + )} !important`, + }, + }); + } + }; + }, + function (options = {}) { + // Enable forms and tooltip by default if not specified in options + const { charts = false, forms = true, tooltips = true } = options; + + const safelist = [ + 'w-64', + 'w-1/2', + 'rounded-l-lg', + 'rounded-r-lg', + 'bg-gray-200', + 'grid-cols-4', + 'grid-cols-7', + 'h-6', + 'leading-6', + 'h-9', + 'leading-9', + 'shadow-lg', + ]; + + if (charts) { + safelist.push({ pattern: /^apexcharts-.*$/ }); + } + + return { + safelist: safelist, + darkMode: 'class', // or 'media' or 'class', + theme: { + extend: { + height: { + modal: 'calc(100% - 2rem)', + }, + boxShadow: { + 'sm-light': '0 2px 5px 0px rgba(255, 255, 255, 0.08)', + }, + colors: { + transparent: 'transparent', + white: '#ffffff', + black: '#000000', + gray: { + 50: '#F9FAFB', + 100: '#F3F4F6', + 200: '#E5E7EB', + 300: '#D1D5DB', + 400: '#9CA3AF', + 500: '#6B7280', + 600: '#4B5563', + 700: '#374151', + 800: '#1F2937', + 900: '#111827', + }, + red: { + 50: '#FDF2F2', + 100: '#FDE8E8', + 200: '#FBD5D5', + 300: '#F8B4B4', + 400: '#F98080', + 500: '#F05252', + 600: '#E02424', + 700: '#C81E1E', + 800: '#9B1C1C', + 900: '#771D1D', + }, + orange: { + 50: '#FFF8F1', + 100: '#FEECDC', + 200: '#FCD9BD', + 300: '#FDBA8C', + 400: '#FF8A4C', + 500: '#FF5A1F', + 600: '#D03801', + 700: '#B43403', + 800: '#8A2C0D', + 900: '#771D1D', + }, + yellow: { + 50: '#FDFDEA', + 100: '#FDF6B2', + 200: '#FCE96A', + 300: '#FACA15', + 400: '#E3A008', + 500: '#C27803', + 600: '#9F580A', + 700: '#8E4B10', + 800: '#723B13', + 900: '#633112', + }, + green: { + 50: '#F3FAF7', + 100: '#DEF7EC', + 200: '#BCF0DA', + 300: '#84E1BC', + 400: '#31C48D', + 500: '#0E9F6E', + 600: '#057A55', + 700: '#046C4E', + 800: '#03543F', + 900: '#014737', + }, + teal: { + 50: '#EDFAFA', + 100: '#D5F5F6', + 200: '#AFECEF', + 300: '#7EDCE2', + 400: '#16BDCA', + 500: '#0694A2', + 600: '#047481', + 700: '#036672', + 800: '#05505C', + 900: '#014451', + }, + blue: { + 50: '#EBF5FF', + 100: '#E1EFFE', + 200: '#C3DDFD', + 300: '#A4CAFE', + 400: '#76A9FA', + 500: '#3F83F8', + 600: '#1C64F2', + 700: '#1A56DB', + 800: '#1E429F', + 900: '#233876', + }, + indigo: { + 50: '#F0F5FF', + 100: '#E5EDFF', + 200: '#CDDBFE', + 300: '#B4C6FC', + 400: '#8DA2FB', + 500: '#6875F5', + 600: '#5850EC', + 700: '#5145CD', + 800: '#42389D', + 900: '#362F78', + }, + purple: { + 50: '#F6F5FF', + 100: '#EDEBFE', + 200: '#DCD7FE', + 300: '#CABFFD', + 400: '#AC94FA', + 500: '#9061F9', + 600: '#7E3AF2', + 700: '#6C2BD9', + 800: '#5521B5', + 900: '#4A1D96', + }, + pink: { + 50: '#FDF2F8', + 100: '#FCE8F3', + 200: '#FAD1E8', + 300: '#F8B4D9', + 400: '#F17EB8', + 500: '#E74694', + 600: '#D61F69', + 700: '#BF125D', + 800: '#99154B', + 900: '#751A3D', + }, + }, + }, + }, + }; + } +); diff --git a/node_modules/fsevents/LICENSE b/node_modules/fsevents/LICENSE new file mode 100644 index 0000000..5d70441 --- /dev/null +++ b/node_modules/fsevents/LICENSE @@ -0,0 +1,22 @@ +MIT License +----------- + +Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/fsevents/README.md b/node_modules/fsevents/README.md new file mode 100644 index 0000000..025c9a1 --- /dev/null +++ b/node_modules/fsevents/README.md @@ -0,0 +1,83 @@ +# fsevents [![NPM](https://nodei.co/npm/fsevents.png)](https://nodei.co/npm/fsevents/) + +Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) + +The FSEvents API in MacOS allows applications to register for notifications of +changes to a given directory tree. It is a very fast and lightweight alternative +to kqueue. + +This is a low-level library. For a cross-platform file watching module that +uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). + +## Installation + +Supports only **Node.js v8.16 and higher**. + +```sh +npm install fsevents +``` + +## Usage + +```js +const fsevents = require('fsevents'); +const stop = fsevents.watch(__dirname, (path, flags, id) => { + const info = fsevents.getInfo(path, flags, id); +}); // To start observation +stop(); // To end observation +``` + +The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a +a change in the file system. It takes three arguments: + +###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` + + * `path: string` - the item in the filesystem that have been changed + * `flags: number` - a numeric value describing what the change was + * `id: string` - an unique-id identifying this specific event + + Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. + +###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` + +The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure +that is easier to digest to determine what the change was. + +The `FsEventsInfo` has the following shape: + +```js +/** + * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent + * @typedef {'file'|'directory'|'symlink'} FsEventsType + */ +{ + "event": "created", // {FsEventsEvent} + "path": "file.txt", + "type": "file", // {FsEventsType} + "changes": { + "inode": true, // Had iNode Meta-Information changed + "finder": false, // Had Finder Meta-Data changed + "access": false, // Had access permissions changed + "xattrs": false // Had xAttributes changed + }, + "flags": 0x100000000 +} +``` + +## Changelog + +- v2.3 supports Apple Silicon ARM CPUs +- v2 supports node 8.16+ and reduces package size massively +- v1.2.8 supports node 6+ +- v1.2.7 supports node 4+ + +## Troubleshooting + +- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error. +- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default. + +## License + +The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. + +Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/node_modules/fsevents/fsevents.d.ts b/node_modules/fsevents/fsevents.d.ts new file mode 100644 index 0000000..2723c04 --- /dev/null +++ b/node_modules/fsevents/fsevents.d.ts @@ -0,0 +1,46 @@ +declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown"; +declare type Type = "file" | "directory" | "symlink"; +declare type FileChanges = { + inode: boolean; + finder: boolean; + access: boolean; + xattrs: boolean; +}; +declare type Info = { + event: Event; + path: string; + type: Type; + changes: FileChanges; + flags: number; +}; +declare type WatchHandler = (path: string, flags: number, id: string) => void; +export declare function watch(path: string, handler: WatchHandler): () => Promise; +export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise; +export declare function getInfo(path: string, flags: number): Info; +export declare const constants: { + None: 0x00000000; + MustScanSubDirs: 0x00000001; + UserDropped: 0x00000002; + KernelDropped: 0x00000004; + EventIdsWrapped: 0x00000008; + HistoryDone: 0x00000010; + RootChanged: 0x00000020; + Mount: 0x00000040; + Unmount: 0x00000080; + ItemCreated: 0x00000100; + ItemRemoved: 0x00000200; + ItemInodeMetaMod: 0x00000400; + ItemRenamed: 0x00000800; + ItemModified: 0x00001000; + ItemFinderInfoMod: 0x00002000; + ItemChangeOwner: 0x00004000; + ItemXattrMod: 0x00008000; + ItemIsFile: 0x00010000; + ItemIsDir: 0x00020000; + ItemIsSymlink: 0x00040000; + ItemIsHardlink: 0x00100000; + ItemIsLastHardlink: 0x00200000; + OwnEvent: 0x00080000; + ItemCloned: 0x00400000; +}; +export {}; diff --git a/node_modules/fsevents/fsevents.js b/node_modules/fsevents/fsevents.js new file mode 100644 index 0000000..f1b31c9 --- /dev/null +++ b/node_modules/fsevents/fsevents.js @@ -0,0 +1,82 @@ +/* + ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + ** Licensed under MIT License. + */ + +/* jshint node:true */ +"use strict"; + +if (process.platform !== "darwin") { + throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); +} + +const Native = require("./fsevents.node"); +const events = Native.constants; + +function watch(path, since, handler) { + if (typeof path !== "string") { + throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); + } + if ("function" === typeof since && "undefined" === typeof handler) { + handler = since; + since = Native.flags.SinceNow; + } + if (typeof since !== "number") { + throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`); + } + if (typeof handler !== "function") { + throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`); + } + + let instance = Native.start(Native.global, path, since, handler); + if (!instance) throw new Error(`could not watch: ${path}`); + return () => { + const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined); + instance = undefined; + return result; + }; +} + +function getInfo(path, flags) { + return { + path, + flags, + event: getEventType(flags), + type: getFileType(flags), + changes: getFileChanges(flags), + }; +} + +function getFileType(flags) { + if (events.ItemIsFile & flags) return "file"; + if (events.ItemIsDir & flags) return "directory"; + if (events.ItemIsSymlink & flags) return "symlink"; +} +function anyIsTrue(obj) { + for (let key in obj) { + if (obj[key]) return true; + } + return false; +} +function getEventType(flags) { + if (events.ItemRemoved & flags) return "deleted"; + if (events.ItemRenamed & flags) return "moved"; + if (events.ItemCreated & flags) return "created"; + if (events.ItemModified & flags) return "modified"; + if (events.RootChanged & flags) return "root-changed"; + if (events.ItemCloned & flags) return "cloned"; + if (anyIsTrue(flags)) return "modified"; + return "unknown"; +} +function getFileChanges(flags) { + return { + inode: !!(events.ItemInodeMetaMod & flags), + finder: !!(events.ItemFinderInfoMod & flags), + access: !!(events.ItemChangeOwner & flags), + xattrs: !!(events.ItemXattrMod & flags), + }; +} + +exports.watch = watch; +exports.getInfo = getInfo; +exports.constants = events; diff --git a/node_modules/fsevents/fsevents.node b/node_modules/fsevents/fsevents.node new file mode 100755 index 0000000..00fac7e Binary files /dev/null and b/node_modules/fsevents/fsevents.node differ diff --git a/node_modules/fsevents/package.json b/node_modules/fsevents/package.json new file mode 100644 index 0000000..af6da84 --- /dev/null +++ b/node_modules/fsevents/package.json @@ -0,0 +1,62 @@ +{ + "name": "fsevents", + "version": "2.3.2", + "description": "Native Access to MacOS FSEvents", + "main": "fsevents.js", + "types": "fsevents.d.ts", + "os": [ + "darwin" + ], + "files": [ + "fsevents.d.ts", + "fsevents.js", + "fsevents.node" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + }, + "scripts": { + "clean": "node-gyp clean && rm -f fsevents.node", + "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", + "test": "/bin/bash ./test.sh 2>/dev/null", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/fsevents/fsevents.git" + }, + "keywords": [ + "fsevents", + "mac" + ], + "contributors": [ + { + "name": "Philipp Dunkel", + "email": "pip@pipobscure.com" + }, + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "Elan Shankar", + "email": "elan.shanker@gmail.com" + }, + { + "name": "Miroslav Bajtoš", + "email": "mbajtoss@gmail.com" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fsevents/fsevents/issues" + }, + "homepage": "https://github.com/fsevents/fsevents", + "devDependencies": { + "node-gyp": "^6.1.0" + } +} diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig new file mode 100644 index 0000000..ac29ade --- /dev/null +++ b/node_modules/function-bind/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..9b33d8e --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json new file mode 100644 index 0000000..8c44794 --- /dev/null +++ b/node_modules/function-bind/.jscs.json @@ -0,0 +1,176 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} + diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore new file mode 100644 index 0000000..dbb555f --- /dev/null +++ b/node_modules/function-bind/.npmignore @@ -0,0 +1,22 @@ +# gitignore +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml new file mode 100644 index 0000000..85f70d2 --- /dev/null +++ b/node_modules/function-bind/.travis.yml @@ -0,0 +1,168 @@ +language: node_js +os: + - linux +node_js: + - "8.4" + - "7.10" + - "6.11" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..81862a0 --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..cc4daec --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..20a1727 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,63 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..d701b08 --- /dev/null +++ b/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker, 2021 Blaine Bublitz , Eric Schoffstall and other contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md new file mode 100644 index 0000000..6ae18a1 --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,134 @@ +

+ + + +

+ +# glob-parent + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] + +Extract the non-magic parent path from a glob string. + +## Usage + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## API + +### `globParent(maybeGlobString, [options])` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + +#### options + +```js +{ + // Disables the automatic conversion of slashes for Windows + flipBackslashes: true; +} +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/'); // 'foo' +globParent('foo/\\[bar]/'); // 'foo/[bar]' +``` + +## Limitations + +### Braces & Brackets + +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +### Windows + +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext'); // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext'); // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]'); // 'foo ' +globParent('foo \\[bar]*'); // 'foo ' + +// GOOD +globParent('./foo \\[bar]'); // 'foo [bar]' +globParent('./foo \\[bar]*'); // '.' +``` + +## License + +ISC + + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg?style=flat-square +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg?style=flat-square + +[ci-url]: https://github.com/gulpjs/glob-parent/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/glob-parent/dev?style=flat-square + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg?style=flat-square + + + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000..09dde64 --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; +var isWin32 = require('os').platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var escaped = /\\([!*?|[\](){}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (isEnclosure(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlobby(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; + +function isEnclosure(str) { + var lastChar = str.slice(-1); + + var enclosureStart; + switch (lastChar) { + case '}': + enclosureStart = '{'; + break; + case ']': + enclosureStart = '['; + break; + default: + return false; + } + + var foundIndex = str.indexOf(enclosureStart); + if (foundIndex < 0) { + return false; + } + + return str.slice(foundIndex + 1, -1).includes(slash); +} + +function isGlobby(str) { + if (/\([^()]+$/.test(str)) { + return true; + } + if (str[0] === '{' || str[0] === '[') { + return true; + } + if (/[^\\][{[]/.test(str)) { + return true; + } + return isGlob(str); +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000..baeab42 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,54 @@ +{ + "name": "glob-parent", + "version": "6.0.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-parent", + "license": "ISC", + "engines": { + "node": ">=10.13.0" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" + }, + "dependencies": { + "is-glob": "^4.0.3" + }, + "devDependencies": { + "eslint": "^7.0.0", + "eslint-config-gulp": "^5.0.0", + "expect": "^26.0.1", + "mocha": "^7.1.2", + "nyc": "^15.0.1" + }, + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": { + "singleQuote": true + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ] +} diff --git a/node_modules/has/.DS_Store b/node_modules/has/.DS_Store new file mode 100644 index 0000000..c0dd231 Binary files /dev/null and b/node_modules/has/.DS_Store differ diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT new file mode 100644 index 0000000..ae7014d --- /dev/null +++ b/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has/README.md b/node_modules/has/README.md new file mode 100644 index 0000000..635e3a4 --- /dev/null +++ b/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json new file mode 100644 index 0000000..7c4592f --- /dev/null +++ b/node_modules/has/package.json @@ -0,0 +1,48 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } +} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js new file mode 100644 index 0000000..dd92dd9 --- /dev/null +++ b/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js new file mode 100644 index 0000000..43d480b --- /dev/null +++ b/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t.end(); +}); diff --git a/node_modules/is-binary-path/index.d.ts b/node_modules/is-binary-path/index.d.ts new file mode 100644 index 0000000..19dcd43 --- /dev/null +++ b/node_modules/is-binary-path/index.d.ts @@ -0,0 +1,17 @@ +/** +Check if a file path is a binary file. + +@example +``` +import isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` +*/ +declare function isBinaryPath(filePath: string): boolean; + +export = isBinaryPath; diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..ef7548c --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,7 @@ +'use strict'; +const path = require('path'); +const binaryExtensions = require('binary-extensions'); + +const extensions = new Set(binaryExtensions); + +module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/node_modules/is-binary-path/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..a8d005a --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,40 @@ +{ + "name": "is-binary-path", + "version": "2.1.0", + "description": "Check if a file path is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..b4ab025 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a file path is a binary file + + +## Install + +``` +$ npm install is-binary-path +``` + + +## Usage + +```js +const isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` + + +## Related + +- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000..f2e0726 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000..1f4d1d6 --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000..2e50287 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000..062d906 --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000..058584b --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,153 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": ">= 18", + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000..f9637e0 --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var has = require('has'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return has(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000..80ce9f5 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,65 @@ +{ + "name": "is-core-module", + "version": "2.9.0", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "has": "^1.0.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "mock-property": "^1.0.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000..4385b20 --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,133 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..7a90836 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..740724b --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,206 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [doowb](https://github.com/doowb) | +| 1 | [phated](https://github.com/phated) | +| 1 | [danhper](https://github.com/danhper) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..620f563 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,150 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var check = strictCheck; + + // optionally relax check + if (options && options.strict === false) { + check = relaxedCheck; + } + + return check(str); +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..858af03 --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/is-glob", + "bugs": { + "url": "https://github.com/micromatch/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..eb8149e --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,187 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a finite number. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Why is this needed? + +In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: + +```js +console.log(+[]); //=> 0 +console.log(+''); //=> 0 +console.log(+' '); //=> 0 +console.log(typeof NaN); //=> 'number' +``` + +This library offers a performant way to smooth out edge cases like these. + +## Usage + +```js +const isNumber = require('is-number'); +``` + +See the [tests](./test.js) for more examples. + +### true + +```js +isNumber(5e3); // true +isNumber(0xff); // true +isNumber(-1.1); // true +isNumber(0); // true +isNumber(1); // true +isNumber(1.1); // true +isNumber(10); // true +isNumber(10.10); // true +isNumber(100); // true +isNumber('-1.1'); // true +isNumber('0'); // true +isNumber('012'); // true +isNumber('0xff'); // true +isNumber('1'); // true +isNumber('1.1'); // true +isNumber('10'); // true +isNumber('10.10'); // true +isNumber('100'); // true +isNumber('5e3'); // true +isNumber(parseInt('012')); // true +isNumber(parseFloat('012')); // true +``` + +### False + +Everything else is false, as you would expect: + +```js +isNumber(Infinity); // false +isNumber(NaN); // false +isNumber(null); // false +isNumber(undefined); // false +isNumber(''); // false +isNumber(' '); // false +isNumber('foo'); // false +isNumber([1]); // false +isNumber([]); // false +isNumber(function () {}); // false +isNumber({}); // false +``` + +## Release history + +### 7.0.0 + +* Refactor. Now uses `.isFinite` if it exists. +* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. + +### 6.0.0 + +* Optimizations, thanks to @benaadams. + +### 5.0.0 + +**Breaking changes** + +* removed support for `instanceof Number` and `instanceof String` + +## Benchmarks + +As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. + +``` +# all +v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) +v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) +parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) +fastest is 'v7.0' + +# string +v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) +v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) +parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) +fastest is 'parseFloat,v7.0' + +# number +v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) +v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) +parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) +fastest is 'v6.0' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike-old](https://github.com/charlike-old) | +| 1 | [benaadams](https://github.com/benaadams) | +| 1 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..27f19b7 --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,18 @@ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..3715072 --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,82 @@ +{ + "name": "is-number", + "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", + "version": "7.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.12.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "cast", + "check", + "coerce", + "coercion", + "finite", + "integer", + "is", + "isnan", + "is-nan", + "is-num", + "is-number", + "isnumber", + "isfinite", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "parseFloat", + "parseInt", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "is-plain-object", + "is-primitive", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/lilconfig/dist/index.d.ts b/node_modules/lilconfig/dist/index.d.ts new file mode 100644 index 0000000..766c58c --- /dev/null +++ b/node_modules/lilconfig/dist/index.d.ts @@ -0,0 +1,38 @@ +export declare type LilconfigResult = null | { + filepath: string; + config: any; + isEmpty?: boolean; +}; +interface OptionsBase { + stopDir?: string; + searchPlaces?: string[]; + ignoreEmptySearchPlaces?: boolean; + packageProp?: string | string[]; +} +export declare type Transform = TransformSync | ((result: LilconfigResult) => Promise); +export declare type TransformSync = (result: LilconfigResult) => LilconfigResult; +declare type LoaderResult = any; +export declare type LoaderSync = (filepath: string, content: string) => LoaderResult; +export declare type Loader = LoaderSync | ((filepath: string, content: string) => Promise); +export declare type Loaders = Record; +export declare type LoadersSync = Record; +export interface Options extends OptionsBase { + loaders?: Loaders; + transform?: Transform; +} +export interface OptionsSync extends OptionsBase { + loaders?: LoadersSync; + transform?: TransformSync; +} +export declare const defaultLoaders: LoadersSync; +declare type AsyncSearcher = { + search(searchFrom?: string): Promise; + load(filepath: string): Promise; +}; +export declare function lilconfig(name: string, options?: Partial): AsyncSearcher; +declare type SyncSearcher = { + search(searchFrom?: string): LilconfigResult; + load(filepath: string): LilconfigResult; +}; +export declare function lilconfigSync(name: string, options?: OptionsSync): SyncSearcher; +export {}; diff --git a/node_modules/lilconfig/dist/index.js b/node_modules/lilconfig/dist/index.js new file mode 100644 index 0000000..0b684ff --- /dev/null +++ b/node_modules/lilconfig/dist/index.js @@ -0,0 +1,247 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lilconfigSync = exports.lilconfig = exports.defaultLoaders = void 0; +const path = require("path"); +const fs = require("fs"); +const os = require("os"); +const fsReadFileAsync = fs.promises.readFile; +function getDefaultSearchPlaces(name) { + return [ + 'package.json', + `.${name}rc.json`, + `.${name}rc.js`, + `${name}.config.js`, + `.${name}rc.cjs`, + `${name}.config.cjs`, + ]; +} +function getSearchPaths(startDir, stopDir) { + return startDir + .split(path.sep) + .reduceRight((acc, _, ind, arr) => { + const currentPath = arr.slice(0, ind + 1).join(path.sep); + if (!acc.passedStopDir) + acc.searchPlaces.push(currentPath || path.sep); + if (currentPath === stopDir) + acc.passedStopDir = true; + return acc; + }, { searchPlaces: [], passedStopDir: false }).searchPlaces; +} +exports.defaultLoaders = Object.freeze({ + '.js': require, + '.json': require, + '.cjs': require, + noExt(_, content) { + return JSON.parse(content); + }, +}); +function getExtDesc(ext) { + return ext === 'noExt' ? 'files without extensions' : `extension "${ext}"`; +} +function getOptions(name, options = {}) { + const conf = { + stopDir: os.homedir(), + searchPlaces: getDefaultSearchPlaces(name), + ignoreEmptySearchPlaces: true, + transform: (x) => x, + packageProp: [name], + ...options, + loaders: { ...exports.defaultLoaders, ...options.loaders }, + }; + conf.searchPlaces.forEach(place => { + const key = path.extname(place) || 'noExt'; + const loader = conf.loaders[key]; + if (!loader) { + throw new Error(`No loader specified for ${getExtDesc(key)}, so searchPlaces item "${place}" is invalid`); + } + if (typeof loader !== 'function') { + throw new Error(`loader for ${getExtDesc(key)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`); + } + }); + return conf; +} +function getPackageProp(props, obj) { + if (typeof props === 'string' && props in obj) + return obj[props]; + return ((Array.isArray(props) ? props : props.split('.')).reduce((acc, prop) => (acc === undefined ? acc : acc[prop]), obj) || null); +} +function getSearchItems(searchPlaces, searchPaths) { + return searchPaths.reduce((acc, searchPath) => { + searchPlaces.forEach(fileName => acc.push({ + fileName, + filepath: path.join(searchPath, fileName), + loaderKey: path.extname(fileName) || 'noExt', + })); + return acc; + }, []); +} +function validateFilePath(filepath) { + if (!filepath) + throw new Error('load must pass a non-empty string'); +} +function validateLoader(loader, ext) { + if (!loader) + throw new Error(`No loader specified for extension "${ext}"`); + if (typeof loader !== 'function') + throw new Error('loader is not a function'); +} +function lilconfig(name, options) { + const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, } = getOptions(name, options); + return { + async search(searchFrom = process.cwd()) { + const searchPaths = getSearchPaths(searchFrom, stopDir); + const result = { + config: null, + filepath: '', + }; + const searchItems = getSearchItems(searchPlaces, searchPaths); + for (const { fileName, filepath, loaderKey } of searchItems) { + try { + await fs.promises.access(filepath); + } + catch (_a) { + continue; + } + const content = String(await fsReadFileAsync(filepath)); + const loader = loaders[loaderKey]; + if (fileName === 'package.json') { + const pkg = await loader(filepath, content); + const maybeConfig = getPackageProp(packageProp, pkg); + if (maybeConfig != null) { + result.config = maybeConfig; + result.filepath = filepath; + break; + } + continue; + } + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + continue; + if (isEmpty) { + result.isEmpty = true; + result.config = undefined; + } + else { + validateLoader(loader, loaderKey); + result.config = await loader(filepath, content); + } + result.filepath = filepath; + break; + } + if (result.filepath === '' && result.config === null) + return transform(null); + return transform(result); + }, + async load(filepath) { + validateFilePath(filepath); + const absPath = path.resolve(process.cwd(), filepath); + const { base, ext } = path.parse(absPath); + const loaderKey = ext || 'noExt'; + const loader = loaders[loaderKey]; + validateLoader(loader, loaderKey); + const content = String(await fsReadFileAsync(absPath)); + if (base === 'package.json') { + const pkg = await loader(absPath, content); + return transform({ + config: getPackageProp(packageProp, pkg), + filepath: absPath, + }); + } + const result = { + config: null, + filepath: absPath, + }; + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + return transform({ + config: undefined, + filepath: absPath, + isEmpty: true, + }); + result.config = isEmpty + ? undefined + : await loader(absPath, content); + return transform(isEmpty ? { ...result, isEmpty, config: undefined } : result); + }, + }; +} +exports.lilconfig = lilconfig; +function lilconfigSync(name, options) { + const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, } = getOptions(name, options); + return { + search(searchFrom = process.cwd()) { + const searchPaths = getSearchPaths(searchFrom, stopDir); + const result = { + config: null, + filepath: '', + }; + const searchItems = getSearchItems(searchPlaces, searchPaths); + for (const { fileName, filepath, loaderKey } of searchItems) { + try { + fs.accessSync(filepath); + } + catch (_a) { + continue; + } + const loader = loaders[loaderKey]; + const content = String(fs.readFileSync(filepath)); + if (fileName === 'package.json') { + const pkg = loader(filepath, content); + const maybeConfig = getPackageProp(packageProp, pkg); + if (maybeConfig != null) { + result.config = maybeConfig; + result.filepath = filepath; + break; + } + continue; + } + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + continue; + if (isEmpty) { + result.isEmpty = true; + result.config = undefined; + } + else { + validateLoader(loader, loaderKey); + result.config = loader(filepath, content); + } + result.filepath = filepath; + break; + } + if (result.filepath === '' && result.config === null) + return transform(null); + return transform(result); + }, + load(filepath) { + validateFilePath(filepath); + const absPath = path.resolve(process.cwd(), filepath); + const { base, ext } = path.parse(absPath); + const loaderKey = ext || 'noExt'; + const loader = loaders[loaderKey]; + validateLoader(loader, loaderKey); + const content = String(fs.readFileSync(absPath)); + if (base === 'package.json') { + const pkg = loader(absPath, content); + return transform({ + config: getPackageProp(packageProp, pkg), + filepath: absPath, + }); + } + const result = { + config: null, + filepath: absPath, + }; + const isEmpty = content.trim() === ''; + if (isEmpty && ignoreEmptySearchPlaces) + return transform({ + filepath: absPath, + config: undefined, + isEmpty: true, + }); + result.config = isEmpty ? undefined : loader(absPath, content); + return transform(isEmpty ? { ...result, isEmpty, config: undefined } : result); + }, + }; +} +exports.lilconfigSync = lilconfigSync; diff --git a/node_modules/lilconfig/package.json b/node_modules/lilconfig/package.json new file mode 100644 index 0000000..6b0a384 --- /dev/null +++ b/node_modules/lilconfig/package.json @@ -0,0 +1,48 @@ +{ + "name": "lilconfig", + "version": "2.0.5", + "description": "A zero-dependency alternative to cosmiconfig", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "prebuild": "npm run clean", + "build": "tsc --declaration", + "postbuild": "du -h ./dist/*", + "clean": "rm -rf ./dist", + "test": "jest --coverage", + "lint": "eslint ./src/*.ts" + }, + "keywords": [ + "cosmiconfig", + "config", + "configuration", + "search" + ], + "files": [ + "dist/*" + ], + "repository": { + "type": "git", + "url": "https://github.com/antonk52/lilconfig" + }, + "bugs": "https://github.com/antonk52/lilconfig/issues", + "author": "antonk52", + "license": "MIT", + "devDependencies": { + "@types/jest": "^27.0.2", + "@types/node": "^14.17.2", + "@typescript-eslint/eslint-plugin": "^5.3.0", + "@typescript-eslint/parser": "^5.3.0", + "cosmiconfig": "^7.0.1", + "eslint": "^8.1.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "jest": "^27.3.1", + "prettier": "^2.4.1", + "ts-jest": "^27.0.7", + "typescript": "^4.4.4" + }, + "engines": { + "node": ">=10" + } +} diff --git a/node_modules/lilconfig/readme.md b/node_modules/lilconfig/readme.md new file mode 100644 index 0000000..fea770d --- /dev/null +++ b/node_modules/lilconfig/readme.md @@ -0,0 +1,118 @@ +# Lilconfig ⚙️ +[![npm version](https://badge.fury.io/js/lilconfig.svg)](https://badge.fury.io/js/lilconfig) +[![install size](https://packagephobia.now.sh/badge?p=lilconfig)](https://packagephobia.now.sh/result?p=lilconfig) +[![Coverage Status](https://coveralls.io/repos/github/antonk52/lilconfig/badge.svg)](https://coveralls.io/github/antonk52/lilconfig) + +A zero-dependency alternative to [cosmiconfig](https://www.npmjs.com/package/cosmiconfig) with the same API. + +## Installation + +```sh +npm install lilconfig +``` + +## Usage + +```js +import {lilconfig, lilconfigSync} from 'lilconfig'; + +// all keys are optional +const options = { + stopDir: '/Users/you/some/dir', + searchPlaces: ['package.json', 'myapp.conf.js'], + ignoreEmptySearchPlaces: false +} + +lilconfig( + 'myapp', + options // optional +).search() // Promise + +lilconfigSync( + 'myapp', + options // optional +).load(pathToConfig) // LilconfigResult + +/** + * LilconfigResult + * { + * config: any; // your config + * filepath: string; + * } + */ +``` + +## Difference to `cosmiconfig` +Lilconfig does not intend to be 100% compatible with `cosmiconfig` but tries to mimic it where possible. The key differences are: +- **no** support for yaml files out of the box(`lilconfig` attempts to parse files with no extension as JSON instead of YAML). You can still add the support for YAML files by providing a loader, see an [example](#loaders-example) below. +- **no** cache + +### Options difference between the two. + +|cosmiconfig option | lilconfig | +|------------------------|-----------| +|cache | ❌ | +|loaders | ✅ | +|ignoreEmptySearchPlaces | ✅ | +|packageProp | ✅ | +|searchPlaces | ✅ | +|stopDir | ✅ | +|transform | ✅ | + +## Loaders examples + +### Yaml loader + +If you need the YAML support you can provide your own loader + +```js +import {lilconfig} from 'lilconfig'; +import yaml from 'yaml'; + +function loadYaml(filepath, content) { + return yaml.parse(content); +} + +const options = { + loaders: { + '.yaml': loadYaml, + '.yml': loadYaml, + // loader for files with no extension + noExt: loadYaml + } +}; + +lilconfig('myapp', options) + .search() + .then(result => { + result // {config, filepath} + }); +``` + +### ESM loader + +Lilconfig v2 does not support ESM modules out of the box. However, you can support it with a custom a loader. Note that this will only work with the async `lilconfig` function and won't work with the sync `lilconfigSync`. + +```js +import {lilconfig} from 'lilconfig'; + +const loadEsm = filepath => import(filepath); + +lilconfig('myapp', { + loaders: { + '.js': loadEsm, + '.mjs': loadEsm, + } +}) + .search() + .then(result => { + result // {config, filepath} + + result.config.default // if config uses `export default` + }); +``` + +## Version correlation + +- lilconig v1 → cosmiconfig v6 +- lilconig v2 → cosmiconfig v7 diff --git a/node_modules/merge2/LICENSE b/node_modules/merge2/LICENSE new file mode 100644 index 0000000..31dd9c7 --- /dev/null +++ b/node_modules/merge2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2020 Teambition + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/merge2/README.md b/node_modules/merge2/README.md new file mode 100644 index 0000000..27f8eb9 --- /dev/null +++ b/node_modules/merge2/README.md @@ -0,0 +1,144 @@ +# merge2 + +Merge multiple streams into one stream in sequence or parallel. + +[![NPM version][npm-image]][npm-url] +[![Build Status][travis-image]][travis-url] +[![Downloads][downloads-image]][downloads-url] + +## Install + +Install with [npm](https://npmjs.org/package/merge2) + +```sh +npm install merge2 +``` + +## Usage + +```js +const gulp = require('gulp') +const merge2 = require('merge2') +const concat = require('gulp-concat') +const minifyHtml = require('gulp-minify-html') +const ngtemplate = require('gulp-ngtemplate') + +gulp.task('app-js', function () { + return merge2( + gulp.src('static/src/tpl/*.html') + .pipe(minifyHtml({empty: true})) + .pipe(ngtemplate({ + module: 'genTemplates', + standalone: true + }) + ), gulp.src([ + 'static/src/js/app.js', + 'static/src/js/locale_zh-cn.js', + 'static/src/js/router.js', + 'static/src/js/tools.js', + 'static/src/js/services.js', + 'static/src/js/filters.js', + 'static/src/js/directives.js', + 'static/src/js/controllers.js' + ]) + ) + .pipe(concat('app.js')) + .pipe(gulp.dest('static/dist/js/')) +}) +``` + +```js +const stream = merge2([stream1, stream2], stream3, {end: false}) +//... +stream.add(stream4, stream5) +//.. +stream.end() +``` + +```js +// equal to merge2([stream1, stream2], stream3) +const stream = merge2() +stream.add([stream1, stream2]) +stream.add(stream3) +``` + +```js +// merge order: +// 1. merge `stream1`; +// 2. merge `stream2` and `stream3` in parallel after `stream1` merged; +// 3. merge 'stream4' after `stream2` and `stream3` merged; +const stream = merge2(stream1, [stream2, stream3], stream4) + +// merge order: +// 1. merge `stream5` and `stream6` in parallel after `stream4` merged; +// 2. merge 'stream7' after `stream5` and `stream6` merged; +stream.add([stream5, stream6], stream7) +``` + +```js +// nest merge +// equal to merge2(stream1, stream2, stream6, stream3, [stream4, stream5]); +const streamA = merge2(stream1, stream2) +const streamB = merge2(stream3, [stream4, stream5]) +const stream = merge2(streamA, streamB) +streamA.add(stream6) +``` + +## API + +```js +const merge2 = require('merge2') +``` + +### merge2() + +### merge2(options) + +### merge2(stream1, stream2, ..., streamN) + +### merge2(stream1, stream2, ..., streamN, options) + +### merge2(stream1, [stream2, stream3, ...], streamN, options) + +return a duplex stream (mergedStream). streams in array will be merged in parallel. + +### mergedStream.add(stream) + +### mergedStream.add(stream1, [stream2, stream3, ...], ...) + +return the mergedStream. + +### mergedStream.on('queueDrain', function() {}) + +It will emit 'queueDrain' when all streams merged. If you set `end === false` in options, this event give you a notice that should add more streams to merge or end the mergedStream. + +#### stream + +*option* +Type: `Readable` or `Duplex` or `Transform` stream. + +#### options + +*option* +Type: `Object`. + +* **end** - `Boolean` - if `end === false` then mergedStream will not be auto ended, you should end by yourself. **Default:** `undefined` + +* **pipeError** - `Boolean` - if `pipeError === true` then mergedStream will emit `error` event from source streams. **Default:** `undefined` + +* **objectMode** - `Boolean` . **Default:** `true` + +`objectMode` and other options(`highWaterMark`, `defaultEncoding` ...) is same as Node.js `Stream`. + +## License + +MIT © [Teambition](https://www.teambition.com) + +[npm-url]: https://npmjs.org/package/merge2 +[npm-image]: http://img.shields.io/npm/v/merge2.svg + +[travis-url]: https://travis-ci.org/teambition/merge2 +[travis-image]: http://img.shields.io/travis/teambition/merge2.svg + +[downloads-url]: https://npmjs.org/package/merge2 +[downloads-image]: http://img.shields.io/npm/dm/merge2.svg?style=flat-square diff --git a/node_modules/merge2/index.js b/node_modules/merge2/index.js new file mode 100644 index 0000000..78a61ed --- /dev/null +++ b/node_modules/merge2/index.js @@ -0,0 +1,144 @@ +'use strict' +/* + * merge2 + * https://github.com/teambition/merge2 + * + * Copyright (c) 2014-2020 Teambition + * Licensed under the MIT license. + */ +const Stream = require('stream') +const PassThrough = Stream.PassThrough +const slice = Array.prototype.slice + +module.exports = merge2 + +function merge2 () { + const streamsQueue = [] + const args = slice.call(arguments) + let merging = false + let options = args[args.length - 1] + + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop() + } else { + options = {} + } + + const doEnd = options.end !== false + const doPipeError = options.pipeError === true + if (options.objectMode == null) { + options.objectMode = true + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024 + } + const mergedStream = PassThrough(options) + + function addStream () { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)) + } + mergeStream() + return this + } + + function mergeStream () { + if (merging) { + return + } + merging = true + + let streams = streamsQueue.shift() + if (!streams) { + process.nextTick(endStream) + return + } + if (!Array.isArray(streams)) { + streams = [streams] + } + + let pipesCount = streams.length + 1 + + function next () { + if (--pipesCount > 0) { + return + } + merging = false + mergeStream() + } + + function pipe (stream) { + function onend () { + stream.removeListener('merge2UnpipeEnd', onend) + stream.removeListener('end', onend) + if (doPipeError) { + stream.removeListener('error', onerror) + } + next() + } + function onerror (err) { + mergedStream.emit('error', err) + } + // skip ended stream + if (stream._readableState.endEmitted) { + return next() + } + + stream.on('merge2UnpipeEnd', onend) + stream.on('end', onend) + + if (doPipeError) { + stream.on('error', onerror) + } + + stream.pipe(mergedStream, { end: false }) + // compatible for old stream + stream.resume() + } + + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]) + } + + next() + } + + function endStream () { + merging = false + // emit 'queueDrain' when all streams merged. + mergedStream.emit('queueDrain') + if (doEnd) { + mergedStream.end() + } + } + + mergedStream.setMaxListeners(0) + mergedStream.add = addStream + mergedStream.on('unpipe', function (stream) { + stream.emit('merge2UnpipeEnd') + }) + + if (args.length) { + addStream.apply(null, args) + } + return mergedStream +} + +// check and pause streams for pipe. +function pauseStreams (streams, options) { + if (!Array.isArray(streams)) { + // Backwards-compat with old-style streams + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)) + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error('Only readable stream can be merged.') + } + streams.pause() + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options) + } + } + return streams +} diff --git a/node_modules/merge2/package.json b/node_modules/merge2/package.json new file mode 100644 index 0000000..7777307 --- /dev/null +++ b/node_modules/merge2/package.json @@ -0,0 +1,43 @@ +{ + "name": "merge2", + "description": "Merge multiple streams into one stream in sequence or parallel.", + "authors": [ + "Yan Qing " + ], + "license": "MIT", + "version": "1.4.1", + "main": "./index.js", + "repository": { + "type": "git", + "url": "git@github.com:teambition/merge2.git" + }, + "homepage": "https://github.com/teambition/merge2", + "keywords": [ + "merge2", + "multiple", + "sequence", + "parallel", + "merge", + "stream", + "merge stream", + "sync" + ], + "engines": { + "node": ">= 8" + }, + "dependencies": {}, + "devDependencies": { + "standard": "^14.3.4", + "through2": "^3.0.1", + "thunks": "^4.9.6", + "tman": "^1.10.0", + "to-through": "^2.0.0" + }, + "scripts": { + "test": "standard && tman" + }, + "files": [ + "README.md", + "index.js" + ] +} diff --git a/node_modules/micromatch/LICENSE b/node_modules/micromatch/LICENSE new file mode 100755 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/micromatch/README.md b/node_modules/micromatch/README.md new file mode 100644 index 0000000..fd56336 --- /dev/null +++ b/node_modules/micromatch/README.md @@ -0,0 +1,1011 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Tests](https://github.com/micromatch/micromatch/actions/workflows/test.yml/badge.svg)](https://github.com/micromatch/micromatch/actions/workflows/test.yml) + +> Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [Quickstart](#quickstart) +- [Why use micromatch?](#why-use-micromatch) + * [Matching features](#matching-features) +- [Switching to micromatch](#switching-to-micromatch) + * [From minimatch](#from-minimatch) + * [From multimatch](#from-multimatch) +- [API](#api) +- [Options](#options) +- [Options Examples](#options-examples) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.expandRange](#optionsexpandrange) + * [options.format](#optionsformat) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.noextglob](#optionsnoextglob) + * [options.nonegate](#optionsnonegate) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.onIgnore](#optionsonignore) + * [options.onMatch](#optionsonmatch) + * [options.onResult](#optionsonresult) + * [options.posixSlashes](#optionsposixslashes) + * [options.unescape](#optionsunescape) +- [Extended globbing](#extended-globbing) + * [Extglobs](#extglobs) + * [Braces](#braces) + * [Regex character classes](#regex-character-classes) + * [Regex groups](#regex-groups) + * [POSIX bracket expressions](#posix-bracket-expressions) +- [Notes](#notes) + * [Bash 4.3 parity](#bash-43-parity) + * [Backslashes](#backslashes) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Latest results](#latest-results) +- [Contributing](#contributing) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/) (requires [Node.js](https://nodejs.org/en/) >=8.6): + +```sh +$ npm install --save micromatch +``` + +## Quickstart + +```js +const micromatch = require('micromatch'); +// micromatch(list, patterns[, options]); +``` + +The [main export](#micromatch) takes a list of strings and one or more glob patterns: + +```js +console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['f*', 'b*'])) //=> ['foo', 'bar', 'baz'] +console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['*', '!b*'])) //=> ['foo', 'qux'] +``` + +Use [.isMatch()](#ismatch) to for boolean matching: + +```js +console.log(micromatch.isMatch('foo', 'f*')) //=> true +console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true +``` + +[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! + +
+ +## Why use micromatch? + +> micromatch is a [replacement](#switching-to-micromatch) for minimatch and multimatch + +* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* More complete support for the Bash 4.3 specification than minimatch and multimatch. Micromatch passes _all of the spec tests_ from bash, including some that bash still fails. +* **Fast & Performant** - Loads in about 5ms and performs [fast matches](#benchmarks). +* **Glob matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories +* **[Advanced globbing](#extended-globbing)** - Supports [extglobs](#extglobs), [braces](#braces-1), and [POSIX brackets](#posix-bracket-expressions), and support for escaping special characters with `\` or quotes. +* **Accurate** - Covers more scenarios [than minimatch](https://github.com/yarnpkg/yarn/pull/3339) +* **Well tested** - More than 5,000 [test assertions](./test) +* **Windows support** - More reliable windows support than minimatch and multimatch. +* **[Safe](https://github.com/micromatch/braces#braces-is-safe)** - Micromatch is not subject to DoS with brace patterns like minimatch and multimatch. + +### Matching features + +* Support for multiple glob patterns (no need for wrappers like multimatch) +* Wildcards (`**`, `*.js`) +* Negation (`'!a/*.js'`, `'*!(b).js'`) +* [extglobs](#extglobs) (`+(x|y)`, `!(a|b)`) +* [POSIX character classes](#posix-bracket-expressions) (`[[:alpha:][:digit:]]`) +* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) +* regex character classes (`foo-[1-5].js`) +* regex logical "or" (`foo/(abc|xyz).js`) + +You can mix and match these features to create whatever patterns you need! + +## Switching to micromatch + +_(There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information.)_ + +### From minimatch + +Use [micromatch.isMatch()](#ismatch) instead of `minimatch()`: + +```js +console.log(micromatch.isMatch('foo', 'b*')); //=> false +``` + +Use [micromatch.match()](#match) instead of `minimatch.match()`: + +```js +console.log(micromatch.match(['foo', 'bar'], 'b*')); //=> 'bar' +``` + +### From multimatch + +Same signature: + +```js +console.log(micromatch(['foo', 'bar', 'baz'], ['f*', '*z'])); //=> ['foo', 'baz'] +``` + +## API + +**Params** + +* `list` **{String|Array}**: List of strings to match. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +const mm = require('micromatch'); +// mm(list, patterns[, options]); + +console.log(mm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.matcher](index.js#L104) + +Returns a matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}** +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +const mm = require('micromatch'); +// mm.matcher(pattern[, options]); + +const isMatch = mm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); //=> false +console.log(isMatch('a.b')); //=> true +``` + +### [.isMatch](index.js#L123) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `[options]` **{Object}**: See available [options](#options). +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +const mm = require('micromatch'); +// mm.isMatch(string, patterns[, options]); + +console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true +console.log(mm.isMatch('a.a', 'b.*')); //=> false +``` + +### [.not](index.js#L148) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +const mm = require('micromatch'); +// mm.not(list, patterns[, options]); + +console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L188) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any of the patterns matches any part of `str`. + +**Example** + +```js +var mm = require('micromatch'); +// mm.contains(string, pattern[, options]); + +console.log(mm.contains('aa/bb/cc', '*b')); +//=> true +console.log(mm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L230) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +const mm = require('micromatch'); +// mm.matchKeys(object, patterns[, options]); + +const obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(mm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.some](index.js#L259) + +Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any `patterns` matches any of the strings in `list` + +**Example** + +```js +const mm = require('micromatch'); +// mm.some(list, patterns[, options]); + +console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L295) + +Returns true if every string in the given `list` matches any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if all `patterns` matches all of the strings in `list` + +**Example** + +```js +const mm = require('micromatch'); +// mm.every(list, patterns[, options]); + +console.log(mm.every('foo.js', ['foo.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.all](index.js#L334) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +const mm = require('micromatch'); +// mm.all(string, patterns[, options]); + +console.log(mm.all('foo.js', ['foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(mm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.capture](index.js#L361) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `glob` **{String}**: Glob pattern to use for matching. +* `input` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array|null}**: Returns an array of captures if the input matches the glob pattern, otherwise `null`. + +**Example** + +```js +const mm = require('micromatch'); +// mm.capture(pattern, string[, options]); + +console.log(mm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(mm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L387) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}** +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +const mm = require('micromatch'); +// mm.makeRe(pattern[, options]); + +console.log(mm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.scan](index.js#L403) + +Scan a glob pattern to separate the pattern into segments. Used by the [split](#split) method. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with + +**Example** + +```js +const mm = require('micromatch'); +const state = mm.scan(pattern[, options]); +``` + +### [.parse](index.js#L419) + +Parse a glob pattern to create the source string for a regular expression. + +**Params** + +* `glob` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with useful properties and output to be used as regex source string. + +**Example** + +```js +const mm = require('micromatch'); +const state = mm.parse(pattern[, options]); +``` + +### [.braces](index.js#L446) + +Process the given brace `pattern`. + +**Params** + +* `pattern` **{String}**: String with brace pattern to process. +* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. +* `returns` **{Array}** + +**Example** + +```js +const { braces } = require('micromatch'); +console.log(braces('foo/{a,b,c}/bar')); +//=> [ 'foo/(a|b|c)/bar' ] + +console.log(braces('foo/{a,b,c}/bar', { expand: true })); +//=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] +``` + +## Options + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | +| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | +| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | +| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | +| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | +| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | +| `dot` | `boolean` | `false` | Match dotfiles. Otherwise dotfiles are ignored unless a `.` is explicitly defined in the pattern. | +| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. This option is overridden by the `expandBrace` option. | +| `failglob` | `boolean` | `false` | Similar to the `failglob` behavior in Bash, throws an error when no matches are found. Based on the bash option of the same name. | +| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | +| `flags` | `boolean` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | +| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | +| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | +| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | +| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | +| `lookbehinds` | `boolean` | `true` | Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. | +| `matchBase` | `boolean` | `false` | Alias for `basename` | +| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | +| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | +| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | +| `nocase` | `boolean` | `false` | Perform case-insensitive matching. Equivalent to the regex `i` flag. Note that this option is ignored when the `flags` option is defined. | +| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | +| `noext` | `boolean` | `false` | Alias for `noextglob` | +| `noextglob` | `boolean` | `false` | Disable support for matching with [extglobs](#extglobs) (like `+(a\|b)`) | +| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | +| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | +| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | +| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | +| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | +| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | +| `posix` | `boolean` | `false` | Support [POSIX character classes](#posix-bracket-expressions) ("posix brackets"). | +| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | +| `prepend` | `string` | `undefined` | String to prepend to the generated regex used for matching. | +| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | +| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | +| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | +| `unescape` | `boolean` | `undefined` | Remove preceding backslashes from escaped glob characters before creating the regular expression to perform matches. | +| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatitibility. | + +## Options Examples + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +**Type**: `Boolean` + +**Default**: `false` + +**Example** + +```js +micromatch(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +micromatch(['a/b.js', 'a/c.md'], '*.js', { basename: true }); +//=> ['a/b.js'] +``` + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as any other star. + +**Type**: `Boolean` + +**Default**: `true` + +**Example** + +```js +const files = ['abc', 'ajz']; +console.log(micromatch(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(micromatch(files, '[a-c]*', { bash: false })); +``` + +### options.expandRange + +**Type**: `function` + +**Default**: `undefined` + +Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. + +**Example** + +The following example shows how to create a glob that matches a numeric folder name between `01` and `25`, with leading zeros. + +```js +const fill = require('fill-range'); +const regex = micromatch.makeRe('foo/{01..25}/bar', { + expandRange(a, b) { + return `(${fill(a, b, { toRegex: true })})`; + } +}); + +console.log(regex) +//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ + +console.log(regex.test('foo/00/bar')) // false +console.log(regex.test('foo/01/bar')) // true +console.log(regex.test('foo/10/bar')) // true +console.log(regex.test('foo/22/bar')) // true +console.log(regex.test('foo/25/bar')) // true +console.log(regex.test('foo/26/bar')) // false +``` + +### options.format + +**Type**: `function` + +**Default**: `undefined` + +Custom function for formatting strings before they're matched. + +**Example** + +```js +// strip leading './' from strings +const format = str => str.replace(/^\.\//, ''); +const isMatch = picomatch('foo/*.js', { format }); +console.log(isMatch('./foo/bar.js')) //=> true +``` + +### options.ignore + +String or array of glob patterns to match files to ignore. + +**Type**: `String|Array` + +**Default**: `undefined` + +```js +const isMatch = micromatch.matcher('*', { ignore: 'f*' }); +console.log(isMatch('foo')) //=> false +console.log(isMatch('bar')) //=> true +console.log(isMatch('baz')) //=> true +``` + +### options.matchBase + +Alias for [options.basename](#options-basename). + +### options.noextglob + +Disable extglob support, so that [extglobs](#extglobs) are regarded as literal characters. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Examples** + +```js +console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)')); +//=> ['a/b', 'a/!(z)'] + +console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', { noextglob: true })); +//=> ['a/!(z)'] (matches only as literal characters) +``` + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.noglobstar + +Disable matching with globstars (`**`). + +**Type**: `Boolean` + +**Default**: `undefined` + +```js +micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.onIgnore + +```js +const onIgnore = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); + // { glob: '*', regex: /^(?:(?!\.)(?=.)[^\/]*?\/?)$/, input: 'foo', output: 'foo' } +}; + +const isMatch = micromatch.matcher('*', { onIgnore, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +### options.onMatch + +```js +const onMatch = ({ glob, regex, input, output }) => { + console.log({ input, output }); + // { input: 'some\\path', output: 'some/path' } + // { input: 'some\\path', output: 'some/path' } + // { input: 'some\\path', output: 'some/path' } +}; + +const isMatch = micromatch.matcher('**', { onMatch, posixSlashes: true }); +isMatch('some\\path'); +isMatch('some\\path'); +isMatch('some\\path'); +``` + +### options.onResult + +```js +const onResult = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = micromatch('*', { onResult, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +### options.posixSlashes + +Convert path separators on returned files to posix/unix-style forward slashes. Aliased as `unixify` for backwards compatibility. + +**Type**: `Boolean` + +**Default**: `true` on windows, `false` everywhere else. + +**Example** + +```js +console.log(micromatch.match(['a\\b\\c'], 'a/**')); +//=> ['a/b/c'] + +console.log(micromatch.match(['a\\b\\c'], { posixSlashes: false })); +//=> ['a\\b\\c'] +``` + +### options.unescape + +Remove backslashes from escaped glob characters before creating the regular expression to perform matches. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c')); +//=> ['a\\*c'] + +console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c', { unescape: true })); +//=> ['a*c'] +``` + +
+
+ +## Extended globbing + +Micromatch supports the following extended globbing features. + +### Extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | +| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | +| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | + +* Note that `@` isn't a regex character. + +### Braces + +Brace patterns can be used to match specific ranges or sets of characters. + +**Example** + +The pattern `{f,b}*/{1..3}/{b,q}*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. + +### Regex character classes + +Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +### Regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. + +### POSIX bracket expressions + +POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. + +**Example** + +```js +console.log(micromatch.isMatch('a1', '[[:alpha:][:digit:]]')) //=> true +console.log(micromatch.isMatch('a1', '[[:alpha:][:alpha:]]')) //=> false +``` + +*** + +## Notes + +### Bash 4.3 parity + +Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. + +However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. + +### Backslashes + +There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. + +* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows, which is consistent with bash behavior. _More importantly, unescaping globs can result in unsafe regular expressions_. +* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. + +We made this decision for micromatch for a couple of reasons: + +* Consistency with bash conventions. +* Glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. + +**A note about joining paths to globs** + +Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. + +In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. + +To solve this, you might be inspired to do something like `'foo\\*'.replace(/\\/g, '/')`, but this causes another, potentially much more serious, problem. + +## Benchmarks + +### Running benchmarks + +Install dependencies for running benchmarks: + +```sh +$ cd bench && npm install +``` + +Run the benchmarks: + +```sh +$ npm run bench +``` + +### Latest results + +As of March 24, 2022 (longer bars are better): + +```sh +# .makeRe star + micromatch x 2,232,802 ops/sec ±2.34% (89 runs sampled)) + minimatch x 781,018 ops/sec ±6.74% (92 runs sampled)) + +# .makeRe star; dot=true + micromatch x 1,863,453 ops/sec ±0.74% (93 runs sampled) + minimatch x 723,105 ops/sec ±0.75% (93 runs sampled) + +# .makeRe globstar + micromatch x 1,624,179 ops/sec ±2.22% (91 runs sampled) + minimatch x 1,117,230 ops/sec ±2.78% (86 runs sampled)) + +# .makeRe globstars + micromatch x 1,658,642 ops/sec ±0.86% (92 runs sampled) + minimatch x 741,224 ops/sec ±1.24% (89 runs sampled)) + +# .makeRe with leading star + micromatch x 1,525,014 ops/sec ±1.63% (90 runs sampled) + minimatch x 561,074 ops/sec ±3.07% (89 runs sampled) + +# .makeRe - braces + micromatch x 172,478 ops/sec ±2.37% (78 runs sampled) + minimatch x 96,087 ops/sec ±2.34% (88 runs sampled))) + +# .makeRe braces - range (expanded) + micromatch x 26,973 ops/sec ±0.84% (89 runs sampled) + minimatch x 3,023 ops/sec ±0.99% (90 runs sampled)) + +# .makeRe braces - range (compiled) + micromatch x 152,892 ops/sec ±1.67% (83 runs sampled) + minimatch x 992 ops/sec ±3.50% (89 runs sampled)d)) + +# .makeRe braces - nested ranges (expanded) + micromatch x 15,816 ops/sec ±13.05% (80 runs sampled) + minimatch x 2,953 ops/sec ±1.64% (91 runs sampled) + +# .makeRe braces - nested ranges (compiled) + micromatch x 110,881 ops/sec ±1.85% (82 runs sampled) + minimatch x 1,008 ops/sec ±1.51% (91 runs sampled) + +# .makeRe braces - set (compiled) + micromatch x 134,930 ops/sec ±3.54% (63 runs sampled)) + minimatch x 43,242 ops/sec ±0.60% (93 runs sampled) + +# .makeRe braces - nested sets (compiled) + micromatch x 94,455 ops/sec ±1.74% (69 runs sampled)) + minimatch x 27,720 ops/sec ±1.84% (93 runs sampled)) +``` + +## Contributing + +All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. + +**Bug reports** + +Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: + +* [research existing issues first](../../issues) (open and closed) +* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern +* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js +* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. + +**Platform issues** + +It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/micromatch/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 512 | [jonschlinkert](https://github.com/jonschlinkert) | +| 12 | [es128](https://github.com/es128) | +| 9 | [danez](https://github.com/danez) | +| 8 | [doowb](https://github.com/doowb) | +| 6 | [paulmillr](https://github.com/paulmillr) | +| 5 | [mrmlnc](https://github.com/mrmlnc) | +| 3 | [DrPizza](https://github.com/DrPizza) | +| 2 | [TrySound](https://github.com/TrySound) | +| 2 | [mceIdo](https://github.com/mceIdo) | +| 2 | [Glazy](https://github.com/Glazy) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [antonyk](https://github.com/antonyk) | +| 2 | [Tvrqvoise](https://github.com/Tvrqvoise) | +| 1 | [amilajack](https://github.com/amilajack) | +| 1 | [Cslove](https://github.com/Cslove) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [DianeLooney](https://github.com/DianeLooney) | +| 1 | [UltCombo](https://github.com/UltCombo) | +| 1 | [frangio](https://github.com/frangio) | +| 1 | [joyceerhl](https://github.com/joyceerhl) | +| 1 | [juszczykjakub](https://github.com/juszczykjakub) | +| 1 | [muescha](https://github.com/muescha) | +| 1 | [sebdeckers](https://github.com/sebdeckers) | +| 1 | [tomByrer](https://github.com/tomByrer) | +| 1 | [fidian](https://github.com/fidian) | +| 1 | [curbengh](https://github.com/curbengh) | +| 1 | [simlu](https://github.com/simlu) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | +| 1 | [yvele](https://github.com/yvele) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2022, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 24, 2022._ \ No newline at end of file diff --git a/node_modules/micromatch/index.js b/node_modules/micromatch/index.js new file mode 100644 index 0000000..1fad7f7 --- /dev/null +++ b/node_modules/micromatch/index.js @@ -0,0 +1,467 @@ +'use strict'; + +const util = require('util'); +const braces = require('braces'); +const picomatch = require('picomatch'); +const utils = require('picomatch/lib/utils'); +const isEmptyString = val => val === '' || val === './'; + +/** + * Returns an array of strings that match one or more glob patterns. + * + * ```js + * const mm = require('micromatch'); + * // mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {String|Array} `list` List of strings to match. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +const micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); + + let omit = new Set(); + let keep = new Set(); + let items = new Set(); + let negatives = 0; + + let onResult = state => { + items.add(state.output); + if (options && options.onResult) { + options.onResult(state); + } + }; + + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) negatives++; + + for (let item of list) { + let matched = isMatch(item, true); + + let match = negated ? !matched.isMatch : matched.isMatch; + if (!match) continue; + + if (negated) { + omit.add(matched.output); + } else { + omit.delete(matched.output); + keep.add(matched.output); + } + } + } + + let result = negatives === patterns.length ? [...items] : [...keep]; + let matches = result.filter(item => !omit.has(item)); + + if (options && matches.length === 0) { + if (options.failglob === true) { + throw new Error(`No matches found for "${patterns.join(', ')}"`); + } + + if (options.nonull === true || options.nullglob === true) { + return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; + } + } + + return matches; +}; + +/** + * Backwards compatibility + */ + +micromatch.match = micromatch; + +/** + * Returns a matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * const mm = require('micromatch'); + * // mm.matcher(pattern[, options]); + * + * const isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = (pattern, options) => picomatch(pattern, options); + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const mm = require('micromatch'); + * // mm.isMatch(string, patterns[, options]); + * + * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(mm.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `[options]` See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Backwards compatibility + */ + +micromatch.any = micromatch.isMatch; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = new Set(); + let items = []; + + let onResult = state => { + if (options.onResult) options.onResult(state); + items.push(state.output); + }; + + let matches = new Set(micromatch(list, patterns, { ...options, onResult })); + + for (let item of items) { + if (!matches.has(item)) { + result.add(item); + } + } + return [...result]; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * // mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any of the patterns matches any part of `str`. + * @api public + */ + +micromatch.contains = (str, pattern, options) => { + if (typeof str !== 'string') { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + + if (Array.isArray(pattern)) { + return pattern.some(p => micromatch.contains(str, p, options)); + } + + if (typeof pattern === 'string') { + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { + return true; + } + } + + return micromatch.isMatch(str, pattern, { ...options, contains: true }); +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * const mm = require('micromatch'); + * // mm.matchKeys(object, patterns[, options]); + * + * const obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) { + throw new TypeError('Expected the first argument to be an object'); + } + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) res[key] = obj[key]; + return res; +}; + +/** + * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` + * @api public + */ + +micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some(item => isMatch(item))) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` + * @api public + */ + +micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every(item => isMatch(item))) { + return false; + } + } + return true; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * const mm = require('micromatch'); + * // mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = (str, patterns, options) => { + if (typeof str !== 'string') { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + + return [].concat(patterns).every(p => picomatch(p, options)(str)); +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * const mm = require('micromatch'); + * // mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `glob` Glob pattern to use for matching. + * @param {String} `input` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); + let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); + + if (match) { + return match.slice(1).map(v => v === void 0 ? '' : v); + } +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * const mm = require('micromatch'); + * // mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = (...args) => picomatch.makeRe(...args); + +/** + * Scan a glob pattern to separate the pattern into segments. Used + * by the [split](#split) method. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.scan(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +micromatch.scan = (...args) => picomatch.scan(...args); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.parse(pattern[, options]); + * ``` + * @param {String} `glob` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as regex source string. + * @api public + */ + +micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) { + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); + } + } + return res; +}; + +/** + * Process the given brace `pattern`. + * + * ```js + * const { braces } = require('micromatch'); + * console.log(braces('foo/{a,b,c}/bar')); + * //=> [ 'foo/(a|b|c)/bar' ] + * + * console.log(braces('foo/{a,b,c}/bar', { expand: true })); + * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] + * ``` + * @param {String} `pattern` String with brace pattern to process. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = (pattern, options) => { + if (typeof pattern !== 'string') throw new TypeError('Expected a string'); + if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) { + return [pattern]; + } + return braces(pattern, options); +}; + +/** + * Expand braces + */ + +micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== 'string') throw new TypeError('Expected a string'); + return micromatch.braces(pattern, { ...options, expand: true }); +}; + +/** + * Expose micromatch + */ + +module.exports = micromatch; diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json new file mode 100644 index 0000000..6061d5b --- /dev/null +++ b/node_modules/micromatch/package.json @@ -0,0 +1,119 @@ +{ + "name": "micromatch", + "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.", + "version": "4.0.5", + "homepage": "https://github.com/micromatch/micromatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/DianeLooney)", + "Amila Welihinda (amilajack.com)", + "Bogdan Chadkin (https://github.com/TrySound)", + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Elan Shanker (https://github.com/es128)", + "Fabrício Matté (https://ultcombo.js.org)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (https://kolarik.sk)", + "Olsten Larck (https://i.am.charlike.online)", + "Paul Miller (paulmillr.com)", + "Tom Byrer (https://github.com/tomByrer)", + "Tyler Akins (http://rumkin.com)", + "Peter Bright (https://github.com/drpizza)", + "Kuba Juszczyk (https://github.com/ku8ar)" + ], + "repository": "micromatch/micromatch", + "bugs": { + "url": "https://github.com/micromatch/micromatch/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8.6" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "devDependencies": { + "fill-range": "^7.0.1", + "gulp-format-md": "^2.0.0", + "minimatch": "^5.0.1", + "mocha": "^9.2.2", + "time-require": "github:jonschlinkert/time-require" + }, + "keywords": [ + "bash", + "bracket", + "character-class", + "expand", + "expansion", + "expression", + "extglob", + "extglobs", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "lookahead", + "lookaround", + "lookbehind", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "negate", + "negation", + "path", + "pattern", + "patterns", + "posix", + "regex", + "regexp", + "regular", + "shell", + "star", + "wildcard" + ], + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "nanomatch" + ] + }, + "reflinks": [ + "extglob", + "fill-range", + "glob-object", + "minimatch", + "multimatch" + ] + } +} diff --git a/node_modules/mini-svg-data-uri/LICENSE b/node_modules/mini-svg-data-uri/LICENSE new file mode 100644 index 0000000..bf23b14 --- /dev/null +++ b/node_modules/mini-svg-data-uri/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Taylor Hunt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/mini-svg-data-uri/README.md b/node_modules/mini-svg-data-uri/README.md new file mode 100644 index 0000000..c6a109c --- /dev/null +++ b/node_modules/mini-svg-data-uri/README.md @@ -0,0 +1,109 @@ +Mini SVG `data:` URI +==================== + +This tool converts SVGs into the most compact, compressible `data:` URI that SVG-supporting browsers tolerate. The results look like this (169 bytes): + +```url +data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' +%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e +%3c/svg%3e +``` + +Compare to the Base64 version (210 bytes): + +```url +data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIH +ZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTIyIDM4VjUxTDMyIDMybDE5LTE5djEyQzQ0IDI2ID +QzIDEwIDM4IDAgNTIgMTUgNDkgMzkgMjIgMzh6Ii8+PC9zdmc+ +``` + +Or the URL-encoded version other tools produce (256 bytes): + +```url +data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org% +2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M22%2038V51 +L32%2032l19-19v12C44%2026%2043%2010%2038%200%2052%2015%2049%2039%2022%2038z%22%2 +F%3E%3C%2Fsvg%3E +``` + +For a more realistic example, I inlined the icons from the [Open Iconic](https://useiconic.com/open) project into CSS files with the 3 above methods: + +| Compression | Base64 | Basic %-encoding | `mini-svg-data-uri` | +|-------------|----------:|-----------------:|--------------------:| +| None | 96.459 kB | 103.268 kB | 76.583 kB | +| `gzip -9` | 17.902 kB | 13.780 kB | 12.974 kB | +| `brotli -Z` | 15.797 kB | 11.693 kB | 10.976 kB | + +Roughly 6% smaller compressed, but don't write off the ≈20% uncompressed savings either. [Some browser caches decompress before store](https://blogs.msdn.microsoft.com/ieinternals/2014/10/21/compressing-the-web/), and parsing time/memory usage scale linearly with uncompressed filesize. + + +Usage +----- + +```js +var svgToMiniDataURI = require('mini-svg-data-uri'); + +var svg = ''; + +var optimizedSVGDataURI = svgToMiniDataURI(svg); +// "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e%3c/svg%3e" +``` + +You can also [try it in your browser at RunKit](https://npm.runkit.com/mini-svg-data-uri). + +### CLI + +If you have it installed globally, or as some kind of dependency inside your project’s directory: + +```sh +mini-svg-data-uri file.svg # writes to stdout +mini-svg-data-uri file.svg file.svg.uri # writes to the given output filename +``` + +Use `--help` for more info. + +### Warning + +* This **does not optimize the SVG source file**. You’ll want [svgo](https://github.com/svg/svgo) or its brother [SVGOMG](https://jakearchibald.github.io/svgomg/) for that. + +* The default output **does not work inside `srcset` attributes**. Use the `.toSrcset` method for that: + + ```js + var srcsetExample = html` + + + + `; + ``` + +* The resulting Data URI should be wrapped with double quotes: `url("…")`, ``, etc. + +* This might change or break SVGs that use `"` in character data, like inside `` or `aria-label` or something. Try curly quotes (`“”`) or `"` instead. + + +FAQ +--- + +### Don’t you need a `charset` in the MIME Type? + +`charset` does nothing for Data URIs. The URI can only be the encoding of its parent file — it’s included in it! + +### Why lowercase the URL-encoded hex pairs? + +It compresses slightly better. No, really. Using the same files from earlier: + +| Compression | Uppercase (`%AF`) | Lowercase (`%af`) | +|-------------|------------------:|------------------:| +| `gzip -9` | 12.978 kB | 12.974 kB | +| `brotli -Z` | 10.988 kB | 10.976 kB | + +I did say *slightly*. + + +Browser support +--------------- + +* Internet Explorer 9 and up, including Edge +* Firefox, Safari, Chrome, whatever else uses their engines +* Android WebKit 3+ +* Opera Mini’s server-side Presto diff --git a/node_modules/mini-svg-data-uri/cli.js b/node_modules/mini-svg-data-uri/cli.js new file mode 100755 index 0000000..c5a47dd --- /dev/null +++ b/node_modules/mini-svg-data-uri/cli.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +let help = ` +Usage: mini-svg-data-uri [dest] + +Options: +-v, --version Output the version number +-h, --help Display help for command + +Examples: + mini-svg-data-uri file.svg Write to stdout + mini-svg-data-uri icon.svg icon.uri Write to file +`; + +let [source, dest] = process.argv.slice(2); + +switch (source) { + case '-h': + case '--help': + case undefined: + console.log(help); + process.exit(); + + case '-v': + case '--version': + console.log(require('./package').version); + process.exit(); +} + +const fs = require('fs'); +const svgToMiniDataURI = require('.'); + +fs.readFile(source, 'utf8', (err, data) => { + if (err) { + console.error(err.message); + console.log(help); + process.exit(1); + } + const out = svgToMiniDataURI(data); + dest ? fs.writeFileSync(dest, out) : console.log(out); +}); diff --git a/node_modules/mini-svg-data-uri/index.d.ts b/node_modules/mini-svg-data-uri/index.d.ts new file mode 100644 index 0000000..e1f2686 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.d.ts @@ -0,0 +1,7 @@ +declare function svgToTinyDataUri(svgString: string): string; + +declare namespace svgToTinyDataUri { + function toSrcset(svgString: string): string; +} + +export = svgToTinyDataUri; \ No newline at end of file diff --git a/node_modules/mini-svg-data-uri/index.js b/node_modules/mini-svg-data-uri/index.js new file mode 100644 index 0000000..971cc38 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.js @@ -0,0 +1,55 @@ +var shorterNames = require('./shorter-css-color-names'); +var REGEX = { + whitespace: /\s+/g, + urlHexPairs: /%[\dA-F]{2}/g, + quotes: /"/g, +} + +function collapseWhitespace(str) { + return str.trim().replace(REGEX.whitespace, ' '); +} + +function dataURIPayload(string) { + return encodeURIComponent(string) + .replace(REGEX.urlHexPairs, specialHexEncode); +} + +// `#` gets converted to `%23`, so quite a few CSS named colors are shorter than +// their equivalent URL-encoded hex codes. +function colorCodeToShorterNames(string) { + Object.keys(shorterNames).forEach(function(key) { + if (shorterNames[key].test(string)) { + string = string.replace(shorterNames[key], key); + } + }); + + return string; +} + +function specialHexEncode(match) { + switch (match) { // Browsers tolerate these characters, and they're frequent + case '%20': return ' '; + case '%3D': return '='; + case '%3A': return ':'; + case '%2F': return '/'; + default: return match.toLowerCase(); // compresses better + } +} + +function svgToTinyDataUri(svgString) { + if (typeof svgString !== 'string') { + throw new TypeError('Expected a string, but received ' + typeof svgString); + } + // Strip the Byte-Order Mark if the SVG has one + if (svgString.charCodeAt(0) === 0xfeff) { svgString = svgString.slice(1) } + + var body = colorCodeToShorterNames(collapseWhitespace(svgString)) + .replace(REGEX.quotes, "'"); + return 'data:image/svg+xml,' + dataURIPayload(body); +} + +svgToTinyDataUri.toSrcset = function toSrcset(svgString) { + return svgToTinyDataUri(svgString).replace(/ /g, '%20'); +} + +module.exports = svgToTinyDataUri; diff --git a/node_modules/mini-svg-data-uri/index.test-d.ts b/node_modules/mini-svg-data-uri/index.test-d.ts new file mode 100644 index 0000000..740b215 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.test-d.ts @@ -0,0 +1,5 @@ +import svgToTinyDataUri from "."; + +svgToTinyDataUri('xx'); + +svgToTinyDataUri.toSrcset('xxx'); \ No newline at end of file diff --git a/node_modules/mini-svg-data-uri/package.json b/node_modules/mini-svg-data-uri/package.json new file mode 100644 index 0000000..da3b9cc --- /dev/null +++ b/node_modules/mini-svg-data-uri/package.json @@ -0,0 +1,26 @@ +{ + "name": "mini-svg-data-uri", + "version": "1.4.4", + "description": "Small, efficient encoding of SVG data URIs for CSS, HTML, etc.", + "main": "index.js", + "types": "index.d.ts", + "bin": "cli.js", + "repository": { + "type": "git", + "url": "git+https://github.com/tigt/mini-svg-data-uri.git" + }, + "keywords": [ + "svg", + "url", + "data", + "uri", + "minification", + "url encoding" + ], + "author": "Taylor “Tigt” Hunt (https://ti.gt/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/tigt/mini-svg-data-uri/issues" + }, + "homepage": "https://github.com/tigt/mini-svg-data-uri#readme" +} diff --git a/node_modules/mini-svg-data-uri/shorter-css-color-names.js b/node_modules/mini-svg-data-uri/shorter-css-color-names.js new file mode 100644 index 0000000..5e93f5d --- /dev/null +++ b/node_modules/mini-svg-data-uri/shorter-css-color-names.js @@ -0,0 +1,56 @@ +module.exports = { + aqua: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + azure: /#f0ffff(ff)?(?!\w)/gi, + beige: /#f5f5dc(ff)?(?!\w)/gi, + bisque: /#ffe4c4(ff)?(?!\w)/gi, + black: /#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi, + blue: /#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi, + brown: /#a52a2a(ff)?(?!\w)/gi, + coral: /#ff7f50(ff)?(?!\w)/gi, + cornsilk: /#fff8dc(ff)?(?!\w)/gi, + crimson: /#dc143c(ff)?(?!\w)/gi, + cyan: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + darkblue: /#00008b(ff)?(?!\w)/gi, + darkcyan: /#008b8b(ff)?(?!\w)/gi, + darkgrey: /#a9a9a9(ff)?(?!\w)/gi, + darkred: /#8b0000(ff)?(?!\w)/gi, + deeppink: /#ff1493(ff)?(?!\w)/gi, + dimgrey: /#696969(ff)?(?!\w)/gi, + gold: /#ffd700(ff)?(?!\w)/gi, + green: /#008000(ff)?(?!\w)/gi, + grey: /#808080(ff)?(?!\w)/gi, + honeydew: /#f0fff0(ff)?(?!\w)/gi, + hotpink: /#ff69b4(ff)?(?!\w)/gi, + indigo: /#4b0082(ff)?(?!\w)/gi, + ivory: /#fffff0(ff)?(?!\w)/gi, + khaki: /#f0e68c(ff)?(?!\w)/gi, + lavender: /#e6e6fa(ff)?(?!\w)/gi, + lime: /#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi, + linen: /#faf0e6(ff)?(?!\w)/gi, + maroon: /#800000(ff)?(?!\w)/gi, + moccasin: /#ffe4b5(ff)?(?!\w)/gi, + navy: /#000080(ff)?(?!\w)/gi, + oldlace: /#fdf5e6(ff)?(?!\w)/gi, + olive: /#808000(ff)?(?!\w)/gi, + orange: /#ffa500(ff)?(?!\w)/gi, + orchid: /#da70d6(ff)?(?!\w)/gi, + peru: /#cd853f(ff)?(?!\w)/gi, + pink: /#ffc0cb(ff)?(?!\w)/gi, + plum: /#dda0dd(ff)?(?!\w)/gi, + purple: /#800080(ff)?(?!\w)/gi, + red: /#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi, + salmon: /#fa8072(ff)?(?!\w)/gi, + seagreen: /#2e8b57(ff)?(?!\w)/gi, + seashell: /#fff5ee(ff)?(?!\w)/gi, + sienna: /#a0522d(ff)?(?!\w)/gi, + silver: /#c0c0c0(ff)?(?!\w)/gi, + skyblue: /#87ceeb(ff)?(?!\w)/gi, + snow: /#fffafa(ff)?(?!\w)/gi, + tan: /#d2b48c(ff)?(?!\w)/gi, + teal: /#008080(ff)?(?!\w)/gi, + thistle: /#d8bfd8(ff)?(?!\w)/gi, + tomato: /#ff6347(ff)?(?!\w)/gi, + violet: /#ee82ee(ff)?(?!\w)/gi, + wheat: /#f5deb3(ff)?(?!\w)/gi, + white: /#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi, +}; diff --git a/node_modules/minimist/.DS_Store b/node_modules/minimist/.DS_Store new file mode 100644 index 0000000..6339ca9 Binary files /dev/null and b/node_modules/minimist/.DS_Store differ diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml new file mode 100644 index 0000000..74c57bf --- /dev/null +++ b/node_modules/minimist/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js new file mode 100644 index 0000000..f7c8d49 --- /dev/null +++ b/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js new file mode 100644 index 0000000..d9c3eb7 --- /dev/null +++ b/node_modules/minimist/index.js @@ -0,0 +1,249 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey (obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (isConstructorOrProto(o, key)) return; + if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; + o = o[key]; + } + + var key = keys[keys.length - 1]; + if (isConstructorOrProto(o, key)) return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + + +function isConstructorOrProto (obj, key) { + return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__'; +} diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json new file mode 100644 index 0000000..c225853 --- /dev/null +++ b/node_modules/minimist/package.json @@ -0,0 +1,45 @@ +{ + "name": "minimist", + "version": "1.2.6", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "covert": "^1.0.0", + "tap": "~0.4.0", + "tape": "^3.5.0" + }, + "scripts": { + "test": "tap test/*.js", + "coverage": "covert test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown new file mode 100644 index 0000000..859d1ab --- /dev/null +++ b/node_modules/minimist/readme.markdown @@ -0,0 +1,98 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.log(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# security + +Previous versions had a prototype pollution bug that could cause privilege +escalation in some circumstances when handling untrusted user input. + +Please use version 1.2.6 or later: + +* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5) +* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3) + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: + + ``` + > require('./')('one two three -- four five --six'.split(' '), { '--': true }) + { _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } + ``` + + Note that with `opts['--']` set, parsing for arguments still stops after the + `--`. + +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js new file mode 100644 index 0000000..ac83548 --- /dev/null +++ b/node_modules/minimist/test/all_bool.js @@ -0,0 +1,32 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js new file mode 100644 index 0000000..5f7dbde --- /dev/null +++ b/node_modules/minimist/test/bool.js @@ -0,0 +1,178 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias array with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var alt = [ '--harp', 'derp' ]; + var opts = { + alias: { 'h': ['herp', 'harp'] }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); + +test('boolean --boool=true', function (t) { + var parsed = parse(['--boool=true'], { + default: { + boool: false + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, true); + t.end(); +}); + +test('boolean --boool=false', function (t) { + var parsed = parse(['--boool=false'], { + default: { + boool: true + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, false); + t.end(); +}); + +test('boolean using something similar to true', function (t) { + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + '_': ['true.txt'] + }; + + t.same(result, expected); + t.end(); +}); \ No newline at end of file diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js new file mode 100644 index 0000000..5a4fa5b --- /dev/null +++ b/node_modules/minimist/test/dash.js @@ -0,0 +1,31 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000..780a311 --- /dev/null +++ b/node_modules/minimist/test/default_bool.js @@ -0,0 +1,35 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); + +}) diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000..d8b3e85 --- /dev/null +++ b/node_modules/minimist/test/dotted.js @@ -0,0 +1,22 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js new file mode 100644 index 0000000..f813b30 --- /dev/null +++ b/node_modules/minimist/test/kv_short.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-b=123' ]); + t.deepEqual(argv, { b: 123, _: [] }); +}); + +test('multi short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-a=whatever', '-b=robots' ]); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); +}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js new file mode 100644 index 0000000..5d3a1e0 --- /dev/null +++ b/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js new file mode 100644 index 0000000..2cc77f4 --- /dev/null +++ b/node_modules/minimist/test/num.js @@ -0,0 +1,36 @@ +var parse = require('../'); +var test = require('tape'); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('already a number', function (t) { + var argv = parse([ '-x', 1234, 789 ]); + t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js new file mode 100644 index 0000000..7b4a2a1 --- /dev/null +++ b/node_modules/minimist/test/parse.js @@ -0,0 +1,197 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000..ab620dc --- /dev/null +++ b/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: [123] }); +}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js new file mode 100644 index 0000000..4ac62df --- /dev/null +++ b/node_modules/minimist/test/proto.js @@ -0,0 +1,60 @@ +var parse = require('../'); +var test = require('tape'); + +test('proto pollution', function (t) { + var argv = parse(['--__proto__.x','123']); + t.equal({}.x, undefined); + t.equal(argv.__proto__.x, undefined); + t.equal(argv.x, undefined); + t.end(); +}); + +test('proto pollution (array)', function (t) { + var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); + t.equal({}.z, undefined); + t.deepEqual(argv.x, [4,5]); + t.equal(argv.x.z, undefined); + t.equal(argv.x.__proto__.z, undefined); + t.end(); +}); + +test('proto pollution (number)', function (t) { + var argv = parse(['--x','5','--x.__proto__.z','100']); + t.equal({}.z, undefined); + t.equal((4).z, undefined); + t.equal(argv.x, 5); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (string)', function (t) { + var argv = parse(['--x','abc','--x.__proto__.z','def']); + t.equal({}.z, undefined); + t.equal('...'.z, undefined); + t.equal(argv.x, 'abc'); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (constructor)', function (t) { + var argv = parse(['--constructor.prototype.y','123']); + t.equal({}.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +test('proto pollution (constructor function)', function (t) { + var argv = parse(['--_.concat.constructor.prototype.y', '123']); + function fnToBeTested() {} + t.equal(fnToBeTested.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +// powered by snyk - https://github.com/backstage/backstage/issues/10343 +test('proto pollution (constructor function) snyk', function (t) { + var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); + t.equal((function(){}).foo, undefined); + t.equal(argv.y, undefined); + t.end(); +}) diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js new file mode 100644 index 0000000..d513a1c --- /dev/null +++ b/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..bdf9fbc --- /dev/null +++ b/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000..462a36b --- /dev/null +++ b/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000..8a52a58 --- /dev/null +++ b/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/node_modules/nanoid/.DS_Store b/node_modules/nanoid/.DS_Store new file mode 100644 index 0000000..43349d3 Binary files /dev/null and b/node_modules/nanoid/.DS_Store differ diff --git a/node_modules/nanoid/LICENSE b/node_modules/nanoid/LICENSE new file mode 100644 index 0000000..37f56aa --- /dev/null +++ b/node_modules/nanoid/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2017 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/nanoid/README.md b/node_modules/nanoid/README.md new file mode 100644 index 0000000..35abb57 --- /dev/null +++ b/node_modules/nanoid/README.md @@ -0,0 +1,39 @@ +# Nano ID + +Nano ID logo by Anton Lovchikov + +**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) + +A tiny, secure, URL-friendly, unique string ID generator for JavaScript. + +> “An amazing level of senseless perfectionism, +> which is simply impossible not to respect.” + +* **Small.** 130 bytes (minified and gzipped). No dependencies. + [Size Limit] controls the size. +* **Fast.** It is 2 times faster than UUID. +* **Safe.** It uses hardware random generator. Can be used in clusters. +* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`). + So ID size was reduced from 36 to 21 symbols. +* **Portable.** Nano ID was ported + to [20 programming languages](#other-programming-languages). + +```js +import { nanoid } from 'nanoid' +model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" +``` + +Supports modern browsers, IE [with Babel], Node.js and React Native. + +[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ +[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ +[Size Limit]: https://github.com/ai/size-limit + + + Sponsored by Evil Martians + + +## Docs +Read full docs **[here](https://github.com/ai/nanoid#readme)**. diff --git a/node_modules/nanoid/async/index.browser.cjs b/node_modules/nanoid/async/index.browser.cjs new file mode 100644 index 0000000..7e5bba8 --- /dev/null +++ b/node_modules/nanoid/async/index.browser.cjs @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +module.exports = { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.browser.js b/node_modules/nanoid/async/index.browser.js new file mode 100644 index 0000000..5ece04d --- /dev/null +++ b/node_modules/nanoid/async/index.browser.js @@ -0,0 +1,34 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array(size)) + while (size--) { + let byte = bytes[size] & 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} +export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.cjs b/node_modules/nanoid/async/index.cjs new file mode 100644 index 0000000..50db105 --- /dev/null +++ b/node_modules/nanoid/async/index.cjs @@ -0,0 +1,35 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('../url-alphabet/index.cjs') +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +module.exports = { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.d.ts b/node_modules/nanoid/async/index.d.ts new file mode 100644 index 0000000..9e91965 --- /dev/null +++ b/node_modules/nanoid/async/index.d.ts @@ -0,0 +1,56 @@ +/** + * Generate secure URL-friendly unique ID. The non-blocking version. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid/async' + * nanoid().then(id => { + * model.id = id + * }) + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A promise with a random string. + */ +export function nanoid(size?: number): Promise + +/** + * A low-level function. + * Generate secure unique ID with custom alphabet. The non-blocking version. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A function that returns a promise with a random string. + * + * ```js + * import { customAlphabet } from 'nanoid/async' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid().then(id => { + * model.id = id //=> "8ё56а" + * }) + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => Promise + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { random } from 'nanoid/async' + * random(5).then(bytes => { + * bytes //=> [10, 67, 212, 67, 89] + * }) + * ``` + * + * @param bytes Size of the array. + * @returns A promise with a random bytes array. + */ +export function random(bytes: number): Promise diff --git a/node_modules/nanoid/async/index.js b/node_modules/nanoid/async/index.js new file mode 100644 index 0000000..803fad6 --- /dev/null +++ b/node_modules/nanoid/async/index.js @@ -0,0 +1,35 @@ +import crypto from 'crypto' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = bytes => + new Promise((resolve, reject) => { + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/index.native.js b/node_modules/nanoid/async/index.native.js new file mode 100644 index 0000000..5cb3d57 --- /dev/null +++ b/node_modules/nanoid/async/index.native.js @@ -0,0 +1,26 @@ +import { getRandomBytesAsync } from 'expo-random' +import { urlAlphabet } from '../url-alphabet/index.js' +let random = getRandomBytesAsync +let customAlphabet = (alphabet, defaultSize = 21) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + return tick(id, size) + }) + return size => tick('', size) +} +let nanoid = (size = 21) => + random(size).then(bytes => { + let id = '' + while (size--) { + id += urlAlphabet[bytes[size] & 63] + } + return id + }) +export { nanoid, customAlphabet, random } diff --git a/node_modules/nanoid/async/package.json b/node_modules/nanoid/async/package.json new file mode 100644 index 0000000..578cdb4 --- /dev/null +++ b/node_modules/nanoid/async/package.json @@ -0,0 +1,12 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": { + "./index.js": "./index.native.js" + }, + "browser": { + "./index.js": "./index.browser.js", + "./index.cjs": "./index.browser.cjs" + } +} \ No newline at end of file diff --git a/node_modules/nanoid/bin/nanoid.cjs b/node_modules/nanoid/bin/nanoid.cjs new file mode 100755 index 0000000..c76db0f --- /dev/null +++ b/node_modules/nanoid/bin/nanoid.cjs @@ -0,0 +1,55 @@ +#!/usr/bin/env node + +let { nanoid, customAlphabet } = require('..') + +function print(msg) { + process.stdout.write(msg + '\n') +} + +function error(msg) { + process.stderr.write(msg + '\n') + process.exit(1) +} + +if (process.argv.includes('--help') || process.argv.includes('-h')) { + print(` + Usage + $ nanoid [options] + + Options + -s, --size Generated ID size + -a, --alphabet Alphabet to use + -h, --help Show this help + + Examples + $ nanoid --s 15 + S9sBF77U6sDB8Yg + + $ nanoid --size 10 --alphabet abc + bcabababca`) + process.exit() +} + +let alphabet, size +for (let i = 2; i < process.argv.length; i++) { + let arg = process.argv[i] + if (arg === '--size' || arg === '-s') { + size = Number(process.argv[i + 1]) + i += 1 + if (Number.isNaN(size) || size <= 0) { + error('Size must be positive integer') + } + } else if (arg === '--alphabet' || arg === '-a') { + alphabet = process.argv[i + 1] + i += 1 + } else { + error('Unknown argument ' + arg) + } +} + +if (alphabet) { + let customNanoid = customAlphabet(alphabet, size) + print(customNanoid()) +} else { + print(nanoid(size)) +} diff --git a/node_modules/nanoid/index.browser.cjs b/node_modules/nanoid/index.browser.cjs new file mode 100644 index 0000000..f800d6f --- /dev/null +++ b/node_modules/nanoid/index.browser.cjs @@ -0,0 +1,34 @@ +let { urlAlphabet } = require('./url-alphabet/index.cjs') +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.browser.js b/node_modules/nanoid/index.browser.js new file mode 100644 index 0000000..8b3139b --- /dev/null +++ b/node_modules/nanoid/index.browser.js @@ -0,0 +1,34 @@ +import { urlAlphabet } from './url-alphabet/index.js' +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let j = step + while (j--) { + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63 + if (byte < 36) { + id += byte.toString(36) + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.cjs b/node_modules/nanoid/index.cjs new file mode 100644 index 0000000..0fa85e9 --- /dev/null +++ b/node_modules/nanoid/index.cjs @@ -0,0 +1,45 @@ +let crypto = require('crypto') +let { urlAlphabet } = require('./url-alphabet/index.cjs') +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/index.d.cts b/node_modules/nanoid/index.d.cts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/node_modules/nanoid/index.d.cts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/node_modules/nanoid/index.d.ts b/node_modules/nanoid/index.d.ts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/node_modules/nanoid/index.d.ts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/node_modules/nanoid/index.js b/node_modules/nanoid/index.js new file mode 100644 index 0000000..21e155f --- /dev/null +++ b/node_modules/nanoid/index.js @@ -0,0 +1,45 @@ +import crypto from 'crypto' +import { urlAlphabet } from './url-alphabet/index.js' +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/node_modules/nanoid/nanoid.js b/node_modules/nanoid/nanoid.js new file mode 100644 index 0000000..ec242ea --- /dev/null +++ b/node_modules/nanoid/nanoid.js @@ -0,0 +1 @@ +export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); \ No newline at end of file diff --git a/node_modules/nanoid/non-secure/index.cjs b/node_modules/nanoid/non-secure/index.cjs new file mode 100644 index 0000000..09d57cd --- /dev/null +++ b/node_modules/nanoid/non-secure/index.cjs @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +module.exports = { nanoid, customAlphabet } diff --git a/node_modules/nanoid/non-secure/index.d.ts b/node_modules/nanoid/non-secure/index.d.ts new file mode 100644 index 0000000..4965322 --- /dev/null +++ b/node_modules/nanoid/non-secure/index.d.ts @@ -0,0 +1,33 @@ +/** + * Generate URL-friendly unique ID. This method uses the non-secure + * predictable random generator with bigger collision probability. + * + * ```js + * import { nanoid } from 'nanoid/non-secure' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate a unique ID based on a custom alphabet. + * This method uses the non-secure predictable random generator + * with bigger collision probability. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * import { customAlphabet } from 'nanoid/non-secure' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * model.id = //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string diff --git a/node_modules/nanoid/non-secure/index.js b/node_modules/nanoid/non-secure/index.js new file mode 100644 index 0000000..e7e19ad --- /dev/null +++ b/node_modules/nanoid/non-secure/index.js @@ -0,0 +1,21 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + let i = size + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} +let nanoid = (size = 21) => { + let id = '' + let i = size + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} +export { nanoid, customAlphabet } diff --git a/node_modules/nanoid/non-secure/package.json b/node_modules/nanoid/non-secure/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/node_modules/nanoid/non-secure/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/node_modules/nanoid/package.json b/node_modules/nanoid/package.json new file mode 100644 index 0000000..4f24d96 --- /dev/null +++ b/node_modules/nanoid/package.json @@ -0,0 +1,88 @@ +{ + "name": "nanoid", + "version": "3.3.7", + "description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", + "keywords": [ + "uuid", + "random", + "id", + "url" + ], + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "ai/nanoid", + "browser": { + "./index.js": "./index.browser.js", + "./async/index.js": "./async/index.browser.js", + "./async/index.cjs": "./async/index.browser.cjs", + "./index.cjs": "./index.browser.cjs" + }, + "react-native": "index.js", + "bin": "./bin/nanoid.cjs", + "sideEffects": false, + "types": "./index.d.ts", + "type": "module", + "main": "index.cjs", + "module": "index.js", + "exports": { + ".": { + "browser": "./index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./package.json": "./package.json", + "./async/package.json": "./async/package.json", + "./async": { + "browser": "./async/index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./async/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./async/index.js" + }, + "default": "./async/index.js" + }, + "./non-secure/package.json": "./non-secure/package.json", + "./non-secure": { + "require": { + "types": "./index.d.cts", + "default": "./non-secure/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./non-secure/index.js" + }, + "default": "./non-secure/index.js" + }, + "./url-alphabet/package.json": "./url-alphabet/package.json", + "./url-alphabet": { + "require": { + "types": "./index.d.cts", + "default": "./url-alphabet/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./url-alphabet/index.js" + }, + "default": "./url-alphabet/index.js" + } + } +} \ No newline at end of file diff --git a/node_modules/nanoid/url-alphabet/index.cjs b/node_modules/nanoid/url-alphabet/index.cjs new file mode 100644 index 0000000..757b709 --- /dev/null +++ b/node_modules/nanoid/url-alphabet/index.cjs @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +module.exports = { urlAlphabet } diff --git a/node_modules/nanoid/url-alphabet/index.js b/node_modules/nanoid/url-alphabet/index.js new file mode 100644 index 0000000..c2782e5 --- /dev/null +++ b/node_modules/nanoid/url-alphabet/index.js @@ -0,0 +1,3 @@ +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' +export { urlAlphabet } diff --git a/node_modules/nanoid/url-alphabet/package.json b/node_modules/nanoid/url-alphabet/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/node_modules/nanoid/url-alphabet/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/normalize-path/README.md b/node_modules/normalize-path/README.md new file mode 100644 index 0000000..726d4d6 --- /dev/null +++ b/node_modules/normalize-path/README.md @@ -0,0 +1,127 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +const normalize = require('normalize-path'); + +console.log(normalize('\\foo\\bar\\baz\\')); +//=> '/foo/bar/baz' +``` + +**win32 namespaces** + +```js +console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); +//=> '//?/UNC/Server01/user/docs/Letter.txt' + +console.log(normalize('\\\\.\\CdRomX')); +//=> '//./CdRomX' +``` + +**Consecutive slashes** + +Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash. + +```js +console.log(normalize('.//foo//bar///////baz/')); +//=> './foo/bar/baz' +``` + +### Trailing slashes + +By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_: + +```js +console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/' +console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' +``` + +## Release history + +### v3.0 + +No breaking changes in this release. + +* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library. +* a minor optimization was made to simplify how the trailing separator was handled + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +Other useful path-related libraries: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 35 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js new file mode 100644 index 0000000..6fac553 --- /dev/null +++ b/node_modules/normalize-path/index.js @@ -0,0 +1,35 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +module.exports = function(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + var len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + var prefix = ''; + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json new file mode 100644 index 0000000..ad61098 --- /dev/null +++ b/node_modules/normalize-path/package.json @@ -0,0 +1,77 @@ +{ + "name": "normalize-path", + "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "absolute", + "backslash", + "delimiter", + "file", + "file-path", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "relative", + "separator", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "Other useful path-related libraries:", + "list": [ + "contains-path", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-ends-with", + "unixify" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/object-hash/LICENSE b/node_modules/object-hash/LICENSE new file mode 100644 index 0000000..6ea185f --- /dev/null +++ b/node_modules/object-hash/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 object-hash contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/object-hash/dist/object_hash.js b/node_modules/object-hash/dist/object_hash.js new file mode 100644 index 0000000..2e584c5 --- /dev/null +++ b/node_modules/object-hash/dist/object_hash.js @@ -0,0 +1 @@ +!function(e){var t;"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):("undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e())}(function(){return function r(o,i,u){function s(n,e){if(!i[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(a)return a(n,!0);throw new Error("Cannot find module '"+n+"'")}e=i[n]={exports:{}};o[n][0].call(e.exports,function(e){var t=o[n][1][e];return s(t||e)},e,e.exports,r,o,i,u)}return i[n].exports}for(var a="function"==typeof require&&require,e=0;e>16),s((65280&n)>>8),s(255&n);return 2==r?s(255&(n=f(e.charAt(t))<<2|f(e.charAt(t+1))>>4)):1==r&&(s((n=f(e.charAt(t))<<10|f(e.charAt(t+1))<<4|f(e.charAt(t+2))>>2)>>8&255),s(255&n)),o},e.fromByteArray=function(e){var t,n,r,o,i=e.length%3,u="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-i;t>18&63)+s(o>>12&63)+s(o>>6&63)+s(63&o);switch(i){case 1:u=(u+=s((n=e[e.length-1])>>2))+s(n<<4&63)+"==";break;case 2:u=(u=(u+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+"="}return u}}(void 0===f?this.base64js={}:f)}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(O,e,H){!function(e,n,f,r,h,p,g,y,w){var a=O("base64-js"),i=O("ieee754");function f(e,t,n){if(!(this instanceof f))return new f(e,t,n);var r,o,i,u,s=typeof e;if("base64"===t&&"string"==s)for(e=(u=e).trim?u.trim():u.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==s)r=j(e);else if("string"==s)r=f.byteLength(e,t);else{if("object"!=s)throw new Error("First argument needs to be a number, array or string.");r=j(e.length)}if(f._useTypedArrays?o=f._augment(new Uint8Array(r)):((o=this).length=r,o._isBuffer=!0),f._useTypedArrays&&"number"==typeof e.byteLength)o._set(e);else if(C(u=e)||f.isBuffer(u)||u&&"object"==typeof u&&"number"==typeof u.length)for(i=0;i>8,n=n%256,r.push(n),r.push(t);return r}(t),e,n,r)}function v(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o>>0)):(t+1>>0),o}function _(e,t,n,r){if(r||(d("boolean"==typeof n,"missing or invalid endian"),d(null!=t,"missing offset"),d(t+1>>8*(r?i:1-i)}function l(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+3>>8*(r?i:3-i)&255}function B(e,t,n,r,o){o||(d(null!=t,"missing value"),d("boolean"==typeof r,"missing or invalid endian"),d(null!=n,"missing offset"),d(n+1this.length&&(r=this.length);var o=(r=e.length-t=this.length))return this[e]},f.prototype.readUInt16LE=function(e,t){return o(this,e,!0,t)},f.prototype.readUInt16BE=function(e,t){return o(this,e,!1,t)},f.prototype.readUInt32LE=function(e,t){return u(this,e,!0,t)},f.prototype.readUInt32BE=function(e,t){return u(this,e,!1,t)},f.prototype.readInt8=function(e,t){if(t||(d(null!=e,"missing offset"),d(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){return _(this,e,!0,t)},f.prototype.readInt16BE=function(e,t){return _(this,e,!1,t)},f.prototype.readInt32LE=function(e,t){return E(this,e,!0,t)},f.prototype.readInt32BE=function(e,t){return E(this,e,!1,t)},f.prototype.readFloatLE=function(e,t){return I(this,e,!0,t)},f.prototype.readFloatBE=function(e,t){return I(this,e,!1,t)},f.prototype.readDoubleLE=function(e,t){return A(this,e,!0,t)},f.prototype.readDoubleBE=function(e,t){return A(this,e,!1,t)},f.prototype.writeUInt8=function(e,t,n){n||(d(null!=e,"missing value"),d(null!=t,"missing offset"),d(t=this.length||(this[t]=e)},f.prototype.writeUInt16LE=function(e,t,n){s(this,e,t,!0,n)},f.prototype.writeUInt16BE=function(e,t,n){s(this,e,t,!1,n)},f.prototype.writeUInt32LE=function(e,t,n){l(this,e,t,!0,n)},f.prototype.writeUInt32BE=function(e,t,n){l(this,e,t,!1,n)},f.prototype.writeInt8=function(e,t,n){n||(d(null!=e,"missing value"),d(null!=t,"missing offset"),d(t=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},f.prototype.writeInt16LE=function(e,t,n){B(this,e,t,!0,n)},f.prototype.writeInt16BE=function(e,t,n){B(this,e,t,!1,n)},f.prototype.writeInt32LE=function(e,t,n){L(this,e,t,!0,n)},f.prototype.writeInt32BE=function(e,t,n){L(this,e,t,!1,n)},f.prototype.writeFloatLE=function(e,t,n){U(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){U(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){x(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){x(this,e,t,!1,n)},f.prototype.fill=function(e,t,n){if(t=t||0,n=n||this.length,d("number"==typeof(e="string"==typeof(e=e||0)?e.charCodeAt(0):e)&&!isNaN(e),"value is not a number"),d(t<=n,"end < start"),n!==t&&0!==this.length){d(0<=t&&t"},f.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(f._useTypedArrays)return new f(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function N(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function Y(e,t){d("number"==typeof e,"cannot write a non-number as a number"),d(0<=e,"specified a negative value for writing an unsigned value"),d(e<=t,"value is larger than maximum value for type"),d(Math.floor(e)===e,"value has a fractional component")}function F(e,t,n){d("number"==typeof e,"cannot write a non-number as a number"),d(e<=t,"value larger than maximum allowed value"),d(n<=e,"value smaller than minimum allowed value"),d(Math.floor(e)===e,"value has a fractional component")}function D(e,t,n){d("number"==typeof e,"cannot write a non-number as a number"),d(e<=t,"value larger than maximum allowed value"),d(n<=e,"value smaller than minimum allowed value")}function d(e,t){if(!e)throw new Error(t||"Failed assertion")}f._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=t.get,e.set=t.set,e.write=t.write,e.toString=t.toString,e.toLocaleString=t.toString,e.toJSON=t.toJSON,e.copy=t.copy,e.slice=t.slice,e.readUInt8=t.readUInt8,e.readUInt16LE=t.readUInt16LE,e.readUInt16BE=t.readUInt16BE,e.readUInt32LE=t.readUInt32LE,e.readUInt32BE=t.readUInt32BE,e.readInt8=t.readInt8,e.readInt16LE=t.readInt16LE,e.readInt16BE=t.readInt16BE,e.readInt32LE=t.readInt32LE,e.readInt32BE=t.readInt32BE,e.readFloatLE=t.readFloatLE,e.readFloatBE=t.readFloatBE,e.readDoubleLE=t.readDoubleLE,e.readDoubleBE=t.readDoubleBE,e.writeUInt8=t.writeUInt8,e.writeUInt16LE=t.writeUInt16LE,e.writeUInt16BE=t.writeUInt16BE,e.writeUInt32LE=t.writeUInt32LE,e.writeUInt32BE=t.writeUInt32BE,e.writeInt8=t.writeInt8,e.writeInt16LE=t.writeInt16LE,e.writeInt16BE=t.writeInt16BE,e.writeInt32LE=t.writeInt32LE,e.writeInt32BE=t.writeInt32BE,e.writeFloatLE=t.writeFloatLE,e.writeFloatBE=t.writeFloatBE,e.writeDoubleLE=t.writeDoubleLE,e.writeDoubleBE=t.writeDoubleBE,e.fill=t.fill,e.inspect=t.inspect,e.toArrayBuffer=t.toArrayBuffer,e}}.call(this,O("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},O("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(c,d,e){!function(e,t,a,n,r,o,i,u,s){var a=c("buffer").Buffer,f=4,l=new a(f);l.fill(0);d.exports={hash:function(e,t,n,r){for(var o=t(function(e,t){e.length%f!=0&&(n=e.length+(f-e.length%f),e=a.concat([e,l],n));for(var n,r=[],o=t?e.readInt32BE:e.readInt32LE,i=0;is?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u>>32-o,n)}function c(e,t,n,r,o,i,u){return s(t&n|~t&r,e,t,o,i,u)}function d(e,t,n,r,o,i,u){return s(t&r|n&~r,e,t,o,i,u)}function h(e,t,n,r,o,i,u){return s(t^n^r,e,t,o,i,u)}function p(e,t,n,r,o,i,u){return s(n^(t|~r),e,t,o,i,u)}function g(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}b.exports=function(e){return t.hash(e,n,16)}}.call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,l,t){!function(e,t,n,r,o,i,u,s,f){var a;l.exports=a||function(e){for(var t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n}}.call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(c,d,e){!function(e,t,n,r,o,s,a,f,l){var i=c("./helpers");function u(l,c){l[c>>5]|=128<<24-c%32,l[15+(c+64>>9<<4)]=c;for(var e,t,n,r=Array(80),o=1732584193,i=-271733879,u=-1732584194,s=271733878,d=-1009589776,h=0;h>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){return e<>>32-t}d.exports=function(e){return i.hash(e,u,20,!0)}}.call(this,c("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(c,d,e){!function(e,t,n,r,u,s,a,f,l){function b(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,l){var c,d=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),t=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),n=new Array(64);e[l>>5]|=128<<24-l%32,e[15+(l+64>>9<<4)]=l;for(var r,o,h=0;h>>t|e<<32-t},v=function(e,t){return e>>>t};d.exports=function(e){return i.hash(e,o,32,!0)}}.call(this,c("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,f){!function(e,t,n,r,o,i,u,s,a){f.read=function(e,t,n,r,o){var i,u,l=8*o-r-1,c=(1<>1,s=-7,a=n?o-1:0,f=n?-1:1,o=e[t+a];for(a+=f,i=o&(1<<-s)-1,o>>=-s,s+=l;0>=-s,s+=r;0>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:c-1,h=n?1:-1,c=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,o=s):(o=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-o))<1&&(o--,n*=2),2<=(t+=1<=o+a?d/n:d*Math.pow(2,1-a))*n&&(o++,n/=2),s<=o+a?(i=0,o=s):1<=o+a?(i=(t*n-1)*Math.pow(2,r),o+=a):(i=t*Math.pow(2,a-1)*Math.pow(2,r),o=0));8<=r;e[l+f]=255&i,f+=h,i/=256,r-=8);for(o=o<", type, " -> ", "_" + type); + + return this['_' + type](value); + }, + _object: function(object) { + var pattern = (/\[object (.*)\]/i); + var objString = Object.prototype.toString.call(object); + var objType = pattern.exec(objString); + if (!objType) { // object type did not match [object ...] + objType = 'unknown:[' + objString + ']'; + } else { + objType = objType[1]; // take only the class name + } + + objType = objType.toLowerCase(); + + var objectNumber = null; + + if ((objectNumber = context.indexOf(object)) >= 0) { + return this.dispatch('[CIRCULAR:' + objectNumber + ']'); + } else { + context.push(object); + } + + if (typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(object)) { + write('buffer:'); + return write(object); + } + + if(objType !== 'object' && objType !== 'function' && objType !== 'asyncfunction') { + if(this['_' + objType]) { + this['_' + objType](object); + } else if (options.ignoreUnknown) { + return write('[' + objType + ']'); + } else { + throw new Error('Unknown object type "' + objType + '"'); + } + }else{ + var keys = Object.keys(object); + if (options.unorderedObjects) { + keys = keys.sort(); + } + // Make sure to incorporate special properties, so + // Types with different prototypes will produce + // a different hash and objects derived from + // different functions (`new Foo`, `new Bar`) will + // produce different hashes. + // We never do this for native functions since some + // seem to break because of that. + if (options.respectType !== false && !isNativeFunction(object)) { + keys.splice(0, 0, 'prototype', '__proto__', 'constructor'); + } + + if (options.excludeKeys) { + keys = keys.filter(function(key) { return !options.excludeKeys(key); }); + } + + write('object:' + keys.length + ':'); + var self = this; + return keys.forEach(function(key){ + self.dispatch(key); + write(':'); + if(!options.excludeValues) { + self.dispatch(object[key]); + } + write(','); + }); + } + }, + _array: function(arr, unordered){ + unordered = typeof unordered !== 'undefined' ? unordered : + options.unorderedArrays !== false; // default to options.unorderedArrays + + var self = this; + write('array:' + arr.length + ':'); + if (!unordered || arr.length <= 1) { + return arr.forEach(function(entry) { + return self.dispatch(entry); + }); + } + + // the unordered case is a little more complicated: + // since there is no canonical ordering on objects, + // i.e. {a:1} < {a:2} and {a:1} > {a:2} are both false, + // we first serialize each entry using a PassThrough stream + // before sorting. + // also: we can’t use the same context array for all entries + // since the order of hashing should *not* matter. instead, + // we keep track of the additions to a copy of the context array + // and add all of them to the global context array when we’re done + var contextAdditions = []; + var entries = arr.map(function(entry) { + var strm = new PassThrough(); + var localContext = context.slice(); // make copy + var hasher = typeHasher(options, strm, localContext); + hasher.dispatch(entry); + // take only what was added to localContext and append it to contextAdditions + contextAdditions = contextAdditions.concat(localContext.slice(context.length)); + return strm.read().toString(); + }); + context = context.concat(contextAdditions); + entries.sort(); + return this._array(entries, false); + }, + _date: function(date){ + return write('date:' + date.toJSON()); + }, + _symbol: function(sym){ + return write('symbol:' + sym.toString()); + }, + _error: function(err){ + return write('error:' + err.toString()); + }, + _boolean: function(bool){ + return write('bool:' + bool.toString()); + }, + _string: function(string){ + write('string:' + string.length + ':'); + write(string.toString()); + }, + _function: function(fn){ + write('fn:'); + if (isNativeFunction(fn)) { + this.dispatch('[native]'); + } else { + this.dispatch(fn.toString()); + } + + if (options.respectFunctionNames !== false) { + // Make sure we can still distinguish native functions + // by their name, otherwise String and Function will + // have the same hash + this.dispatch("function-name:" + String(fn.name)); + } + + if (options.respectFunctionProperties) { + this._object(fn); + } + }, + _number: function(number){ + return write('number:' + number.toString()); + }, + _xml: function(xml){ + return write('xml:' + xml.toString()); + }, + _null: function() { + return write('Null'); + }, + _undefined: function() { + return write('Undefined'); + }, + _regexp: function(regex){ + return write('regex:' + regex.toString()); + }, + _uint8array: function(arr){ + write('uint8array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint8clampedarray: function(arr){ + write('uint8clampedarray:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int8array: function(arr){ + write('int8array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint16array: function(arr){ + write('uint16array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int16array: function(arr){ + write('int16array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint32array: function(arr){ + write('uint32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int32array: function(arr){ + write('int32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float32array: function(arr){ + write('float32array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float64array: function(arr){ + write('float64array:'); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _arraybuffer: function(arr){ + write('arraybuffer:'); + return this.dispatch(new Uint8Array(arr)); + }, + _url: function(url) { + return write('url:' + url.toString(), 'utf8'); + }, + _map: function(map) { + write('map:'); + var arr = Array.from(map); + return this._array(arr, options.unorderedSets !== false); + }, + _set: function(set) { + write('set:'); + var arr = Array.from(set); + return this._array(arr, options.unorderedSets !== false); + }, + _file: function(file) { + write('file:'); + return this.dispatch([file.name, file.size, file.type, file.lastModfied]); + }, + _blob: function() { + if (options.ignoreUnknown) { + return write('[blob]'); + } + + throw Error('Hashing Blob objects is currently not supported\n' + + '(see https://github.com/puleos/object-hash/issues/26)\n' + + 'Use "options.replacer" or "options.ignoreUnknown"\n'); + }, + _domwindow: function() { return write('domwindow'); }, + _bigint: function(number){ + return write('bigint:' + number.toString()); + }, + /* Node.js standard native objects */ + _process: function() { return write('process'); }, + _timer: function() { return write('timer'); }, + _pipe: function() { return write('pipe'); }, + _tcp: function() { return write('tcp'); }, + _udp: function() { return write('udp'); }, + _tty: function() { return write('tty'); }, + _statwatcher: function() { return write('statwatcher'); }, + _securecontext: function() { return write('securecontext'); }, + _connection: function() { return write('connection'); }, + _zlib: function() { return write('zlib'); }, + _context: function() { return write('context'); }, + _nodescript: function() { return write('nodescript'); }, + _httpparser: function() { return write('httpparser'); }, + _dataview: function() { return write('dataview'); }, + _signal: function() { return write('signal'); }, + _fsevent: function() { return write('fsevent'); }, + _tlswrap: function() { return write('tlswrap'); }, + }; +} + +// Mini-implementation of stream.PassThrough +// We are far from having need for the full implementation, and we can +// make assumptions like "many writes, then only one final read" +// and we can ignore encoding specifics +function PassThrough() { + return { + buf: '', + + write: function(b) { + this.buf += b; + }, + + end: function(b) { + this.buf += b; + }, + + read: function() { + return this.buf; + } + }; +} diff --git a/node_modules/object-hash/package.json b/node_modules/object-hash/package.json new file mode 100644 index 0000000..a72557f --- /dev/null +++ b/node_modules/object-hash/package.json @@ -0,0 +1,53 @@ +{ + "name": "object-hash", + "version": "3.0.0", + "description": "Generate hashes from javascript objects in node and the browser.", + "homepage": "https://github.com/puleos/object-hash", + "repository": { + "type": "git", + "url": "https://github.com/puleos/object-hash" + }, + "keywords": [ + "object", + "hash", + "sha1", + "md5" + ], + "bugs": { + "url": "https://github.com/puleos/object-hash/issues" + }, + "scripts": { + "test": "node ./node_modules/.bin/mocha test", + "prepublish": "gulp dist" + }, + "author": "Scott Puleo ", + "files": [ + "index.js", + "dist/object_hash.js" + ], + "license": "MIT", + "devDependencies": { + "browserify": "^16.2.3", + "gulp": "^4.0.0", + "gulp-browserify": "^0.5.1", + "gulp-coveralls": "^0.1.4", + "gulp-exec": "^3.0.1", + "gulp-istanbul": "^1.1.3", + "gulp-jshint": "^2.0.0", + "gulp-mocha": "^5.0.0", + "gulp-rename": "^1.2.0", + "gulp-replace": "^1.0.0", + "gulp-uglify": "^3.0.0", + "jshint": "^2.8.0", + "jshint-stylish": "^2.1.0", + "karma": "^4.2.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^6.2.0" + }, + "engines": { + "node": ">= 6" + }, + "main": "./index.js", + "browser": "./dist/object_hash.js" +} diff --git a/node_modules/object-hash/readme.markdown b/node_modules/object-hash/readme.markdown new file mode 100644 index 0000000..c507cf8 --- /dev/null +++ b/node_modules/object-hash/readme.markdown @@ -0,0 +1,198 @@ +# object-hash + +Generate hashes from objects and values in node and the browser. Uses node.js +crypto module for hashing. Supports SHA1 and many others (depending on the platform) +as well as custom streams (e.g. CRC32). + +[![NPM](https://nodei.co/npm/object-hash.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/object-hash) + +[![Travis CI](https://secure.travis-ci.org/puleos/object-hash.png?branch=master)](https://secure.travis-ci.org/puleos/object-hash?branch=master) +[![Coverage Status](https://coveralls.io/repos/puleos/object-hash/badge.svg?branch=master&service=github)](https://coveralls.io/github/puleos/object-hash?branch=master) + +* Hash values of any type. +* Supports a keys only option for grouping similar objects with different values. + +```js +var hash = require('object-hash'); + +hash({foo: 'bar'}) // => '67b69634f9880a282c14a0f0cb7ba20cf5d677e9' +hash([1, 2, 2.718, 3.14159]) // => '136b9b88375971dff9f1af09d7356e3e04281951' +``` + +## Versioning Disclaimer + +Starting with version `1.1.8` (released April 2017), new versions will consider +the exact returned hash part of the API contract, i.e. changes that will affect +hash values will be considered `semver-major`. Previous versions may violate +that expectation. + +For more information, see [this discussion](https://github.com/puleos/object-hash/issues/30). + +## hash(value, options) + +Generate a hash from any object or type. Defaults to sha1 with hex encoding. + +* `algorithm` hash algo to be used: 'sha1', 'md5', 'passthrough'. default: sha1 + * This supports the algorithms returned by `crypto.getHashes()`. Note that the default of SHA-1 is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired. + * This also supports the `passthrough` algorith, which will return the information that would otherwise have been hashed. +* `excludeValues` {true|false} hash object keys, values ignored. default: false +* `encoding` hash encoding, supports 'buffer', 'hex', 'binary', 'base64'. default: hex +* `ignoreUnknown` {true|*false} ignore unknown object types. default: false +* `replacer` optional function that replaces values before hashing. default: accept all values +* `respectFunctionProperties` {true|false} Whether properties on functions are considered when hashing. default: true +* `respectFunctionNames` {true|false} consider `name` property of functions for hashing. default: true +* `respectType` {true|false} Whether special type attributes (`.prototype`, `.__proto__`, `.constructor`) + are hashed. default: true +* `unorderedArrays` {true|false} Sort all arrays before hashing. Note that this affects *all* collections, + i.e. including typed arrays, Sets, Maps, etc. default: false +* `unorderedSets` {true|false} Sort `Set` and `Map` instances before hashing, i.e. make + `hash(new Set([1, 2])) == hash(new Set([2, 1]))` return `true`. default: true +* `unorderedObjects` {true|false} Sort objects before hashing, i.e. make `hash({ x: 1, y: 2 }) === hash({ y: 2, x: 1 })`. default: true +* `excludeKeys` optional function for excluding specific key(s) from hashing, if true is returned then exclude from hash. default: include all keys + +## hash.sha1(value) + +Hash using the sha1 algorithm. + +Note that SHA-1 is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired. + +*Sugar method, equivalent to* `hash(value, {algorithm: 'sha1'})` + +## hash.keys(value) + +Hash object keys using the sha1 algorithm, values ignored. + +*Sugar method, equivalent to* `hash(value, {excludeValues: true})` + +## hash.MD5(value) + +Hash using the md5 algorithm. + +Note that the MD5 algorithm is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired. + +*Sugar method, equivalent to* `hash(value, {algorithm: 'md5'})` + +## hash.keysMD5(value) + +Hash object keys using the md5 algorithm, values ignored. + +Note that the MD5 algorithm is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired. + +*Sugar method, equivalent to* `hash(value, {algorithm: 'md5', excludeValues: true})` + +## hash.writeToStream(value, [options,] stream) + +Write the information that would otherwise have been hashed to a stream, e.g.: + +```js +hash.writeToStream({foo: 'bar', a: 42}, {respectType: false}, process.stdout) +// => e.g. 'object:a:number:42foo:string:bar' +``` + +## Installation + +node: + +```js +npm install object-hash +``` + +browser: */dist/object_hash.js* + +```html + + + +``` + +## Example usage + +```js +var hash = require('object-hash'); + +var peter = { name: 'Peter', stapler: false, friends: ['Joanna', 'Michael', 'Samir'] }; +var michael = { name: 'Michael', stapler: false, friends: ['Peter', 'Samir'] }; +var bob = { name: 'Bob', stapler: true, friends: [] }; + +/*** + * sha1 hex encoding (default) + */ +hash(peter); +// 14fa461bf4b98155e82adc86532938553b4d33a9 +hash(michael); +// 4b2b30e27699979ce46714253bc2213010db039c +hash(bob); +// 38d96106bc8ef3d8bd369b99bb6972702c9826d5 + +/*** + * hash object keys, values ignored + */ +hash(peter, { excludeValues: true }); +// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c +hash(michael, { excludeValues: true }); +// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c +hash.keys(bob); +// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c + +/*** + * hash object, ignore specific key(s) + */ +hash(peter, { excludeKeys: function(key) { + if ( key === 'friends') { + return true; + } + return false; + } +}); +// 66b7d7e64871aa9fda1bdc8e88a28df797648d80 + +/*** + * md5 base64 encoding + */ +hash(peter, { algorithm: 'md5', encoding: 'base64' }); +// 6rkWaaDiG3NynWw4svGH7g== +hash(michael, { algorithm: 'md5', encoding: 'base64' }); +// djXaWpuWVJeOF8Sb6SFFNg== +hash(bob, { algorithm: 'md5', encoding: 'base64' }); +// lFzkw/IJ8/12jZI0rQeS3w== +``` + +## Legacy Browser Support + +IE <= 8 and Opera <= 11 support dropped in version 0.3.0. If you require +legacy browser support you must either use an ES5 shim or use version 0.2.5 +of this module. + +## Development + +```sh-session +git clone https://github.com/puleos/object-hash +``` + +## Node Docker Wrapper + +If you want to stand this up in a docker container, you should take at look +at the [![node-object-hash](https://github.com/bean5/node-object-hash)](https://github.com/bean5/node-object-hash) project. + +### gulp tasks + +* `gulp watch` (default) watch files, test and lint on change/add +* `gulp test` unit tests +* `gulp karma` browser unit tests +* `gulp lint` jshint +* `gulp dist` create browser version in /dist + +## License + +MIT + +## Changelog + +### v2.0.0 + +Only Node.js versions `>= 6.0.0` are being tested in CI now. +No other breaking changes were introduced. diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE new file mode 100644 index 0000000..810f3db --- /dev/null +++ b/node_modules/path-parse/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Javier Blanco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-parse/README.md b/node_modules/path-parse/README.md new file mode 100644 index 0000000..05097f8 --- /dev/null +++ b/node_modules/path-parse/README.md @@ -0,0 +1,42 @@ +# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) + +> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). + +## Install + +``` +$ npm install --save path-parse +``` + +## Usage + +```js +var pathParse = require('path-parse'); + +pathParse('/home/user/dir/file.txt'); +//=> { +// root : "/", +// dir : "/home/user/dir", +// base : "file.txt", +// ext : ".txt", +// name : "file" +// } +``` + +## API + +See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. + +### pathParse(path) + +### pathParse.posix(path) + +The Posix specific version. + +### pathParse.win32(path) + +The Windows specific version. + +## License + +MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js new file mode 100644 index 0000000..f062d0a --- /dev/null +++ b/node_modules/path-parse/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isWindows = process.platform === 'win32'; + +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; + +var win32 = {}; + +function win32SplitPath(filename) { + return splitWindowsRe.exec(filename).slice(1); +} + +win32.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = win32SplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + return { + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3] + }; +}; + + + +// Split a filename into [dir, root, basename, name, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; +var posix = {}; + + +function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); +} + + +posix.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = posixSplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[1], + dir: allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3], + }; +}; + + +if (isWindows) + module.exports = win32.parse; +else /* posix */ + module.exports = posix.parse; + +module.exports.posix = posix.parse; +module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json new file mode 100644 index 0000000..36c23f8 --- /dev/null +++ b/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/node_modules/picocolors/LICENSE b/node_modules/picocolors/LICENSE new file mode 100644 index 0000000..496098c --- /dev/null +++ b/node_modules/picocolors/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/picocolors/README.md b/node_modules/picocolors/README.md new file mode 100644 index 0000000..8e47aa8 --- /dev/null +++ b/node_modules/picocolors/README.md @@ -0,0 +1,21 @@ +# picocolors + +The tiniest and the fastest library for terminal output formatting with ANSI colors. + +```javascript +import pc from "picocolors" + +console.log( + pc.green(`How are ${pc.italic(`you`)} doing?`) +) +``` + +- **No dependencies.** +- **14 times** smaller and **2 times** faster than chalk. +- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. +- Node.js v6+ & browsers support. Support for both CJS and ESM projects. +- TypeScript type declarations included. +- [`NO_COLOR`](https://no-color.org/) friendly. + +## Docs +Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/node_modules/picocolors/package.json b/node_modules/picocolors/package.json new file mode 100644 index 0000000..85a12d5 --- /dev/null +++ b/node_modules/picocolors/package.json @@ -0,0 +1,25 @@ +{ + "name": "picocolors", + "version": "1.0.0", + "main": "./picocolors.js", + "types": "./picocolors.d.ts", + "browser": { + "./picocolors.js": "./picocolors.browser.js" + }, + "sideEffects": false, + "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", + "files": [ + "picocolors.*", + "types.ts" + ], + "keywords": [ + "terminal", + "colors", + "formatting", + "cli", + "console" + ], + "author": "Alexey Raspopov", + "repository": "alexeyraspopov/picocolors", + "license": "ISC" +} diff --git a/node_modules/picocolors/picocolors.browser.js b/node_modules/picocolors/picocolors.browser.js new file mode 100644 index 0000000..5eb9fbe --- /dev/null +++ b/node_modules/picocolors/picocolors.browser.js @@ -0,0 +1,4 @@ +var x=String; +var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}}; +module.exports=create(); +module.exports.createColors = create; diff --git a/node_modules/picocolors/picocolors.d.ts b/node_modules/picocolors/picocolors.d.ts new file mode 100644 index 0000000..94e146a --- /dev/null +++ b/node_modules/picocolors/picocolors.d.ts @@ -0,0 +1,5 @@ +import { Colors } from "./types" + +declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } + +export = picocolors diff --git a/node_modules/picocolors/picocolors.js b/node_modules/picocolors/picocolors.js new file mode 100644 index 0000000..fdb6304 --- /dev/null +++ b/node_modules/picocolors/picocolors.js @@ -0,0 +1,58 @@ +let tty = require("tty") + +let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty.isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env) + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input + let index = string.indexOf(close, open.length) + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + } + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace + let end = string.substring(index + close.length) + let nextIndex = end.indexOf(close) + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +} + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}) + +module.exports = createColors() +module.exports.createColors = createColors diff --git a/node_modules/picocolors/types.ts b/node_modules/picocolors/types.ts new file mode 100644 index 0000000..b4bacee --- /dev/null +++ b/node_modules/picocolors/types.ts @@ -0,0 +1,30 @@ +export type Formatter = (input: string | number | null | undefined) => string + +export interface Colors { + isColorSupported: boolean + reset: Formatter + bold: Formatter + dim: Formatter + italic: Formatter + underline: Formatter + inverse: Formatter + hidden: Formatter + strikethrough: Formatter + black: Formatter + red: Formatter + green: Formatter + yellow: Formatter + blue: Formatter + magenta: Formatter + cyan: Formatter + white: Formatter + gray: Formatter + bgBlack: Formatter + bgRed: Formatter + bgGreen: Formatter + bgYellow: Formatter + bgBlue: Formatter + bgMagenta: Formatter + bgCyan: Formatter + bgWhite: Formatter +} diff --git a/node_modules/picomatch/CHANGELOG.md b/node_modules/picomatch/CHANGELOG.md new file mode 100644 index 0000000..8ccc6c1 --- /dev/null +++ b/node_modules/picomatch/CHANGELOG.md @@ -0,0 +1,136 @@ +# Release history + +**All notable changes to this project will be documented in this file.** + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## 2.3.1 (2022-01-02) + +### Fixed + +* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)). + +### Changed + +* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)). + +## 2.3.0 (2021-05-21) + +### Fixed + +* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef)) + +## 2.2.3 (2021-04-10) + +### Fixed + +* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)). +* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)). + +## 2.2.2 (2020-03-21) + +### Fixed + +* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)). + +## 2.2.1 (2020-01-04) + +* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals. + +## 2.2.0 (2020-01-04) + +* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f)) +* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`. + +## 2.1.0 (2019-10-31) + +* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92)) +* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650)) +* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c)) +* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9)) +* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625)) +* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0)) +* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8)) +* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07)) +* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45)) +* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34)) +* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55)) +* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03)) +* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87)) +* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d)) +* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa)) +* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d)) +* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54)) +* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367)) +* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569)) +* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77)) +* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038)) +* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd)) + +## 2.0.7 (2019-05-14) + +* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71)) +* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e)) +* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279)) +* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44)) + +## 2.0.4 (2019-04-10) + +### Fixed + +- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. +- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. + +## 2.0.0 (2019-04-10) + +### Added + +- Adds support for `options.onIgnore`. See the readme for details +- Adds support for `options.onResult`. See the readme for details + +### Breaking changes + +- The unixify option was renamed to `windows` +- caching and all related options and methods have been removed + +## 1.0.0 (2018-11-05) + +- adds `.onMatch` option +- improvements to `.scan` method +- numerous improvements and optimizations for matching and parsing +- better windows path handling + +## 0.1.0 - 2017-04-13 + +First release. + + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE new file mode 100644 index 0000000..3608dca --- /dev/null +++ b/node_modules/picomatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md new file mode 100644 index 0000000..b0526e2 --- /dev/null +++ b/node_modules/picomatch/README.md @@ -0,0 +1,708 @@ +

Picomatch

+ +

+ +version + + +test status + + +coverage status + + +downloads + +

+ +
+
+ +

+Blazing fast and accurate glob matcher written in JavaScript.
+No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. +

+ +
+
+ +## Why picomatch? + +* **Lightweight** - No dependencies +* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. +* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) +* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) +* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. +* **Well tested** - Thousands of unit tests + +See the [library comparison](#library-comparisons) to other libraries. + +
+
+ +## Table of Contents + +
Click to expand + +- [Install](#install) +- [Usage](#usage) +- [API](#api) + * [picomatch](#picomatch) + * [.test](#test) + * [.matchBase](#matchbase) + * [.isMatch](#ismatch) + * [.parse](#parse) + * [.scan](#scan) + * [.compileRe](#compilere) + * [.makeRe](#makere) + * [.toRegex](#toregex) +- [Options](#options) + * [Picomatch options](#picomatch-options) + * [Scan Options](#scan-options) + * [Options Examples](#options-examples) +- [Globbing features](#globbing-features) + * [Basic globbing](#basic-globbing) + * [Advanced globbing](#advanced-globbing) + * [Braces](#braces) + * [Matching special characters as literals](#matching-special-characters-as-literals) +- [Library Comparisons](#library-comparisons) +- [Benchmarks](#benchmarks) +- [Philosophies](#philosophies) +- [About](#about) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +
+ +
+
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +npm install --save picomatch +``` + +
+ +## Usage + +The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. + +```js +const pm = require('picomatch'); +const isMatch = pm('*.js'); + +console.log(isMatch('abcd')); //=> false +console.log(isMatch('a.js')); //=> true +console.log(isMatch('a.md')); //=> false +console.log(isMatch('a/b.js')); //=> false +``` + +
+ +## API + +### [picomatch](lib/picomatch.js#L32) + +Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. + +**Params** + +* `globs` **{String|Array}**: One or more glob patterns. +* `options` **{Object=}** +* `returns` **{Function=}**: Returns a matcher function. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch(glob[, options]); + +const isMatch = picomatch('*.!(*a)'); +console.log(isMatch('a.a')); //=> false +console.log(isMatch('a.b')); //=> true +``` + +### [.test](lib/picomatch.js#L117) + +Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. + +**Params** + +* `input` **{String}**: String to test. +* `regex` **{RegExp}** +* `returns` **{Object}**: Returns an object with matching info. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.test(input, regex[, options]); + +console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); +// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } +``` + +### [.matchBase](lib/picomatch.js#L161) + +Match the basename of a filepath. + +**Params** + +* `input` **{String}**: String to test. +* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). +* `returns` **{Boolean}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.matchBase(input, glob[, options]); +console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true +``` + +### [.isMatch](lib/picomatch.js#L183) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* **{String|Array}**: str The string to test. +* **{String|Array}**: patterns One or more glob patterns to use for matching. +* **{Object}**: See available [options](#options). +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.isMatch(string, patterns[, options]); + +console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true +console.log(picomatch.isMatch('a.a', 'b.*')); //=> false +``` + +### [.parse](lib/picomatch.js#L199) + +Parse a glob pattern to create the source string for a regular expression. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.parse(pattern[, options]); +``` + +### [.scan](lib/picomatch.js#L231) + +Scan a glob pattern to separate the pattern into segments. + +**Params** + +* `input` **{String}**: Glob pattern to scan. +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.scan(input[, options]); + +const result = picomatch.scan('!./foo/*.js'); +console.log(result); +{ prefix: '!./', + input: '!./foo/*.js', + start: 3, + base: 'foo', + glob: '*.js', + isBrace: false, + isBracket: false, + isGlob: true, + isExtglob: false, + isGlobstar: false, + negated: true } +``` + +### [.compileRe](lib/picomatch.js#L245) + +Compile a regular expression from the `state` object returned by the +[parse()](#parse) method. + +**Params** + +* `state` **{Object}** +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. +* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. +* `returns` **{RegExp}** + +### [.makeRe](lib/picomatch.js#L286) + +Create a regular expression from a parsed glob pattern. + +**Params** + +* `state` **{String}**: The object returned from the `.parse` method. +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. +* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +const picomatch = require('picomatch'); +const state = picomatch.parse('*.js'); +// picomatch.compileRe(state[, options]); + +console.log(picomatch.compileRe(state)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +### [.toRegex](lib/picomatch.js#L321) + +Create a regular expression from the given regex source string. + +**Params** + +* `source` **{String}**: Regular expression source string. +* `options` **{Object}** +* `returns` **{RegExp}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.toRegex(source[, options]); + +const { output } = picomatch.parse('*.js'); +console.log(picomatch.toRegex(output)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +
+ +## Options + +### Picomatch options + +The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | +| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | +| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | +| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | +| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | +| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | +| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | +| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | +| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | +| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | +| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | +| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | +| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | +| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | +| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | +| `matchBase` | `boolean` | `false` | Alias for `basename` | +| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | +| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | +| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | +| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | +| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | +| `noext` | `boolean` | `false` | Alias for `noextglob` | +| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | +| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | +| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | +| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | +| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | +| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | +| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | +| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | +| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | +| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | +| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | +| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | +| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | +| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | +| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | + +picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error. + +### Scan Options + +In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | +| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.scan('!./foo/*.js', { tokens: true }); +console.log(result); +// { +// prefix: '!./', +// input: '!./foo/*.js', +// start: 3, +// base: 'foo', +// glob: '*.js', +// isBrace: false, +// isBracket: false, +// isGlob: true, +// isExtglob: false, +// isGlobstar: false, +// negated: true, +// maxDepth: 2, +// tokens: [ +// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, +// { value: 'foo', depth: 1, isGlob: false }, +// { value: '*.js', depth: 1, isGlob: true } +// ], +// slashes: [ 2, 6 ], +// parts: [ 'foo', '*.js' ] +// } +``` + +
+ +### Options Examples + +#### options.expandRange + +**Type**: `function` + +**Default**: `undefined` + +Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. + +**Example** + +The following example shows how to create a glob that matches a folder + +```js +const fill = require('fill-range'); +const regex = pm.makeRe('foo/{01..25}/bar', { + expandRange(a, b) { + return `(${fill(a, b, { toRegex: true })})`; + } +}); + +console.log(regex); +//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ + +console.log(regex.test('foo/00/bar')) // false +console.log(regex.test('foo/01/bar')) // true +console.log(regex.test('foo/10/bar')) // true +console.log(regex.test('foo/22/bar')) // true +console.log(regex.test('foo/25/bar')) // true +console.log(regex.test('foo/26/bar')) // false +``` + +#### options.format + +**Type**: `function` + +**Default**: `undefined` + +Custom function for formatting strings before they're matched. + +**Example** + +```js +// strip leading './' from strings +const format = str => str.replace(/^\.\//, ''); +const isMatch = picomatch('foo/*.js', { format }); +console.log(isMatch('./foo/bar.js')); //=> true +``` + +#### options.onMatch + +```js +const onMatch = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onMatch }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onIgnore + +```js +const onIgnore = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onResult + +```js +const onResult = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onResult, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +
+
+ +## Globbing features + +* [Basic globbing](#basic-globbing) (Wildcard matching) +* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) + +### Basic globbing + +| **Character** | **Description** | +| --- | --- | +| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | +| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | +| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | +| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | + +#### Matching behavior vs. Bash + +Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: + +* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. +* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. + +
+ +### Advanced globbing + +* [extglobs](#extglobs) +* [POSIX brackets](#posix-brackets) +* [Braces](#brace-expansion) + +#### Extglobs + +| **Pattern** | **Description** | +| --- | --- | +| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | +| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | +| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | +| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | +| `!(pattern)` | Match _anything but_ `pattern` | + +**Examples** + +```js +const pm = require('picomatch'); + +// *(pattern) matches ZERO or more of "pattern" +console.log(pm.isMatch('a', 'a*(z)')); // true +console.log(pm.isMatch('az', 'a*(z)')); // true +console.log(pm.isMatch('azzz', 'a*(z)')); // true + +// +(pattern) matches ONE or more of "pattern" +console.log(pm.isMatch('a', 'a*(z)')); // true +console.log(pm.isMatch('az', 'a*(z)')); // true +console.log(pm.isMatch('azzz', 'a*(z)')); // true + +// supports multiple extglobs +console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false + +// supports nested extglobs +console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true +``` + +#### POSIX brackets + +POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. + +**Enable POSIX bracket support** + +```js +console.log(pm.makeRe('[[:word:]]+', { posix: true })); +//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ +``` + +**Supported POSIX classes** + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` +* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. +* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. +* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. +* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. +* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. +* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. +* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. +* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. +* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. +* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. +* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. +* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. +* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. + +See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. + +### Braces + +Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. + +### Matching special characters as literals + +If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: + +**Special Characters** + +Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. + +To match any of the following characters as literals: `$^*+?()[] + +Examples: + +```js +console.log(pm.makeRe('foo/bar \\(1\\)')); +console.log(pm.makeRe('foo/bar \\(1\\)')); +``` + +
+
+ +## Library Comparisons + +The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). + +| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | +| --- | --- | --- | --- | --- | --- | --- | --- | +| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | +| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | +| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | +| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | +| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | +| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | +| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | +| File system operations | - | - | - | - | - | - | - | + +
+
+ +## Benchmarks + +Performance comparison of picomatch and minimatch. + +``` +# .makeRe star + picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled) + minimatch x 627,206 ops/sec ±1.96% (87 runs sampled)) + +# .makeRe star; dot=true + picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled) + minimatch x 525,876 ops/sec ±0.60% (88 runs sampled) + +# .makeRe globstar + picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled) + minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d) + +# .makeRe globstars + picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled) + minimatch x 477,179 ops/sec ±1.33% (91 runs sampled) + +# .makeRe with leading star + picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled) + minimatch x 453,564 ops/sec ±1.43% (94 runs sampled) + +# .makeRe - basic braces + picomatch x 392,067 ops/sec ±0.70% (90 runs sampled) + minimatch x 99,532 ops/sec ±2.03% (87 runs sampled)) +``` + +
+
+ +## Philosophies + +The goal of this library is to be blazing fast, without compromising on accuracy. + +**Accuracy** + +The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. + +Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. + +**Performance** + +Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. + +
+
+ +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js new file mode 100644 index 0000000..d2f2bc5 --- /dev/null +++ b/node_modules/picomatch/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/picomatch'); diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js new file mode 100644 index 0000000..a62ef38 --- /dev/null +++ b/node_modules/picomatch/lib/constants.js @@ -0,0 +1,179 @@ +'use strict'; + +const path = require('path'); +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js new file mode 100644 index 0000000..58269d0 --- /dev/null +++ b/node_modules/picomatch/lib/parse.js @@ -0,0 +1,1091 @@ +'use strict'; + +const constants = require('./constants'); +const utils = require('./utils'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js new file mode 100644 index 0000000..782d809 --- /dev/null +++ b/node_modules/picomatch/lib/picomatch.js @@ -0,0 +1,342 @@ +'use strict'; + +const path = require('path'); +const scan = require('./scan'); +const parse = require('./parse'); +const utils = require('./utils'); +const constants = require('./constants'); +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse(input, options); + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js new file mode 100644 index 0000000..e59cd7a --- /dev/null +++ b/node_modules/picomatch/lib/scan.js @@ -0,0 +1,391 @@ +'use strict'; + +const utils = require('./utils'); +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = require('./constants'); + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js new file mode 100644 index 0000000..c3ca766 --- /dev/null +++ b/node_modules/picomatch/lib/utils.js @@ -0,0 +1,64 @@ +'use strict'; + +const path = require('path'); +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = require('./constants'); + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json new file mode 100644 index 0000000..3db22d4 --- /dev/null +++ b/node_modules/picomatch/package.json @@ -0,0 +1,81 @@ +{ + "name": "picomatch", + "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", + "version": "2.3.1", + "homepage": "https://github.com/micromatch/picomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "funding": "https://github.com/sponsors/jonschlinkert", + "repository": "micromatch/picomatch", + "bugs": { + "url": "https://github.com/micromatch/picomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8.6" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, + "devDependencies": { + "eslint": "^6.8.0", + "fill-range": "^7.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.2.2", + "nyc": "^15.0.0", + "time-require": "github:jonschlinkert/time-require" + }, + "keywords": [ + "glob", + "match", + "picomatch" + ], + "nyc": { + "reporter": [ + "html", + "lcov", + "text-summary" + ] + }, + "verb": { + "toc": { + "render": true, + "method": "preWrite", + "maxdepth": 3 + }, + "layout": "empty", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "braces", + "micromatch" + ] + }, + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "micromatch", + "minimatch", + "nanomatch", + "picomatch" + ] + } +} diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js new file mode 100644 index 0000000..7c720eb --- /dev/null +++ b/node_modules/pify/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var processFn = function (fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + + fn.apply(that, args); + }); + }; +}; + +var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function (key) { + var match = function (pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + + return ret; + }, ret); +}; + +pify.all = pify; diff --git a/node_modules/pify/license b/node_modules/pify/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/pify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json new file mode 100644 index 0000000..311d198 --- /dev/null +++ b/node_modules/pify/package.json @@ -0,0 +1,48 @@ +{ + "name": "pify", + "version": "2.3.0", + "description": "Promisify a callback-style function", + "license": "MIT", + "repository": "sindresorhus/pify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava && npm run optimization-test", + "optimization-test": "node --allow-natives-syntax optimization-test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "promisify", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "es2015" + ], + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + } +} diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md new file mode 100644 index 0000000..c79ca8b --- /dev/null +++ b/node_modules/pify/readme.md @@ -0,0 +1,119 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// promisify a single function + +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// or promisify all methods in a module + +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [promiseModule], [options]) + +Returns a promise wrapped version of the supplied function or module. + +#### input + +Type: `function`, `object` + +Callback-style function or module whose methods you want to promisify. + +#### promiseModule + +Type: `function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + +#### options + +##### multiArgs + +Type: `boolean` +Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `array` of (`string`|`regex`) + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `array` of (`string`|`regex`) +Default: `[/.+Sync$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean` +Default: `false` + +By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(data, null); + }); +}; + +// promisify methods but not fn() +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/postcss-import/LICENSE b/node_modules/postcss-import/LICENSE new file mode 100755 index 0000000..13983fb --- /dev/null +++ b/node_modules/postcss-import/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Maxime Thirouin, Jason Campbell & Kevin Mårtensson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-import/README.md b/node_modules/postcss-import/README.md new file mode 100644 index 0000000..f0ce11e --- /dev/null +++ b/node_modules/postcss-import/README.md @@ -0,0 +1,227 @@ +# postcss-import + +[![Build](https://img.shields.io/travis/postcss/postcss-import/master)](https://travis-ci.org/postcss/postcss-import) +[![Version](https://img.shields.io/npm/v/postcss-import)](https://github.com/postcss/postcss-import/blob/master/CHANGELOG.md) +[![postcss compatibility](https://img.shields.io/npm/dependency-version/postcss-import/peer/postcss)](https://postcss.org/) + +> [PostCSS](https://github.com/postcss/postcss) plugin to transform `@import` +rules by inlining content. + +This plugin can consume local files, node modules or web_modules. +To resolve path of an `@import` rule, it can look into root directory +(by default `process.cwd()`), `web_modules`, `node_modules` +or local modules. +_When importing a module, it will look for `index.css` or file referenced in +`package.json` in the `style` or `main` fields._ +You can also provide manually multiples paths where to look at. + +**Notes:** + +- **This plugin should probably be used as the first plugin of your list. +This way, other plugins will work on the AST as if there were only a single file +to process, and will probably work as you can expect**. +- This plugin works great with +[postcss-url](https://github.com/postcss/postcss-url) plugin, +which will allow you to adjust assets `url()` (or even inline them) after +inlining imported files. +- In order to optimize output, **this plugin will only import a file once** on +a given scope (root, media query...). +Tests are made from the path & the content of imported files (using a hash +table). +If this behavior is not what you want, look at `skipDuplicates` option +- If you are looking for **Glob Imports**, you can use [postcss-import-ext-glob](https://github.com/dimitrinicolas/postcss-import-ext-glob) to extend postcss-import. +- Imports which are not modified (by `options.filter` or because they are remote + imports) are moved to the top of the output. +- **This plugin attempts to follow the CSS `@import` spec**; `@import` + statements must precede all other statements (besides `@charset`). + +## Installation + +```console +$ npm install -D postcss-import +``` + +## Usage + +Unless your stylesheet is in the same place where you run postcss +(`process.cwd()`), you will need to use `from` option to make relative imports +work. + +```js +// dependencies +const fs = require("fs") +const postcss = require("postcss") +const atImport = require("postcss-import") + +// css to be processed +const css = fs.readFileSync("css/input.css", "utf8") + +// process css +postcss() + .use(atImport()) + .process(css, { + // `from` option is needed here + from: "css/input.css" + }) + .then((result) => { + const output = result.css + + console.log(output) + }) +``` + +`css/input.css`: + +```css +/* can consume `node_modules`, `web_modules` or local modules */ +@import "cssrecipes-defaults"; /* == @import "../node_modules/cssrecipes-defaults/index.css"; */ +@import "normalize.css"; /* == @import "../node_modules/normalize.css/normalize.css"; */ + +@import "foo.css"; /* relative to css/ according to `from` option above */ + +@import "bar.css" (min-width: 25em); + +body { + background: black; +} +``` + +will give you: + +```css +/* ... content of ../node_modules/cssrecipes-defaults/index.css */ +/* ... content of ../node_modules/normalize.css/normalize.css */ + +/* ... content of css/foo.css */ + +@media (min-width: 25em) { +/* ... content of css/bar.css */ +} + +body { + background: black; +} +``` + +Checkout the [tests](test) for more examples. + +### Options + +### `filter` +Type: `Function` +Default: `() => true` + +Only transform imports for which the test function returns `true`. Imports for +which the test function returns `false` will be left as is. The function gets +the path to import as an argument and should return a boolean. + +#### `root` + +Type: `String` +Default: `process.cwd()` or _dirname of +[the postcss `from`](https://github.com/postcss/postcss#node-source)_ + +Define the root where to resolve path (eg: place where `node_modules` are). +Should not be used that much. +_Note: nested `@import` will additionally benefit of the relative dirname of +imported files._ + +#### `path` + +Type: `String|Array` +Default: `[]` + +A string or an array of paths in where to look for files. + +#### `plugins` + +Type: `Array` +Default: `undefined` + +An array of plugins to be applied on each imported files. + +#### `resolve` + +Type: `Function` +Default: `null` + +You can provide a custom path resolver with this option. This function gets +`(id, basedir, importOptions)` arguments and should return a path, an array of +paths or a promise resolving to the path(s). If you do not return an absolute +path, your path will be resolved to an absolute path using the default +resolver. +You can use [resolve](https://github.com/substack/node-resolve) for this. + +#### `load` + +Type: `Function` +Default: null + +You can overwrite the default loading way by setting this option. +This function gets `(filename, importOptions)` arguments and returns content or +promised content. + +#### `skipDuplicates` + +Type: `Boolean` +Default: `true` + +By default, similar files (based on the same content) are being skipped. +It's to optimize output and skip similar files like `normalize.css` for example. +If this behavior is not what you want, just set this option to `false` to +disable it. + +#### `addModulesDirectories` + +Type: `Array` +Default: `[]` + +An array of folder names to add to [Node's resolver](https://github.com/substack/node-resolve). +Values will be appended to the default resolve directories: +`["node_modules", "web_modules"]`. + +This option is only for adding additional directories to default resolver. If +you provide your own resolver via the `resolve` configuration option above, then +this value will be ignored. + +#### Example with some options + +```js +const postcss = require("postcss") +const atImport = require("postcss-import") + +postcss() + .use(atImport({ + path: ["src/css"], + })) + .process(cssString) + .then((result) => { + const { css } = result + }) +``` + +## `dependency` Message Support + +`postcss-import` adds a message to `result.messages` for each `@import`. Messages are in the following format: + +``` +{ + type: 'dependency', + file: absoluteFilePath, + parent: fileContainingTheImport +} +``` + +This is mainly for use by postcss runners that implement file watching. + +--- + +## CONTRIBUTING + +* ⇄ Pull requests and ★ Stars are always welcome. +* For bugs and feature requests, please create an issue. +* Pull requests must be accompanied by passing automated tests (`$ npm test`). + +## [Changelog](CHANGELOG.md) + +## [License](LICENSE) diff --git a/node_modules/postcss-import/index.js b/node_modules/postcss-import/index.js new file mode 100755 index 0000000..e6a3dc3 --- /dev/null +++ b/node_modules/postcss-import/index.js @@ -0,0 +1,344 @@ +"use strict" +// builtin tooling +const path = require("path") + +// internal tooling +const joinMedia = require("./lib/join-media") +const joinLayer = require("./lib/join-layer") +const resolveId = require("./lib/resolve-id") +const loadContent = require("./lib/load-content") +const processContent = require("./lib/process-content") +const parseStatements = require("./lib/parse-statements") + +function AtImport(options) { + options = { + root: process.cwd(), + path: [], + skipDuplicates: true, + resolve: resolveId, + load: loadContent, + plugins: [], + addModulesDirectories: [], + ...options, + } + + options.root = path.resolve(options.root) + + // convert string to an array of a single element + if (typeof options.path === "string") options.path = [options.path] + + if (!Array.isArray(options.path)) options.path = [] + + options.path = options.path.map(p => path.resolve(options.root, p)) + + return { + postcssPlugin: "postcss-import", + Once(styles, { result, atRule, postcss }) { + const state = { + importedFiles: {}, + hashFiles: {}, + } + + if (styles.source && styles.source.input && styles.source.input.file) { + state.importedFiles[styles.source.input.file] = {} + } + + if (options.plugins && !Array.isArray(options.plugins)) { + throw new Error("plugins option must be an array") + } + + return parseStyles(result, styles, options, state, [], []).then( + bundle => { + applyRaws(bundle) + applyMedia(bundle) + applyStyles(bundle, styles) + } + ) + + function applyRaws(bundle) { + bundle.forEach((stmt, index) => { + if (index === 0) return + + if (stmt.parent) { + const { before } = stmt.parent.node.raws + if (stmt.type === "nodes") stmt.nodes[0].raws.before = before + else stmt.node.raws.before = before + } else if (stmt.type === "nodes") { + stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n" + } + }) + } + + function applyMedia(bundle) { + bundle.forEach(stmt => { + if ( + (!stmt.media.length && !stmt.layer.length) || + stmt.type === "charset" + ) { + return + } + + if (stmt.type === "import") { + stmt.node.params = `${stmt.fullUri} ${stmt.media.join(", ")}` + } else if (stmt.type === "media") { + stmt.node.params = stmt.media.join(", ") + } else { + const { nodes } = stmt + const { parent } = nodes[0] + + let outerAtRule + let innerAtRule + if (stmt.media.length && stmt.layer.length) { + const mediaNode = atRule({ + name: "media", + params: stmt.media.join(", "), + source: parent.source, + }) + + const layerNode = atRule({ + name: "layer", + params: stmt.layer.filter(layer => layer !== "").join("."), + source: parent.source, + }) + + mediaNode.append(layerNode) + innerAtRule = layerNode + outerAtRule = mediaNode + } else if (stmt.media.length) { + const mediaNode = atRule({ + name: "media", + params: stmt.media.join(", "), + source: parent.source, + }) + + innerAtRule = mediaNode + outerAtRule = mediaNode + } else if (stmt.layer.length) { + const layerNode = atRule({ + name: "layer", + params: stmt.layer.filter(layer => layer !== "").join("."), + source: parent.source, + }) + + innerAtRule = layerNode + outerAtRule = layerNode + } + + parent.insertBefore(nodes[0], outerAtRule) + + // remove nodes + nodes.forEach(node => { + node.parent = undefined + }) + + // better output + nodes[0].raws.before = nodes[0].raws.before || "\n" + + // wrap new rules with media query and/or layer at rule + innerAtRule.append(nodes) + + stmt.type = "media" + stmt.node = outerAtRule + delete stmt.nodes + } + }) + } + + function applyStyles(bundle, styles) { + styles.nodes = [] + + // Strip additional statements. + bundle.forEach(stmt => { + if (["charset", "import", "media"].includes(stmt.type)) { + stmt.node.parent = undefined + styles.append(stmt.node) + } else if (stmt.type === "nodes") { + stmt.nodes.forEach(node => { + node.parent = undefined + styles.append(node) + }) + } + }) + } + + function parseStyles(result, styles, options, state, media, layer) { + const statements = parseStatements(result, styles) + + return Promise.resolve(statements) + .then(stmts => { + // process each statement in series + return stmts.reduce((promise, stmt) => { + return promise.then(() => { + stmt.media = joinMedia(media, stmt.media || []) + stmt.layer = joinLayer(layer, stmt.layer || []) + + // skip protocol base uri (protocol://url) or protocol-relative + if ( + stmt.type !== "import" || + /^(?:[a-z]+:)?\/\//i.test(stmt.uri) + ) { + return + } + + if (options.filter && !options.filter(stmt.uri)) { + // rejected by filter + return + } + + return resolveImportId(result, stmt, options, state) + }) + }, Promise.resolve()) + }) + .then(() => { + let charset + const imports = [] + const bundle = [] + + function handleCharset(stmt) { + if (!charset) charset = stmt + // charsets aren't case-sensitive, so convert to lower case to compare + else if ( + stmt.node.params.toLowerCase() !== + charset.node.params.toLowerCase() + ) { + throw new Error( + `Incompatable @charset statements: + ${stmt.node.params} specified in ${stmt.node.source.input.file} + ${charset.node.params} specified in ${charset.node.source.input.file}` + ) + } + } + + // squash statements and their children + statements.forEach(stmt => { + if (stmt.type === "charset") handleCharset(stmt) + else if (stmt.type === "import") { + if (stmt.children) { + stmt.children.forEach((child, index) => { + if (child.type === "import") imports.push(child) + else if (child.type === "charset") handleCharset(child) + else bundle.push(child) + // For better output + if (index === 0) child.parent = stmt + }) + } else imports.push(stmt) + } else if (stmt.type === "media" || stmt.type === "nodes") { + bundle.push(stmt) + } + }) + + return charset + ? [charset, ...imports.concat(bundle)] + : imports.concat(bundle) + }) + } + + function resolveImportId(result, stmt, options, state) { + const atRule = stmt.node + let sourceFile + if (atRule.source && atRule.source.input && atRule.source.input.file) { + sourceFile = atRule.source.input.file + } + const base = sourceFile + ? path.dirname(atRule.source.input.file) + : options.root + + return Promise.resolve(options.resolve(stmt.uri, base, options)) + .then(paths => { + if (!Array.isArray(paths)) paths = [paths] + // Ensure that each path is absolute: + return Promise.all( + paths.map(file => { + return !path.isAbsolute(file) + ? resolveId(file, base, options) + : file + }) + ) + }) + .then(resolved => { + // Add dependency messages: + resolved.forEach(file => { + result.messages.push({ + type: "dependency", + plugin: "postcss-import", + file, + parent: sourceFile, + }) + }) + + return Promise.all( + resolved.map(file => { + return loadImportContent(result, stmt, file, options, state) + }) + ) + }) + .then(result => { + // Merge loaded statements + stmt.children = result.reduce((result, statements) => { + return statements ? result.concat(statements) : result + }, []) + }) + } + + function loadImportContent(result, stmt, filename, options, state) { + const atRule = stmt.node + const { media, layer } = stmt + if (options.skipDuplicates) { + // skip files already imported at the same scope + if ( + state.importedFiles[filename] && + state.importedFiles[filename][media] + ) { + return + } + + // save imported files to skip them next time + if (!state.importedFiles[filename]) state.importedFiles[filename] = {} + state.importedFiles[filename][media] = true + } + + return Promise.resolve(options.load(filename, options)).then( + content => { + if (content.trim() === "") { + result.warn(`${filename} is empty`, { node: atRule }) + return + } + + // skip previous imported files not containing @import rules + if (state.hashFiles[content] && state.hashFiles[content][media]) + return + + return processContent( + result, + content, + filename, + options, + postcss + ).then(importedResult => { + const styles = importedResult.root + result.messages = result.messages.concat(importedResult.messages) + + if (options.skipDuplicates) { + const hasImport = styles.some(child => { + return child.type === "atrule" && child.name === "import" + }) + if (!hasImport) { + // save hash files to skip them next time + if (!state.hashFiles[content]) state.hashFiles[content] = {} + state.hashFiles[content][media] = true + } + } + + // recursion: import @import from imported file + return parseStyles(result, styles, options, state, media, layer) + }) + } + ) + } + }, + } +} + +AtImport.postcss = true + +module.exports = AtImport diff --git a/node_modules/postcss-import/lib/join-layer.js b/node_modules/postcss-import/lib/join-layer.js new file mode 100644 index 0000000..9d91519 --- /dev/null +++ b/node_modules/postcss-import/lib/join-layer.js @@ -0,0 +1,9 @@ +"use strict" + +module.exports = function (parentLayer, childLayer) { + if (!parentLayer.length && childLayer.length) return childLayer + if (parentLayer.length && !childLayer.length) return parentLayer + if (!parentLayer.length && !childLayer.length) return [] + + return parentLayer.concat(childLayer) +} diff --git a/node_modules/postcss-import/lib/join-media.js b/node_modules/postcss-import/lib/join-media.js new file mode 100644 index 0000000..5780de9 --- /dev/null +++ b/node_modules/postcss-import/lib/join-media.js @@ -0,0 +1,17 @@ +"use strict" + +module.exports = function (parentMedia, childMedia) { + if (!parentMedia.length && childMedia.length) return childMedia + if (parentMedia.length && !childMedia.length) return parentMedia + if (!parentMedia.length && !childMedia.length) return [] + + const media = [] + + parentMedia.forEach(parentItem => { + childMedia.forEach(childItem => { + if (parentItem !== childItem) media.push(`${parentItem} and ${childItem}`) + }) + }) + + return media +} diff --git a/node_modules/postcss-import/lib/load-content.js b/node_modules/postcss-import/lib/load-content.js new file mode 100644 index 0000000..de61155 --- /dev/null +++ b/node_modules/postcss-import/lib/load-content.js @@ -0,0 +1,5 @@ +"use strict" + +const readCache = require("read-cache") + +module.exports = filename => readCache(filename, "utf-8") diff --git a/node_modules/postcss-import/lib/parse-statements.js b/node_modules/postcss-import/lib/parse-statements.js new file mode 100644 index 0000000..0c94e5a --- /dev/null +++ b/node_modules/postcss-import/lib/parse-statements.js @@ -0,0 +1,172 @@ +"use strict" + +// external tooling +const valueParser = require("postcss-value-parser") + +// extended tooling +const { stringify } = valueParser + +function split(params, start) { + const list = [] + const last = params.reduce((item, node, index) => { + if (index < start) return "" + if (node.type === "div" && node.value === ",") { + list.push(item) + return "" + } + return item + stringify(node) + }, "") + list.push(last) + return list +} + +module.exports = function (result, styles) { + const statements = [] + let nodes = [] + + styles.each(node => { + let stmt + if (node.type === "atrule") { + if (node.name === "import") stmt = parseImport(result, node) + else if (node.name === "media") stmt = parseMedia(result, node) + else if (node.name === "charset") stmt = parseCharset(result, node) + } + + if (stmt) { + if (nodes.length) { + statements.push({ + type: "nodes", + nodes, + media: [], + layer: [], + }) + nodes = [] + } + statements.push(stmt) + } else nodes.push(node) + }) + + if (nodes.length) { + statements.push({ + type: "nodes", + nodes, + media: [], + layer: [], + }) + } + + return statements +} + +function parseMedia(result, atRule) { + const params = valueParser(atRule.params).nodes + return { + type: "media", + node: atRule, + media: split(params, 0), + layer: [], + } +} + +function parseCharset(result, atRule) { + if (atRule.prev()) { + return result.warn("@charset must precede all other statements", { + node: atRule, + }) + } + return { + type: "charset", + node: atRule, + media: [], + layer: [], + } +} + +function parseImport(result, atRule) { + let prev = atRule.prev() + if (prev) { + do { + if ( + prev.type !== "comment" && + (prev.type !== "atrule" || + (prev.name !== "import" && + prev.name !== "charset" && + !(prev.name === "layer" && !prev.nodes))) + ) { + return result.warn( + "@import must precede all other statements (besides @charset or empty @layer)", + { node: atRule } + ) + } + prev = prev.prev() + } while (prev) + } + + if (atRule.nodes) { + return result.warn( + "It looks like you didn't end your @import statement correctly. " + + "Child nodes are attached to it.", + { node: atRule } + ) + } + + const params = valueParser(atRule.params).nodes + const stmt = { + type: "import", + node: atRule, + media: [], + layer: [], + } + + // prettier-ignore + if ( + !params.length || + ( + params[0].type !== "string" || + !params[0].value + ) && + ( + params[0].type !== "function" || + params[0].value !== "url" || + !params[0].nodes.length || + !params[0].nodes[0].value + ) + ) { + return result.warn(`Unable to find uri in '${ atRule.toString() }'`, { + node: atRule, + }) + } + + if (params[0].type === "string") stmt.uri = params[0].value + else stmt.uri = params[0].nodes[0].value + stmt.fullUri = stringify(params[0]) + + let remainder = params + if (remainder.length > 2) { + if ( + (remainder[2].type === "word" || remainder[2].type === "function") && + remainder[2].value === "layer" + ) { + if (remainder[1].type !== "space") { + return result.warn("Invalid import layer statement", { node: atRule }) + } + + if (remainder[2].nodes) { + stmt.layer = [stringify(remainder[2].nodes)] + } else { + stmt.layer = [""] + } + remainder = remainder.slice(2) + } + } + + if (remainder.length > 2) { + if (remainder[1].type !== "space") { + return result.warn("Invalid import media statement", { node: atRule }) + } + + stmt.media = split(remainder, 2) + } + + return stmt +} diff --git a/node_modules/postcss-import/lib/process-content.js b/node_modules/postcss-import/lib/process-content.js new file mode 100644 index 0000000..beaa3f0 --- /dev/null +++ b/node_modules/postcss-import/lib/process-content.js @@ -0,0 +1,59 @@ +"use strict" + +// builtin tooling +const path = require("path") + +// placeholder tooling +let sugarss + +module.exports = function processContent( + result, + content, + filename, + options, + postcss +) { + const { plugins } = options + const ext = path.extname(filename) + + const parserList = [] + + // SugarSS support: + if (ext === ".sss") { + if (!sugarss) { + try { + sugarss = require("sugarss") + } catch {} // Ignore + } + if (sugarss) + return runPostcss(postcss, content, filename, plugins, [sugarss]) + } + + // Syntax support: + if (result.opts.syntax && result.opts.syntax.parse) { + parserList.push(result.opts.syntax.parse) + } + + // Parser support: + if (result.opts.parser) parserList.push(result.opts.parser) + // Try the default as a last resort: + parserList.push(null) + + return runPostcss(postcss, content, filename, plugins, parserList) +} + +function runPostcss(postcss, content, filename, plugins, parsers, index) { + if (!index) index = 0 + return postcss(plugins) + .process(content, { + from: filename, + parser: parsers[index], + }) + .catch(err => { + // If there's an error, try the next parser + index++ + // If there are no parsers left, throw it + if (index === parsers.length) throw err + return runPostcss(postcss, content, filename, plugins, parsers, index) + }) +} diff --git a/node_modules/postcss-import/lib/resolve-id.js b/node_modules/postcss-import/lib/resolve-id.js new file mode 100644 index 0000000..ffef034 --- /dev/null +++ b/node_modules/postcss-import/lib/resolve-id.js @@ -0,0 +1,42 @@ +"use strict" + +// external tooling +const resolve = require("resolve") + +const moduleDirectories = ["web_modules", "node_modules"] + +function resolveModule(id, opts) { + return new Promise((res, rej) => { + resolve(id, opts, (err, path) => (err ? rej(err) : res(path))) + }) +} + +module.exports = function (id, base, options) { + const paths = options.path + + const resolveOpts = { + basedir: base, + moduleDirectory: moduleDirectories.concat(options.addModulesDirectories), + paths, + extensions: [".css"], + packageFilter: function processPackage(pkg) { + if (pkg.style) pkg.main = pkg.style + else if (!pkg.main || !/\.css$/.test(pkg.main)) pkg.main = "index.css" + return pkg + }, + preserveSymlinks: false, + } + + return resolveModule(`./${id}`, resolveOpts) + .catch(() => resolveModule(id, resolveOpts)) + .catch(() => { + if (paths.indexOf(base) === -1) paths.unshift(base) + + throw new Error( + `Failed to find '${id}' + in [ + ${paths.join(",\n ")} + ]` + ) + }) +} diff --git a/node_modules/postcss-import/package.json b/node_modules/postcss-import/package.json new file mode 100644 index 0000000..46767be --- /dev/null +++ b/node_modules/postcss-import/package.json @@ -0,0 +1,65 @@ +{ + "name": "postcss-import", + "version": "14.1.0", + "description": "PostCSS plugin to import CSS files", + "keywords": [ + "css", + "postcss", + "postcss-plugin", + "import", + "node modules", + "npm" + ], + "author": "Maxime Thirouin", + "license": "MIT", + "repository": "https://github.com/postcss/postcss-import.git", + "files": [ + "index.js", + "lib" + ], + "engines": { + "node": ">=10.0.0" + }, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "devDependencies": { + "ava": "^3.0.0", + "eslint": "^7.0.0", + "eslint-config-problems": "^5.0.0", + "eslint-plugin-prettier": "^4.0.0", + "postcss": "^8.0.0", + "postcss-scss": "^4.0.0", + "prettier": "~2.6.0", + "sugarss": "^4.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + }, + "scripts": { + "ci": "eslint . && ava", + "lint": "eslint . --fix", + "pretest": "npm run lint", + "test": "ava" + }, + "eslintConfig": { + "extends": "eslint-config-problems", + "env": { + "node": true + }, + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": [ + "error", + { + "semi": false, + "arrowParens": "avoid" + } + ] + } + } +} diff --git a/node_modules/postcss-js/LICENSE b/node_modules/postcss-js/LICENSE new file mode 100644 index 0000000..d3bd672 --- /dev/null +++ b/node_modules/postcss-js/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2015 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-js/README.md b/node_modules/postcss-js/README.md new file mode 100644 index 0000000..469b3be --- /dev/null +++ b/node_modules/postcss-js/README.md @@ -0,0 +1,22 @@ +# PostCSS JS + + + +[PostCSS] for for CSS-in-JS and styles in JS objects. + +For example, to use [Stylelint] or [RTLCSS] plugins in your workflow. + + + Sponsored by Evil Martians + + +[Stylelint]: https://github.com/stylelint/stylelint +[PostCSS]: https://github.com/postcss/postcss +[RTLCSS]: https://github.com/MohammadYounes/rtlcss + + +## Docs +Read **[full docs](https://github.com/postcss/postcss-js#readme)** on GitHub. diff --git a/node_modules/postcss-js/async.js b/node_modules/postcss-js/async.js new file mode 100644 index 0000000..4c2f3c6 --- /dev/null +++ b/node_modules/postcss-js/async.js @@ -0,0 +1,15 @@ +let postcss = require('postcss') + +let processResult = require('./process-result') +let parse = require('./parser') + +module.exports = function async(plugins) { + let processor = postcss(plugins) + return async input => { + let result = await processor.process(input, { + parser: parse, + from: undefined + }) + return processResult(result) + } +} diff --git a/node_modules/postcss-js/index.js b/node_modules/postcss-js/index.js new file mode 100644 index 0000000..8a4274e --- /dev/null +++ b/node_modules/postcss-js/index.js @@ -0,0 +1,11 @@ +let objectify = require('./objectifier') +let parse = require('./parser') +let async = require('./async') +let sync = require('./sync') + +module.exports = { + objectify, + parse, + async, + sync +} diff --git a/node_modules/postcss-js/index.mjs b/node_modules/postcss-js/index.mjs new file mode 100644 index 0000000..d14b61c --- /dev/null +++ b/node_modules/postcss-js/index.mjs @@ -0,0 +1,8 @@ +import index from './index.js' + +export default index + +export const objectify = index.objectify +export const parse = index.parse +export const async = index.async +export const sync = index.sync diff --git a/node_modules/postcss-js/objectifier.js b/node_modules/postcss-js/objectifier.js new file mode 100644 index 0000000..ae43e43 --- /dev/null +++ b/node_modules/postcss-js/objectifier.js @@ -0,0 +1,83 @@ +let camelcase = require('camelcase-css') + +let UNITLESS = { + boxFlex: true, + boxFlexGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + fillOpacity: true, + strokeDashoffset: true, + strokeOpacity: true, + strokeWidth: true +} + +function atRule(node) { + if (typeof node.nodes === 'undefined') { + return true + } else { + return process(node) + } +} + +function process(node) { + let name + let result = {} + + node.each(child => { + if (child.type === 'atrule') { + name = '@' + child.name + if (child.params) name += ' ' + child.params + if (typeof result[name] === 'undefined') { + result[name] = atRule(child) + } else if (Array.isArray(result[name])) { + result[name].push(atRule(child)) + } else { + result[name] = [result[name], atRule(child)] + } + } else if (child.type === 'rule') { + let body = process(child) + if (result[child.selector]) { + for (let i in body) { + result[child.selector][i] = body[i] + } + } else { + result[child.selector] = body + } + } else if (child.type === 'decl') { + if (child.prop[0] === '-' && child.prop[1] === '-') { + name = child.prop + } else { + name = camelcase(child.prop) + } + let value = child.value + if (!isNaN(child.value) && UNITLESS[name]) { + value = parseFloat(child.value) + } + if (child.important) value += ' !important' + if (typeof result[name] === 'undefined') { + result[name] = value + } else if (Array.isArray(result[name])) { + result[name].push(value) + } else { + result[name] = [result[name], value] + } + } + }) + return result +} + +module.exports = process diff --git a/node_modules/postcss-js/package.json b/node_modules/postcss-js/package.json new file mode 100644 index 0000000..575047b --- /dev/null +++ b/node_modules/postcss-js/package.json @@ -0,0 +1,42 @@ +{ + "name": "postcss-js", + "version": "4.0.0", + "description": "PostCSS for CSS-in-JS and styles in JS objects", + "keywords": [ + "postcss", + "postcss-runner", + "js", + "inline", + "react", + "css", + "cssinjs" + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "postcss/postcss-js", + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "exports": { + ".": { + "require": "./index.js", + "import": "./index.mjs" + }, + "./package.json": "./package.json", + "./async": "./async.js", + "./objectifier": "./objectifier.js", + "./parser": "./parser.js", + "./process-result": "./process-result.js", + "./sync": "./sync.js" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + }, + "dependencies": { + "camelcase-css": "^2.0.1" + } +} diff --git a/node_modules/postcss-js/parser.js b/node_modules/postcss-js/parser.js new file mode 100644 index 0000000..17ae264 --- /dev/null +++ b/node_modules/postcss-js/parser.js @@ -0,0 +1,104 @@ +let postcss = require('postcss') + +let IMPORTANT = /\s*!important\s*$/i + +let UNITLESS = { + 'box-flex': true, + 'box-flex-group': true, + 'column-count': true, + 'flex': true, + 'flex-grow': true, + 'flex-positive': true, + 'flex-shrink': true, + 'flex-negative': true, + 'font-weight': true, + 'line-clamp': true, + 'line-height': true, + 'opacity': true, + 'order': true, + 'orphans': true, + 'tab-size': true, + 'widows': true, + 'z-index': true, + 'zoom': true, + 'fill-opacity': true, + 'stroke-dashoffset': true, + 'stroke-opacity': true, + 'stroke-width': true +} + +function dashify(str) { + return str + .replace(/([A-Z])/g, '-$1') + .replace(/^ms-/, '-ms-') + .toLowerCase() +} + +function decl(parent, name, value) { + if (value === false || value === null) return + + if (!name.startsWith('--')) { + name = dashify(name) + } + + if (typeof value === 'number') { + if (value === 0 || UNITLESS[name]) { + value = value.toString() + } else { + value += 'px' + } + } + + if (name === 'css-float') name = 'float' + + if (IMPORTANT.test(value)) { + value = value.replace(IMPORTANT, '') + parent.push(postcss.decl({ prop: name, value, important: true })) + } else { + parent.push(postcss.decl({ prop: name, value })) + } +} + +function atRule(parent, parts, value) { + let node = postcss.atRule({ name: parts[1], params: parts[3] || '' }) + if (typeof value === 'object') { + node.nodes = [] + parse(value, node) + } + parent.push(node) +} + +function parse(obj, parent) { + let name, value, node + for (name in obj) { + value = obj[name] + if (value === null || typeof value === 'undefined') { + continue + } else if (name[0] === '@') { + let parts = name.match(/@(\S+)(\s+([\W\w]*)\s*)?/) + if (Array.isArray(value)) { + for (let i of value) { + atRule(parent, parts, i) + } + } else { + atRule(parent, parts, value) + } + } else if (Array.isArray(value)) { + for (let i of value) { + decl(parent, name, i) + } + } else if (typeof value === 'object') { + node = postcss.rule({ selector: name }) + parse(value, node) + parent.push(node) + } else { + decl(parent, name, value) + } + } +} + +module.exports = function (obj) { + let root = postcss.root() + parse(obj, root) + return root +} diff --git a/node_modules/postcss-js/process-result.js b/node_modules/postcss-js/process-result.js new file mode 100644 index 0000000..215a95c --- /dev/null +++ b/node_modules/postcss-js/process-result.js @@ -0,0 +1,11 @@ +let objectify = require('./objectifier') + +module.exports = function processResult(result) { + if (console && console.warn) { + result.warnings().forEach(warn => { + let source = warn.plugin || 'PostCSS' + console.warn(source + ': ' + warn.text) + }) + } + return objectify(result.root) +} diff --git a/node_modules/postcss-js/sync.js b/node_modules/postcss-js/sync.js new file mode 100644 index 0000000..745bd27 --- /dev/null +++ b/node_modules/postcss-js/sync.js @@ -0,0 +1,12 @@ +let postcss = require('postcss') + +let processResult = require('./process-result') +let parse = require('./parser') + +module.exports = function (plugins) { + let processor = postcss(plugins) + return input => { + let result = processor.process(input, { parser: parse, from: undefined }) + return processResult(result) + } +} diff --git a/node_modules/postcss-load-config/LICENSE b/node_modules/postcss-load-config/LICENSE new file mode 100644 index 0000000..458e8a3 --- /dev/null +++ b/node_modules/postcss-load-config/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright Michael Ciniawsky + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-load-config/README.md b/node_modules/postcss-load-config/README.md new file mode 100644 index 0000000..741ddd3 --- /dev/null +++ b/node_modules/postcss-load-config/README.md @@ -0,0 +1,500 @@ +[![npm][npm]][npm-url] +[![node][node]][node-url] +[![deps][deps]][deps-url] +[![test][test]][test-url] +[![coverage][cover]][cover-url] +[![code style][style]][style-url] +[![chat][chat]][chat-url] + +
+ + + + + +

Load Config

+
+ +

Install

+ +```bash +npm i -D postcss-load-config +``` + +

Usage

+ +```bash +npm i -S|-D postcss-plugin +``` + +Install all required PostCSS plugins and save them to your **package.json** `dependencies`/`devDependencies` + +Then create a PostCSS config file by choosing one of the following formats + +### `package.json` + +Create a **`postcss`** section in your project's **`package.json`** + +``` +Project (Root) + |– client + |– public + | + |- package.json +``` + +```json +{ + "postcss": { + "parser": "sugarss", + "map": false, + "plugins": { + "postcss-plugin": {} + } + } +} +``` + +### `.postcssrc` + +Create a **`.postcssrc`** file in JSON or YAML format + +> ℹ️ It's recommended to use an extension (e.g **`.postcssrc.json`** or **`.postcssrc.yml`**) instead of `.postcssrc` + +``` +Project (Root) + |– client + |– public + | + |- (.postcssrc|.postcssrc.json|.postcssrc.yml) + |- package.json +``` + +**`.postcssrc.json`** +```json +{ + "parser": "sugarss", + "map": false, + "plugins": { + "postcss-plugin": {} + } +} +``` + +**`.postcssrc.yml`** +```yaml +parser: sugarss +map: false +plugins: + postcss-plugin: {} +``` + +### `.postcssrc.js` or `postcss.config.js` + +You may need some logic within your config. In this case create JS file named **`.postcssrc.js`** or **`postcss.config.js`** + +``` +Project (Root) + |– client + |– public + | + |- (.postcssrc.js|postcss.config.js) + |- package.json +``` + +You can export the config as an `{Object}` + +**.postcssrc.js** +```js +module.exports = { + parser: 'sugarss', + map: false, + plugins: { + 'postcss-plugin': {} + } +} +``` + +Or export a `{Function}` that returns the config (more about the `ctx` param below) + +**.postcssrc.js** +```js +module.exports = (ctx) => ({ + parser: ctx.parser ? 'sugarss' : false, + map: ctx.env === 'development' ? ctx.map : false, + plugins: { + 'postcss-plugin': ctx.options.plugin + } +}) +``` + +Plugins can be loaded either using an `{Object}` or an `{Array}` + +#### `{Object}` + +**.postcssrc.js** +```js +module.exports = ({ env }) => ({ + ...options, + plugins: { + 'postcss-plugin': env === 'production' ? {} : false + } +}) +``` + +> ℹ️ When using an `{Object}`, the key can be a Node.js module name, a path to a JavaScript file that is relative to the directory of the PostCSS config file, or an absolute path to a JavaScript file. + +#### `{Array}` + +**.postcssrc.js** +```js +module.exports = ({ env }) => ({ + ...options, + plugins: [ + env === 'production' ? require('postcss-plugin')() : false + ] +}) +``` +> :warning: When using an `{Array}`, make sure to `require()` each plugin + +

Options

+ +|Name|Type|Default|Description| +|:--:|:--:|:-----:|:----------| +|[**`to`**](#to)|`{String}`|`undefined`|Destination File Path| +|[**`map`**](#map)|`{String\|Object}`|`false`|Enable/Disable Source Maps| +|[**`from`**](#from)|`{String}`|`undefined`|Source File Path| +|[**`parser`**](#parser)|`{String\|Function}`|`false`|Custom PostCSS Parser| +|[**`syntax`**](#syntax)|`{String\|Function}`|`false`|Custom PostCSS Syntax| +|[**`stringifier`**](#stringifier)|`{String\|Function}`|`false`|Custom PostCSS Stringifier| + +### `parser` + +**.postcssrc.js** +```js +module.exports = { + parser: 'sugarss' +} +``` + +### `syntax` + +**.postcssrc.js** +```js +module.exports = { + syntax: 'postcss-scss' +} +``` + +### `stringifier` + +**.postcssrc.js** +```js +module.exports = { + stringifier: 'midas' +} +``` + +### [**`map`**](https://github.com/postcss/postcss/blob/master/docs/source-maps.md) + +**.postcssrc.js** +```js +module.exports = { + map: 'inline' +} +``` + +> :warning: In most cases `options.from` && `options.to` are set by the third-party which integrates this package (CLI, gulp, webpack). It's unlikely one needs to set/use `options.from` && `options.to` within a config file. Unless you're a third-party plugin author using this module and its Node API directly **dont't set `options.from` && `options.to` yourself** + +### `to` + +```js +module.exports = { + to: 'path/to/dest.css' +} +``` + +### `from` + +```js +module.exports = { + from: 'path/to/src.css' +} +``` + +

Plugins

+ +### `{} || null` + +The plugin will be loaded with defaults + +```js +'postcss-plugin': {} || null +``` + +**.postcssrc.js** +```js +module.exports = { + plugins: { + 'postcss-plugin': {} || null + } +} +``` + +> :warning: `{}` must be an **empty** `{Object}` literal + +### `{Object}` + +The plugin will be loaded with given options + +```js +'postcss-plugin': { option: '', option: '' } +``` + +**.postcssrc.js** +```js +module.exports = { + plugins: { + 'postcss-plugin': { option: '', option: '' } + } +} +``` + +### `false` + +The plugin will not be loaded + +```js +'postcss-plugin': false +``` + +**.postcssrc.js** +```js +module.exports = { + plugins: { + 'postcss-plugin': false + } +} +``` + +### `Ordering` + +Plugin **execution order** is determined by declaration in the plugins section (**top-down**) + +```js +{ + plugins: { + 'postcss-plugin': {}, // [0] + 'postcss-plugin': {}, // [1] + 'postcss-plugin': {} // [2] + } +} +``` + +

Context

+ +When using a `{Function}` (`postcss.config.js` or `.postcssrc.js`), it's possible to pass context to `postcss-load-config`, which will be evaluated while loading your config. By default `ctx.env (process.env.NODE_ENV)` and `ctx.cwd (process.cwd())` are available on the `ctx` `{Object}` + +> ℹ️ Most third-party integrations add additional properties to the `ctx` (e.g `postcss-loader`). Check the specific module's README for more information about what is available on the respective `ctx` + +

Examples

+ +**postcss.config.js** + +```js +module.exports = (ctx) => ({ + parser: ctx.parser ? 'sugarss' : false, + map: ctx.env === 'development' ? ctx.map : false, + plugins: { + 'postcss-import': {}, + 'postcss-nested': {}, + cssnano: ctx.env === 'production' ? {} : false + } +}) +``` + +
+ +
+ +```json +"scripts": { + "build": "NODE_ENV=production node postcss", + "start": "NODE_ENV=development node postcss" +} +``` + +### `Async` + +```js +const { readFileSync } = require('fs') + +const postcss = require('postcss') +const postcssrc = require('postcss-load-config') + +const css = readFileSync('index.sss', 'utf8') + +const ctx = { parser: true, map: 'inline' } + +postcssrc(ctx).then(({ plugins, options }) => { + postcss(plugins) + .process(css, options) + .then((result) => console.log(result.css)) +}) +``` + +### `Sync` + +```js +const { readFileSync } = require('fs') + +const postcss = require('postcss') +const postcssrc = require('postcss-load-config') + +const css = readFileSync('index.sss', 'utf8') + +const ctx = { parser: true, map: 'inline' } + +const { plugins, options } = postcssrc.sync(ctx) +``` + +
+ +
+ +```json +"scripts": { + "build": "NODE_ENV=production gulp", + "start": "NODE_ENV=development gulp" +} +``` + +```js +const { task, src, dest, series, watch } = require('gulp') + +const postcss = require('gulp-postcssrc') + +const css = () => { + src('src/*.css') + .pipe(postcss()) + .pipe(dest('dest')) +}) + +task('watch', () => { + watch(['src/*.css', 'postcss.config.js'], css) +}) + +task('default', series(css, 'watch')) +``` + +
+ +
+ +```json +"scripts": { + "build": "NODE_ENV=production webpack", + "start": "NODE_ENV=development webpack-dev-server" +} +``` + +**webpack.config.js** +```js +module.exports = (env) => ({ + module: { + rules: [ + { + test: /\.css$/, + use: [ + 'style-loader', + 'css-loader', + 'postcss-loader' + ] + } + ] + } +}) +``` + +

Maintainers

+ + + + + + + + +
+ +
+ Michael Ciniawsky +
+ +
+ Mateusz Derks +
+ +

Contributors

+ + + + + + + + + + +
+ +
+ Ryan Dunckel +
+ +
+ Patrick Gilday +
+ +
+ Dalton Santos +
+ +
+ François Wouts +
+ + +[npm]: https://img.shields.io/npm/v/postcss-load-config.svg +[npm-url]: https://npmjs.com/package/postcss-load-config + +[node]: https://img.shields.io/node/v/postcss-load-plugins.svg +[node-url]: https://nodejs.org/ + +[deps]: https://david-dm.org/michael-ciniawsky/postcss-load-config.svg +[deps-url]: https://david-dm.org/michael-ciniawsky/postcss-load-config + +[test]: http://img.shields.io/travis/michael-ciniawsky/postcss-load-config.svg +[test-url]: https://travis-ci.org/michael-ciniawsky/postcss-load-config + +[cover]: https://coveralls.io/repos/github/michael-ciniawsky/postcss-load-config/badge.svg +[cover-url]: https://coveralls.io/github/michael-ciniawsky/postcss-load-config + +[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg +[style-url]: http://standardjs.com/ + +[chat]: https://img.shields.io/gitter/room/postcss/postcss.svg +[chat-url]: https://gitter.im/postcss/postcss + +## Security Contact + +To report a security vulnerability, please use the [Tidelift security contact]. +Tidelift will coordinate the fix and disclosure. + +[Tidelift security contact]: https://tidelift.com/security diff --git a/node_modules/postcss-load-config/package.json b/node_modules/postcss-load-config/package.json new file mode 100644 index 0000000..01f611b --- /dev/null +++ b/node_modules/postcss-load-config/package.json @@ -0,0 +1,48 @@ +{ + "name": "postcss-load-config", + "version": "3.1.4", + "description": "Autoload Config for PostCSS", + "main": "src/index.js", + "types": "src/index.d.ts", + "files": [ + "src" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "postcss": { + "optional": true + } + }, + "keywords": [ + "postcss", + "postcssrc", + "postcss.config.js" + ], + "author": "Michael Ciniawky ", + "contributors": [ + "Ryan Dunckel", + "Mateusz Derks", + "Dalton Santos", + "Patrick Gilday", + "François Wouts" + ], + "repository": "postcss/postcss-load-config", + "license": "MIT" +} diff --git a/node_modules/postcss-load-config/src/index.d.ts b/node_modules/postcss-load-config/src/index.d.ts new file mode 100644 index 0000000..c2c4cfe --- /dev/null +++ b/node_modules/postcss-load-config/src/index.d.ts @@ -0,0 +1,71 @@ +// based on @types/postcss-load-config@2.0.1 +// Type definitions for postcss-load-config 2.1 +import Processor from 'postcss/lib/processor'; +import { Plugin, ProcessOptions, Transformer } from 'postcss'; +import { Options as ConfigOptions } from "lilconfig"; + +declare function postcssrc( + ctx?: postcssrc.ConfigContext, + path?: string, + options?: ConfigOptions +): Promise; + +declare namespace postcssrc { + function sync( + ctx?: ConfigContext, + path?: string, + options?: ConfigOptions + ): Result; + + // In the ConfigContext, these three options can be instances of the + // appropriate class, or strings. If they are strings, postcss-load-config will + // require() them and pass the instances along. + export interface ProcessOptionsPreload { + parser?: string | ProcessOptions['parser']; + stringifier?: string | ProcessOptions['stringifier']; + syntax?: string | ProcessOptions['syntax']; + } + + // The remaining ProcessOptions, sans the three above. + export type RemainingProcessOptions = Pick< + ProcessOptions, + Exclude + >; + + // Additional context options that postcss-load-config understands. + export interface Context { + cwd?: string; + env?: string; + } + + // The full shape of the ConfigContext. + export type ConfigContext = Context & + ProcessOptionsPreload & + RemainingProcessOptions; + + // Result of postcssrc is a Promise containing the filename plus the options + // and plugins that are ready to pass on to postcss. + export type ResultPlugin = Plugin | Transformer | Processor; + + export interface Result { + file: string; + options: ProcessOptions; + plugins: ResultPlugin[]; + } + + export type ConfigPlugin = Transformer | Plugin | Processor; + + export interface Config { + parser?: string | ProcessOptions['parser'] | false; + stringifier?: string | ProcessOptions['stringifier'] | false; + syntax?: string | ProcessOptions['syntax'] | false; + map?: string | false; + from?: string; + to?: string; + plugins?: Array | Record; + } + + export type ConfigFn = (ctx: ConfigContext) => Config | Promise; +} + +export = postcssrc; diff --git a/node_modules/postcss-load-config/src/index.js b/node_modules/postcss-load-config/src/index.js new file mode 100644 index 0000000..db5c40e --- /dev/null +++ b/node_modules/postcss-load-config/src/index.js @@ -0,0 +1,188 @@ +'use strict' + +const resolve = require('path').resolve + +const config = require('lilconfig') +const yaml = require('yaml') + +const loadOptions = require('./options.js') +const loadPlugins = require('./plugins.js') + +/* istanbul ignore next */ +const interopRequireDefault = (obj) => obj && obj.__esModule ? obj : { default: obj } + +/** + * Process the result from cosmiconfig + * + * @param {Object} ctx Config Context + * @param {Object} result Cosmiconfig result + * + * @return {Object} PostCSS Config + */ +const processResult = (ctx, result) => { + const file = result.filepath || '' + let config = interopRequireDefault(result.config).default || {} + + if (typeof config === 'function') { + config = config(ctx) + } else { + config = Object.assign({}, config, ctx) + } + + if (!config.plugins) { + config.plugins = [] + } + + return { + plugins: loadPlugins(config, file), + options: loadOptions(config, file), + file: file + } +} + +/** + * Builds the Config Context + * + * @param {Object} ctx Config Context + * + * @return {Object} Config Context + */ +const createContext = (ctx) => { + /** + * @type {Object} + * + * @prop {String} cwd=process.cwd() Config search start location + * @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined` + */ + ctx = Object.assign({ + cwd: process.cwd(), + env: process.env.NODE_ENV + }, ctx) + + if (!ctx.env) { + process.env.NODE_ENV = 'development' + } + + return ctx +} + +const addTypeScriptLoader = (options = {}, loader) => { + const moduleName = 'postcss' + + return { + ...options, + searchPlaces: [ + ...(options.searchPlaces || []), + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.js`, + `.${moduleName}rc.cjs`, + `${moduleName}.config.ts`, + `${moduleName}.config.js`, + `${moduleName}.config.cjs` + ], + loaders: { + ...options.loaders, + '.yaml': (filepath, content) => yaml.parse(content), + '.yml': (filepath, content) => yaml.parse(content), + '.ts': loader + } + } +} + +const withTypeScriptLoader = (rcFunc) => { + return (ctx, path, options) => { + return rcFunc(ctx, path, addTypeScriptLoader(options, (configFile) => { + let registerer = { enabled () {} } + + try { + // Register TypeScript compiler instance + registerer = require('ts-node').register() + + return require(configFile) + } catch (err) { + if (err.code === 'MODULE_NOT_FOUND') { + throw new Error( + `'ts-node' is required for the TypeScript configuration files. Make sure it is installed\nError: ${err.message}` + ) + } + + throw err + } finally { + registerer.enabled(false) + } + })) + } +} + +/** + * Load Config + * + * @method rc + * + * @param {Object} ctx Config Context + * @param {String} path Config Path + * @param {Object} options Config Options + * + * @return {Promise} config PostCSS Config + */ +const rc = withTypeScriptLoader((ctx, path, options) => { + /** + * @type {Object} The full Config Context + */ + ctx = createContext(ctx) + + /** + * @type {String} `process.cwd()` + */ + path = path ? resolve(path) : process.cwd() + + return config.lilconfig('postcss', options) + .search(path) + .then((result) => { + if (!result) { + throw new Error(`No PostCSS Config found in: ${path}`) + } + + return processResult(ctx, result) + }) +}) + +rc.sync = withTypeScriptLoader((ctx, path, options) => { + /** + * @type {Object} The full Config Context + */ + ctx = createContext(ctx) + + /** + * @type {String} `process.cwd()` + */ + path = path ? resolve(path) : process.cwd() + + const result = config.lilconfigSync('postcss', options).search(path) + + if (!result) { + throw new Error(`No PostCSS Config found in: ${path}`) + } + + return processResult(ctx, result) +}) + +/** + * Autoload Config for PostCSS + * + * @author Michael Ciniawsky @michael-ciniawsky + * @license MIT + * + * @module postcss-load-config + * @version 2.1.0 + * + * @requires comsiconfig + * @requires ./options + * @requires ./plugins + */ +module.exports = rc diff --git a/node_modules/postcss-load-config/src/options.js b/node_modules/postcss-load-config/src/options.js new file mode 100644 index 0000000..d3ef2d6 --- /dev/null +++ b/node_modules/postcss-load-config/src/options.js @@ -0,0 +1,47 @@ +'use strict' + +const req = require('./req.js') + +/** + * Load Options + * + * @private + * @method options + * + * @param {Object} config PostCSS Config + * + * @return {Object} options PostCSS Options + */ +const options = (config, file) => { + if (config.parser && typeof config.parser === 'string') { + try { + config.parser = req(config.parser, file) + } catch (err) { + throw new Error(`Loading PostCSS Parser failed: ${err.message}\n\n(@${file})`) + } + } + + if (config.syntax && typeof config.syntax === 'string') { + try { + config.syntax = req(config.syntax, file) + } catch (err) { + throw new Error(`Loading PostCSS Syntax failed: ${err.message}\n\n(@${file})`) + } + } + + if (config.stringifier && typeof config.stringifier === 'string') { + try { + config.stringifier = req(config.stringifier, file) + } catch (err) { + throw new Error(`Loading PostCSS Stringifier failed: ${err.message}\n\n(@${file})`) + } + } + + if (config.plugins) { + delete config.plugins + } + + return config +} + +module.exports = options diff --git a/node_modules/postcss-load-config/src/plugins.js b/node_modules/postcss-load-config/src/plugins.js new file mode 100644 index 0000000..6cb994b --- /dev/null +++ b/node_modules/postcss-load-config/src/plugins.js @@ -0,0 +1,85 @@ +'use strict' + +const req = require('./req.js') + +/** + * Plugin Loader + * + * @private + * @method load + * + * @param {String} plugin PostCSS Plugin Name + * @param {Object} options PostCSS Plugin Options + * + * @return {Function} PostCSS Plugin + */ +const load = (plugin, options, file) => { + try { + if ( + options === null || + options === undefined || + Object.keys(options).length === 0 + ) { + return req(plugin, file) + } else { + return req(plugin, file)(options) + } + } catch (err) { + throw new Error(`Loading PostCSS Plugin failed: ${err.message}\n\n(@${file})`) + } +} + +/** + * Load Plugins + * + * @private + * @method plugins + * + * @param {Object} config PostCSS Config Plugins + * + * @return {Array} plugins PostCSS Plugins + */ +const plugins = (config, file) => { + let plugins = [] + + if (Array.isArray(config.plugins)) { + plugins = config.plugins.filter(Boolean) + } else { + plugins = Object.keys(config.plugins) + .filter((plugin) => { + return config.plugins[plugin] !== false ? plugin : '' + }) + .map((plugin) => { + return load(plugin, config.plugins[plugin], file) + }) + } + + if (plugins.length && plugins.length > 0) { + plugins.forEach((plugin, i) => { + if (plugin.default) { + plugin = plugin.default + } + + if (plugin.postcss === true) { + plugin = plugin() + } else if (plugin.postcss) { + plugin = plugin.postcss + } + + if ( + // eslint-disable-next-line + !( + (typeof plugin === 'object' && Array.isArray(plugin.plugins)) || + (typeof plugin === 'object' && plugin.postcssPlugin) || + (typeof plugin === 'function') + ) + ) { + throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${i}]\n\n(@${file})`) + } + }) + } + + return plugins +} + +module.exports = plugins diff --git a/node_modules/postcss-load-config/src/req.js b/node_modules/postcss-load-config/src/req.js new file mode 100644 index 0000000..ad6a332 --- /dev/null +++ b/node_modules/postcss-load-config/src/req.js @@ -0,0 +1,10 @@ +// eslint-disable-next-line node/no-deprecated-api +const { createRequire, createRequireFromPath } = require('module') + +function req (name, rootFile) { + const create = createRequire || createRequireFromPath + const require = create(rootFile) + return require(name) +} + +module.exports = req diff --git a/node_modules/postcss-nested/LICENSE b/node_modules/postcss-nested/LICENSE new file mode 100644 index 0000000..1ae47a2 --- /dev/null +++ b/node_modules/postcss-nested/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2014 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-nested/README.md b/node_modules/postcss-nested/README.md new file mode 100644 index 0000000..118ae20 --- /dev/null +++ b/node_modules/postcss-nested/README.md @@ -0,0 +1,198 @@ +# PostCSS Nested + + + +[PostCSS] plugin to unwrap nested rules like how Sass does it. + +```css +.phone { + &_title { + width: 500px; + @media (max-width: 500px) { + width: auto; + } + body.is_dark & { + color: white; + } + } + img { + display: block; + } +} + +.title { + font-size: var(--font); + + @at-root html { + --font: 16px + } +} +``` + +will be processed to: + +```css +.phone_title { + width: 500px; +} +@media (max-width: 500px) { + .phone_title { + width: auto; + } +} +body.is_dark .phone_title { + color: white; +} +.phone img { + display: block; +} + +.title { + font-size: var(--font); +} +html { + --font: 16px +} +``` + +Related plugins: + +* Use [`postcss-atroot`] for `@at-root` at-rule to move nested child + to the CSS root. +* Use [`postcss-current-selector`] **after** this plugin if you want + to use current selector in properties or variables values. +* Use [`postcss-nested-ancestors`] **before** this plugin if you want + to reference any ancestor element directly in your selectors with `^&`. + +Alternatives: + +* See also [`postcss-nesting`], which implements [CSSWG draft] + (requires the `&` and introduces `@nest`). +* [`postcss-nested-props`] for nested properties like `font-size`. + + + Sponsored by Evil Martians + + +[`postcss-atroot`]: https://github.com/OEvgeny/postcss-atroot +[`postcss-current-selector`]: https://github.com/komlev/postcss-current-selector +[`postcss-nested-ancestors`]: https://github.com/toomuchdesign/postcss-nested-ancestors +[`postcss-nested-props`]: https://github.com/jedmao/postcss-nested-props +[`postcss-nesting`]: https://github.com/jonathantneal/postcss-nesting +[CSSWG draft]: https://drafts.csswg.org/css-nesting-1/ +[PostCSS]: https://github.com/postcss/postcss + + +## Usage + +**Step 1:** Install plugin: + +```sh +npm install --save-dev postcss postcss-nested +``` + +**Step 2:** Check your project for existing PostCSS config: `postcss.config.js` +in the project root, `"postcss"` section in `package.json` +or `postcss` in bundle config. + +If you do not use PostCSS, add it according to [official docs] +and set this plugin in settings. + +**Step 3:** Add the plugin to plugins list: + +```diff +module.exports = { + plugins: [ ++ require('postcss-nested'), + require('autoprefixer') + ] +} +``` + +[official docs]: https://github.com/postcss/postcss#usage + + +## Options + +### `bubble` + +By default, plugin will bubble only `@media` and `@supports` at-rules. +You can add your custom at-rules to this list by `bubble` option: + +```js +postcss([ require('postcss-nested')({ bubble: ['phone'] }) ]) +``` + +```css +/* input */ +a { + color: white; + @phone { + color: black; + } +} +/* output */ +a { + color: white; +} +@phone { + a { + color: black; + } +} +``` + + +### `unwrap` + +By default, plugin will unwrap only `@font-face`, `@keyframes` and `@document` +at-rules. You can add your custom at-rules to this list by `unwrap` option: + +```js +postcss([ require('postcss-nested')({ unwrap: ['phone'] }) ]) +``` + +```css +/* input */ +a { + color: white; + @phone { + color: black; + } +} +/* output */ +a { + color: white; +} +@phone { + color: black; +} +``` + + +### `preserveEmpty` + +By default, plugin will strip out any empty selector generated by intermediate +nesting levels. You can set `preserveEmpty` to `true` to preserve them. + +```css +.a { + .b { + color: black; + } +} +``` + +Will be compiled to: + +```css +.a { } +.a .b { + color: black; +} +``` + +This is especially useful if you want to export the empty classes with `postcss-modules`. diff --git a/node_modules/postcss-nested/index.d.ts b/node_modules/postcss-nested/index.d.ts new file mode 100644 index 0000000..d22bcdd --- /dev/null +++ b/node_modules/postcss-nested/index.d.ts @@ -0,0 +1,34 @@ +// Original definitions (@types/postcss-nested) +// by Maxim Vorontsov + +import { PluginCreator } from 'postcss' + +declare namespace nested { + interface Options { + /** + * By default, plugin will bubble only `@media` and `@supports` at-rules. + * You can add your custom at-rules to this list by this option. + */ + bubble?: string[] + + /** + * By default, plugin will unwrap only `@font-face`, `@keyframes`, + * and `@document` at-rules. You can add your custom at-rules + * to this list by this option. + */ + unwrap?: string[] + + /** + * By default, plugin will strip out any empty selector generated + * by intermediate nesting levels. You can set this option to `true` + * to preserve them. + */ + preserveEmpty?: boolean + } + + type Nested = PluginCreator +} + +declare const nested: nested.Nested + +export = nested diff --git a/node_modules/postcss-nested/index.js b/node_modules/postcss-nested/index.js new file mode 100644 index 0000000..e6ebd92 --- /dev/null +++ b/node_modules/postcss-nested/index.js @@ -0,0 +1,214 @@ +let parser = require('postcss-selector-parser') + +function parse (str, rule) { + let nodes + let saver = parser(parsed => { + nodes = parsed + }) + try { + saver.processSync(str) + } catch (e) { + if (str.includes(':')) { + throw rule ? rule.error('Missed semicolon') : e + } else { + throw rule ? rule.error(e.message) : e + } + } + return nodes.at(0) +} + +function replace (nodes, parent) { + let replaced = false + nodes.each(i => { + if (i.type === 'nesting') { + let clonedParent = parent.clone() + if (i.value !== '&') { + i.replaceWith(parse(i.value.replace('&', clonedParent.toString()))) + } else { + i.replaceWith(clonedParent) + } + replaced = true + } else if (i.nodes) { + if (replace(i, parent)) { + replaced = true + } + } + }) + return replaced +} + +function selectors (parent, child) { + let result = [] + parent.selectors.forEach(i => { + let parentNode = parse(i, parent) + + child.selectors.forEach(j => { + if (j.length) { + let node = parse(j, child) + let replaced = replace(node, parentNode) + if (!replaced) { + node.prepend(parser.combinator({ value: ' ' })) + node.prepend(parentNode.clone()) + } + result.push(node.toString()) + } + }) + }) + return result +} + +function pickComment (comment, after) { + if (comment && comment.type === 'comment') { + after.after(comment) + return comment + } else { + return after + } +} + +function createFnAtruleChilds (bubble) { + return function atruleChilds (rule, atrule, bubbling) { + let children = [] + atrule.each(child => { + if (child.type === 'comment') { + children.push(child) + } else if (child.type === 'decl') { + children.push(child) + } else if (child.type === 'rule' && bubbling) { + child.selectors = selectors(rule, child) + } else if (child.type === 'atrule') { + if (child.nodes && bubble[child.name]) { + atruleChilds(rule, child, true) + } else { + children.push(child) + } + } + }) + if (bubbling) { + if (children.length) { + let clone = rule.clone({ nodes: [] }) + for (let child of children) { + clone.append(child) + } + atrule.prepend(clone) + } + } + } +} + +function pickDeclarations (selector, declarations, after, Rule) { + let parent = new Rule({ + selector, + nodes: [] + }) + + for (let declaration of declarations) { + parent.append(declaration) + } + + after.after(parent) + return parent +} + +function atruleNames (defaults, custom) { + let list = {} + for (let i of defaults) { + list[i] = true + } + if (custom) { + for (let i of custom) { + let name = i.replace(/^@/, '') + list[name] = true + } + } + return list +} + +module.exports = (opts = {}) => { + let bubble = atruleNames(['media', 'supports'], opts.bubble) + let atruleChilds = createFnAtruleChilds(bubble) + let unwrap = atruleNames( + [ + 'document', + 'font-face', + 'keyframes', + '-webkit-keyframes', + '-moz-keyframes' + ], + opts.unwrap + ) + let preserveEmpty = opts.preserveEmpty + + return { + postcssPlugin: 'postcss-nested', + Rule (rule, { Rule }) { + let unwrapped = false + let after = rule + let copyDeclarations = false + let declarations = [] + + rule.each(child => { + if (child.type === 'rule') { + if (declarations.length) { + after = pickDeclarations(rule.selector, declarations, after, Rule) + declarations = [] + } + + copyDeclarations = true + unwrapped = true + child.selectors = selectors(rule, child) + after = pickComment(child.prev(), after) + after.after(child) + after = child + } else if (child.type === 'atrule') { + if (declarations.length) { + after = pickDeclarations(rule.selector, declarations, after, Rule) + declarations = [] + } + + if (child.name === 'at-root') { + unwrapped = true + atruleChilds(rule, child, false) + + let nodes = child.nodes + if (child.params) { + nodes = new Rule({ selector: child.params, nodes }) + } + + after.after(nodes) + after = nodes + child.remove() + } else if (bubble[child.name]) { + copyDeclarations = true + unwrapped = true + atruleChilds(rule, child, true) + after = pickComment(child.prev(), after) + after.after(child) + after = child + } else if (unwrap[child.name]) { + copyDeclarations = true + unwrapped = true + atruleChilds(rule, child, false) + after = pickComment(child.prev(), after) + after.after(child) + after = child + } else if (copyDeclarations) { + declarations.push(child) + } + } else if (child.type === 'decl' && copyDeclarations) { + declarations.push(child) + } + }) + + if (declarations.length) { + after = pickDeclarations(rule.selector, declarations, after, Rule) + } + + if (unwrapped && preserveEmpty !== true) { + rule.raws.semicolon = true + if (rule.nodes.length === 0) rule.remove() + } + } + } +} +module.exports.postcss = true diff --git a/node_modules/postcss-nested/package.json b/node_modules/postcss-nested/package.json new file mode 100644 index 0000000..29090bd --- /dev/null +++ b/node_modules/postcss-nested/package.json @@ -0,0 +1,28 @@ +{ + "name": "postcss-nested", + "version": "5.0.6", + "description": "PostCSS plugin to unwrap nested rules like how Sass does it", + "keywords": [ + "postcss", + "css", + "postcss-plugin", + "sass", + "nested" + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "postcss/postcss-nested", + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + }, + "dependencies": { + "postcss-selector-parser": "^6.0.6" + } +} diff --git a/node_modules/postcss-selector-parser/API.md b/node_modules/postcss-selector-parser/API.md new file mode 100644 index 0000000..6aa1f14 --- /dev/null +++ b/node_modules/postcss-selector-parser/API.md @@ -0,0 +1,873 @@ +# API Documentation + +*Please use only this documented API when working with the parser. Methods +not documented here are subject to change at any point.* + +## `parser` function + +This is the module's main entry point. + +```js +const parser = require('postcss-selector-parser'); +``` + +### `parser([transform], [options])` + +Creates a new `processor` instance + +```js +const processor = parser(); +``` + +Or, with optional transform function + +```js +const transform = selectors => { + selectors.walkUniversals(selector => { + selector.remove(); + }); +}; + +const processor = parser(transform) + +// Example +const result = processor.processSync('*.class'); +// => .class +``` + +[See processor documentation](#processor) + +Arguments: + +* `transform (function)`: Provide a function to work with the parsed AST. +* `options (object)`: Provide default options for all calls on the returned `Processor`. + +### `parser.attribute([props])` + +Creates a new attribute selector. + +```js +parser.attribute({attribute: 'href'}); +// => [href] +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.className([props])` + +Creates a new class selector. + +```js +parser.className({value: 'button'}); +// => .button +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.combinator([props])` + +Creates a new selector combinator. + +```js +parser.combinator({value: '+'}); +// => + +``` + +Arguments: + +* `props (object)`: The new node's properties. + +Notes: +* **Descendant Combinators** The value of descendant combinators created by the + parser always just a single space (`" "`). For descendant selectors with no + comments, additional space is now stored in `node.spaces.before`. Depending + on the location of comments, additional spaces may be stored in + `node.raws.spaces.before`, `node.raws.spaces.after`, or `node.raws.value`. +* **Named Combinators** Although, nonstandard and unlikely to ever become a standard, + named combinators like `/deep/` and `/for/` are parsed as combinators. The + `node.value` is name after being unescaped and normalized as lowercase. The + original value for the combinator name is stored in `node.raws.value`. + + +### `parser.comment([props])` + +Creates a new comment. + +```js +parser.comment({value: '/* Affirmative, Dave. I read you. */'}); +// => /* Affirmative, Dave. I read you. */ +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.id([props])` + +Creates a new id selector. + +```js +parser.id({value: 'search'}); +// => #search +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.nesting([props])` + +Creates a new nesting selector. + +```js +parser.nesting(); +// => & +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.pseudo([props])` + +Creates a new pseudo selector. + +```js +parser.pseudo({value: '::before'}); +// => ::before +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.root([props])` + +Creates a new root node. + +```js +parser.root(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.selector([props])` + +Creates a new selector node. + +```js +parser.selector(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.string([props])` + +Creates a new string node. + +```js +parser.string(); +// => (empty) +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.tag([props])` + +Creates a new tag selector. + +```js +parser.tag({value: 'button'}); +// => button +``` + +Arguments: + +* `props (object)`: The new node's properties. + +### `parser.universal([props])` + +Creates a new universal selector. + +```js +parser.universal(); +// => * +``` + +Arguments: + +* `props (object)`: The new node's properties. + +## Node types + +### `node.type` + +A string representation of the selector type. It can be one of the following; +`attribute`, `class`, `combinator`, `comment`, `id`, `nesting`, `pseudo`, +`root`, `selector`, `string`, `tag`, or `universal`. Note that for convenience, +these constants are exposed on the main `parser` as uppercased keys. So for +example you can get `id` by querying `parser.ID`. + +```js +parser.attribute({attribute: 'href'}).type; +// => 'attribute' +``` + +### `node.parent` + +Returns the parent node. + +```js +root.nodes[0].parent === root; +``` + +### `node.toString()`, `String(node)`, or `'' + node` + +Returns a string representation of the node. + +```js +const id = parser.id({value: 'search'}); +console.log(String(id)); +// => #search +``` + +### `node.next()` & `node.prev()` + +Returns the next/previous child of the parent node. + +```js +const next = id.next(); +if (next && next.type !== 'combinator') { + throw new Error('Qualified IDs are not allowed!'); +} +``` + +### `node.replaceWith(node)` + +Replace a node with another. + +```js +const attr = selectors.first.first; +const className = parser.className({value: 'test'}); +attr.replaceWith(className); +``` + +Arguments: + +* `node`: The node to substitute the original with. + +### `node.remove()` + +Removes the node from its parent node. + +```js +if (node.type === 'id') { + node.remove(); +} +``` + +### `node.clone()` + +Returns a copy of a node, detached from any parent containers that the +original might have had. + +```js +const cloned = parser.id({value: 'search'}); +String(cloned); + +// => #search +``` + +### `node.isAtPosition(line, column)` + +Return a `boolean` indicating whether this node includes the character at the +position of the given line and column. Returns `undefined` if the nodes lack +sufficient source metadata to determine the position. + +Arguments: + +* `line`: 1-index based line number relative to the start of the selector. +* `column`: 1-index based column number relative to the start of the selector. + +### `node.spaces` + +Extra whitespaces around the node will be moved into `node.spaces.before` and +`node.spaces.after`. So for example, these spaces will be moved as they have +no semantic meaning: + +```css + h1 , h2 {} +``` + +For descendent selectors, the value is always a single space. + +```css +h1 h2 {} +``` + +Additional whitespace is found in either the `node.spaces.before` and `node.spaces.after` depending on the presence of comments or other whitespace characters. If the actual whitespace does not start or end with a single space, the node's raw value is set to the actual space(s) found in the source. + +### `node.source` + +An object describing the node's start/end, line/column source position. + +Within the following CSS, the `.bar` class node ... + +```css +.foo, + .bar {} +``` + +... will contain the following `source` object. + +```js +source: { + start: { + line: 2, + column: 3 + }, + end: { + line: 2, + column: 6 + } +} +``` + +### `node.sourceIndex` + +The zero-based index of the node within the original source string. + +Within the following CSS, the `.baz` class node will have a `sourceIndex` of `12`. + +```css +.foo, .bar, .baz {} +``` + +## Container types + +The `root`, `selector`, and `pseudo` nodes have some helper methods for working +with their children. + +### `container.nodes` + +An array of the container's children. + +```js +// Input: h1 h2 +selectors.at(0).nodes.length // => 3 +selectors.at(0).nodes[0].value // => 'h1' +selectors.at(0).nodes[1].value // => ' ' +``` + +### `container.first` & `container.last` + +The first/last child of the container. + +```js +selector.first === selector.nodes[0]; +selector.last === selector.nodes[selector.nodes.length - 1]; +``` + +### `container.at(index)` + +Returns the node at position `index`. + +```js +selector.at(0) === selector.first; +selector.at(0) === selector.nodes[0]; +``` + +Arguments: + +* `index`: The index of the node to return. + +### `container.atPosition(line, column)` + +Returns the node at the source position `index`. + +```js +selector.at(0) === selector.first; +selector.at(0) === selector.nodes[0]; +``` + +Arguments: + +* `index`: The index of the node to return. + +### `container.index(node)` + +Return the index of the node within its container. + +```js +selector.index(selector.nodes[2]) // => 2 +``` + +Arguments: + +* `node`: A node within the current container. + +### `container.length` + +Proxy to the length of the container's nodes. + +```js +container.length === container.nodes.length +``` + +### `container` Array iterators + +The container class provides proxies to certain Array methods; these are: + +* `container.map === container.nodes.map` +* `container.reduce === container.nodes.reduce` +* `container.every === container.nodes.every` +* `container.some === container.nodes.some` +* `container.filter === container.nodes.filter` +* `container.sort === container.nodes.sort` + +Note that these methods only work on a container's immediate children; recursive +iteration is provided by `container.walk`. + +### `container.each(callback)` + +Iterate the container's immediate children, calling `callback` for each child. +You may return `false` within the callback to break the iteration. + +```js +let className; +selectors.each((selector, index) => { + if (selector.type === 'class') { + className = selector.value; + return false; + } +}); +``` + +Note that unlike `Array#forEach()`, this iterator is safe to use whilst adding +or removing nodes from the container. + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + and `index` arguments. + +### `container.walk(callback)` + +Like `container#each`, but will also iterate child nodes as long as they are +`container` types. + +```js +selectors.walk((selector, index) => { + // all nodes +}); +``` + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + and `index` arguments. + +This iterator is safe to use whilst mutating `container.nodes`, +like `container#each`. + +### `container.walk` proxies + +The container class provides proxy methods for iterating over types of nodes, +so that it is easier to write modules that target specific selectors. Those +methods are: + +* `container.walkAttributes` +* `container.walkClasses` +* `container.walkCombinators` +* `container.walkComments` +* `container.walkIds` +* `container.walkNesting` +* `container.walkPseudos` +* `container.walkTags` +* `container.walkUniversals` + +### `container.split(callback)` + +This method allows you to split a group of nodes by returning `true` from +a callback. It returns an array of arrays, where each inner array corresponds +to the groups that you created via the callback. + +```js +// (input) => h1 h2>>h3 +const list = selectors.first.split(selector => { + return selector.type === 'combinator'; +}); + +// (node values) => [['h1', ' '], ['h2', '>>'], ['h3']] +``` + +Arguments: + +* `callback (function)`: A function to call for each node, which receives `node` + as an argument. + +### `container.prepend(node)` & `container.append(node)` + +Add a node to the start/end of the container. Note that doing so will set +the parent property of the node to this container. + +```js +const id = parser.id({value: 'search'}); +selector.append(id); +``` + +Arguments: + +* `node`: The node to add. + +### `container.insertBefore(old, new)` & `container.insertAfter(old, new)` + +Add a node before or after an existing node in a container: + +```js +selectors.walk(selector => { + if (selector.type !== 'class') { + const className = parser.className({value: 'theme-name'}); + selector.parent.insertAfter(selector, className); + } +}); +``` + +Arguments: + +* `old`: The existing node in the container. +* `new`: The new node to add before/after the existing node. + +### `container.removeChild(node)` + +Remove the node from the container. Note that you can also use +`node.remove()` if you would like to remove just a single node. + +```js +selector.length // => 2 +selector.remove(id) +selector.length // => 1; +id.parent // undefined +``` + +Arguments: + +* `node`: The node to remove. + +### `container.removeAll()` or `container.empty()` + +Remove all children from the container. + +```js +selector.removeAll(); +selector.length // => 0 +``` + +## Root nodes + +A root node represents a comma separated list of selectors. Indeed, all +a root's `toString()` method does is join its selector children with a ','. +Other than this, it has no special functionality and acts like a container. + +### `root.trailingComma` + +This will be set to `true` if the input has a trailing comma, in order to +support parsing of legacy CSS hacks. + +## Selector nodes + +A selector node represents a single complex selector. For example, this +selector string `h1 h2 h3, [href] > p`, is represented as two selector nodes. +It has no special functionality of its own. + +## Pseudo nodes + +A pseudo selector extends a container node; if it has any parameters of its +own (such as `h1:not(h2, h3)`), they will be its children. Note that the pseudo +`value` will always contain the colons preceding the pseudo identifier. This +is so that both `:before` and `::before` are properly represented in the AST. + +## Attribute nodes + +### `attribute.quoted` + +Returns `true` if the attribute's value is wrapped in quotation marks, false if it is not. +Remains `undefined` if there is no attribute value. + +```css +[href=foo] /* false */ +[href='foo'] /* true */ +[href="foo"] /* true */ +[href] /* undefined */ +``` + +### `attribute.qualifiedAttribute` + +Returns the attribute name qualified with the namespace if one is given. + +### `attribute.offsetOf(part)` + + Returns the offset of the attribute part specified relative to the + start of the node of the output string. This is useful in raising + error messages about a specific part of the attribute, especially + in combination with `attribute.sourceIndex`. + + Returns `-1` if the name is invalid or the value doesn't exist in this + attribute. + + The legal values for `part` are: + + * `"ns"` - alias for "namespace" + * `"namespace"` - the namespace if it exists. + * `"attribute"` - the attribute name + * `"attributeNS"` - the start of the attribute or its namespace + * `"operator"` - the match operator of the attribute + * `"value"` - The value (string or identifier) + * `"insensitive"` - the case insensitivity flag + +### `attribute.raws.unquoted` + +Returns the unquoted content of the attribute's value. +Remains `undefined` if there is no attribute value. + +```css +[href=foo] /* foo */ +[href='foo'] /* foo */ +[href="foo"] /* foo */ +[href] /* undefined */ +``` + +### `attribute.spaces` + +Like `node.spaces` with the `before` and `after` values containing the spaces +around the element, the parts of the attribute can also have spaces before +and after them. The for each of `attribute`, `operator`, `value` and +`insensitive` there is corresponding property of the same nam in +`node.spaces` that has an optional `before` or `after` string containing only +whitespace. + +Note that corresponding values in `attributes.raws.spaces` contain values +including any comments. If set, these values will override the +`attribute.spaces` value. Take care to remove them if changing +`attribute.spaces`. + +### `attribute.raws` + +The raws object stores comments and other information necessary to re-render +the node exactly as it was in the source. + +If a comment is embedded within the identifiers for the `namespace`, `attribute` +or `value` then a property is placed in the raws for that value containing the full source of the propery including comments. + +If a comment is embedded within the space between parts of the attribute +then the raw for that space is set accordingly. + +Setting an attribute's property `raws` value to be deleted. + +For now, changing the spaces required also updating or removing any of the +raws values that override them. + +Example: `[ /*before*/ href /* after-attr */ = /* after-operator */ te/*inside-value*/st/* wow */ /*omg*/i/*bbq*/ /*whodoesthis*/]` would parse as: + +```js +{ + attribute: "href", + operator: "=", + value: "test", + spaces: { + before: '', + after: '', + attribute: { before: ' ', after: ' ' }, + operator: { after: ' ' }, + value: { after: ' ' }, + insensitive: { after: ' ' } + }, + raws: { + spaces: { + attribute: { before: ' /*before*/ ', after: ' /* after-attr */ ' }, + operator: { after: ' /* after-operator */ ' }, + value: { after: '/* wow */ /*omg*/' }, + insensitive: { after: '/*bbq*/ /*whodoesthis*/' } + }, + unquoted: 'test', + value: 'te/*inside-value*/st' + } +} +``` + +## `Processor` + +### `ProcessorOptions` + +* `lossless` - When `true`, whitespace is preserved. Defaults to `true`. +* `updateSelector` - When `true`, if any processor methods are passed a postcss + `Rule` node instead of a string, then that Rule's selector is updated + with the results of the processing. Defaults to `true`. + +### `process|processSync(selectors, [options])` + +Processes the `selectors`, returning a string from the result of processing. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +**Example:** + +```js +const parser = require("postcss-selector-parser"); +const processor = parser(); + +let result = processor.processSync(' .class'); +console.log(result); +// => .class + +// Asynchronous operation +let promise = processor.process(' .class').then(result => { + console.log(result) + // => .class +}); + +// To have the parser normalize whitespace values, utilize the options +result = processor.processSync(' .class ', {lossless: false}); +console.log(result); +// => .class + +// For better syntax errors, pass a PostCSS Rule node. +const postcss = require('postcss'); +rule = postcss.rule({selector: ' #foo > a, .class '}); +processor.process(rule, {lossless: false, updateSelector: true}).then(result => { + console.log(result); + // => #foo>a,.class + console.log("rule:", rule.selector); + // => rule: #foo>a,.class +}) +``` + +Arguments: + +* `selectors (string|postcss.Rule)`: Either a selector string or a PostCSS Rule + node. +* `[options] (object)`: Process options + + +### `ast|astSync(selectors, [options])` + +Like `process()` and `processSync()` but after +processing the `selectors` these methods return the `Root` node of the result +instead of a string. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +### `transform|transformSync(selectors, [options])` + +Like `process()` and `processSync()` but after +processing the `selectors` these methods return the value returned by the +processor callback. + +Note: when the `updateSelector` option is set, the rule's selector +will be updated with the resulting string. + +### Error Handling Within Selector Processors + +The root node passed to the selector processor callback +has a method `error(message, options)` that returns an +error object. This method should always be used to raise +errors relating to the syntax of selectors. The options +to this method are passed to postcss's error constructor +([documentation](http://api.postcss.org/Container.html#error)). + +#### Async Error Example + +```js +let processor = (root) => { + return new Promise((resolve, reject) => { + root.walkClasses((classNode) => { + if (/^(.*)[-_]/.test(classNode.value)) { + let msg = "classes may not have underscores or dashes in them"; + reject(root.error(msg, { + index: classNode.sourceIndex + RegExp.$1.length + 1, + word: classNode.value + })); + } + }); + resolve(); + }); +}; + +const postcss = require("postcss"); +const parser = require("postcss-selector-parser"); +const selectorProcessor = parser(processor); +const plugin = postcss.plugin('classValidator', (options) => { + return (root) => { + let promises = []; + root.walkRules(rule => { + promises.push(selectorProcessor.process(rule)); + }); + return Promise.all(promises); + }; +}); +postcss(plugin()).process(` +.foo-bar { + color: red; +} +`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString())); + +// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them +// +// > 1 | .foo-bar { +// | ^ +// 2 | color: red; +// 3 | } +``` + +#### Synchronous Error Example + +```js +let processor = (root) => { + root.walkClasses((classNode) => { + if (/.*[-_]/.test(classNode.value)) { + let msg = "classes may not have underscores or dashes in them"; + throw root.error(msg, { + index: classNode.sourceIndex, + word: classNode.value + }); + } + }); +}; + +const postcss = require("postcss"); +const parser = require("postcss-selector-parser"); +const selectorProcessor = parser(processor); +const plugin = postcss.plugin('classValidator', (options) => { + return (root) => { + root.walkRules(rule => { + selectorProcessor.processSync(rule); + }); + }; +}); +postcss(plugin()).process(` +.foo-bar { + color: red; +} +`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString())); + +// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them +// +// > 1 | .foo-bar { +// | ^ +// 2 | color: red; +// 3 | } +``` diff --git a/node_modules/postcss-selector-parser/CHANGELOG.md b/node_modules/postcss-selector-parser/CHANGELOG.md new file mode 100644 index 0000000..f2fdfea --- /dev/null +++ b/node_modules/postcss-selector-parser/CHANGELOG.md @@ -0,0 +1,513 @@ +# 6.0.10 + +- Fixed: `isPseudoElement()` supports `:first-letter` and `:first-line` + +# 6.0.9 + +- Fixed: `Combinator.raws` property type + +# 6.0.8 + +- Fixed: reduced size + +# 6.0.7 + +- Fixed: parse animation percents + +# 6.0.6 + +- Fixed: parse quoted attributes containing a newline correctly + +# 6.0.5 + +- Perf: rework unesc for a 63+% performance boost + +# 6.0.4 + +- Fixed: ts errors + +# 6.0.3 + +- Fixed: replace node built-in "util" module with "util-deprecate" +- Fixed: handle uppercase pseudo elements +- Fixed: do not create invalid combinator before comment + +# 6.0.2 + +- Fixed an issue with parsing and stringifying an empty attribute value + +# 6.0.1 + +- Fixed an issue with unicode surrogate pair parsing + +# 6.0.0 + +- Updated: `cssesc` to 3.0.0 (major) +- Fixed: Issues with escaped `id` and `class` selectors + +# 5.0.0 + +- Allow escaped dot within class name. +- Update PostCSS to 7.0.7 (patch) + +# 5.0.0-rc.4 + +- Fixed an issue where comments immediately after an insensitive (in attribute) + were not parsed correctly. +- Updated `cssesc` to 2.0.0 (major). +- Removed outdated integration tests. +- Added tests for custom selectors, tags with attributes, the universal + selector with pseudos, and tokens after combinators. + +# 5.0.0-rc.1 + +To ease adoption of the v5.0 release, we have relaxed the node version +check performed by npm at installation time to allow for node 4, which +remains officially unsupported, but likely to continue working for the +time being. + +# 5.0.0-rc.0 + +This release has **BREAKING CHANGES** that were required to fix regressions +in 4.0.0 and to make the Combinator Node API consistent for all combinator +types. Please read carefully. + +## Summary of Changes + +* The way a descendent combinator that isn't a single space character (E.g. `.a .b`) is stored in the AST has changed. +* Named Combinators (E.g. `.a /for/ .b`) are now properly parsed as a combinator. +* It is now possible to look up a node based on the source location of a character in that node and to query nodes if they contain some character. +* Several bug fixes that caused the parser to hang and run out of memory when a `/` was encountered have been fixed. +* The minimum supported version of Node is now `v6.0.0`. + +### Changes to the Descendent Combinator + +In prior releases, the value of a descendant combinator with multiple spaces included all the spaces. + +* `.a .b`: Extra spaces are now stored as space before. + - Old & Busted: + - `combinator.value === " "` + - New hotness: + - `combinator.value === " " && combinator.spaces.before === " "` +* `.a /*comment*/.b`: A comment at the end of the combinator causes extra space to become after space. + - Old & Busted: + - `combinator.value === " "` + - `combinator.raws.value === " /*comment/"` + - New hotness: + - `combinator.value === " "` + - `combinator.spaces.after === " "` + - `combinator.raws.spaces.after === " /*comment*/"` +* `.a.b`: whitespace that doesn't start or end with a single space character is stored as a raw value. + - Old & Busted: + - `combinator.value === "\n"` + - `combinator.raws.value === undefined` + - New hotness: + - `combinator.value === " "` + - `combinator.raws.value === "\n"` + +### Support for "Named Combinators" + +Although, nonstandard and unlikely to ever become a standard, combinators like `/deep/` and `/for/` are now properly supported. + +Because they've been taken off the standardization track, there is no spec-official name for combinators of the form `//`. However, I talked to [Tab Atkins](https://twitter.com/tabatkins) and we agreed to call them "named combinators" so now they are called that. + +Before this release such named combinators were parsed without intention and generated three nodes of type `"tag"` where the first and last nodes had a value of `"/"`. + +* `.a /for/ .b` is parsed as a combinator. + - Old & Busted: + - `root.nodes[0].nodes[1].type === "tag"` + - `root.nodes[0].nodes[1].value === "/"` + - New hotness: + - `root.nodes[0].nodes[1].type === "combinator"` + - `root.nodes[0].nodes[1].value === "/for/"` +* `.a /F\6fR/ .b` escapes are handled and uppercase is normalized. + - Old & Busted: + - `root.nodes[0].nodes[2].type === "tag"` + - `root.nodes[0].nodes[2].value === "F\\6fR"` + - New hotness: + - `root.nodes[0].nodes[1].type === "combinator"` + - `root.nodes[0].nodes[1].value === "/for/"` + - `root.nodes[0].nodes[1].raws.value === "/F\\6fR/"` + +### Source position checks and lookups + +A new API was added to look up a node based on the source location. + +```js +const selectorParser = require("postcss-selector-parser"); +// You can find the most specific node for any given character +let combinator = selectorParser.astSync(".a > .b").atPosition(1,4); +combinator.toString() === " > "; +// You can check if a node includes a specific character +// Whitespace surrounding the node that is owned by that node +// is included in the check. +[2,3,4,5,6].map(column => combinator.isAtPosition(1, column)); +// => [false, true, true, true, false] +``` + +# 4.0.0 + +This release has **BREAKING CHANGES** that were required to fix bugs regarding values with escape sequences. Please read carefully. + +* **Identifiers with escapes** - CSS escape sequences are now hidden from the public API by default. + The normal value of a node like a class name or ID, or an aspect of a node such as attribute + selector's value, is unescaped. Escapes representing Non-ascii characters are unescaped into + unicode characters. For example: `bu\tton, .\31 00, #i\2764\FE0Fu, [attr="value is \"quoted\""]` + will parse respectively to the values `button`, `100`, `i❤️u`, `value is "quoted"`. + The original escape sequences for these values can be found in the corresponding property name + in `node.raws`. Where possible, deprecation warnings were added, but the nature + of escape handling makes it impossible to detect what is escaped or not. Our expectation is + that most users are neither expecting nor handling escape sequences in their use of this library, + and so for them, this is a bug fix. Users who are taking care to handle escapes correctly can + now update their code to remove the escape handling and let us do it for them. + +* **Mutating values with escapes** - When you make an update to a node property that has escape handling + The value is assumed to be unescaped, and any special characters are escaped automatically and + the corresponding `raws` value is immediately updated. This can result in changes to the original + escape format. Where the exact value of the escape sequence is important there are methods that + allow both values to be set in conjunction. There are a number of new convenience methods for + manipulating values that involve escapes, especially for attributes values where the quote mark + is involved. See https://github.com/postcss/postcss-selector-parser/pull/133 for an extensive + write-up on these changes. + + +**Upgrade/API Example** + +In `3.x` there was no unescape handling and internal consistency of several properties was the caller's job to maintain. It was very easy for the developer +to create a CSS file that did not parse correctly when some types of values +were in use. + +```js +const selectorParser = require("postcss-selector-parser"); +let attr = selectorParser.attribute({attribute: "id", operator: "=", value: "a-value"}); +attr.value; // => "a-value" +attr.toString(); // => [id=a-value] +// Add quotes to an attribute's value. +// All these values have to be set by the caller to be consistent: +// no internal consistency is maintained. +attr.raws.unquoted = attr.value +attr.value = "'" + attr.value + "'"; +attr.value; // => "'a-value'" +attr.quoted = true; +attr.toString(); // => "[id='a-value']" +``` + +In `4.0` there is a convenient API for setting and mutating values +that may need escaping. Especially for attributes. + +```js +const selectorParser = require("postcss-selector-parser"); + +// The constructor requires you specify the exact escape sequence +let className = selectorParser.className({value: "illegal class name", raws: {value: "illegal\\ class\\ name"}}); +className.toString(); // => '.illegal\\ class\\ name' + +// So it's better to set the value as a property +className = selectorParser.className(); +// Most properties that deal with identifiers work like this +className.value = "escape for me"; +className.value; // => 'escape for me' +className.toString(); // => '.escape\\ for\\ me' + +// emoji and all non-ascii are escaped to ensure it works in every css file. +className.value = "😱🦄😍"; +className.value; // => '😱🦄😍' +className.toString(); // => '.\\1F631\\1F984\\1F60D' + +// you can control the escape sequence if you want, or do bad bad things +className.setPropertyAndEscape('value', 'xxxx', 'yyyy'); +className.value; // => "xxxx" +className.toString(); // => ".yyyy" + +// Pass a value directly through to the css output without escaping it. +className.setPropertyWithoutEscape('value', '$REPLACE_ME$'); +className.value; // => "$REPLACE_ME$" +className.toString(); // => ".$REPLACE_ME$" + +// The biggest changes are to the Attribute class +// passing quoteMark explicitly is required to avoid a deprecation warning. +let attr = selectorParser.attribute({attribute: "id", operator: "=", value: "a-value", quoteMark: null}); +attr.toString(); // => "[id=a-value]" +// Get the value with quotes on it and any necessary escapes. +// This is the same as reading attr.value in 3.x. +attr.getQuotedValue(); // => "a-value"; +attr.quoteMark; // => null + +// Add quotes to an attribute's value. +attr.quoteMark = "'"; // This is all that's required. +attr.toString(); // => "[id='a-value']" +attr.quoted; // => true +// The value is still the same, only the quotes have changed. +attr.value; // => a-value +attr.getQuotedValue(); // => "'a-value'"; + +// deprecated assignment, no warning because there's no escapes +attr.value = "new-value"; +// no quote mark is needed so it is removed +attr.getQuotedValue(); // => "new-value"; + +// deprecated assignment, +attr.value = "\"a 'single quoted' value\""; +// > (node:27859) DeprecationWarning: Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead. +attr.getQuotedValue(); // => '"a \'single quoted\' value"'; +// quote mark inferred from first and last characters. +attr.quoteMark; // => '"' + +// setValue takes options to make manipulating the value simple. +attr.setValue('foo', {smart: true}); +// foo doesn't require any escapes or quotes. +attr.toString(); // => '[id=foo]' +attr.quoteMark; // => null + +// An explicit quote mark can be specified +attr.setValue('foo', {quoteMark: '"'}); +attr.toString(); // => '[id="foo"]' + +// preserves quote mark by default +attr.setValue('bar'); +attr.toString(); // => '[id="bar"]' +attr.quoteMark = null; +attr.toString(); // => '[id=bar]' + +// with no arguments, it preserves quote mark even when it's not a great idea +attr.setValue('a value \n that should be quoted'); +attr.toString(); // => '[id=a\\ value\\ \\A\\ that\\ should\\ be\\ quoted]' + +// smart preservation with a specified default +attr.setValue('a value \n that should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => "[id='a value \\A that should be quoted']" +attr.quoteMark = '"'; +// => '[id="a value \\A that should be quoted"]' + +// this keeps double quotes because it wants to quote the value and the existing value has double quotes. +attr.setValue('this should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => '[id="this should be quoted"]' + +// picks single quotes because the value has double quotes +attr.setValue('a "double quoted" value', {smart: true, preferCurrentQuoteMark: true, quoteMark: "'"}); +// => "[id='a "double quoted" value']" + +// setPropertyAndEscape lets you do anything you want. Even things that are a bad idea and illegal. +attr.setPropertyAndEscape('value', 'xxxx', 'the password is 42'); +attr.value; // => "xxxx" +attr.toString(); // => "[id=the password is 42]" + +// Pass a value directly through to the css output without escaping it. +attr.setPropertyWithoutEscape('value', '$REPLACEMENT$'); +attr.value; // => "$REPLACEMENT$" +attr.toString(); // => "[id=$REPLACEMENT$]" +``` + +# 3.1.2 + +* Fix: Removed dot-prop dependency since it's no longer written in es5. + +# 3.1.1 + +* Fix: typescript definitions weren't in the published package. + +# 3.1.0 + +* Fixed numerous bugs in attribute nodes relating to the handling of comments + and whitespace. There's significant changes to `attrNode.spaces` and `attrNode.raws` since the `3.0.0` release. +* Added `Attribute#offsetOf(part)` to get the offset location of + attribute parts like `"operator"` and `"value"`. This is most + often added to `Attribute#sourceIndex` for error reporting. + +# 3.0.0 + +## Breaking changes + +* Some tweaks to the tokenizer/attribute selector parsing mean that whitespace + locations might be slightly different to the 2.x code. +* Better attribute selector parsing with more validation; postcss-selector-parser + no longer uses regular expressions to parse attribute selectors. +* Added an async API (thanks to @jacobp100); the default `process` API is now + async, and the sync API is now accessed through `processSync` instead. +* `process()` and `processSync()` now return a string instead of the Processor + instance. +* Tweaks handling of Less interpolation (thanks to @jwilsson). +* Removes support for Node 0.12. + +## Other changes + +* `ast()` and `astSync()` methods have been added to the `Processor`. These + return the `Root` node of the selectors after processing them. +* `transform()` and `transformSync()` methods have been added to the + `Processor`. These return the value returned by the processor callback + after processing the selectors. +* Set the parent when inserting a node (thanks to @chriseppstein). +* Correctly adjust indices when using insertBefore/insertAfter (thanks to @tivac). +* Fixes handling of namespaces with qualified tag selectors. +* `process`, `ast` and `transform` (and their sync variants) now accept a + `postcss` rule node. When provided, better errors are generated and selector + processing is automatically set back to the rule selector (unless the `updateSelector` option is set to `false`.) +* Now more memory efficient when tokenizing selectors. + +### Upgrade hints + +The pattern of: + +`rule.selector = processor.process(rule.selector).result.toString();` + +is now: + +`processor.processSync(rule)` + +# 2.2.3 + +* Resolves an issue where the parser would not reduce multiple spaces between an + ampersand and another simple selector in lossy mode (thanks to @adam-26). + +# 2.2.2 + +* No longer hangs on an unescaped semicolon; instead the parser will throw + an exception for these cases. + +# 2.2.1 + +* Allows a consumer to specify whitespace tokens when creating a new Node + (thanks to @Semigradsky). + +# 2.2.0 + +* Added a new option to normalize whitespace when parsing the selector string + (thanks to @adam-26). + +# 2.1.1 + +* Better unquoted value handling within attribute selectors + (thanks to @evilebottnawi). + +# 2.1.0 + +* Added: Use string constants for all node types & expose them on the main + parser instance (thanks to @Aweary). + +# 2.0.0 + +This release contains the following breaking changes: + +* Renamed all `eachInside` iterators to `walk`. For example, `eachTag` is now + `walkTags`, and `eachInside` is now `walk`. +* Renamed `Node#removeSelf()` to `Node#remove()`. +* Renamed `Container#remove()` to `Container#removeChild()`. +* Renamed `Node#raw` to `Node#raws` (thanks to @davidtheclark). +* Now parses `&` as the *nesting* selector, rather than a *tag* selector. +* Fixes misinterpretation of Sass interpolation (e.g. `#{foo}`) as an + id selector (thanks to @davidtheclark). + +and; + +* Fixes parsing of attribute selectors with equals signs in them + (e.g. `[data-attr="foo=bar"]`) (thanks to @montmanu). +* Adds `quoted` and `raw.unquoted` properties to attribute nodes + (thanks to @davidtheclark). + +# 1.3.3 + +* Fixes an infinite loop on `)` and `]` tokens when they had no opening pairs. + Now postcss-selector-parser will throw when it encounters these lone tokens. + +# 1.3.2 + +* Now uses plain integers rather than `str.charCodeAt(0)` for compiled builds. + +# 1.3.1 + +* Update flatten to v1.x (thanks to @shinnn). + +# 1.3.0 + +* Adds a new node type, `String`, to fix a crash on selectors such as + `foo:bar("test")`. + +# 1.2.1 + +* Fixes a crash when the parser encountered a trailing combinator. + +# 1.2.0 + +* A more descriptive error is thrown when the parser expects to find a + pseudo-class/pseudo-element (thanks to @ashelley). +* Adds support for line/column locations for selector nodes, as well as a + `Node#sourceIndex` method (thanks to @davidtheclark). + +# 1.1.4 + +* Fixes a crash when a selector started with a `>` combinator. The module will + now no longer throw if a selector has a leading/trailing combinator node. + +# 1.1.3 + +* Fixes a crash on `@` tokens. + +# 1.1.2 + +* Fixes an infinite loop caused by using parentheses in a non-pseudo element + context. + +# 1.1.1 + +* Fixes a crash when a backslash ended a selector string. + +# 1.1.0 + +* Adds support for replacing multiple nodes at once with `replaceWith` + (thanks to @jonathantneal). +* Parser no longer throws on sequential IDs and trailing commas, to support + parsing of selector hacks. + +# 1.0.1 + +* Fixes using `insertAfter` and `insertBefore` during iteration. + +# 1.0.0 + +* Adds `clone` and `replaceWith` methods to nodes. +* Adds `insertBefore` and `insertAfter` to containers. +* Stabilises API. + +# 0.0.5 + +* Fixes crash on extra whitespace inside a pseudo selector's parentheses. +* Adds sort function to the container class. +* Enables the parser to pass its input through without transforming. +* Iteration-safe `each` and `eachInside`. + +# 0.0.4 + +* Tidy up redundant duplication. +* Fixes a bug where the parser would loop infinitely on universal selectors + inside pseudo selectors. +* Adds `length` getter and `eachInside`, `map`, `reduce` to the container class. +* When a selector has been removed from the tree, the root node will no longer + cast it to a string. +* Adds node type iterators to the container class (e.g. `eachComment`). +* Adds filter function to the container class. +* Adds split function to the container class. +* Create new node types by doing `parser.id(opts)` etc. +* Adds support for pseudo classes anywhere in the selector. + +# 0.0.3 + +* Adds `next` and `prev` to the node class. +* Adds `first` and `last` getters to the container class. +* Adds `every` and `some` iterators to the container class. +* Add `empty` alias for `removeAll`. +* Combinators are now types of node. +* Fixes the at method so that it is not an alias for `index`. +* Tidy up creation of new nodes in the parser. +* Refactors how namespaces are handled for consistency & less redundant code. +* Refactors AST to use `nodes` exclusively, and eliminates excessive nesting. +* Fixes nested pseudo parsing. +* Fixes whitespace parsing. + +# 0.0.2 + +* Adds support for namespace selectors. +* Adds support for selectors joined by escaped spaces - such as `.\31\ 0`. + +# 0.0.1 + +* Initial release. diff --git a/node_modules/postcss-selector-parser/LICENSE-MIT b/node_modules/postcss-selector-parser/LICENSE-MIT new file mode 100644 index 0000000..fd0e863 --- /dev/null +++ b/node_modules/postcss-selector-parser/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) Ben Briggs (http://beneb.info) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-selector-parser/README.md b/node_modules/postcss-selector-parser/README.md new file mode 100644 index 0000000..18a01c5 --- /dev/null +++ b/node_modules/postcss-selector-parser/README.md @@ -0,0 +1,49 @@ +# postcss-selector-parser [![Build Status](https://travis-ci.org/postcss/postcss-selector-parser.svg?branch=master)](https://travis-ci.org/postcss/postcss-selector-parser) + +> Selector parser with built in methods for working with selector strings. + +## Install + +With [npm](https://npmjs.com/package/postcss-selector-parser) do: + +``` +npm install postcss-selector-parser +``` + +## Quick Start + +```js +const parser = require('postcss-selector-parser'); +const transform = selectors => { + selectors.walk(selector => { + // do something with the selector + console.log(String(selector)) + }); +}; + +const transformed = parser(transform).processSync('h1, h2, h3'); +``` + +To normalize selector whitespace: + +```js +const parser = require('postcss-selector-parser'); +const normalized = parser().processSync('h1, h2, h3', {lossless: false}); +// -> h1,h2,h3 +``` + +Async support is provided through `parser.process` and will resolve a Promise +with the resulting selector string. + +## API + +Please see [API.md](API.md). + +## Credits + +* Huge thanks to Andrey Sitnik (@ai) for work on PostCSS which helped + accelerate this module's development. + +## License + +MIT diff --git a/node_modules/postcss-selector-parser/dist/index.js b/node_modules/postcss-selector-parser/dist/index.js new file mode 100644 index 0000000..6e76a32 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/index.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _processor = _interopRequireDefault(require("./processor")); + +var selectors = _interopRequireWildcard(require("./selectors")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var parser = function parser(processor) { + return new _processor["default"](processor); +}; + +Object.assign(parser, selectors); +delete parser.__esModule; +var _default = parser; +exports["default"] = _default; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/parser.js b/node_modules/postcss-selector-parser/dist/parser.js new file mode 100644 index 0000000..e0451de --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/parser.js @@ -0,0 +1,1243 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _root = _interopRequireDefault(require("./selectors/root")); + +var _selector = _interopRequireDefault(require("./selectors/selector")); + +var _className = _interopRequireDefault(require("./selectors/className")); + +var _comment = _interopRequireDefault(require("./selectors/comment")); + +var _id = _interopRequireDefault(require("./selectors/id")); + +var _tag = _interopRequireDefault(require("./selectors/tag")); + +var _string = _interopRequireDefault(require("./selectors/string")); + +var _pseudo = _interopRequireDefault(require("./selectors/pseudo")); + +var _attribute = _interopRequireWildcard(require("./selectors/attribute")); + +var _universal = _interopRequireDefault(require("./selectors/universal")); + +var _combinator = _interopRequireDefault(require("./selectors/combinator")); + +var _nesting = _interopRequireDefault(require("./selectors/nesting")); + +var _sortAscending = _interopRequireDefault(require("./sortAscending")); + +var _tokenize = _interopRequireWildcard(require("./tokenize")); + +var tokens = _interopRequireWildcard(require("./tokenTypes")); + +var types = _interopRequireWildcard(require("./selectors/types")); + +var _util = require("./util"); + +var _WHITESPACE_TOKENS, _Object$assign; + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); +var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + +function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; +} + +function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; +} + +function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; +} + +function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); +} + +function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); +} + +function unescapeProp(node, prop) { + var value = node[prop]; + + if (typeof value !== "string") { + return; + } + + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + + return node; +} + +function indexesOf(array, item) { + var i = -1; + var indexes = []; + + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + + return indexes; +} + +function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); +} + +var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + } + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + + var _proto = Parser.prototype; + + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + + return _this.rule.error(message, errorOptions); + }; + }; + + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + + if (this.options.lossy) { + break; + } + + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + + break; + + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + + if (rawValue) { + node.raws.namespace += content; + } + + lastAdded = 'namespace'; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + + break; + } + + // Falls through + + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + + node.attribute = (node.attribute || "") + content; + + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + + if (_rawValue) { + node.raws.attribute += content; + } + + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) { + var _unescaped = (0, _util.unesc)(content); + + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + + lastAdded = 'insensitive'; + + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + + if (node.raws.value) { + node.raws.value += content; + } + } + } + + spaceAfterMeaningfulToken = false; + break; + + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + + break; + + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + + pos++; + } + + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */ + ; + + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + + if (space) { + spaces.before = space; + space = ""; + } + + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + + return nodes; + } + /** + * + * @param {*} nodes + */ + ; + + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + + if (requiredSpace === void 0) { + requiredSpace = false; + } + + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + + if (rawSpace === space) { + rawSpace = undefined; + } + + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + + _proto.combinator = function combinator() { + var _this3 = this; + + if (this.content() === '|') { + return this.namespace(); + } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + + + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + + if (nodes.length > 0) { + var last = this.current.last; + + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + + return; + } + + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + + var node; + + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {// pass + } else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + + var spaces = {}; + var raws = { + spaces: {} + }; + + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + + return this.newNode(node); + }; + + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + + this.current._inferEndPosition(); + + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + } + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + }; + + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + + if (nextContent === "|") { + this.position++; + return; + } + } + + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position - 1]) + } + }); + var cache = this.current; + last.append(selector); + this.current = selector; + + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + + _proto.pseudo = function pseudo() { + var _this4 = this; + + var pseudoStr = ''; + var startingToken = this.currToken; + + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + + _proto.space = function space() { + var content = this.content(); // Handle space before and after the selector + + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + + var nextToken = this.nextToken; + var word = this.content(); + + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + + nextToken = this.nextToken; + } + + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes + + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); // Eliminate Sass interpolations from the list of id indexes + + var interpolations = indexesOf(word, '#{'); + + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + + _this5.newNode(node, namespace); // Ensure that the namespace is used only once + + + namespace = null; + }); + this.position++; + }; + + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + + return this.splitWord(namespace); + }; + + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + + this.current._inferEndPosition(); + + return this.root; + }; + + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + + case tokens.comment: + this.comment(); + break; + + case tokens.openParenthesis: + this.parentheses(); + break; + + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + + break; + + case tokens.openSquare: + this.attribute(); + break; + + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + + case tokens.colon: + this.pseudo(); + break; + + case tokens.comma: + this.comma(); + break; + + case tokens.asterisk: + this.universal(); + break; + + case tokens.ampersand: + this.nesting(); + break; + + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + + case tokens.closeSquare: + this.missingSquareBracket(); + + case tokens.semicolon: + this.missingBackslash(); + + default: + this.unexpected(); + } + } + /** + * Helpers + */ + ; + + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + + namespace = true; + } + + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + + return this.current.append(node); + }; + + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + + var searchPosition = startPosition; + + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + + return -1; + }; + + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + + return Parser; +}(); + +exports["default"] = Parser; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/processor.js b/node_modules/postcss-selector-parser/dist/processor.js new file mode 100644 index 0000000..a00170c --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/processor.js @@ -0,0 +1,206 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _parser = _interopRequireDefault(require("./parser")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + + this.funcRes = null; + this.options = options; + } + + var _proto = Processor.prototype; + + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + + var merged = Object.assign({}, this.options, options); + + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + + var merged = Object.assign({}, this.options, options); + + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + + _proto._run = function _run(rule, options) { + var _this = this; + + if (options === void 0) { + options = {}; + } + + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + + var root = this._root(rule, options); + + var transform = this.func(root); + + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + + var string = undefined; + + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + + return { + transform: transform, + root: root, + string: string + }; + } + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise} The AST of the selector after processing it. + */ + ; + + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */ + ; + + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise} The value returned by the processor. + */ + ; + + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */ + ; + + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */ + ; + + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */ + ; + + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + + return result.string || result.root.toString(); + }; + + return Processor; +}(); + +exports["default"] = Processor; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/attribute.js b/node_modules/postcss-selector-parser/dist/selectors/attribute.js new file mode 100644 index 0000000..8f535e5 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/attribute.js @@ -0,0 +1,515 @@ +"use strict"; + +exports.__esModule = true; +exports.unescapeValue = unescapeValue; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _unesc = _interopRequireDefault(require("../util/unesc")); + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +var _CSSESC_QUOTE_OPTIONS; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var deprecate = require("util-deprecate"); + +var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; +var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); +var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); +var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + +function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + + unescaped = (0, _unesc["default"])(unescaped); + + if (unescaped !== value) { + deprecatedUsage = true; + } + + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; +} + +function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + + if (opts.value === undefined) { + return opts; + } + + warnOfDeprecatedConstructor(); + + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + + if (!opts.raws) { + opts.raws = {}; + } + + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; +} + +var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + + function Attribute(opts) { + var _this; + + if (opts === void 0) { + opts = {}; + } + + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + + + var _proto = Attribute.prototype; + + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + + var quoteMark = this._determineQuoteMark(options); + + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */ + ; + + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + + this._syncRawValue(); + } + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */ + ; + + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + + if (quoteValue.length < escaped.length) { + return quote; + } + } + + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */ + ; + + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + + return quoteMark; + }; + + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + + if (concat === void 0) { + concat = defaultAttrConcat; + } + + var attrSpaces = this._spacesFor(spaceName); + + return concat(this.stringifyProperty(name), attrSpaces); + } + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */ + ; + + _proto.offsetOf = function offsetOf(name) { + var count = 1; + + var attributeSpaces = this._spacesFor("attribute"); + + count += attributeSpaces.before.length; + + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + + if (name === "attributeNS") { + return count; + } + + count += this.namespaceString.length; + + if (this.namespace) { + count += 1; + } + + if (name === "attribute") { + return count; + } + + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + + var operatorSpaces = this._spacesFor("operator"); + + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + + if (name === "operator") { + return operator ? count : -1; + } + + count += operator.length; + count += operatorSpaces.after.length; + + var valueSpaces = this._spacesFor("value"); + + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + + if (name === "value") { + return value ? count : -1; + } + + count += value.length; + count += valueSpaces.after.length; + + var insensitiveSpaces = this._spacesFor("insensitive"); + + count += insensitiveSpaces.before.length; + + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + + return -1; + }; + + _proto.toString = function toString() { + var _this2 = this; + + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */ + , + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + } + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + , + set: function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + + this._value = unescaped; + this._quoteMark = quoteMark; + + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + + this._attribute = name; + } + }]); + + return Attribute; +}(_namespace["default"]); + +exports["default"] = Attribute; +Attribute.NO_QUOTE = null; +Attribute.SINGLE_QUOTE = "'"; +Attribute.DOUBLE_QUOTE = '"'; +var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } +}, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true +}, _CSSESC_QUOTE_OPTIONS); + +function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; +} \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/className.js b/node_modules/postcss-selector-parser/dist/selectors/className.js new file mode 100644 index 0000000..2240991 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/className.js @@ -0,0 +1,69 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _util = require("../util"); + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + + function ClassName(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + + var _proto = ClassName.prototype; + + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + + this._value = v; + } + }]); + + return ClassName; +}(_node["default"]); + +exports["default"] = ClassName; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/combinator.js b/node_modules/postcss-selector-parser/dist/selectors/combinator.js new file mode 100644 index 0000000..271ab4d --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/combinator.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + + function Combinator(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + + return Combinator; +}(_node["default"]); + +exports["default"] = Combinator; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/comment.js b/node_modules/postcss-selector-parser/dist/selectors/comment.js new file mode 100644 index 0000000..e778094 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/comment.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + + function Comment(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + + return Comment; +}(_node["default"]); + +exports["default"] = Comment; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/constructors.js b/node_modules/postcss-selector-parser/dist/selectors/constructors.js new file mode 100644 index 0000000..078023e --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/constructors.js @@ -0,0 +1,102 @@ +"use strict"; + +exports.__esModule = true; +exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; + +var _attribute = _interopRequireDefault(require("./attribute")); + +var _className = _interopRequireDefault(require("./className")); + +var _combinator = _interopRequireDefault(require("./combinator")); + +var _comment = _interopRequireDefault(require("./comment")); + +var _id = _interopRequireDefault(require("./id")); + +var _nesting = _interopRequireDefault(require("./nesting")); + +var _pseudo = _interopRequireDefault(require("./pseudo")); + +var _root = _interopRequireDefault(require("./root")); + +var _selector = _interopRequireDefault(require("./selector")); + +var _string = _interopRequireDefault(require("./string")); + +var _tag = _interopRequireDefault(require("./tag")); + +var _universal = _interopRequireDefault(require("./universal")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var attribute = function attribute(opts) { + return new _attribute["default"](opts); +}; + +exports.attribute = attribute; + +var className = function className(opts) { + return new _className["default"](opts); +}; + +exports.className = className; + +var combinator = function combinator(opts) { + return new _combinator["default"](opts); +}; + +exports.combinator = combinator; + +var comment = function comment(opts) { + return new _comment["default"](opts); +}; + +exports.comment = comment; + +var id = function id(opts) { + return new _id["default"](opts); +}; + +exports.id = id; + +var nesting = function nesting(opts) { + return new _nesting["default"](opts); +}; + +exports.nesting = nesting; + +var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); +}; + +exports.pseudo = pseudo; + +var root = function root(opts) { + return new _root["default"](opts); +}; + +exports.root = root; + +var selector = function selector(opts) { + return new _selector["default"](opts); +}; + +exports.selector = selector; + +var string = function string(opts) { + return new _string["default"](opts); +}; + +exports.string = string; + +var tag = function tag(opts) { + return new _tag["default"](opts); +}; + +exports.tag = tag; + +var universal = function universal(opts) { + return new _universal["default"](opts); +}; + +exports.universal = universal; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/container.js b/node_modules/postcss-selector-parser/dist/selectors/container.js new file mode 100644 index 0000000..2626fb8 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/container.js @@ -0,0 +1,395 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var types = _interopRequireWildcard(require("./types")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + + function Container(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + + if (!_this.nodes) { + _this.nodes = []; + } + + return _this; + } + + var _proto = Container.prototype; + + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + + _proto.at = function at(index) { + return this.nodes[index]; + }; + + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + + return this.nodes.indexOf(child); + }; + + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + }; + + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + + this.nodes = []; + return this; + }; + + _proto.empty = function empty() { + return this.removeAll(); + }; + + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (oldIndex <= index) { + this.indexes[id] = index + 1; + } + } + + return this; + }; + + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index <= oldIndex) { + this.indexes[id] = index + 1; + } + } + + return this; + }; + + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */ + ; + + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + + if (!this.indexes) { + this.indexes = {}; + } + + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + + if (!this.length) { + return undefined; + } + + var index, result; + + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + + if (result === false) { + break; + } + + this.indexes[id] += 1; + } + + delete this.indexes[id]; + + if (result === false) { + return false; + } + }; + + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + + if (result !== false && node.length) { + result = node.walk(callback); + } + + if (result === false) { + return false; + } + }); + }; + + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + + _proto.split = function split(callback) { + var _this11 = this; + + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + + return memo; + }, []); + }; + + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + + _proto.toString = function toString() { + return this.map(String).join(''); + }; + + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + + return Container; +}(_node["default"]); + +exports["default"] = Container; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/guards.js b/node_modules/postcss-selector-parser/dist/selectors/guards.js new file mode 100644 index 0000000..c949af5 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/guards.js @@ -0,0 +1,64 @@ +"use strict"; + +exports.__esModule = true; +exports.isNode = isNode; +exports.isPseudoElement = isPseudoElement; +exports.isPseudoClass = isPseudoClass; +exports.isContainer = isContainer; +exports.isNamespace = isNamespace; +exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; + +var _types = require("./types"); + +var _IS_TYPE; + +var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + +function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; +} + +function isNodeType(type, node) { + return isNode(node) && node.type === type; +} + +var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); +exports.isAttribute = isAttribute; +var isClassName = isNodeType.bind(null, _types.CLASS); +exports.isClassName = isClassName; +var isCombinator = isNodeType.bind(null, _types.COMBINATOR); +exports.isCombinator = isCombinator; +var isComment = isNodeType.bind(null, _types.COMMENT); +exports.isComment = isComment; +var isIdentifier = isNodeType.bind(null, _types.ID); +exports.isIdentifier = isIdentifier; +var isNesting = isNodeType.bind(null, _types.NESTING); +exports.isNesting = isNesting; +var isPseudo = isNodeType.bind(null, _types.PSEUDO); +exports.isPseudo = isPseudo; +var isRoot = isNodeType.bind(null, _types.ROOT); +exports.isRoot = isRoot; +var isSelector = isNodeType.bind(null, _types.SELECTOR); +exports.isSelector = isSelector; +var isString = isNodeType.bind(null, _types.STRING); +exports.isString = isString; +var isTag = isNodeType.bind(null, _types.TAG); +exports.isTag = isTag; +var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); +exports.isUniversal = isUniversal; + +function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); +} + +function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); +} + +function isContainer(node) { + return !!(isNode(node) && node.walk); +} + +function isNamespace(node) { + return isAttribute(node) || isTag(node); +} \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/id.js b/node_modules/postcss-selector-parser/dist/selectors/id.js new file mode 100644 index 0000000..4e83147 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/id.js @@ -0,0 +1,37 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + + function ID(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + + var _proto = ID.prototype; + + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + + return ID; +}(_node["default"]); + +exports["default"] = ID; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/index.js b/node_modules/postcss-selector-parser/dist/selectors/index.js new file mode 100644 index 0000000..1fe9b13 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/index.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; + +var _types = require("./types"); + +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; +}); + +var _constructors = require("./constructors"); + +Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; +}); + +var _guards = require("./guards"); + +Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; +}); \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/namespace.js b/node_modules/postcss-selector-parser/dist/selectors/namespace.js new file mode 100644 index 0000000..fd6c729 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/namespace.js @@ -0,0 +1,101 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _cssesc = _interopRequireDefault(require("cssesc")); + +var _util = require("../util"); + +var _node = _interopRequireDefault(require("./node")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + + function Namespace() { + return _Node.apply(this, arguments) || this; + } + + var _proto = Namespace.prototype; + + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + + if (this.raws) { + delete this.raws.namespace; + } + + return; + } + + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + + return Namespace; +}(_node["default"]); + +exports["default"] = Namespace; +; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/nesting.js b/node_modules/postcss-selector-parser/dist/selectors/nesting.js new file mode 100644 index 0000000..3288c78 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/nesting.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + + function Nesting(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + + return Nesting; +}(_node["default"]); + +exports["default"] = Nesting; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/node.js b/node_modules/postcss-selector-parser/dist/selectors/node.js new file mode 100644 index 0000000..e8eca11 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/node.js @@ -0,0 +1,239 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _util = require("../util"); + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + + var value = obj[i]; + var type = typeof value; + + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + + return cloned; +}; + +var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + + var _proto = Node.prototype; + + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + }; + + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + + this.remove(); + } + + return this; + }; + + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + } + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */ + ; + + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */ + ; + + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + + this.raws[name] = valueEscaped; + } + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */ + ; + + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + + if (this.raws) { + delete this.raws[name]; + } + } + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */ + ; + + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + + if (this.source.end.line < line) { + return false; + } + + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + + return true; + } + + return undefined; + }; + + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + + return Node; +}(); + +exports["default"] = Node; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/pseudo.js b/node_modules/postcss-selector-parser/dist/selectors/pseudo.js new file mode 100644 index 0000000..a0e7bca --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/pseudo.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + + function Pseudo(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + + var _proto = Pseudo.prototype; + + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + + return Pseudo; +}(_container["default"]); + +exports["default"] = Pseudo; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/root.js b/node_modules/postcss-selector-parser/dist/selectors/root.js new file mode 100644 index 0000000..be5c2cc --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/root.js @@ -0,0 +1,60 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + + function Root(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + + var _proto = Root.prototype; + + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + + return Root; +}(_container["default"]); + +exports["default"] = Root; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/selector.js b/node_modules/postcss-selector-parser/dist/selectors/selector.js new file mode 100644 index 0000000..699eeb6 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/selector.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + + function Selector(opts) { + var _this; + + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + + return Selector; +}(_container["default"]); + +exports["default"] = Selector; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/string.js b/node_modules/postcss-selector-parser/dist/selectors/string.js new file mode 100644 index 0000000..e61df30 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/string.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _node = _interopRequireDefault(require("./node")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + + function String(opts) { + var _this; + + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + + return String; +}(_node["default"]); + +exports["default"] = String; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/tag.js b/node_modules/postcss-selector-parser/dist/selectors/tag.js new file mode 100644 index 0000000..e298db1 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/tag.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + + function Tag(opts) { + var _this; + + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + + return Tag; +}(_namespace["default"]); + +exports["default"] = Tag; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/types.js b/node_modules/postcss-selector-parser/dist/selectors/types.js new file mode 100644 index 0000000..ab897b8 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/types.js @@ -0,0 +1,28 @@ +"use strict"; + +exports.__esModule = true; +exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0; +var TAG = 'tag'; +exports.TAG = TAG; +var STRING = 'string'; +exports.STRING = STRING; +var SELECTOR = 'selector'; +exports.SELECTOR = SELECTOR; +var ROOT = 'root'; +exports.ROOT = ROOT; +var PSEUDO = 'pseudo'; +exports.PSEUDO = PSEUDO; +var NESTING = 'nesting'; +exports.NESTING = NESTING; +var ID = 'id'; +exports.ID = ID; +var COMMENT = 'comment'; +exports.COMMENT = COMMENT; +var COMBINATOR = 'combinator'; +exports.COMBINATOR = COMBINATOR; +var CLASS = 'class'; +exports.CLASS = CLASS; +var ATTRIBUTE = 'attribute'; +exports.ATTRIBUTE = ATTRIBUTE; +var UNIVERSAL = 'universal'; +exports.UNIVERSAL = UNIVERSAL; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/selectors/universal.js b/node_modules/postcss-selector-parser/dist/selectors/universal.js new file mode 100644 index 0000000..cf25473 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/selectors/universal.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = void 0; + +var _namespace = _interopRequireDefault(require("./namespace")); + +var _types = require("./types"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + + function Universal(opts) { + var _this; + + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + + return Universal; +}(_namespace["default"]); + +exports["default"] = Universal; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/sortAscending.js b/node_modules/postcss-selector-parser/dist/sortAscending.js new file mode 100644 index 0000000..3ef56ac --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/sortAscending.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = sortAscending; + +function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); +} + +; +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/tokenTypes.js b/node_modules/postcss-selector-parser/dist/tokenTypes.js new file mode 100644 index 0000000..48314b9 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/tokenTypes.js @@ -0,0 +1,95 @@ +"use strict"; + +exports.__esModule = true; +exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0; +var ampersand = 38; // `&`.charCodeAt(0); + +exports.ampersand = ampersand; +var asterisk = 42; // `*`.charCodeAt(0); + +exports.asterisk = asterisk; +var at = 64; // `@`.charCodeAt(0); + +exports.at = at; +var comma = 44; // `,`.charCodeAt(0); + +exports.comma = comma; +var colon = 58; // `:`.charCodeAt(0); + +exports.colon = colon; +var semicolon = 59; // `;`.charCodeAt(0); + +exports.semicolon = semicolon; +var openParenthesis = 40; // `(`.charCodeAt(0); + +exports.openParenthesis = openParenthesis; +var closeParenthesis = 41; // `)`.charCodeAt(0); + +exports.closeParenthesis = closeParenthesis; +var openSquare = 91; // `[`.charCodeAt(0); + +exports.openSquare = openSquare; +var closeSquare = 93; // `]`.charCodeAt(0); + +exports.closeSquare = closeSquare; +var dollar = 36; // `$`.charCodeAt(0); + +exports.dollar = dollar; +var tilde = 126; // `~`.charCodeAt(0); + +exports.tilde = tilde; +var caret = 94; // `^`.charCodeAt(0); + +exports.caret = caret; +var plus = 43; // `+`.charCodeAt(0); + +exports.plus = plus; +var equals = 61; // `=`.charCodeAt(0); + +exports.equals = equals; +var pipe = 124; // `|`.charCodeAt(0); + +exports.pipe = pipe; +var greaterThan = 62; // `>`.charCodeAt(0); + +exports.greaterThan = greaterThan; +var space = 32; // ` `.charCodeAt(0); + +exports.space = space; +var singleQuote = 39; // `'`.charCodeAt(0); + +exports.singleQuote = singleQuote; +var doubleQuote = 34; // `"`.charCodeAt(0); + +exports.doubleQuote = doubleQuote; +var slash = 47; // `/`.charCodeAt(0); + +exports.slash = slash; +var bang = 33; // `!`.charCodeAt(0); + +exports.bang = bang; +var backslash = 92; // '\\'.charCodeAt(0); + +exports.backslash = backslash; +var cr = 13; // '\r'.charCodeAt(0); + +exports.cr = cr; +var feed = 12; // '\f'.charCodeAt(0); + +exports.feed = feed; +var newline = 10; // '\n'.charCodeAt(0); + +exports.newline = newline; +var tab = 9; // '\t'.charCodeAt(0); +// Expose aliases primarily for readability. + +exports.tab = tab; +var str = singleQuote; // No good single character representation! + +exports.str = str; +var comment = -1; +exports.comment = comment; +var word = -2; +exports.word = word; +var combinator = -3; +exports.combinator = combinator; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/tokenize.js b/node_modules/postcss-selector-parser/dist/tokenize.js new file mode 100644 index 0000000..bee9fee --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/tokenize.js @@ -0,0 +1,271 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = tokenize; +exports.FIELDS = void 0; + +var t = _interopRequireWildcard(require("./tokenTypes")); + +var _unescapable, _wordDelimiters; + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); +var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); +var hex = {}; +var hexChars = "0123456789abcdefABCDEF"; + +for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; +} +/** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + + +function consumeWord(css, start) { + var next = start; + var code; + + do { + code = css.charCodeAt(next); + + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + + return next - 1; +} +/** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + + +function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + + if (unescapable[code]) {// just consume the escape char + } else if (hex[code]) { + var hexDigits = 0; // consume up to 6 hex chars + + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape + + + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + + return next; +} + +var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 +}; +exports.FIELDS = FIELDS; + +function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + + while (start < length) { + code = css.charCodeAt(start); + + if (code === t.newline) { + offset = start; + line += 1; + } + + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + // Consume these characters as single tokens. + + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + unclosed('quote', quote); + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + + if (next === 0) { + unclosed('comment', '*/'); + } + + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + + end = next + 1; + break; + } // Ensure that the token structure remains consistent + + + tokens.push([tokenType, // [0] Token type + line, // [1] Starting line + start - offset, // [2] Starting column + endLine, // [3] Ending line + endColumn, // [4] Ending column + start, // [5] Start position / Source index + end // [6] End position + ]); // Reset offset for the next token + + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + + start = end; + } + + return tokens; +} \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/util/ensureObject.js b/node_modules/postcss-selector-parser/dist/util/ensureObject.js new file mode 100644 index 0000000..3472e07 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/util/ensureObject.js @@ -0,0 +1,22 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = ensureObject; + +function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + + while (props.length > 0) { + var prop = props.shift(); + + if (!obj[prop]) { + obj[prop] = {}; + } + + obj = obj[prop]; + } +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/util/getProp.js b/node_modules/postcss-selector-parser/dist/util/getProp.js new file mode 100644 index 0000000..53e07c9 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/util/getProp.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = getProp; + +function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + + while (props.length > 0) { + var prop = props.shift(); + + if (!obj[prop]) { + return undefined; + } + + obj = obj[prop]; + } + + return obj; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/util/index.js b/node_modules/postcss-selector-parser/dist/util/index.js new file mode 100644 index 0000000..043fda8 --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/util/index.js @@ -0,0 +1,22 @@ +"use strict"; + +exports.__esModule = true; +exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0; + +var _unesc = _interopRequireDefault(require("./unesc")); + +exports.unesc = _unesc["default"]; + +var _getProp = _interopRequireDefault(require("./getProp")); + +exports.getProp = _getProp["default"]; + +var _ensureObject = _interopRequireDefault(require("./ensureObject")); + +exports.ensureObject = _ensureObject["default"]; + +var _stripComments = _interopRequireDefault(require("./stripComments")); + +exports.stripComments = _stripComments["default"]; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/util/stripComments.js b/node_modules/postcss-selector-parser/dist/util/stripComments.js new file mode 100644 index 0000000..c74f1fe --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/util/stripComments.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = stripComments; + +function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + + if (commentEnd < 0) { + return s; + } + + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + + s = s + str.slice(lastEnd); + return s; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/dist/util/unesc.js b/node_modules/postcss-selector-parser/dist/util/unesc.js new file mode 100644 index 0000000..3136e7e --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/util/unesc.js @@ -0,0 +1,93 @@ +"use strict"; + +exports.__esModule = true; +exports["default"] = unesc; + +// Many thanks for this post which made this migration much easier. +// https://mathiasbynens.be/notes/css-escapes + +/** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ +function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9] + + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + + spaceTerminated = code === 32; + + if (!valid) { + break; + } + + hex += lower[i]; + } + + if (hex.length === 0) { + return undefined; + } + + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; +} + +var CONTAINS_ESCAPE = /\\/; + +function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + + if (!needToProcess) { + return str; + } + + var ret = ""; + + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + + + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + + + if (str.length === i + 1) { + ret += str[i]; + } + + continue; + } + + ret += str[i]; + } + + return ret; +} + +module.exports = exports.default; \ No newline at end of file diff --git a/node_modules/postcss-selector-parser/package.json b/node_modules/postcss-selector-parser/package.json new file mode 100644 index 0000000..a6f3358 --- /dev/null +++ b/node_modules/postcss-selector-parser/package.json @@ -0,0 +1,78 @@ +{ + "name": "postcss-selector-parser", + "version": "6.0.10", + "devDependencies": { + "@babel/cli": "^7.11.6", + "@babel/core": "^7.11.6", + "@babel/eslint-parser": "^7.11.5", + "@babel/eslint-plugin": "^7.11.5", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/preset-env": "^7.11.5", + "@babel/register": "^7.11.5", + "ava": "^3.12.1", + "babel-plugin-add-module-exports": "^1.0.4", + "coveralls": "^3.1.0", + "del-cli": "^3.0.1", + "eslint": "^7.9.0", + "eslint-plugin-import": "^2.22.0", + "glob": "^7.1.6", + "minimist": "^1.2.5", + "nyc": "^15.1.0", + "postcss": "^8.0.0", + "semver": "^7.3.2", + "typescript": "^4.0.3" + }, + "main": "dist/index.js", + "types": "postcss-selector-parser.d.ts", + "files": [ + "API.md", + "CHANGELOG.md", + "LICENSE-MIT", + "dist", + "postcss-selector-parser.d.ts", + "!**/__tests__" + ], + "scripts": { + "pretest": "eslint src && tsc --noEmit postcss-selector-parser.d.ts", + "prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", + "lintfix": "eslint --fix src", + "report": "nyc report --reporter=html", + "test": "nyc ava src/__tests__/*.js ", + "testone": "ava" + }, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "license": "MIT", + "engines": { + "node": ">=4" + }, + "homepage": "https://github.com/postcss/postcss-selector-parser", + "contributors": [ + { + "name": "Ben Briggs", + "email": "beneb.info@gmail.com", + "url": "http://beneb.info" + }, + { + "name": "Chris Eppstein", + "email": "chris@eppsteins.net", + "url": "http://twitter.com/chriseppstein" + } + ], + "repository": "postcss/postcss-selector-parser", + "ava": { + "require": [ + "@babel/register" + ], + "concurrency": 5, + "timeout": "25s" + }, + "nyc": { + "exclude": [ + "node_modules", + "**/__tests__" + ] + } +} diff --git a/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts b/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts new file mode 100644 index 0000000..89a2c52 --- /dev/null +++ b/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts @@ -0,0 +1,555 @@ +// Type definitions for postcss-selector-parser 2.2.3 +// Definitions by: Chris Eppstein + +/*~ Note that ES6 modules cannot directly export callable functions. + *~ This file should be imported using the CommonJS-style: + *~ import x = require('someLibrary'); + *~ + *~ Refer to the documentation to understand common + *~ workarounds for this limitation of ES6 modules. + */ + +/*~ This declaration specifies that the function + *~ is the exported object from the file + */ +export = parser; + +// A type that's T but not U. +type Diff = T extends U ? never : T; + +// TODO: Conditional types in TS 1.8 will really clean this up. +declare function parser(): parser.Processor; +declare function parser(processor: parser.AsyncProcessor): parser.Processor; +declare function parser(processor: parser.AsyncProcessor): parser.Processor; +declare function parser(processor: parser.SyncProcessor): parser.Processor; +declare function parser(processor: parser.SyncProcessor): parser.Processor; +declare function parser(processor?: parser.SyncProcessor | parser.AsyncProcessor): parser.Processor; + +/*~ If you want to expose types from your module as well, you can + *~ place them in this block. Often you will want to describe the + *~ shape of the return type of the function; that type should + *~ be declared in here, as this example shows. + */ +declare namespace parser { + /* copied from postcss -- so we don't need to add a dependency */ + type ErrorOptions = { + plugin?: string; + word?: string; + index?: number + }; + /* the bits we use of postcss.Rule, copied from postcss -- so we don't need to add a dependency */ + type PostCSSRuleNode = { + selector: string + /** + * @returns postcss.CssSyntaxError but it's a complex object, caller + * should cast to it if they have a dependency on postcss. + */ + error(message: string, options?: ErrorOptions): Error; + }; + /** Accepts a string */ + type Selectors = string | PostCSSRuleNode + type ProcessorFn = (root: parser.Root) => ReturnType; + type SyncProcessor = ProcessorFn; + type AsyncProcessor = ProcessorFn>; + + const TAG: "tag"; + const STRING: "string"; + const SELECTOR: "selector"; + const ROOT: "root"; + const PSEUDO: "pseudo"; + const NESTING: "nesting"; + const ID: "id"; + const COMMENT: "comment"; + const COMBINATOR: "combinator"; + const CLASS: "class"; + const ATTRIBUTE: "attribute"; + const UNIVERSAL: "universal"; + + interface NodeTypes { + tag: Tag, + string: String, + selector: Selector, + root: Root, + pseudo: Pseudo, + nesting: Nesting, + id: Identifier, + comment: Comment, + combinator: Combinator, + class: ClassName, + attribute: Attribute, + universal: Universal + } + + type Node = NodeTypes[keyof NodeTypes]; + + function isNode(node: any): node is Node; + + interface Options { + /** + * Preserve whitespace when true. Default: false; + */ + lossless: boolean; + /** + * When true and a postcss.Rule is passed, set the result of + * processing back onto the rule when done. Default: false. + */ + updateSelector: boolean; + } + class Processor< + TransformType = never, + SyncSelectorsType extends Selectors | never = Selectors + > { + res: Root; + readonly result: String; + ast(selectors: Selectors, options?: Partial): Promise; + astSync(selectors: SyncSelectorsType, options?: Partial): Root; + transform(selectors: Selectors, options?: Partial): Promise; + transformSync(selectors: SyncSelectorsType, options?: Partial): TransformType; + process(selectors: Selectors, options?: Partial): Promise; + processSync(selectors: SyncSelectorsType, options?: Partial): string; + } + interface ParserOptions { + css: string; + error: (message: string, options: ErrorOptions) => Error; + options: Options; + } + class Parser { + input: ParserOptions; + lossy: boolean; + position: number; + root: Root; + selectors: string; + current: Selector; + constructor(input: ParserOptions); + /** + * Raises an error, if the processor is invoked on + * a postcss Rule node, a better error message is raised. + */ + error(message: string, options?: ErrorOptions): void; + } + interface NodeSource { + start?: { + line: number, + column: number + }, + end?: { + line: number, + column: number + } + } + interface SpaceAround { + before: string; + after: string; + } + interface Spaces extends SpaceAround { + [spaceType: string]: string | Partial | undefined; + } + interface NodeOptions { + value: Value; + spaces?: Partial; + source?: NodeSource; + sourceIndex?: number; + } + interface Base< + Value extends string | undefined = string, + ParentType extends Container | undefined = Container | undefined + > { + type: keyof NodeTypes; + parent: ParentType; + value: Value; + spaces: Spaces; + source?: NodeSource; + sourceIndex: number; + rawSpaceBefore: string; + rawSpaceAfter: string; + remove(): Node; + replaceWith(...nodes: Node[]): Node; + next(): Node; + prev(): Node; + clone(opts: {[override: string]:any}): Node; + /** + * Return whether this node includes the character at the position of the given line and column. + * Returns undefined if the nodes lack sufficient source metadata to determine the position. + * @param line 1-index based line number relative to the start of the selector. + * @param column 1-index based column number relative to the start of the selector. + */ + isAtPosition(line: number, column: number): boolean | undefined; + /** + * Some non-standard syntax doesn't follow normal escaping rules for css, + * this allows the escaped value to be specified directly, allowing illegal characters to be + * directly inserted into css output. + * @param name the property to set + * @param value the unescaped value of the property + * @param valueEscaped optional. the escaped value of the property. + */ + setPropertyAndEscape(name: string, value: any, valueEscaped: string): void; + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param name the property to set. + * @param value The value that is both escaped and unescaped. + */ + setPropertyWithoutEscape(name: string, value: any): void; + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */ + appendToPropertyAndEscape(name: string, value: any, valueEscaped: string): void; + toString(): string; + } + interface ContainerOptions extends NodeOptions { + nodes?: Array; + } + interface Container< + Value extends string | undefined = string, + Child extends Node = Node + > extends Base { + nodes: Array; + append(selector: Selector): this; + prepend(selector: Selector): this; + at(index: number): Child; + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param line The line number of the node to find. (1-based index) + * @param col The column number of the node to find. (1-based index) + */ + atPosition(line: number, column: number): Child; + index(child: Child): number; + readonly first: Child; + readonly last: Child; + readonly length: number; + removeChild(child: Child): this; + removeAll(): Container; + empty(): Container; + insertAfter(oldNode: Child, newNode: Child): this; + insertBefore(oldNode: Child, newNode: Child): this; + each(callback: (node: Child) => boolean | void): boolean | undefined; + walk( + callback: (node: Node) => boolean | void + ): boolean | undefined; + walkAttributes( + callback: (node: Attribute) => boolean | void + ): boolean | undefined; + walkClasses( + callback: (node: ClassName) => boolean | void + ): boolean | undefined; + walkCombinators( + callback: (node: Combinator) => boolean | void + ): boolean | undefined; + walkComments( + callback: (node: Comment) => boolean | void + ): boolean | undefined; + walkIds( + callback: (node: Identifier) => boolean | void + ): boolean | undefined; + walkNesting( + callback: (node: Nesting) => boolean | void + ): boolean | undefined; + walkPseudos( + callback: (node: Pseudo) => boolean | void + ): boolean | undefined; + walkTags(callback: (node: Tag) => boolean | void): boolean | undefined; + split(callback: (node: Child) => boolean): [Child[], Child[]]; + map(callback: (node: Child) => T): T[]; + reduce( + callback: ( + previousValue: Child, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => Child + ): Child; + reduce( + callback: ( + previousValue: Child, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => Child, + initialValue: Child + ): Child; + reduce( + callback: ( + previousValue: T, + currentValue: Child, + currentIndex: number, + array: readonly Child[] + ) => T, + initialValue: T + ): T; + every(callback: (node: Child) => boolean): boolean; + some(callback: (node: Child) => boolean): boolean; + filter(callback: (node: Child) => boolean): Child[]; + sort(callback: (nodeA: Child, nodeB: Child) => number): Child[]; + toString(): string; + } + function isContainer(node: any): node is Root | Selector | Pseudo; + + interface NamespaceOptions extends NodeOptions { + namespace?: string | true; + } + interface Namespace extends Base { + /** alias for namespace */ + ns: string | true; + /** + * namespace prefix. + */ + namespace: string | true; + /** + * If a namespace exists, prefix the value provided with it, separated by |. + */ + qualifiedName(value: string): string; + /** + * A string representing the namespace suitable for output. + */ + readonly namespaceString: string; + } + function isNamespace(node: any): node is Attribute | Tag; + + interface Root extends Container { + type: "root"; + /** + * Raises an error, if the processor is invoked on + * a postcss Rule node, a better error message is raised. + */ + error(message: string, options?: ErrorOptions): Error; + nodeAt(line: number, column: number): Node + } + function root(opts: ContainerOptions): Root; + function isRoot(node: any): node is Root; + + interface _Selector extends Container> { + type: "selector"; + } + type Selector = _Selector; + function selector(opts: ContainerOptions): Selector; + function isSelector(node: any): node is Selector; + + interface CombinatorRaws { + value?: string; + spaces?: { + before?: string; + after?: string; + }; + } + interface Combinator extends Base { + type: "combinator"; + raws?: CombinatorRaws; + } + function combinator(opts: NodeOptions): Combinator; + function isCombinator(node: any): node is Combinator; + + interface ClassName extends Base { + type: "class"; + } + function className(opts: NamespaceOptions): ClassName; + function isClassName(node: any): node is ClassName; + + type AttributeOperator = "=" | "~=" | "|=" | "^=" | "$=" | "*="; + type QuoteMark = '"' | "'" | null; + interface PreferredQuoteMarkOptions { + quoteMark?: QuoteMark; + preferCurrentQuoteMark?: boolean; + } + interface SmartQuoteMarkOptions extends PreferredQuoteMarkOptions { + smart?: boolean; + } + interface AttributeOptions extends NamespaceOptions { + attribute: string; + operator?: AttributeOperator; + insensitive?: boolean; + quoteMark?: QuoteMark; + /** @deprecated Use quoteMark instead. */ + quoted?: boolean; + spaces?: { + before?: string; + after?: string; + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + raws: { + unquoted?: string; + attribute?: string; + operator?: string; + value?: string; + insensitive?: string; + spaces?: { + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + }; + } + interface Attribute extends Namespace { + type: "attribute"; + attribute: string; + operator?: AttributeOperator; + insensitive?: boolean; + quoteMark: QuoteMark; + quoted?: boolean; + spaces: { + before: string; + after: string; + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + raws: { + /** @deprecated The attribute value is unquoted, use that instead.. */ + unquoted?: string; + attribute?: string; + operator?: string; + /** The value of the attribute with quotes and escapes. */ + value?: string; + insensitive?: string; + spaces?: { + attribute?: Partial; + operator?: Partial; + value?: Partial; + insensitive?: Partial; + } + }; + /** + * The attribute name after having been qualified with a namespace. + */ + readonly qualifiedAttribute: string; + + /** + * The case insensitivity flag or an empty string depending on whether this + * attribute is case insensitive. + */ + readonly insensitiveFlag : 'i' | ''; + + /** + * Returns the attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute or + * `set quoteMark(mark)` if you want to change the quote settings of the current + * value. + * + * You can also change the quotation used for the current value by setting quoteMark. + **/ + getQuotedValue(options?: SmartQuoteMarkOptions): string; + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + * @param value + */ + setValue(value: string, options?: SmartQuoteMarkOptions): void; + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + **/ + smartQuoteMark(options: PreferredQuoteMarkOptions): QuoteMark; + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */ + preferredQuoteMark(options: PreferredQuoteMarkOptions): QuoteMark + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */ + offsetOf(part: "ns" | "namespace" | "attribute" | "attributeNS" | "operator" | "value" | "insensitive"): number; + } + function attribute(opts: AttributeOptions): Attribute; + function isAttribute(node: any): node is Attribute; + + interface Pseudo extends Container { + type: "pseudo"; + } + function pseudo(opts: ContainerOptions): Pseudo; + /** + * Checks wether the node is the Psuedo subtype of node. + */ + function isPseudo(node: any): node is Pseudo; + + /** + * Checks wether the node is, specifically, a pseudo element instead of + * pseudo class. + */ + function isPseudoElement(node: any): node is Pseudo; + + /** + * Checks wether the node is, specifically, a pseudo class instead of + * pseudo element. + */ + function isPseudoClass(node: any): node is Pseudo; + + + interface Tag extends Namespace { + type: "tag"; + } + function tag(opts: NamespaceOptions): Tag; + function isTag(node: any): node is Tag; + + interface Comment extends Base { + type: "comment"; + } + function comment(opts: NodeOptions): Comment; + function isComment(node: any): node is Comment; + + interface Identifier extends Base { + type: "id"; + } + function id(opts: any): any; + function isIdentifier(node: any): node is Identifier; + + interface Nesting extends Base { + type: "nesting"; + } + function nesting(opts: any): any; + function isNesting(node: any): node is Nesting; + + interface String extends Base { + type: "string"; + } + function string(opts: NodeOptions): String; + function isString(node: any): node is String; + + interface Universal extends Base { + type: "universal"; + } + function universal(opts?: NamespaceOptions): any; + function isUniversal(node: any): node is Universal; +} diff --git a/node_modules/postcss-value-parser/LICENSE b/node_modules/postcss-value-parser/LICENSE new file mode 100644 index 0000000..6dcaefc --- /dev/null +++ b/node_modules/postcss-value-parser/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) Bogdan Chadkin + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss-value-parser/README.md b/node_modules/postcss-value-parser/README.md new file mode 100644 index 0000000..3bd6a0d --- /dev/null +++ b/node_modules/postcss-value-parser/README.md @@ -0,0 +1,263 @@ +# postcss-value-parser + +[![Travis CI](https://travis-ci.org/TrySound/postcss-value-parser.svg)](https://travis-ci.org/TrySound/postcss-value-parser) + +Transforms CSS declaration values and at-rule parameters into a tree of nodes, and provides a simple traversal API. + +## Usage + +```js +var valueParser = require('postcss-value-parser'); +var cssBackgroundValue = 'url(foo.png) no-repeat 40px 73%'; +var parsedValue = valueParser(cssBackgroundValue); +// parsedValue exposes an API described below, +// e.g. parsedValue.walk(..), parsedValue.toString(), etc. +``` + +For example, parsing the value `rgba(233, 45, 66, .5)` will return the following: + +```js +{ + nodes: [ + { + type: 'function', + value: 'rgba', + before: '', + after: '', + nodes: [ + { type: 'word', value: '233' }, + { type: 'div', value: ',', before: '', after: ' ' }, + { type: 'word', value: '45' }, + { type: 'div', value: ',', before: '', after: ' ' }, + { type: 'word', value: '66' }, + { type: 'div', value: ',', before: ' ', after: '' }, + { type: 'word', value: '.5' } + ] + } + ] +} +``` + +If you wanted to convert each `rgba()` value in `sourceCSS` to a hex value, you could do so like this: + +```js +var valueParser = require('postcss-value-parser'); + +var parsed = valueParser(sourceCSS); + +// walk() will visit all the of the nodes in the tree, +// invoking the callback for each. +parsed.walk(function (node) { + + // Since we only want to transform rgba() values, + // we can ignore anything else. + if (node.type !== 'function' && node.value !== 'rgba') return; + + // We can make an array of the rgba() arguments to feed to a + // convertToHex() function + var color = node.nodes.filter(function (node) { + return node.type === 'word'; + }).map(function (node) { + return Number(node.value); + }); // [233, 45, 66, .5] + + // Now we will transform the existing rgba() function node + // into a word node with the hex value + node.type = 'word'; + node.value = convertToHex(color); +}) + +parsed.toString(); // #E92D42 +``` + +## Nodes + +Each node is an object with these common properties: + +- **type**: The type of node (`word`, `string`, `div`, `space`, `comment`, or `function`). + Each type is documented below. +- **value**: Each node has a `value` property; but what exactly `value` means + is specific to the node type. Details are documented for each type below. +- **sourceIndex**: The starting index of the node within the original source + string. For example, given the source string `10px 20px`, the `word` node + whose value is `20px` will have a `sourceIndex` of `5`. + +### word + +The catch-all node type that includes keywords (e.g. `no-repeat`), +quantities (e.g. `20px`, `75%`, `1.5`), and hex colors (e.g. `#e6e6e6`). + +Node-specific properties: + +- **value**: The "word" itself. + +### string + +A quoted string value, e.g. `"something"` in `content: "something";`. + +Node-specific properties: + +- **value**: The text content of the string. +- **quote**: The quotation mark surrounding the string, either `"` or `'`. +- **unclosed**: `true` if the string was not closed properly. e.g. `"unclosed string `. + +### div + +A divider, for example + +- `,` in `animation-duration: 1s, 2s, 3s` +- `/` in `border-radius: 10px / 23px` +- `:` in `(min-width: 700px)` + +Node-specific properties: + +- **value**: The divider character. Either `,`, `/`, or `:` (see examples above). +- **before**: Whitespace before the divider. +- **after**: Whitespace after the divider. + +### space + +Whitespace used as a separator, e.g. ` ` occurring twice in `border: 1px solid black;`. + +Node-specific properties: + +- **value**: The whitespace itself. + +### comment + +A CSS comment starts with `/*` and ends with `*/` + +Node-specific properties: + +- **value**: The comment value without `/*` and `*/` +- **unclosed**: `true` if the comment was not closed properly. e.g. `/* comment without an end `. + +### function + +A CSS function, e.g. `rgb(0,0,0)` or `url(foo.bar)`. + +Function nodes have nodes nested within them: the function arguments. + +Additional properties: + +- **value**: The name of the function, e.g. `rgb` in `rgb(0,0,0)`. +- **before**: Whitespace after the opening parenthesis and before the first argument, + e.g. ` ` in `rgb( 0,0,0)`. +- **after**: Whitespace before the closing parenthesis and after the last argument, + e.g. ` ` in `rgb(0,0,0 )`. +- **nodes**: More nodes representing the arguments to the function. +- **unclosed**: `true` if the parentheses was not closed properly. e.g. `( unclosed-function `. + +Media features surrounded by parentheses are considered functions with an +empty value. For example, `(min-width: 700px)` parses to these nodes: + +```js +[ + { + type: 'function', value: '', before: '', after: '', + nodes: [ + { type: 'word', value: 'min-width' }, + { type: 'div', value: ':', before: '', after: ' ' }, + { type: 'word', value: '700px' } + ] + } +] +``` + +`url()` functions can be parsed a little bit differently depending on +whether the first character in the argument is a quotation mark. + +`url( /gfx/img/bg.jpg )` parses to: + +```js +{ type: 'function', sourceIndex: 0, value: 'url', before: ' ', after: ' ', nodes: [ + { type: 'word', sourceIndex: 5, value: '/gfx/img/bg.jpg' } +] } +``` + +`url( "/gfx/img/bg.jpg" )`, on the other hand, parses to: + +```js +{ type: 'function', sourceIndex: 0, value: 'url', before: ' ', after: ' ', nodes: [ + type: 'string', sourceIndex: 5, quote: '"', value: '/gfx/img/bg.jpg' }, +] } +``` + +### unicode-range + +The unicode-range CSS descriptor sets the specific range of characters to be +used from a font defined by @font-face and made available +for use on the current page (`unicode-range: U+0025-00FF`). + +Node-specific properties: + +- **value**: The "unicode-range" itself. + +## API + +``` +var valueParser = require('postcss-value-parser'); +``` + +### valueParser.unit(quantity) + +Parses `quantity`, distinguishing the number from the unit. Returns an object like the following: + +```js +// Given 2rem +{ + number: '2', + unit: 'rem' +} +``` + +If the `quantity` argument cannot be parsed as a number, returns `false`. + +*This function does not parse complete values*: you cannot pass it `1px solid black` and expect `px` as +the unit. Instead, you should pass it single quantities only. Parse `1px solid black`, then pass it +the stringified `1px` node (a `word` node) to parse the number and unit. + +### valueParser.stringify(nodes[, custom]) + +Stringifies a node or array of nodes. + +The `custom` function is called for each `node`; return a string to override the default behaviour. + +### valueParser.walk(nodes, callback[, bubble]) + +Walks each provided node, recursively walking all descendent nodes within functions. + +Returning `false` in the `callback` will prevent traversal of descendent nodes (within functions). +You can use this feature to for shallow iteration, walking over only the *immediate* children. +*Note: This only applies if `bubble` is `false` (which is the default).* + +By default, the tree is walked from the outermost node inwards. +To reverse the direction, pass `true` for the `bubble` argument. + +The `callback` is invoked with three arguments: `callback(node, index, nodes)`. + +- `node`: The current node. +- `index`: The index of the current node. +- `nodes`: The complete nodes array passed to `walk()`. + +Returns the `valueParser` instance. + +### var parsed = valueParser(value) + +Returns the parsed node tree. + +### parsed.nodes + +The array of nodes. + +### parsed.toString() + +Stringifies the node tree. + +### parsed.walk(callback[, bubble]) + +Walks each node inside `parsed.nodes`. See the documentation for `valueParser.walk()` above. + +# License + +MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru) diff --git a/node_modules/postcss-value-parser/lib/index.d.ts b/node_modules/postcss-value-parser/lib/index.d.ts new file mode 100644 index 0000000..8759f3f --- /dev/null +++ b/node_modules/postcss-value-parser/lib/index.d.ts @@ -0,0 +1,177 @@ +declare namespace postcssValueParser { + interface BaseNode { + /** + * The offset, inclusive, inside the CSS value at which the node starts. + */ + sourceIndex: number; + + /** + * The offset, exclusive, inside the CSS value at which the node ends. + */ + sourceEndIndex: number; + + /** + * The node's characteristic value + */ + value: string; + } + + interface ClosableNode { + /** + * Whether the parsed CSS value ended before the node was properly closed + */ + unclosed?: true; + } + + interface AdjacentAwareNode { + /** + * The token at the start of the node + */ + before: string; + + /** + * The token at the end of the node + */ + after: string; + } + + interface CommentNode extends BaseNode, ClosableNode { + type: "comment"; + } + + interface DivNode extends BaseNode, AdjacentAwareNode { + type: "div"; + } + + interface FunctionNode extends BaseNode, ClosableNode, AdjacentAwareNode { + type: "function"; + + /** + * Nodes inside the function + */ + nodes: Node[]; + } + + interface SpaceNode extends BaseNode { + type: "space"; + } + + interface StringNode extends BaseNode, ClosableNode { + type: "string"; + + /** + * The quote type delimiting the string + */ + quote: '"' | "'"; + } + + interface UnicodeRangeNode extends BaseNode { + type: "unicode-range"; + } + + interface WordNode extends BaseNode { + type: "word"; + } + + /** + * Any node parsed from a CSS value + */ + type Node = + | CommentNode + | DivNode + | FunctionNode + | SpaceNode + | StringNode + | UnicodeRangeNode + | WordNode; + + interface CustomStringifierCallback { + /** + * @param node The node to stringify + * @returns The serialized CSS representation of the node + */ + (nodes: Node): string | undefined; + } + + interface WalkCallback { + /** + * @param node The currently visited node + * @param index The index of the node in the series of parsed nodes + * @param nodes The series of parsed nodes + * @returns Returning `false` will prevent traversal of descendant nodes (only applies if `bubble` was set to `true` in the `walk()` call) + */ + (node: Node, index: number, nodes: Node[]): void | boolean; + } + + /** + * A CSS dimension, decomposed into its numeric and unit parts + */ + interface Dimension { + number: string; + unit: string; + } + + /** + * A wrapper around a parsed CSS value that allows for inspecting and walking nodes + */ + interface ParsedValue { + /** + * The series of parsed nodes + */ + nodes: Node[]; + + /** + * Walk all parsed nodes, applying a callback + * + * @param callback A visitor callback that will be executed for each node + * @param bubble When set to `true`, walking will be done inside-out instead of outside-in + */ + walk(callback: WalkCallback, bubble?: boolean): this; + } + + interface ValueParser { + /** + * Decompose a CSS dimension into its numeric and unit part + * + * @param value The dimension to decompose + * @returns An object representing `number` and `unit` part of the dimension or `false` if the decomposing fails + */ + unit(value: string): Dimension | false; + + /** + * Serialize a series of nodes into a CSS value + * + * @param nodes The nodes to stringify + * @param custom A custom stringifier callback + * @returns The generated CSS value + */ + stringify(nodes: Node | Node[], custom?: CustomStringifierCallback): string; + + /** + * Walk a series of nodes, applying a callback + * + * @param nodes The nodes to walk + * @param callback A visitor callback that will be executed for each node + * @param bubble When set to `true`, walking will be done inside-out instead of outside-in + */ + walk(nodes: Node[], callback: WalkCallback, bubble?: boolean): void; + + /** + * Parse a CSS value into a series of nodes to operate on + * + * @param value The value to parse + */ + new (value: string): ParsedValue; + + /** + * Parse a CSS value into a series of nodes to operate on + * + * @param value The value to parse + */ + (value: string): ParsedValue; + } +} + +declare const postcssValueParser: postcssValueParser.ValueParser; + +export = postcssValueParser; diff --git a/node_modules/postcss-value-parser/lib/index.js b/node_modules/postcss-value-parser/lib/index.js new file mode 100644 index 0000000..f9ac0e6 --- /dev/null +++ b/node_modules/postcss-value-parser/lib/index.js @@ -0,0 +1,28 @@ +var parse = require("./parse"); +var walk = require("./walk"); +var stringify = require("./stringify"); + +function ValueParser(value) { + if (this instanceof ValueParser) { + this.nodes = parse(value); + return this; + } + return new ValueParser(value); +} + +ValueParser.prototype.toString = function() { + return Array.isArray(this.nodes) ? stringify(this.nodes) : ""; +}; + +ValueParser.prototype.walk = function(cb, bubble) { + walk(this.nodes, cb, bubble); + return this; +}; + +ValueParser.unit = require("./unit"); + +ValueParser.walk = walk; + +ValueParser.stringify = stringify; + +module.exports = ValueParser; diff --git a/node_modules/postcss-value-parser/lib/parse.js b/node_modules/postcss-value-parser/lib/parse.js new file mode 100644 index 0000000..950631c --- /dev/null +++ b/node_modules/postcss-value-parser/lib/parse.js @@ -0,0 +1,321 @@ +var openParentheses = "(".charCodeAt(0); +var closeParentheses = ")".charCodeAt(0); +var singleQuote = "'".charCodeAt(0); +var doubleQuote = '"'.charCodeAt(0); +var backslash = "\\".charCodeAt(0); +var slash = "/".charCodeAt(0); +var comma = ",".charCodeAt(0); +var colon = ":".charCodeAt(0); +var star = "*".charCodeAt(0); +var uLower = "u".charCodeAt(0); +var uUpper = "U".charCodeAt(0); +var plus = "+".charCodeAt(0); +var isUnicodeRange = /^[a-f0-9?-]+$/i; + +module.exports = function(input) { + var tokens = []; + var value = input; + + var next, + quote, + prev, + token, + escape, + escapePos, + whitespacePos, + parenthesesOpenPos; + var pos = 0; + var code = value.charCodeAt(pos); + var max = value.length; + var stack = [{ nodes: tokens }]; + var balanced = 0; + var parent; + + var name = ""; + var before = ""; + var after = ""; + + while (pos < max) { + // Whitespaces + if (code <= 32) { + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + token = value.slice(pos, next); + + prev = tokens[tokens.length - 1]; + if (code === closeParentheses && balanced) { + after = token; + } else if (prev && prev.type === "div") { + prev.after = token; + prev.sourceEndIndex += token.length; + } else if ( + code === comma || + code === colon || + (code === slash && + value.charCodeAt(next + 1) !== star && + (!parent || + (parent && parent.type === "function" && parent.value !== "calc"))) + ) { + before = token; + } else { + tokens.push({ + type: "space", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + + // Quotes + } else if (code === singleQuote || code === doubleQuote) { + next = pos; + quote = code === singleQuote ? "'" : '"'; + token = { + type: "string", + sourceIndex: pos, + quote: quote + }; + do { + escape = false; + next = value.indexOf(quote, next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += quote; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + token.value = value.slice(pos + 1, next); + token.sourceEndIndex = token.unclosed ? next : next + 1; + tokens.push(token); + pos = next + 1; + code = value.charCodeAt(pos); + + // Comments + } else if (code === slash && value.charCodeAt(pos + 1) === star) { + next = value.indexOf("*/", pos); + + token = { + type: "comment", + sourceIndex: pos, + sourceEndIndex: next + 2 + }; + + if (next === -1) { + token.unclosed = true; + next = value.length; + token.sourceEndIndex = next; + } + + token.value = value.slice(pos + 2, next); + tokens.push(token); + + pos = next + 2; + code = value.charCodeAt(pos); + + // Operation within calc + } else if ( + (code === slash || code === star) && + parent && + parent.type === "function" && + parent.value === "calc" + ) { + token = value[pos]; + tokens.push({ + type: "word", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token + }); + pos += 1; + code = value.charCodeAt(pos); + + // Dividers + } else if (code === slash || code === comma || code === colon) { + token = value[pos]; + + tokens.push({ + type: "div", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token, + before: before, + after: "" + }); + before = ""; + + pos += 1; + code = value.charCodeAt(pos); + + // Open parentheses + } else if (openParentheses === code) { + // Whitespaces after open parentheses + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + parenthesesOpenPos = pos; + token = { + type: "function", + sourceIndex: pos - name.length, + value: name, + before: value.slice(parenthesesOpenPos + 1, next) + }; + pos = next; + + if (name === "url" && code !== singleQuote && code !== doubleQuote) { + next -= 1; + do { + escape = false; + next = value.indexOf(")", next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += ")"; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + // Whitespaces before closed + whitespacePos = next; + do { + whitespacePos -= 1; + code = value.charCodeAt(whitespacePos); + } while (code <= 32); + if (parenthesesOpenPos < whitespacePos) { + if (pos !== whitespacePos + 1) { + token.nodes = [ + { + type: "word", + sourceIndex: pos, + sourceEndIndex: whitespacePos + 1, + value: value.slice(pos, whitespacePos + 1) + } + ]; + } else { + token.nodes = []; + } + if (token.unclosed && whitespacePos + 1 !== next) { + token.after = ""; + token.nodes.push({ + type: "space", + sourceIndex: whitespacePos + 1, + sourceEndIndex: next, + value: value.slice(whitespacePos + 1, next) + }); + } else { + token.after = value.slice(whitespacePos + 1, next); + token.sourceEndIndex = next; + } + } else { + token.after = ""; + token.nodes = []; + } + pos = next + 1; + token.sourceEndIndex = token.unclosed ? next : pos; + code = value.charCodeAt(pos); + tokens.push(token); + } else { + balanced += 1; + token.after = ""; + token.sourceEndIndex = pos + 1; + tokens.push(token); + stack.push(token); + tokens = token.nodes = []; + parent = token; + } + name = ""; + + // Close parentheses + } else if (closeParentheses === code && balanced) { + pos += 1; + code = value.charCodeAt(pos); + + parent.after = after; + parent.sourceEndIndex += after.length; + after = ""; + balanced -= 1; + stack[stack.length - 1].sourceEndIndex = pos; + stack.pop(); + parent = stack[balanced]; + tokens = parent.nodes; + + // Words + } else { + next = pos; + do { + if (code === backslash) { + next += 1; + } + next += 1; + code = value.charCodeAt(next); + } while ( + next < max && + !( + code <= 32 || + code === singleQuote || + code === doubleQuote || + code === comma || + code === colon || + code === slash || + code === openParentheses || + (code === star && + parent && + parent.type === "function" && + parent.value === "calc") || + (code === slash && + parent.type === "function" && + parent.value === "calc") || + (code === closeParentheses && balanced) + ) + ); + token = value.slice(pos, next); + + if (openParentheses === code) { + name = token; + } else if ( + (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && + plus === token.charCodeAt(1) && + isUnicodeRange.test(token.slice(2)) + ) { + tokens.push({ + type: "unicode-range", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } else { + tokens.push({ + type: "word", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + } + } + + for (pos = stack.length - 1; pos; pos -= 1) { + stack[pos].unclosed = true; + stack[pos].sourceEndIndex = value.length; + } + + return stack[0].nodes; +}; diff --git a/node_modules/postcss-value-parser/lib/stringify.js b/node_modules/postcss-value-parser/lib/stringify.js new file mode 100644 index 0000000..6079671 --- /dev/null +++ b/node_modules/postcss-value-parser/lib/stringify.js @@ -0,0 +1,48 @@ +function stringifyNode(node, custom) { + var type = node.type; + var value = node.value; + var buf; + var customResult; + + if (custom && (customResult = custom(node)) !== undefined) { + return customResult; + } else if (type === "word" || type === "space") { + return value; + } else if (type === "string") { + buf = node.quote || ""; + return buf + value + (node.unclosed ? "" : buf); + } else if (type === "comment") { + return "/*" + value + (node.unclosed ? "" : "*/"); + } else if (type === "div") { + return (node.before || "") + value + (node.after || ""); + } else if (Array.isArray(node.nodes)) { + buf = stringify(node.nodes, custom); + if (type !== "function") { + return buf; + } + return ( + value + + "(" + + (node.before || "") + + buf + + (node.after || "") + + (node.unclosed ? "" : ")") + ); + } + return value; +} + +function stringify(nodes, custom) { + var result, i; + + if (Array.isArray(nodes)) { + result = ""; + for (i = nodes.length - 1; ~i; i -= 1) { + result = stringifyNode(nodes[i], custom) + result; + } + return result; + } + return stringifyNode(nodes, custom); +} + +module.exports = stringify; diff --git a/node_modules/postcss-value-parser/lib/unit.js b/node_modules/postcss-value-parser/lib/unit.js new file mode 100644 index 0000000..c349661 --- /dev/null +++ b/node_modules/postcss-value-parser/lib/unit.js @@ -0,0 +1,120 @@ +var minus = "-".charCodeAt(0); +var plus = "+".charCodeAt(0); +var dot = ".".charCodeAt(0); +var exp = "e".charCodeAt(0); +var EXP = "E".charCodeAt(0); + +// Check if three code points would start a number +// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number +function likeNumber(value) { + var code = value.charCodeAt(0); + var nextCode; + + if (code === plus || code === minus) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + var nextNextCode = value.charCodeAt(2); + + if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { + return true; + } + + return false; + } + + if (code === dot) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + return false; + } + + if (code >= 48 && code <= 57) { + return true; + } + + return false; +} + +// Consume a number +// https://www.w3.org/TR/css-syntax-3/#consume-number +module.exports = function(value) { + var pos = 0; + var length = value.length; + var code; + var nextCode; + var nextNextCode; + + if (length === 0 || !likeNumber(value)) { + return false; + } + + code = value.charCodeAt(pos); + + if (code === plus || code === minus) { + pos++; + } + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + + if (code === dot && nextCode >= 48 && nextCode <= 57) { + pos += 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + nextNextCode = value.charCodeAt(pos + 2); + + if ( + (code === exp || code === EXP) && + ((nextCode >= 48 && nextCode <= 57) || + ((nextCode === plus || nextCode === minus) && + nextNextCode >= 48 && + nextNextCode <= 57)) + ) { + pos += nextCode === plus || nextCode === minus ? 3 : 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + return { + number: value.slice(0, pos), + unit: value.slice(pos) + }; +}; diff --git a/node_modules/postcss-value-parser/lib/walk.js b/node_modules/postcss-value-parser/lib/walk.js new file mode 100644 index 0000000..7666c5b --- /dev/null +++ b/node_modules/postcss-value-parser/lib/walk.js @@ -0,0 +1,22 @@ +module.exports = function walk(nodes, cb, bubble) { + var i, max, node, result; + + for (i = 0, max = nodes.length; i < max; i += 1) { + node = nodes[i]; + if (!bubble) { + result = cb(node, i, nodes); + } + + if ( + result !== false && + node.type === "function" && + Array.isArray(node.nodes) + ) { + walk(node.nodes, cb, bubble); + } + + if (bubble) { + cb(node, i, nodes); + } + } +}; diff --git a/node_modules/postcss-value-parser/package.json b/node_modules/postcss-value-parser/package.json new file mode 100644 index 0000000..02d744a --- /dev/null +++ b/node_modules/postcss-value-parser/package.json @@ -0,0 +1,58 @@ +{ + "name": "postcss-value-parser", + "version": "4.2.0", + "description": "Transforms css values and at-rule params into the tree", + "main": "lib/index.js", + "files": [ + "lib" + ], + "devDependencies": { + "eslint": "^5.16.0", + "husky": "^2.3.0", + "lint-staged": "^8.1.7", + "prettier": "^1.17.1", + "tap-spec": "^5.0.0", + "tape": "^4.10.2" + }, + "scripts": { + "lint:prettier": "prettier \"**/*.js\" \"**/*.ts\" --list-different", + "lint:js": "eslint . --cache", + "lint": "yarn lint:js && yarn lint:prettier", + "pretest": "yarn lint", + "test": "tape test/*.js | tap-spec" + }, + "eslintConfig": { + "env": { + "es6": true, + "node": true + }, + "extends": "eslint:recommended" + }, + "lint-staged": { + "*.js": [ + "eslint", + "prettier --write", + "git add" + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "author": "Bogdan Chadkin ", + "license": "MIT", + "homepage": "https://github.com/TrySound/postcss-value-parser", + "repository": { + "type": "git", + "url": "https://github.com/TrySound/postcss-value-parser.git" + }, + "keywords": [ + "postcss", + "value", + "parser" + ], + "bugs": { + "url": "https://github.com/TrySound/postcss-value-parser/issues" + } +} diff --git a/node_modules/postcss/LICENSE b/node_modules/postcss/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/node_modules/postcss/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/postcss/README.md b/node_modules/postcss/README.md new file mode 100644 index 0000000..9b646dd --- /dev/null +++ b/node_modules/postcss/README.md @@ -0,0 +1,28 @@ +# PostCSS + +Philosopher’s stone, logo of PostCSS + +PostCSS is a tool for transforming styles with JS plugins. +These plugins can lint your CSS, support variables and mixins, +transpile future CSS syntax, inline images, and more. + +PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, +and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins is one of the most popular CSS tools. + +--- + +  Made in Evil Martians, product consulting for developer tools. + +--- + +[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree +[Evil Martians]: https://evilmartians.com/?utm_source=postcss +[Autoprefixer]: https://github.com/postcss/autoprefixer +[Stylelint]: https://stylelint.io/ +[plugins]: https://github.com/postcss/postcss#plugins + + +## Docs +Read full docs **[here](https://postcss.org/)**. diff --git a/node_modules/postcss/lib/at-rule.d.ts b/node_modules/postcss/lib/at-rule.d.ts new file mode 100644 index 0000000..5bdee38 --- /dev/null +++ b/node_modules/postcss/lib/at-rule.d.ts @@ -0,0 +1,137 @@ +import Container, { + ContainerProps, + ContainerWithChildren +} from './container.js' + +declare namespace AtRule { + export interface AtRuleRaws extends Record { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space between the at-rule name and its parameters. + */ + afterName?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the last parameter and `{` for rules. + */ + between?: string + + /** + * The rule’s selector with comments. + */ + params?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface AtRuleProps extends ContainerProps { + /** Name of the at-rule. */ + name: string + /** Parameters following the name of the at-rule. */ + params?: number | string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: AtRuleRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { AtRule_ as default } +} + +/** + * Represents an at-rule. + * + * ```js + * Once (root, { AtRule }) { + * let media = new AtRule({ name: 'media', params: 'print' }) + * media.append(…) + * root.append(media) + * } + * ``` + * + * If it’s followed in the CSS by a `{}` block, this node will have + * a nodes property representing its children. + * + * ```js + * const root = postcss.parse('@charset "UTF-8"; @media print {}') + * + * const charset = root.first + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last + * media.nodes //=> [] + * ``` + */ +declare class AtRule_ extends Container { + /** + * The at-rule’s name immediately follows the `@`. + * + * ```js + * const root = postcss.parse('@media print {}') + * const media = root.first + * media.name //=> 'media' + * ``` + */ + name: string + /** + * An array containing the layer’s children. + * + * ```js + * const root = postcss.parse('@layer example { a { color: black } }') + * const layer = root.first + * layer.nodes.length //=> 1 + * layer.nodes[0].selector //=> 'a' + * ``` + * + * Can be `undefinded` if the at-rule has no body. + * + * ```js + * const root = postcss.parse('@layer a, b, c;') + * const layer = root.first + * layer.nodes //=> undefined + * ``` + */ + nodes: Container['nodes'] + /** + * The at-rule’s parameters, the values that follow the at-rule’s name + * but precede any `{}` block. + * + * ```js + * const root = postcss.parse('@media print, screen {}') + * const media = root.first + * media.params //=> 'print, screen' + * ``` + */ + params: string + parent: ContainerWithChildren | undefined + + raws: AtRule.AtRuleRaws + + type: 'atrule' + + constructor(defaults?: AtRule.AtRuleProps) + assign(overrides: AtRule.AtRuleProps | object): this + clone(overrides?: Partial): AtRule + cloneAfter(overrides?: Partial): AtRule + cloneBefore(overrides?: Partial): AtRule +} + +declare class AtRule extends AtRule_ {} + +export = AtRule diff --git a/node_modules/postcss/lib/at-rule.js b/node_modules/postcss/lib/at-rule.js new file mode 100644 index 0000000..9486447 --- /dev/null +++ b/node_modules/postcss/lib/at-rule.js @@ -0,0 +1,25 @@ +'use strict' + +let Container = require('./container') + +class AtRule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'atrule' + } + + append(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.append(...children) + } + + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.prepend(...children) + } +} + +module.exports = AtRule +AtRule.default = AtRule + +Container.registerAtRule(AtRule) diff --git a/node_modules/postcss/lib/comment.d.ts b/node_modules/postcss/lib/comment.d.ts new file mode 100644 index 0000000..d244508 --- /dev/null +++ b/node_modules/postcss/lib/comment.d.ts @@ -0,0 +1,67 @@ +import Container from './container.js' +import Node, { NodeProps } from './node.js' + +declare namespace Comment { + export interface CommentRaws extends Record { + /** + * The space symbols before the node. + */ + before?: string + + /** + * The space symbols between `/*` and the comment’s text. + */ + left?: string + + /** + * The space symbols between the comment’s text. + */ + right?: string + } + + export interface CommentProps extends NodeProps { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: CommentRaws + /** Content of the comment. */ + text: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Comment_ as default } +} + +/** + * It represents a class that handles + * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments) + * + * ```js + * Once (root, { Comment }) { + * const note = new Comment({ text: 'Note: …' }) + * root.append(note) + * } + * ``` + * + * Remember that CSS comments inside selectors, at-rule parameters, + * or declaration values will be stored in the `raws` properties + * explained above. + */ +declare class Comment_ extends Node { + parent: Container | undefined + raws: Comment.CommentRaws + /** + * The comment's text. + */ + text: string + + type: 'comment' + + constructor(defaults?: Comment.CommentProps) + assign(overrides: Comment.CommentProps | object): this + clone(overrides?: Partial): Comment + cloneAfter(overrides?: Partial): Comment + cloneBefore(overrides?: Partial): Comment +} + +declare class Comment extends Comment_ {} + +export = Comment diff --git a/node_modules/postcss/lib/comment.js b/node_modules/postcss/lib/comment.js new file mode 100644 index 0000000..c566506 --- /dev/null +++ b/node_modules/postcss/lib/comment.js @@ -0,0 +1,13 @@ +'use strict' + +let Node = require('./node') + +class Comment extends Node { + constructor(defaults) { + super(defaults) + this.type = 'comment' + } +} + +module.exports = Comment +Comment.default = Comment diff --git a/node_modules/postcss/lib/container.d.ts b/node_modules/postcss/lib/container.d.ts new file mode 100644 index 0000000..d16b85d --- /dev/null +++ b/node_modules/postcss/lib/container.d.ts @@ -0,0 +1,490 @@ +import AtRule from './at-rule.js' +import Comment from './comment.js' +import Declaration from './declaration.js' +import Node, { ChildNode, ChildProps, NodeProps } from './node.js' +import Rule from './rule.js' + +declare namespace Container { + export class ContainerWithChildren< + Child extends Node = ChildNode + > extends Container_ { + nodes: Child[] + } + + export interface ValueOptions { + /** + * String that’s used to narrow down values and speed up the regexp search. + */ + fast?: string + + /** + * An array of property names. + */ + props?: string[] + } + + export interface ContainerProps extends NodeProps { + nodes?: (ChildNode | ChildProps)[] + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Container_ as default } +} + +/** + * The `Root`, `AtRule`, and `Rule` container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + */ +declare abstract class Container_ extends Node { + /** + * An array containing the container’s children. + * + * ```js + * const root = postcss.parse('a { color: black }') + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + * ``` + */ + nodes: Child[] | undefined + + /** + * Inserts new nodes to the end of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.append(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + append( + ...nodes: ( + | ChildProps + | ChildProps[] + | Node + | Node[] + | string + | string[] + | undefined + )[] + ): this + + assign(overrides: Container.ContainerProps | object): this + clone(overrides?: Partial): Container + cloneAfter(overrides?: Partial): Container + cloneBefore(overrides?: Partial): Container + + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use `Container#walk`. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * ```js + * const root = postcss.parse('a { color: black; z-index: 1 }') + * const rule = root.first + * + * for (const decl of rule.nodes) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Will be executed only for color and z-index + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + each( + callback: (node: Child, index: number) => false | void + ): false | undefined + + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * ```js + * const noPrefixes = rule.every(i => i.prop[0] !== '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is every child pass condition. + */ + every( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + /** + * Returns a `child`’s index within the `Container#nodes` array. + * + * ```js + * rule.index( rule.nodes[2] ) //=> 2 + * ``` + * + * @param child Child of the current container. + * @return Child index. + */ + index(child: Child | number): number + + /** + * Insert new node after old node within the container. + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertAfter( + oldNode: Child | number, + newNode: + | Child + | Child[] + | ChildProps + | ChildProps[] + | string + | string[] + | undefined + ): this + /** + * Insert new node before old node within the container. + * + * ```js + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })) + * ``` + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertBefore( + oldNode: Child | number, + newNode: + | Child + | Child[] + | ChildProps + | ChildProps[] + | string + | string[] + | undefined + ): this + + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkComments(comment => { + * comment.remove() + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + + /** + * Inserts new nodes to the start of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.prepend(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + prepend( + ...nodes: ( + | ChildProps + | ChildProps[] + | Node + | Node[] + | string + | string[] + | undefined + )[] + ): this + /** + * Add child to the end of the node. + * + * ```js + * rule.push(new Declaration({ prop: 'color', value: 'black' })) + * ``` + * + * @param child New node. + * @return This node for methods chain. + */ + push(child: Child): this + + /** + * Removes all children from the container + * and cleans their parent properties. + * + * ```js + * rule.removeAll() + * rule.nodes.length //=> 0 + * ``` + * + * @return This node for methods chain. + */ + removeAll(): this + + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * ```js + * rule.nodes.length //=> 5 + * rule.removeChild(decl) + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + * ``` + * + * @param child Child or child’s index. + * @return This node for methods chain. + */ + removeChild(child: Child | number): this + + replaceValues( + pattern: RegExp | string, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * ```js + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px' + * }) + * ``` + * + * @param pattern Replace pattern. + * @param {object} opts Options to speed up the search. + * @param callback String to replace pattern or callback + * that returns a new value. The callback + * will receive the same arguments + * as those passed to a function parameter + * of `String#replace`. + * @return This node for methods chain. + */ + replaceValues( + pattern: RegExp | string, + options: Container.ValueOptions, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * ```js + * const hasPrefix = rule.some(i => i.prop[0] === '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is some child pass condition. + */ + some( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use `Container#each`. + * + * ```js + * root.walk(node => { + * // Traverses all descendant nodes. + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walk( + callback: (node: ChildNode, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkAtRules(rule => { + * if (isOld(rule.name)) rule.remove() + * }) + * + * let first = false + * root.walkAtRules('charset', rule => { + * if (!first) { + * first = true + * } else { + * rule.remove() + * } + * }) + * ``` + * + * @param name String or regular expression to filter at-rules by name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkAtRules( + nameFilter: RegExp | string, + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + + walkAtRules( + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * ```js + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop) + * }) + * + * root.walkDecls('border-radius', decl => { + * decl.remove() + * }) + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value) + * }) + * ``` + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param prop String or regular expression to filter declarations + * by property name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkDecls( + propFilter: RegExp | string, + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + walkDecls( + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * const selectors = [] + * root.walkRules(rule => { + * selectors.push(rule.selector) + * }) + * console.log(`Your CSS uses ${ selectors.length } selectors`) + * ``` + * + * @param selector String or regular expression to filter rules by selector. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkRules( + selectorFilter: RegExp | string, + callback: (rule: Rule, index: number) => false | void + ): false | undefined + walkRules( + callback: (rule: Rule, index: number) => false | void + ): false | undefined + /** + * The container’s first child. + * + * ```js + * rule.first === rules.nodes[0] + * ``` + */ + get first(): Child | undefined + /** + * The container’s last child. + * + * ```js + * rule.last === rule.nodes[rule.nodes.length - 1] + * ``` + */ + get last(): Child | undefined +} + +declare class Container< + Child extends Node = ChildNode +> extends Container_ {} + +export = Container diff --git a/node_modules/postcss/lib/container.js b/node_modules/postcss/lib/container.js new file mode 100644 index 0000000..462e3f0 --- /dev/null +++ b/node_modules/postcss/lib/container.js @@ -0,0 +1,441 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let Declaration = require('./declaration') +let Comment = require('./comment') +let Node = require('./node') + +let parse, Rule, AtRule, Root + +function cleanSource(nodes) { + return nodes.map(i => { + if (i.nodes) i.nodes = cleanSource(i.nodes) + delete i.source + return i + }) +} + +function markDirtyUp(node) { + node[isClean] = false + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes) { + markDirtyUp(i) + } + } +} + +class Container extends Node { + append(...children) { + for (let child of children) { + let nodes = this.normalize(child, this.last) + for (let node of nodes) this.proxyOf.nodes.push(node) + } + + this.markDirty() + + return this + } + + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween) + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween) + } + } + + each(callback) { + if (!this.proxyOf.nodes) return undefined + let iterator = this.getIterator() + + let index, result + while (this.indexes[iterator] < this.proxyOf.nodes.length) { + index = this.indexes[iterator] + result = callback(this.proxyOf.nodes[index], index) + if (result === false) break + + this.indexes[iterator] += 1 + } + + delete this.indexes[iterator] + return result + } + + every(condition) { + return this.nodes.every(condition) + } + + getIterator() { + if (!this.lastEach) this.lastEach = 0 + if (!this.indexes) this.indexes = {} + + this.lastEach += 1 + let iterator = this.lastEach + this.indexes[iterator] = 0 + + return iterator + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (!node[prop]) { + return node[prop] + } else if ( + prop === 'each' || + (typeof prop === 'string' && prop.startsWith('walk')) + ) { + return (...args) => { + return node[prop]( + ...args.map(i => { + if (typeof i === 'function') { + return (child, index) => i(child.toProxy(), index) + } else { + return i + } + }) + ) + } + } else if (prop === 'every' || prop === 'some') { + return cb => { + return node[prop]((child, ...other) => + cb(child.toProxy(), ...other) + ) + } + } else if (prop === 'root') { + return () => node.root().toProxy() + } else if (prop === 'nodes') { + return node.nodes.map(i => i.toProxy()) + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty() + } + return true + } + } + } + + index(child) { + if (typeof child === 'number') return child + if (child.proxyOf) child = child.proxyOf + return this.proxyOf.nodes.indexOf(child) + } + + insertAfter(exist, add) { + let existIndex = this.index(exist) + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex < index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + insertBefore(exist, add) { + let existIndex = this.index(exist) + let type = existIndex === 0 ? 'prepend' : false + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex <= index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse(nodes).nodes) + } else if (typeof nodes === 'undefined') { + nodes = [] + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type) { + nodes = [nodes] + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation') + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value) + } + nodes = [new Declaration(nodes)] + } else if (nodes.selector) { + nodes = [new Rule(nodes)] + } else if (nodes.name) { + nodes = [new AtRule(nodes)] + } else if (nodes.text) { + nodes = [new Comment(nodes)] + } else { + throw new Error('Unknown node type in node creation') + } + + let processed = nodes.map(i => { + /* c8 ignore next */ + if (!i[my]) Container.rebuild(i) + i = i.proxyOf + if (i.parent) i.parent.removeChild(i) + if (i[isClean]) markDirtyUp(i) + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, '') + } + } + i.parent = this.proxyOf + return i + }) + + return processed + } + + prepend(...children) { + children = children.reverse() + for (let child of children) { + let nodes = this.normalize(child, this.first, 'prepend').reverse() + for (let node of nodes) this.proxyOf.nodes.unshift(node) + for (let id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length + } + } + + this.markDirty() + + return this + } + + push(child) { + child.parent = this + this.proxyOf.nodes.push(child) + return this + } + + removeAll() { + for (let node of this.proxyOf.nodes) node.parent = undefined + this.proxyOf.nodes = [] + + this.markDirty() + + return this + } + + removeChild(child) { + child = this.index(child) + this.proxyOf.nodes[child].parent = undefined + this.proxyOf.nodes.splice(child, 1) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (index >= child) { + this.indexes[id] = index - 1 + } + } + + this.markDirty() + + return this + } + + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts + opts = {} + } + + this.walkDecls(decl => { + if (opts.props && !opts.props.includes(decl.prop)) return + if (opts.fast && !decl.value.includes(opts.fast)) return + + decl.value = decl.value.replace(pattern, callback) + }) + + this.markDirty() + + return this + } + + some(condition) { + return this.nodes.some(condition) + } + + walk(callback) { + return this.each((child, i) => { + let result + try { + result = callback(child, i) + } catch (e) { + throw child.addToError(e) + } + if (result !== false && child.walk) { + result = child.walk(callback) + } + + return result + }) + } + + walkAtRules(name, callback) { + if (!callback) { + callback = name + return this.walk((child, i) => { + if (child.type === 'atrule') { + return callback(child, i) + } + }) + } + if (name instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i) + } + }) + } + + walkComments(callback) { + return this.walk((child, i) => { + if (child.type === 'comment') { + return callback(child, i) + } + }) + } + + walkDecls(prop, callback) { + if (!callback) { + callback = prop + return this.walk((child, i) => { + if (child.type === 'decl') { + return callback(child, i) + } + }) + } + if (prop instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i) + } + }) + } + + walkRules(selector, callback) { + if (!callback) { + callback = selector + + return this.walk((child, i) => { + if (child.type === 'rule') { + return callback(child, i) + } + }) + } + if (selector instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i) + } + }) + } + + get first() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[0] + } + + get last() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] + } +} + +Container.registerParse = dependant => { + parse = dependant +} + +Container.registerRule = dependant => { + Rule = dependant +} + +Container.registerAtRule = dependant => { + AtRule = dependant +} + +Container.registerRoot = dependant => { + Root = dependant +} + +module.exports = Container +Container.default = Container + +/* c8 ignore start */ +Container.rebuild = node => { + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule.prototype) + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule.prototype) + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration.prototype) + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment.prototype) + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root.prototype) + } + + node[my] = true + + if (node.nodes) { + node.nodes.forEach(child => { + Container.rebuild(child) + }) + } +} +/* c8 ignore stop */ diff --git a/node_modules/postcss/lib/css-syntax-error.d.ts b/node_modules/postcss/lib/css-syntax-error.d.ts new file mode 100644 index 0000000..d2d11bf --- /dev/null +++ b/node_modules/postcss/lib/css-syntax-error.d.ts @@ -0,0 +1,248 @@ +import { FilePosition } from './input.js' + +declare namespace CssSyntaxError { + /** + * A position that is part of a range. + */ + export interface RangePosition { + /** + * The column number in the input. + */ + column: number + + /** + * The line number in the input. + */ + line: number + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { CssSyntaxError_ as default } +} + +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the `Node#error` method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * ```js + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }) + * ``` + * + * ```js + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * } + * ``` + */ +declare class CssSyntaxError_ { + /** + * Source column of the error. + * + * ```js + * error.column //=> 1 + * error.input.column //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.column`. + */ + column?: number + + /** + * Source column of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endColumn //=> 1 + * error.input.endColumn //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endColumn`. + */ + endColumn?: number + + /** + * Source line of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endLine //=> 3 + * error.input.endLine //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endLine`. + */ + endLine?: number + + /** + * Absolute path to the broken file. + * + * ```js + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.file`. + */ + file?: string + + /** + * Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * ```js + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + * ``` + */ + input?: FilePosition + + /** + * Source line of the error. + * + * ```js + * error.line //=> 2 + * error.input.line //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.line`. + */ + line?: number + + /** + * Full error text in the GNU error format + * with plugin, file, line and column. + * + * ```js + * error.message //=> 'a.css:1:1: Unclosed block' + * ``` + */ + message: string + + /** + * Always equal to `'CssSyntaxError'`. You should always check error type + * by `error.name === 'CssSyntaxError'` + * instead of `error instanceof CssSyntaxError`, + * because npm could have several PostCSS versions. + * + * ```js + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * ``` + */ + name: 'CssSyntaxError' + + /** + * Plugin name, if error came from plugin. + * + * ```js + * error.plugin //=> 'postcss-vars' + * ``` + */ + plugin?: string + + /** + * Error message. + * + * ```js + * error.message //=> 'Unclosed block' + * ``` + */ + reason: string + + /** + * Source code of the broken file. + * + * ```js + * error.source //=> 'a { b {} }' + * error.input.source //=> 'a b { }' + * ``` + */ + source?: string + + stack: string + + /** + * Instantiates a CSS syntax error. Can be instantiated for a single position + * or for a range. + * @param message Error message. + * @param lineOrStartPos If for a single position, the line number, or if for + * a range, the inclusive start position of the error. + * @param columnOrEndPos If for a single position, the column number, or if for + * a range, the exclusive end position of the error. + * @param source Source code of the broken file. + * @param file Absolute path to the broken file. + * @param plugin PostCSS plugin name, if error came from plugin. + */ + constructor( + message: string, + lineOrStartPos?: CssSyntaxError.RangePosition | number, + columnOrEndPos?: CssSyntaxError.RangePosition | number, + source?: string, + file?: string, + plugin?: string + ) + + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * ```js + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * ``` + * + * @param color Whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * @return Few lines of CSS source that caused the error. + */ + showSourceCode(color?: boolean): string + + /** + * Returns error position, message and source code of the broken part. + * + * ```js + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * ``` + * + * @return Error position, message and source code. + */ + toString(): string +} + +declare class CssSyntaxError extends CssSyntaxError_ {} + +export = CssSyntaxError diff --git a/node_modules/postcss/lib/css-syntax-error.js b/node_modules/postcss/lib/css-syntax-error.js new file mode 100644 index 0000000..1693033 --- /dev/null +++ b/node_modules/postcss/lib/css-syntax-error.js @@ -0,0 +1,100 @@ +'use strict' + +let pico = require('picocolors') + +let terminalHighlight = require('./terminal-highlight') + +class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin) { + super(message) + this.name = 'CssSyntaxError' + this.reason = message + + if (file) { + this.file = file + } + if (source) { + this.source = source + } + if (plugin) { + this.plugin = plugin + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line + this.column = column + } else { + this.line = line.line + this.column = line.column + this.endLine = column.line + this.endColumn = column.column + } + } + + this.setMessage() + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError) + } + } + + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : '' + this.message += this.file ? this.file : '' + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column + } + this.message += ': ' + this.reason + } + + showSourceCode(color) { + if (!this.source) return '' + + let css = this.source + if (color == null) color = pico.isColorSupported + if (terminalHighlight) { + if (color) css = terminalHighlight(css) + } + + let lines = css.split(/\r?\n/) + let start = Math.max(this.line - 3, 0) + let end = Math.min(this.line + 2, lines.length) + + let maxWidth = String(end).length + + let mark, aside + if (color) { + let { bold, gray, red } = pico.createColors(true) + mark = text => bold(red(text)) + aside = text => gray(text) + } else { + mark = aside = str => str + } + + return lines + .slice(start, end) + .map((line, index) => { + let number = start + 1 + index + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' + if (number === this.line) { + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') + } + return ' ' + aside(gutter) + line + }) + .join('\n') + } + + toString() { + let code = this.showSourceCode() + if (code) { + code = '\n\n' + code + '\n' + } + return this.name + ': ' + this.message + code + } +} + +module.exports = CssSyntaxError +CssSyntaxError.default = CssSyntaxError diff --git a/node_modules/postcss/lib/declaration.d.ts b/node_modules/postcss/lib/declaration.d.ts new file mode 100644 index 0000000..a5db984 --- /dev/null +++ b/node_modules/postcss/lib/declaration.d.ts @@ -0,0 +1,148 @@ +import { ContainerWithChildren } from './container.js' +import Node from './node.js' + +declare namespace Declaration { + export interface DeclarationRaws extends Record { + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the property and value for declarations. + */ + between?: string + + /** + * The content of the important statement, if it is not just `!important`. + */ + important?: string + + /** + * Declaration value with comments. + */ + value?: { + raw: string + value: string + } + } + + export interface DeclarationProps { + /** Whether the declaration has an `!important` annotation. */ + important?: boolean + /** Name of the declaration. */ + prop: string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: DeclarationRaws + /** Value of the declaration. */ + value: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Declaration_ as default } +} + +/** + * It represents a class that handles + * [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations) + * + * ```js + * Once (root, { Declaration }) { + * const color = new Declaration({ prop: 'color', value: 'black' }) + * root.append(color) + * } + * ``` + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first?.first + * + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + * ``` + */ +declare class Declaration_ extends Node { + /** + * It represents a specificity of the declaration. + * + * If true, the CSS declaration will have an + * [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important) + * specifier. + * + * ```js + * const root = postcss.parse('a { color: black !important; color: red }') + * + * root.first.first.important //=> true + * root.first.last.important //=> undefined + * ``` + */ + important: boolean + + parent: ContainerWithChildren | undefined + + /** + * The property name for a CSS declaration. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.prop //=> 'color' + * ``` + */ + prop: string + + raws: Declaration.DeclarationRaws + + type: 'decl' + + /** + * The property value for a CSS declaration. + * + * Any CSS comments inside the value string will be filtered out. + * CSS comments present in the source value will be available in + * the `raws` property. + * + * Assigning new `value` would ignore the comments in `raws` + * property while compiling node to string. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.value //=> 'black' + * ``` + */ + value: string + + /** + * It represents a getter that returns `true` if a declaration starts with + * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS. + * + * ```js + * const root = postcss.parse(':root { --one: 1 }') + * const one = root.first.first + * + * one.variable //=> true + * ``` + * + * ```js + * const root = postcss.parse('$one: 1') + * const one = root.first + * + * one.variable //=> true + * ``` + */ + variable: boolean + + constructor(defaults?: Declaration.DeclarationProps) + assign(overrides: Declaration.DeclarationProps | object): this + clone(overrides?: Partial): Declaration + cloneAfter(overrides?: Partial): Declaration + cloneBefore(overrides?: Partial): Declaration +} + +declare class Declaration extends Declaration_ {} + +export = Declaration diff --git a/node_modules/postcss/lib/declaration.js b/node_modules/postcss/lib/declaration.js new file mode 100644 index 0000000..a04bdec --- /dev/null +++ b/node_modules/postcss/lib/declaration.js @@ -0,0 +1,24 @@ +'use strict' + +let Node = require('./node') + +class Declaration extends Node { + constructor(defaults) { + if ( + defaults && + typeof defaults.value !== 'undefined' && + typeof defaults.value !== 'string' + ) { + defaults = { ...defaults, value: String(defaults.value) } + } + super(defaults) + this.type = 'decl' + } + + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$' + } +} + +module.exports = Declaration +Declaration.default = Declaration diff --git a/node_modules/postcss/lib/document.d.ts b/node_modules/postcss/lib/document.d.ts new file mode 100644 index 0000000..a368f16 --- /dev/null +++ b/node_modules/postcss/lib/document.d.ts @@ -0,0 +1,69 @@ +import Container, { ContainerProps } from './container.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Document { + export interface DocumentProps extends ContainerProps { + nodes?: Root[] + + /** + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * Every parser saves its own properties. + */ + raws?: Record + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Document_ as default } +} + +/** + * Represents a file and contains all its parsed nodes. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + * + * ```js + * const document = htmlParser( + * '' + * ) + * document.type //=> 'document' + * document.nodes.length //=> 2 + * ``` + */ +declare class Document_ extends Container { + nodes: Root[] + parent: undefined + type: 'document' + + constructor(defaults?: Document.DocumentProps) + + assign(overrides: Document.DocumentProps | object): this + clone(overrides?: Partial): Document + cloneAfter(overrides?: Partial): Document + cloneBefore(overrides?: Partial): Document + + /** + * Returns a `Result` instance representing the document’s CSS roots. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * const document = postcss.document() + * document.append(root1) + * document.append(root2) + * const result = document.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current document’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Document extends Document_ {} + +export = Document diff --git a/node_modules/postcss/lib/document.js b/node_modules/postcss/lib/document.js new file mode 100644 index 0000000..4468991 --- /dev/null +++ b/node_modules/postcss/lib/document.js @@ -0,0 +1,33 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Document extends Container { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }) + + if (!this.nodes) { + this.nodes = [] + } + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + + return lazy.stringify() + } +} + +Document.registerLazyResult = dependant => { + LazyResult = dependant +} + +Document.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Document +Document.default = Document diff --git a/node_modules/postcss/lib/fromJSON.d.ts b/node_modules/postcss/lib/fromJSON.d.ts new file mode 100644 index 0000000..e1deedb --- /dev/null +++ b/node_modules/postcss/lib/fromJSON.d.ts @@ -0,0 +1,9 @@ +import { JSONHydrator } from './postcss.js' + +interface FromJSON extends JSONHydrator { + default: FromJSON +} + +declare const fromJSON: FromJSON + +export = fromJSON diff --git a/node_modules/postcss/lib/fromJSON.js b/node_modules/postcss/lib/fromJSON.js new file mode 100644 index 0000000..09f2b89 --- /dev/null +++ b/node_modules/postcss/lib/fromJSON.js @@ -0,0 +1,54 @@ +'use strict' + +let Declaration = require('./declaration') +let PreviousMap = require('./previous-map') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Input = require('./input') +let Root = require('./root') +let Rule = require('./rule') + +function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON(n)) + + let { inputs: ownInputs, ...defaults } = json + if (ownInputs) { + inputs = [] + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input.prototype } + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + } + } + inputs.push(inputHydrated) + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) + } + if (defaults.source) { + let { inputId, ...source } = defaults.source + defaults.source = source + if (inputId != null) { + defaults.source.input = inputs[inputId] + } + } + if (defaults.type === 'root') { + return new Root(defaults) + } else if (defaults.type === 'decl') { + return new Declaration(defaults) + } else if (defaults.type === 'rule') { + return new Rule(defaults) + } else if (defaults.type === 'comment') { + return new Comment(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } +} + +module.exports = fromJSON +fromJSON.default = fromJSON diff --git a/node_modules/postcss/lib/input.d.ts b/node_modules/postcss/lib/input.d.ts new file mode 100644 index 0000000..c718bd1 --- /dev/null +++ b/node_modules/postcss/lib/input.d.ts @@ -0,0 +1,194 @@ +import { CssSyntaxError, ProcessOptions } from './postcss.js' +import PreviousMap from './previous-map.js' + +declare namespace Input { + export interface FilePosition { + /** + * Column of inclusive start position in source file. + */ + column: number + + /** + * Column of exclusive end position in source file. + */ + endColumn?: number + + /** + * Line of exclusive end position in source file. + */ + endLine?: number + + /** + * Absolute path to the source file. + */ + file?: string + + /** + * Line of inclusive start position in source file. + */ + line: number + + /** + * Source code. + */ + source?: string + + /** + * URL for the source file. + */ + url: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Input_ as default } +} + +/** + * Represents the source CSS. + * + * ```js + * const root = postcss.parse(css, { from: file }) + * const input = root.source.input + * ``` + */ +declare class Input_ { + /** + * Input CSS source. + * + * ```js + * const input = postcss.parse('a{}', { from: file }).input + * input.css //=> "a{}" + * ``` + */ + css: string + + /** + * The absolute path to the CSS source file defined + * with the `from` option. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.file //=> '/home/ai/a.css' + * ``` + */ + file?: string + + /** + * The flag to indicate whether or not the source code has Unicode BOM. + */ + hasBOM: boolean + + /** + * The unique ID of the CSS source. It will be created if `from` option + * is not provided (because PostCSS does not know the file path). + * + * ```js + * const root = postcss.parse(css) + * root.source.input.file //=> undefined + * root.source.input.id //=> "" + * ``` + */ + id?: string + + /** + * The input source map passed from a compilation step before PostCSS + * (for example, from Sass compiler). + * + * ```js + * root.source.input.map.consumer().sources //=> ['a.sass'] + * ``` + */ + map: PreviousMap + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + error( + message: string, + start: + | { + column: number + line: number + } + | { + offset: number + }, + end: + | { + column: number + line: number + } + | { + offset: number + }, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Returns `CssSyntaxError` with information about the error and its position. + */ + error( + message: string, + line: number, + column: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + error( + message: string, + offset: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Converts source offset to line and column. + * + * @param offset Source offset. + */ + fromOffset(offset: number): { col: number; line: number } | null + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). Optionally takes an + * end position, exclusive. + * + * ```js + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + * root.source.input.origin(1, 1, 1, 4) + * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 } + * ``` + * + * @param line Line for inclusive start position in input CSS. + * @param column Column for inclusive start position in input CSS. + * @param endLine Line for exclusive end position in input CSS. + * @param endColumn Column for exclusive end position in input CSS. + * + * @return Position in input source. + */ + origin( + line: number, + column: number, + endLine?: number, + endColumn?: number + ): false | Input.FilePosition + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css) + * root.source.input.from //=> "" + * ``` + */ + get from(): string +} + +declare class Input extends Input_ {} + +export = Input diff --git a/node_modules/postcss/lib/input.js b/node_modules/postcss/lib/input.js new file mode 100644 index 0000000..4b5ee5e --- /dev/null +++ b/node_modules/postcss/lib/input.js @@ -0,0 +1,248 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { fileURLToPath, pathToFileURL } = require('url') +let { isAbsolute, resolve } = require('path') +let { nanoid } = require('nanoid/non-secure') + +let terminalHighlight = require('./terminal-highlight') +let CssSyntaxError = require('./css-syntax-error') +let PreviousMap = require('./previous-map') + +let fromOffsetCache = Symbol('fromOffsetCache') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(resolve && isAbsolute) + +class Input { + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString() + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true + this.css = this.css.slice(1) + } else { + this.hasBOM = false + } + + if (opts.from) { + if ( + !pathAvailable || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from + } else { + this.file = resolve(opts.from) + } + } + + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts) + if (map.text) { + this.map = map + let file = map.consumer().file + if (!this.file && file) this.file = this.mapResolve(file) + } + } + + if (!this.file) { + this.id = '' + } + if (this.map) this.map.file = this.from + } + + error(message, line, column, opts = {}) { + let result, endLine, endColumn + + if (line && typeof line === 'object') { + let start = line + let end = column + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset) + line = pos.line + column = pos.col + } else { + line = start.line + column = start.column + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset) + endLine = pos.line + endColumn = pos.col + } else { + endLine = end.line + endColumn = end.column + } + } else if (!column) { + let pos = this.fromOffset(line) + line = pos.line + column = pos.col + } + + let origin = this.origin(line, column, endLine, endColumn) + if (origin) { + result = new CssSyntaxError( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ) + } else { + result = new CssSyntaxError( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ) + } + + result.input = { column, endColumn, endLine, line, source: this.css } + if (this.file) { + if (pathToFileURL) { + result.input.url = pathToFileURL(this.file).toString() + } + result.input.file = this.file + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n') + lineToIndex = new Array(lines.length) + let prevIndex = 0 + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex + prevIndex += lines[i].length + 1 + } + + this[fromOffsetCache] = lineToIndex + } else { + lineToIndex = this[fromOffsetCache] + } + lastLine = lineToIndex[lineToIndex.length - 1] + + let min = 0 + if (offset >= lastLine) { + min = lineToIndex.length - 1 + } else { + let max = lineToIndex.length - 2 + let mid + while (min < max) { + mid = min + ((max - min) >> 1) + if (offset < lineToIndex[mid]) { + max = mid - 1 + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1 + } else { + min = mid + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer() + + let from = consumer.originalPositionFor({ column, line }) + if (!from.source) return false + + let to + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }) + } + + let fromUrl + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source) + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) + ) + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + } + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl) + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source) + if (source) result.source = source + + return result + } + + toJSON() { + let json = {} + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name] + } + } + if (this.map) { + json.map = { ...this.map } + if (json.map.consumerCache) { + json.map.consumerCache = undefined + } + } + return json + } + + get from() { + return this.file || this.id + } +} + +module.exports = Input +Input.default = Input + +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input) +} diff --git a/node_modules/postcss/lib/lazy-result.d.ts b/node_modules/postcss/lib/lazy-result.d.ts new file mode 100644 index 0000000..dd291aa --- /dev/null +++ b/node_modules/postcss/lib/lazy-result.d.ts @@ -0,0 +1,190 @@ +import Document from './document.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace LazyResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { LazyResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by `Processor#process`. + * + * ```js + * const lazy = postcss([autoprefixer]).process(css) + * ``` + */ +declare class LazyResult_ + implements PromiseLike> +{ + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }).catch(error => { + * console.error(error) + * }) + * ``` + */ + catch: Promise>['catch'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onFinally on any error or when all plugins will finish work. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).finally(() => { + * console.log('processing ended') + * }) + * ``` + */ + finally: Promise>['finally'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { + * console.log(result.css) + * }) + * ``` + */ + then: Promise>['then'] + + /** + * @param processor Processor used for this transformation. + * @param css CSS to parse and transform. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, css: string, opts: ResultOptions) + + /** + * Run plugin in async way and return `Result`. + * + * @return Result with output content. + */ + async(): Promise> + + /** + * Run plugin in sync way and return `Result`. + * + * @return Result with output content. + */ + sync(): Result + + /** + * Alias for the `LazyResult#css` property. + * + * ```js + * lazy + '' === lazy.css + * ``` + * + * @return Output CSS. + */ + toString(): string + + /** + * Processes input CSS through synchronous plugins + * and calls `Result#warnings`. + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get content(): string + + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns `Result#css`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get css(): string + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#map`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get map(): SourceMap + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#messages`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get messages(): Message[] + + /** + * Options from the `Processor#process` call. + */ + get opts(): ResultOptions + + /** + * Returns a `Processor` instance, which will be used + * for CSS transformations. + */ + get processor(): Processor + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#root`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get root(): RootNode + + /** + * Returns the default string description of an object. + * Required to implement the Promise interface. + */ + get [Symbol.toStringTag](): string +} + +declare class LazyResult< + RootNode = Document | Root +> extends LazyResult_ {} + +export = LazyResult diff --git a/node_modules/postcss/lib/lazy-result.js b/node_modules/postcss/lib/lazy-result.js new file mode 100644 index 0000000..126f40c --- /dev/null +++ b/node_modules/postcss/lib/lazy-result.js @@ -0,0 +1,550 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let MapGenerator = require('./map-generator') +let stringify = require('./stringify') +let Container = require('./container') +let Document = require('./document') +let warnOnce = require('./warn-once') +let Result = require('./result') +let parse = require('./parse') +let Root = require('./root') + +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +} + +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +} + +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +} + +const CHILDREN = 0 + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' +} + +function getEvents(node) { + let key = false + let type = TYPE_TO_CLASS_NAME[node.type] + if (node.type === 'decl') { + key = node.prop.toLowerCase() + } else if (node.type === 'atrule') { + key = node.name.toLowerCase() + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } +} + +function toStack(node) { + let events + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit'] + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit'] + } else { + events = getEvents(node) + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } +} + +function cleanMarks(node) { + node[isClean] = false + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) + return node +} + +let postcss = {} + +class LazyResult { + constructor(processor, css, opts) { + this.stringified = false + this.processed = false + + let root + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css) + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root) + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {} + if (!opts.map.inline) opts.map.inline = false + opts.map.prev = css.map + } + } else { + let parser = parse + if (opts.syntax) parser = opts.syntax.parse + if (opts.parser) parser = opts.parser + if (parser.parse) parser = parser.parse + + try { + root = parser(css, opts) + } catch (error) { + this.processed = true + this.error = error + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container.rebuild(root) + } + } + + this.result = new Result(processor, root, opts) + this.helpers = { ...postcss, postcss, result: this.result } + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }) + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync() + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin + try { + if (node) node.addToError(error) + this.error = error + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin + error.setMessage() + } else if (plugin.postcssVersion) { + if (process.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin + let pluginVer = plugin.postcssVersion + let runtimeVer = this.result.processor.version + let a = pluginVer.split('.') + let b = runtimeVer.split('.') + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ) + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err) + } + return error + } + + prepareVisitors() { + this.listeners = {} + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = [] + this.listeners[type].push([plugin, cb]) + } + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]) + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ) + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]) + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0 + } + + async runAsync() { + this.plugin = 0 + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i] + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + try { + await promise + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + let stack = [toStack(root)] + while (stack.length > 0) { + let promise = this.visitTick(stack) + if (isPromise(promise)) { + try { + await promise + } catch (e) { + let node = stack[stack.length - 1].node + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ) + + await Promise.all(roots) + } else { + await visitor(root, this.helpers) + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ) + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true + + this.sync() + + let opts = this.result.opts + let str = stringify + if (opts.syntax) str = opts.syntax.stringify + if (opts.stringifier) str = opts.stringifier + if (str.stringify) str = str.stringify + + let map = new MapGenerator(str, this.result.root, this.result.opts) + let data = map.generate() + this.result.css = data[0] + this.result.map = data[1] + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + this.walkSync(root) + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot) + } + } else { + this.visitSync(this.listeners.OnceExit, root) + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin + let promise + try { + promise = visitor(node, this.helpers) + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1] + let { node, visitors } = visit + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop() + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex] + visit.visitorIndex += 1 + if (visit.visitorIndex === visitors.length) { + visit.visitors = [] + visit.visitorIndex = 0 + } + this.result.lastPlugin = plugin + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator + let child + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1 + if (!child[isClean]) { + child[isClean] = true + stack.push(toStack(child)) + return + } + } + visit.iterator = 0 + delete node.indexes[iterator] + } + + let events = visit.events + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex] + visit.eventIndex += 1 + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true + visit.iterator = node.getIterator() + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event] + return + } + } + stack.pop() + } + + walkSync(node) { + node[isClean] = true + let events = getEvents(node) + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child) + }) + } + } else { + let visitors = this.listeners[event] + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } + + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } +} + +LazyResult.registerPostcss = dependant => { + postcss = dependant +} + +module.exports = LazyResult +LazyResult.default = LazyResult + +Root.registerLazyResult(LazyResult) +Document.registerLazyResult(LazyResult) diff --git a/node_modules/postcss/lib/list.d.ts b/node_modules/postcss/lib/list.d.ts new file mode 100644 index 0000000..1a74d74 --- /dev/null +++ b/node_modules/postcss/lib/list.d.ts @@ -0,0 +1,57 @@ +declare namespace list { + type List = { + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * ```js + * Once (root, { list }) { + * list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + * } + * ``` + * + * @param str Comma-separated values. + * @return Split values. + */ + comma(str: string): string[] + + default: List + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * ```js + * Once (root, { list }) { + * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param str Space-separated values. + * @return Split values. + */ + space(str: string): string[] + + /** + * Safely splits values. + * + * ```js + * Once (root, { list }) { + * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param string separated values. + * @param separators array of separators. + * @param last boolean indicator. + * @return Split values. + */ + split(string: string, separators: string[], last: boolean): string[] + } +} + +// eslint-disable-next-line @typescript-eslint/no-redeclare +declare const list: list.List + +export = list diff --git a/node_modules/postcss/lib/list.js b/node_modules/postcss/lib/list.js new file mode 100644 index 0000000..1b31f98 --- /dev/null +++ b/node_modules/postcss/lib/list.js @@ -0,0 +1,58 @@ +'use strict' + +let list = { + comma(string) { + return list.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t'] + return list.split(string, spaces) + }, + + split(string, separators, last) { + let array = [] + let current = '' + let split = false + + let func = 0 + let inQuote = false + let prevQuote = '' + let escape = false + + for (let letter of string) { + if (escape) { + escape = false + } else if (letter === '\\') { + escape = true + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false + } + } else if (letter === '"' || letter === "'") { + inQuote = true + prevQuote = letter + } else if (letter === '(') { + func += 1 + } else if (letter === ')') { + if (func > 0) func -= 1 + } else if (func === 0) { + if (separators.includes(letter)) split = true + } + + if (split) { + if (current !== '') array.push(current.trim()) + current = '' + split = false + } else { + current += letter + } + } + + if (last || current !== '') array.push(current.trim()) + return array + } +} + +module.exports = list +list.default = list diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js new file mode 100644 index 0000000..71b21ca --- /dev/null +++ b/node_modules/postcss/lib/map-generator.js @@ -0,0 +1,368 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { dirname, relative, resolve, sep } = require('path') +let { pathToFileURL } = require('url') + +let Input = require('./input') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(dirname && resolve && relative && sep) + +class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify + this.mapOpts = opts.map || {} + this.root = root + this.opts = opts + this.css = cssString + this.originalCSS = cssString + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute + + this.memoizedFileURLs = new Map() + this.memoizedPaths = new Map() + this.memoizedURLs = new Map() + } + + addAnnotation() { + let content + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()) + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root) + } else { + content = this.outputFile() + '.map' + } + let eol = '\n' + if (this.css.includes('\r\n')) eol = '\r\n' + + this.css += eol + '/*# sourceMappingURL=' + content + ' */' + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)) + let root = prev.root || dirname(prev.file) + let map + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text) + if (map.sourcesContent) { + map.sourcesContent = null + } + } else { + map = prev.consumer() + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))) + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i] + if (node.type !== 'comment') continue + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i) + } + } + } else if (this.css) { + this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '') + } + } + + generate() { + this.clearAnnotation() + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = '' + this.stringify(this.root, i => { + result += i + }) + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString() + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer() + prev.file = this.outputFile() + this.map = SourceMapGenerator.fromSourceMap(prev, { + ignoreInvalidMapping: true + }) + } else { + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + }) + } + + if (this.isSourcesContent()) this.setSourcesContent() + if (this.root && this.previous().length > 0) this.applyPrevMaps() + if (this.isAnnotation()) this.addAnnotation() + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = '' + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + + let line = 1 + let column = 1 + + let noSource = '' + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + } + + let lines, last + this.stringify(this.root, (str, node, type) => { + this.css += str + + if (node && type !== 'end') { + mapping.generated.line = line + mapping.generated.column = column - 1 + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.start.line + mapping.original.column = node.source.start.column - 1 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + this.map.addMapping(mapping) + } + } + + lines = str.match(/\n/g) + if (lines) { + line += lines.length + last = str.lastIndexOf('\n') + column = str.length - last + } else { + column += str.length + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} } + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes) + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.end.line + mapping.original.column = node.source.end.column - 1 + mapping.generated.line = line + mapping.generated.column = column - 2 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + mapping.generated.line = line + mapping.generated.column = column - 1 + this.map.addMapping(mapping) + } + } + } + }) + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file) + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.' + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)) + } + + let path = relative(from, file) + this.memoizedPaths.set(file, path) + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = [] + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map) + } + } + }) + } else { + let input = new Input(this.originalCSS, this.opts) + if (input.map) this.previousMaps.push(input.map) + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {} + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from + if (from && !already[from]) { + already[from] = true + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)) + this.map.setSourceContent(fromUrl, node.source.input.css) + } + } + }) + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '' + this.map.setSourceContent(from, this.css) + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer) { + return Buffer.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path) + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString() + this.memoizedFileURLs.set(path, fileURL) + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path) + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/') + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) + this.memoizedURLs.set(path, url) + + return url + } +} + +module.exports = MapGenerator diff --git a/node_modules/postcss/lib/no-work-result.d.ts b/node_modules/postcss/lib/no-work-result.d.ts new file mode 100644 index 0000000..8039076 --- /dev/null +++ b/node_modules/postcss/lib/no-work-result.d.ts @@ -0,0 +1,46 @@ +import LazyResult from './lazy-result.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace NoWorkResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { NoWorkResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root` + * are accessed. See the example below for details. + * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined. + * + * ```js + * const noWorkResult = postcss().process(css) // No plugins are defined. + * // CSS is not parsed + * let root = noWorkResult.root // now css is parsed because we accessed the root + * ``` + */ +declare class NoWorkResult_ implements LazyResult { + catch: Promise>['catch'] + finally: Promise>['finally'] + then: Promise>['then'] + constructor(processor: Processor, css: string, opts: ResultOptions) + async(): Promise> + sync(): Result + toString(): string + warnings(): Warning[] + get content(): string + get css(): string + get map(): SourceMap + get messages(): Message[] + get opts(): ResultOptions + get processor(): Processor + get root(): Root + get [Symbol.toStringTag](): string +} + +declare class NoWorkResult extends NoWorkResult_ {} + +export = NoWorkResult diff --git a/node_modules/postcss/lib/no-work-result.js b/node_modules/postcss/lib/no-work-result.js new file mode 100644 index 0000000..05821b7 --- /dev/null +++ b/node_modules/postcss/lib/no-work-result.js @@ -0,0 +1,138 @@ +'use strict' + +let MapGenerator = require('./map-generator') +let stringify = require('./stringify') +let warnOnce = require('./warn-once') +let parse = require('./parse') +const Result = require('./result') + +class NoWorkResult { + constructor(processor, css, opts) { + css = css.toString() + this.stringified = false + + this._processor = processor + this._css = css + this._opts = opts + this._map = undefined + let root + + let str = stringify + this.result = new Result(this._processor, root, this._opts) + this.result.css = css + + let self = this + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }) + + let map = new MapGenerator(str, root, this._opts, css) + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate() + if (generatedCSS) { + this.result.css = generatedCSS + } + if (generatedMap) { + this.result.map = generatedMap + } + } else { + map.clearAnnotation() + this.result.css = map.css + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } + + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root + let parser = parse + + try { + root = parser(this._css, this._opts) + } catch (error) { + this.error = error + } + + if (this.error) { + throw this.error + } else { + this._root = root + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } +} + +module.exports = NoWorkResult +NoWorkResult.default = NoWorkResult diff --git a/node_modules/postcss/lib/node.d.ts b/node_modules/postcss/lib/node.d.ts new file mode 100644 index 0000000..5971656 --- /dev/null +++ b/node_modules/postcss/lib/node.d.ts @@ -0,0 +1,536 @@ +import AtRule = require('./at-rule.js') + +import { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document from './document.js' +import Input from './input.js' +import { Stringifier, Syntax } from './postcss.js' +import Result from './result.js' +import Root from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +declare namespace Node { + export type ChildNode = AtRule.default | Comment | Declaration | Rule + + export type AnyNode = + | AtRule.default + | Comment + | Declaration + | Document + | Root + | Rule + + export type ChildProps = + | AtRuleProps + | CommentProps + | DeclarationProps + | RuleProps + + export interface Position { + /** + * Source line in file. In contrast to `offset` it starts from 1. + */ + column: number + + /** + * Source column in file. + */ + line: number + + /** + * Source offset in file. It starts from 0. + */ + offset: number + } + + export interface Range { + /** + * End position, exclusive. + */ + end: Position + + /** + * Start position, inclusive. + */ + start: Position + } + + /** + * Source represents an interface for the {@link Node.source} property. + */ + export interface Source { + /** + * The inclusive ending position for the source + * code of a node. + */ + end?: Position + + /** + * The source file from where a node has originated. + */ + input: Input + + /** + * The inclusive starting position for the source + * code of a node. + */ + start?: Position + } + + /** + * Interface represents an interface for an object received + * as parameter by Node class constructor. + */ + export interface NodeProps { + source?: Source + } + + export interface NodeErrorOptions { + /** + * An ending index inside a node's string that should be highlighted as + * source of error. + */ + endIndex?: number + /** + * An index inside a node's string that should be highlighted as source + * of error. + */ + index?: number + /** + * Plugin name that created this error. PostCSS will set it automatically. + */ + plugin?: string + /** + * A word inside a node's string, that should be highlighted as source + * of error. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-shadow + class Node extends Node_ {} + export { Node as default } +} + +/** + * It represents an abstract class that handles common + * methods for other CSS abstract syntax tree nodes. + * + * Any node that represents CSS selector or value should + * not extend the `Node` class. + */ +declare abstract class Node_ { + /** + * It represents parent of the current node. + * + * ```js + * root.nodes[0].parent === root //=> true + * ``` + */ + parent: Container | Document | undefined + + /** + * It represents unnecessary whitespace and characters present + * in the css source code. + * + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * The properties of the raws object are decided by parser, + * the default parser uses the following properties: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and */. + * - `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS filters out the comments inside selectors, declaration values + * and at-rule parameters but it stores the origin content in raws. + * + * ```js + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + * ``` + */ + raws: any + + /** + * It represents information related to origin of a node and is required + * for generating source maps. + * + * The nodes that are created manually using the public APIs + * provided by PostCSS will have `source` undefined and + * will be absent in the source map. + * + * For this reason, the plugin developer should consider + * duplicating nodes as the duplicate node will have the + * same source as the original node by default or assign + * source to a node created manually. + * + * ```js + * decl.source.input.from //=> '/home/ai/source.css' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + * ``` + * + * ```js + * // Incorrect method, source not specified! + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }) + * + * // Correct method, source is inherited when duplicating. + * const prefixed = decl.clone({ + * prop: '-moz-' + decl.prop + * }) + * ``` + * + * ```js + * if (atrule.name === 'add-link') { + * const rule = postcss.rule({ + * selector: 'a', + * source: atrule.source + * }) + * + * atrule.parent.insertBefore(atrule, rule) + * } + * ``` + */ + source?: Node.Source + + /** + * It represents type of a node in + * an abstract syntax tree. + * + * A type of node helps in identification of a node + * and perform operation based on it's type. + * + * ```js + * const declaration = new Declaration({ + * prop: 'color', + * value: 'black' + * }) + * + * declaration.type //=> 'decl' + * ``` + */ + type: string + + constructor(defaults?: object) + + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * ```js + * decl.after('color: black') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + after(newNode: Node | Node.ChildProps | Node[] | string | undefined): this + + /** + * It assigns properties to an existing node instance. + * + * ```js + * decl.assign({ prop: 'word-wrap', value: 'break-word' }) + * ``` + * + * @param overrides New properties to override the node. + * + * @return `this` for method chaining. + */ + assign(overrides: object): this + + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * ```js + * decl.before('content: ""') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + before(newNode: Node | Node.ChildProps | Node[] | string | undefined): this + + /** + * Clear the code style properties for the node and its children. + * + * ```js + * node.raws.before //=> ' ' + * node.cleanRaws() + * node.raws.before //=> undefined + * ``` + * + * @param keepBetween Keep the `raws.between` symbols. + */ + cleanRaws(keepBetween?: boolean): void + + /** + * It creates clone of an existing node, which includes all the properties + * and their values, that includes `raws` but not `type`. + * + * ```js + * decl.raws.before //=> "\n " + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) + * cloned.raws.before //=> "\n " + * cloned.toString() //=> -moz-transform: scale(0) + * ``` + * + * @param overrides New properties to override in the clone. + * + * @return Duplicate of the node instance. + */ + clone(overrides?: object): Node + + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param overrides New properties to override in the clone. + * @return New node. + */ + cloneAfter(overrides?: object): Node + + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * ```js + * decl.cloneBefore({ prop: '-moz-' + decl.prop }) + * ``` + * + * @param overrides Mew properties to override in the clone. + * + * @return New node + */ + cloneBefore(overrides?: object): Node + + /** + * It creates an instance of the class `CssSyntaxError` and parameters passed + * to this method are assigned to the error instance. + * + * The error instance will have description for the + * error, original position of the node in the + * source, showing line and column number. + * + * If any previous map is present, it would be used + * to get original position of the source. + * + * The Previous Map here is referred to the source map + * generated by previous compilation, example: Less, + * Stylus and Sass. + * + * This method returns the error instance instead of + * throwing it. + * + * ```js + * if (!variables[name]) { + * throw decl.error(`Unknown variable ${name}`, { word: name }) + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + * ``` + * + * @param message Description for the error instance. + * @param options Options for the error instance. + * + * @return Error instance is returned. + */ + error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError + + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * ```js + * if (comment.text === 'delete next') { + * const next = comment.next() + * if (next) { + * next.remove() + * } + * } + * ``` + * + * @return Next node. + */ + next(): Node.ChildNode | undefined + + /** + * Get the position for a word or an index inside the node. + * + * @param opts Options. + * @return Position. + */ + positionBy(opts?: Pick): Node.Position + + /** + * Convert string index to line/column. + * + * @param index The symbol number in the node’s string. + * @return Symbol position in file. + */ + positionInside(index: number): Node.Position + + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * ```js + * const annotation = decl.prev() + * if (annotation.type === 'comment') { + * readAnnotation(annotation.text) + * } + * ``` + * + * @return Previous node. + */ + prev(): Node.ChildNode | undefined + + /** + * Get the range for a word or start and end index inside the node. + * The start index is inclusive; the end index is exclusive. + * + * @param opts Options. + * @return Range. + */ + rangeBy( + opts?: Pick + ): Node.Range + + /** + * Returns a `raws` value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * ```js + * const root = postcss.parse('a { background: white }') + * root.nodes[0].append({ prop: 'color', value: 'black' }) + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * ``` + * + * @param prop Name of code style property. + * @param defaultType Name of default value, it can be missed + * if the value is the same as prop. + * @return {string} Code style value. + */ + raw(prop: string, defaultType?: string): string + + /** + * It removes the node from its parent and deletes its parent property. + * + * ```js + * if (decl.prop.match(/^-webkit-/)) { + * decl.remove() + * } + * ``` + * + * @return `this` for method chaining. + */ + remove(): this + + /** + * Inserts node(s) before the current node and removes the current node. + * + * ```js + * AtRule: { + * mixin: atrule => { + * atrule.replaceWith(mixinRules[atrule.params]) + * } + * } + * ``` + * + * @param nodes Mode(s) to replace current one. + * @return Current node to methods chain. + */ + replaceWith( + ...nodes: ( + | Node.ChildNode + | Node.ChildNode[] + | Node.ChildProps + | Node.ChildProps[] + )[] + ): this + + /** + * Finds the Root instance of the node’s tree. + * + * ```js + * root.nodes[0].nodes[0].root() === root + * ``` + * + * @return Root parent. + */ + root(): Root + + /** + * Fix circular links on `JSON.stringify()`. + * + * @return Cleaned object. + */ + toJSON(): object + + /** + * It compiles the node to browser readable cascading style sheets string + * depending on it's type. + * + * ```js + * new Rule({ selector: 'a' }).toString() //=> "a {}" + * ``` + * + * @param stringifier A syntax to use in string generation. + * @return CSS string of this node. + */ + toString(stringifier?: Stringifier | Syntax): string + + /** + * It is a wrapper for {@link Result#warn}, providing convenient + * way of generating warnings. + * + * ```js + * Declaration: { + * bad: (decl, { result }) => { + * decl.warn(result, 'Deprecated property: bad') + * } + * } + * ``` + * + * @param result The `Result` instance that will receive the warning. + * @param message Description for the warning. + * @param options Options for the warning. + * + * @return `Warning` instance is returned + */ + warn(result: Result, message: string, options?: WarningOptions): Warning +} + +declare class Node extends Node_ {} + +export = Node diff --git a/node_modules/postcss/lib/node.js b/node_modules/postcss/lib/node.js new file mode 100644 index 0000000..9e747ca --- /dev/null +++ b/node_modules/postcss/lib/node.js @@ -0,0 +1,381 @@ +'use strict' + +let { isClean, my } = require('./symbols') +let CssSyntaxError = require('./css-syntax-error') +let Stringifier = require('./stringifier') +let stringify = require('./stringify') + +function cloneNode(obj, parent) { + let cloned = new obj.constructor() + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i] + let type = typeof value + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent + } else if (i === 'source') { + cloned[i] = value + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)) + } else { + if (type === 'object' && value !== null) value = cloneNode(value) + cloned[i] = value + } + } + + return cloned +} + +class Node { + constructor(defaults = {}) { + this.raws = {} + this[isClean] = false + this[my] = true + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = [] + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()) + } else { + this.append(node) + } + } + } else { + this[name] = defaults[name] + } + } + } + + addToError(error) { + error.postcssNode = this + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ) + } + return error + } + + after(add) { + this.parent.insertAfter(this, add) + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name] + } + return this + } + + before(add) { + this.parent.insertBefore(this, add) + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before + delete this.raws.after + if (!keepBetween) delete this.raws.between + } + + clone(overrides = {}) { + let cloned = cloneNode(this) + for (let name in overrides) { + cloned[name] = overrides[name] + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertAfter(this, cloned) + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertBefore(this, cloned) + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts) + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty() + } + return true + } + } + } + + markDirty() { + if (this[isClean]) { + this[isClean] = false + let next = this + while ((next = next.parent)) { + next[isClean] = false + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index + 1] + } + + positionBy(opts, stringRepresentation) { + let pos = this.source.start + if (opts.index) { + pos = this.positionInside(opts.index, stringRepresentation) + } else if (opts.word) { + stringRepresentation = this.toString() + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) pos = this.positionInside(index, stringRepresentation) + } + return pos + } + + positionInside(index, stringRepresentation) { + let string = stringRepresentation || this.toString() + let column = this.source.start.column + let line = this.source.start.line + + for (let i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + } + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + } + + if (opts.word) { + let stringRepresentation = this.toString() + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) { + start = this.positionInside(index, stringRepresentation) + end = this.positionInside(index + opts.word.length, stringRepresentation) + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + } + } else if (opts.index) { + start = this.positionInside(opts.index) + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + } + } else if (typeof opts.endIndex === 'number') { + end = this.positionInside(opts.endIndex) + } else if (opts.index) { + end = this.positionInside(opts.index + 1) + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line } + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier() + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this) + } + this.parent = undefined + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this + let foundSelf = false + for (let node of nodes) { + if (node === this) { + foundSelf = true + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node) + bookmark = node + } else { + this.parent.insertBefore(bookmark, node) + } + } + + if (!foundSelf) { + this.remove() + } + } + + return this + } + + root() { + let result = this + while (result.parent && result.parent.type !== 'document') { + result = result.parent + } + return result + } + + toJSON(_, inputs) { + let fixed = {} + let emitInputs = inputs == null + inputs = inputs || new Map() + let inputsNextIndex = 0 + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name] + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }) + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs) + } else if (name === 'source') { + let inputId = inputs.get(value.input) + if (inputId == null) { + inputId = inputsNextIndex + inputs.set(value.input, inputsNextIndex) + inputsNextIndex++ + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + } + } else { + fixed[name] = value + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()) + } + return this.proxyCache + } + + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify + let result = '' + stringifier(this, i => { + result += i + }) + return result + } + + warn(result, text, opts) { + let data = { node: this } + for (let i in opts) data[i] = opts[i] + return result.warn(text, data) + } + + get proxyOf() { + return this + } +} + +module.exports = Node +Node.default = Node diff --git a/node_modules/postcss/lib/parse.d.ts b/node_modules/postcss/lib/parse.d.ts new file mode 100644 index 0000000..4c943a4 --- /dev/null +++ b/node_modules/postcss/lib/parse.d.ts @@ -0,0 +1,9 @@ +import { Parser } from './postcss.js' + +interface Parse extends Parser { + default: Parse +} + +declare const parse: Parse + +export = parse diff --git a/node_modules/postcss/lib/parse.js b/node_modules/postcss/lib/parse.js new file mode 100644 index 0000000..971431f --- /dev/null +++ b/node_modules/postcss/lib/parse.js @@ -0,0 +1,42 @@ +'use strict' + +let Container = require('./container') +let Parser = require('./parser') +let Input = require('./input') + +function parse(css, opts) { + let input = new Input(css, opts) + let parser = new Parser(input) + try { + parser.parse() + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser' + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser' + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser' + } + } + } + throw e + } + + return parser.root +} + +module.exports = parse +parse.default = parse + +Container.registerParse(parse) diff --git a/node_modules/postcss/lib/parser.js b/node_modules/postcss/lib/parser.js new file mode 100644 index 0000000..bc761de --- /dev/null +++ b/node_modules/postcss/lib/parser.js @@ -0,0 +1,609 @@ +'use strict' + +let Declaration = require('./declaration') +let tokenizer = require('./tokenize') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Root = require('./root') +let Rule = require('./rule') + +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +} + +function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i] + let pos = token[3] || token[2] + if (pos) return pos + } +} + +class Parser { + constructor(input) { + this.input = input + + this.root = new Root() + this.current = this.root + this.spaces = '' + this.semicolon = false + + this.createTokenizer() + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } + } + + atrule(token) { + let node = new AtRule() + node.name = token[1].slice(1) + if (node.name === '') { + this.unnamedAtrule(node, token) + } + this.init(node, token[2]) + + let type + let prev + let shift + let last = false + let open = false + let params = [] + let brackets = [] + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + type = token[0] + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']') + } else if (type === '{' && brackets.length > 0) { + brackets.push('}') + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]) + node.source.end.offset++ + this.semicolon = true + break + } else if (type === '{') { + open = true + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1 + prev = params[shift] + while (prev && prev[0] === 'space') { + prev = params[--shift] + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]) + node.source.end.offset++ + } + } + this.end(token) + break + } else { + params.push(token) + } + } else { + params.push(token) + } + + if (this.tokenizer.endOfFile()) { + last = true + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params) + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params) + this.raw(node, 'params', params) + if (last) { + token = params[params.length - 1] + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + this.spaces = node.raws.between + node.raws.between = '' + } + } else { + node.raws.afterName = '' + node.params = '' + } + + if (open) { + node.nodes = [] + this.current = node + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens) + if (colon === false) return + + let founded = 0 + let token + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j] + if (token[0] !== 'space') { + founded += 1 + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0 + let token, type, prev + for (let [i, element] of tokens.entries()) { + token = element + type = token[0] + + if (type === '(') { + brackets += 1 + } + if (type === ')') { + brackets -= 1 + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token) + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token + } + return false + } + + comment(token) { + let node = new Comment() + this.init(node, token[2]) + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + + let text = token[1].slice(2, -2) + if (/^\s*$/.test(text)) { + node.text = '' + node.raws.left = text + node.raws.right = '' + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/) + node.text = match[2] + node.raws.left = match[1] + node.raws.right = match[3] + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input) + } + + decl(tokens, customProperty) { + let node = new Declaration() + this.init(node, tokens[0][2]) + + let last = tokens[tokens.length - 1] + if (last[0] === ';') { + this.semicolon = true + tokens.pop() + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ) + node.source.end.offset++ + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens) + node.raws.before += tokens.shift()[1] + } + node.source.start = this.getPosition(tokens[0][2]) + + node.prop = '' + while (tokens.length) { + let type = tokens[0][0] + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1] + } + + node.raws.between = '' + + let token + while (tokens.length) { + token = tokens.shift() + + if (token[0] === ':') { + node.raws.between += token[1] + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]) + } + node.raws.between += token[1] + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0] + node.prop = node.prop.slice(1) + } + + let firstSpaces = [] + let next + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()) + } + + this.precheckMissedSemicolon(tokens) + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i] + if (token[1].toLowerCase() === '!important') { + node.important = true + let string = this.stringFrom(tokens, i) + string = this.spacesFromEnd(tokens) + string + if (string !== ' !important') node.raws.important = string + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0) + let str = '' + for (let j = i; j > 0; j--) { + let type = cache[j][0] + if (str.trim().indexOf('!') === 0 && type !== 'space') { + break + } + str = cache.pop()[1] + str + } + if (str.trim().indexOf('!') === 0) { + node.important = true + node.raws.important = str + tokens = cache + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment') + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join('') + firstSpaces = [] + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty) + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens) + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule() + this.init(node, token[2]) + node.selector = '' + node.raws.between = '' + this.current = node + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.semicolon = false + + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.spaces = '' + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]) + this.current.source.end.offset++ + this.current = this.current.parent + } else { + this.unexpectedClose(token) + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock() + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.root.source.end = this.getPosition(this.tokenizer.position()) + } + + freeSemicolon(token) { + this.spaces += token[1] + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1] + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces + this.spaces = '' + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset) + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node) + node.source = { + input: this.input, + start: this.getPosition(offset) + } + node.raws.before = this.spaces + this.spaces = '' + if (node.type !== 'comment') this.semicolon = false + } + + other(start) { + let end = false + let type = null + let colon = false + let bracket = null + let brackets = [] + let customProperty = start[1].startsWith('--') + + let tokens = [] + let token = start + while (token) { + type = token[0] + tokens.push(token) + + if (type === '(' || type === '[') { + if (!bracket) bracket = token + brackets.push(type === '(' ? ')' : ']') + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token + brackets.push('}') + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty) + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens) + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()) + end = true + break + } else if (type === ':') { + colon = true + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + if (brackets.length === 0) bracket = null + } + + token = this.tokenizer.nextToken() + } + + if (this.tokenizer.endOfFile()) end = true + if (brackets.length > 0) this.unclosedBracket(bracket) + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0] + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()) + } + } + this.decl(tokens, customProperty) + } else { + this.unknownWord(tokens) + } + } + + parse() { + let token + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + + switch (token[0]) { + case 'space': + this.spaces += token[1] + break + + case ';': + this.freeSemicolon(token) + break + + case '}': + this.end(token) + break + + case 'comment': + this.comment(token) + break + + case 'at-word': + this.atrule(token) + break + + case '{': + this.emptyRule(token) + break + + default: + this.other(token) + break + } + } + this.endFile() + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type + let length = tokens.length + let value = '' + let clean = true + let next, prev + + for (let i = 0; i < length; i += 1) { + token = tokens[i] + type = token[0] + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false + } else { + value += token[1] + } + } else { + clean = false + } + } else { + value += token[1] + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], '') + node.raws[prop] = { raw, value } + } + node[prop] = value + } + + rule(tokens) { + tokens.pop() + + let node = new Rule() + this.init(node, tokens[0][2]) + + node.raws.between = this.spacesAndCommentsFromEnd(tokens) + this.raw(node, 'selector', tokens) + this.current = node + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next + let spaces = '' + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1] + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + stringFrom(tokens, from) { + let result = '' + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1] + } + tokens.splice(from, tokens.length - from) + return result + } + + unclosedBlock() { + let pos = this.current.source.start + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word', + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } +} + +module.exports = Parser diff --git a/node_modules/postcss/lib/postcss.d.mts b/node_modules/postcss/lib/postcss.d.mts new file mode 100644 index 0000000..a8ca8c7 --- /dev/null +++ b/node_modules/postcss/lib/postcss.d.mts @@ -0,0 +1,72 @@ +export { + // postcss function / namespace + default, + + // Value exports from postcss.mjs + stringify, + fromJSON, + // @ts-expect-error This value exists, but it’s untyped. + plugin, + parse, + list, + + document, + comment, + atRule, + rule, + decl, + root, + + CssSyntaxError, + Declaration, + Container, + Processor, + Document, + Comment, + Warning, + AtRule, + Result, + Input, + Rule, + Root, + Node, + + // Type-only exports + AcceptedPlugin, + AnyNode, + AtRuleProps, + Builder, + ChildNode, + ChildProps, + CommentProps, + ContainerProps, + DeclarationProps, + DocumentProps, + FilePosition, + Helpers, + JSONHydrator, + Message, + NodeErrorOptions, + NodeProps, + OldPlugin, + Parser, + Plugin, + PluginCreator, + Position, + Postcss, + ProcessOptions, + RootProps, + RuleProps, + Source, + SourceMap, + SourceMapOptions, + Stringifier, + Syntax, + TransformCallback, + Transformer, + WarningOptions, + + // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. + type LazyResult, + +} from './postcss.js' diff --git a/node_modules/postcss/lib/postcss.d.ts b/node_modules/postcss/lib/postcss.d.ts new file mode 100644 index 0000000..49af61c --- /dev/null +++ b/node_modules/postcss/lib/postcss.d.ts @@ -0,0 +1,441 @@ +import { RawSourceMap, SourceMapGenerator } from 'source-map-js' + +import AtRule, { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { ContainerProps } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document, { DocumentProps } from './document.js' +import Input, { FilePosition } from './input.js' +import LazyResult from './lazy-result.js' +import list from './list.js' +import Node, { + AnyNode, + ChildNode, + ChildProps, + NodeErrorOptions, + NodeProps, + Position, + Source +} from './node.js' +import Processor from './processor.js' +import Result, { Message } from './result.js' +import Root, { RootProps } from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +type DocumentProcessor = ( + document: Document, + helper: postcss.Helpers +) => Promise | void +type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise | void +type DeclarationProcessor = ( + decl: Declaration, + helper: postcss.Helpers +) => Promise | void +type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise | void +type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise | void +type CommentProcessor = ( + comment: Comment, + helper: postcss.Helpers +) => Promise | void + +interface Processors { + /** + * Will be called on all`AtRule` nodes. + * + * Will be called again on node or children changes. + */ + AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `AtRule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `Comment` nodes. + * + * Will be called again on node or children changes. + */ + Comment?: CommentProcessor + + /** + * Will be called on all `Comment` nodes after listeners + * for `Comment` event. + * + * Will be called again on node or children changes. + */ + CommentExit?: CommentProcessor + + /** + * Will be called on all `Declaration` nodes after listeners + * for `Declaration` event. + * + * Will be called again on node or children changes. + */ + Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor + + /** + * Will be called on all `Declaration` nodes. + * + * Will be called again on node or children changes. + */ + DeclarationExit?: + | { [prop: string]: DeclarationProcessor } + | DeclarationProcessor + + /** + * Will be called on `Document` node. + * + * Will be called again on children changes. + */ + Document?: DocumentProcessor + + /** + * Will be called on `Document` node, when all children will be processed. + * + * Will be called again on children changes. + */ + DocumentExit?: DocumentProcessor + + /** + * Will be called on `Root` node once. + */ + Once?: RootProcessor + + /** + * Will be called on `Root` node once, when all children will be processed. + */ + OnceExit?: RootProcessor + + /** + * Will be called on `Root` node. + * + * Will be called again on children changes. + */ + Root?: RootProcessor + + /** + * Will be called on `Root` node, when all children will be processed. + * + * Will be called again on children changes. + */ + RootExit?: RootProcessor + + /** + * Will be called on all `Rule` nodes. + * + * Will be called again on node or children changes. + */ + Rule?: RuleProcessor + + /** + * Will be called on all `Rule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + RuleExit?: RuleProcessor +} + +declare namespace postcss { + export { + AnyNode, + AtRule, + AtRuleProps, + ChildNode, + ChildProps, + Comment, + CommentProps, + Container, + ContainerProps, + CssSyntaxError, + Declaration, + DeclarationProps, + Document, + DocumentProps, + FilePosition, + Input, + LazyResult, + list, + Message, + Node, + NodeErrorOptions, + NodeProps, + Position, + Processor, + Result, + Root, + RootProps, + Rule, + RuleProps, + Source, + Warning, + WarningOptions + } + + export type SourceMap = SourceMapGenerator & { + toJSON(): RawSourceMap + } + + export type Helpers = { postcss: Postcss; result: Result } & Postcss + + export interface Plugin extends Processors { + postcssPlugin: string + prepare?: (result: Result) => Processors + } + + export interface PluginCreator { + (opts?: PluginOptions): Plugin | Processor + postcss: true + } + + export interface Transformer extends TransformCallback { + postcssPlugin: string + postcssVersion: string + } + + export interface TransformCallback { + (root: Root, result: Result): Promise | void + } + + export interface OldPlugin extends Transformer { + (opts?: T): Transformer + postcss: Transformer + } + + export type AcceptedPlugin = + | { + postcss: Processor | TransformCallback + } + | OldPlugin + | Plugin + | PluginCreator + | Processor + | TransformCallback + + export interface Parser { + ( + css: { toString(): string } | string, + opts?: Pick + ): RootNode + } + + export interface Builder { + (part: string, node?: AnyNode, type?: 'end' | 'start'): void + } + + export interface Stringifier { + (node: AnyNode, builder: Builder): void + } + + export interface JSONHydrator { + (data: object): Node + (data: object[]): Node[] + } + + export interface Syntax { + /** + * Function to generate AST by string. + */ + parse?: Parser + + /** + * Class to generate string by AST. + */ + stringify?: Stringifier + } + + export interface SourceMapOptions { + /** + * Use absolute path in generated source map. + */ + absolute?: boolean + + /** + * Indicates that PostCSS should add annotation comments to the CSS. + * By default, PostCSS will always add a comment with a path + * to the source map. PostCSS will not add annotations to CSS files + * that do not contain any comments. + * + * By default, PostCSS presumes that you want to save the source map as + * `opts.to + '.map'` and will use this path in the annotation comment. + * A different path can be set by providing a string value for annotation. + * + * If you have set `inline: true`, annotation cannot be disabled. + */ + annotation?: ((file: string, root: Root) => string) | boolean | string + + /** + * Override `from` in map’s sources. + */ + from?: string + + /** + * Indicates that the source map should be embedded in the output CSS + * as a Base64-encoded comment. By default, it is `true`. + * But if all previous maps are external, not inline, PostCSS will not embed + * the map even if you do not set this option. + * + * If you have an inline source map, the result.map property will be empty, + * as the source map will be contained within the text of `result.css`. + */ + inline?: boolean + + /** + * Source map content from a previous processing step (e.g., Sass). + * + * PostCSS will try to read the previous source map + * automatically (based on comments within the source CSS), but you can use + * this option to identify it manually. + * + * If desired, you can omit the previous map with prev: `false`. + */ + prev?: ((file: string) => string) | boolean | object | string + + /** + * Indicates that PostCSS should set the origin content (e.g., Sass source) + * of the source map. By default, it is true. But if all previous maps do not + * contain sources content, PostCSS will also leave it out even if you + * do not set this option. + */ + sourcesContent?: boolean + } + + export interface ProcessOptions { + /** + * The path of the CSS source file. You should always set `from`, + * because it is used in source map generation and syntax error messages. + */ + from?: string | undefined + + /** + * Source map options + */ + map?: boolean | SourceMapOptions + + /** + * Function to generate AST by string. + */ + parser?: Parser | Syntax + + /** + * Class to generate string by AST. + */ + stringifier?: Stringifier | Syntax + + /** + * Object with parse and stringify. + */ + syntax?: Syntax + + /** + * The path where you'll put the output CSS file. You should always set `to` + * to generate correct source maps. + */ + to?: string + } + + export type Postcss = typeof postcss + + /** + * Default function to convert a node tree into a CSS string. + */ + export let stringify: Stringifier + + /** + * Parses source css and returns a new `Root` or `Document` node, + * which contains the source CSS nodes. + * + * ```js + * // Simple CSS concatenation with source map support + * const root1 = postcss.parse(css1, { from: file1 }) + * const root2 = postcss.parse(css2, { from: file2 }) + * root1.append(root2).toResult().css + * ``` + */ + export let parse: Parser + + /** + * Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes. + * + * ```js + * const json = root.toJSON() + * // save to file, send by network, etc + * const root2 = postcss.fromJSON(json) + * ``` + */ + export let fromJSON: JSONHydrator + + /** + * Creates a new `Comment` node. + * + * @param defaults Properties for the new node. + * @return New comment node + */ + export function comment(defaults?: CommentProps): Comment + + /** + * Creates a new `AtRule` node. + * + * @param defaults Properties for the new node. + * @return New at-rule node. + */ + export function atRule(defaults?: AtRuleProps): AtRule + + /** + * Creates a new `Declaration` node. + * + * @param defaults Properties for the new node. + * @return New declaration node. + */ + export function decl(defaults?: DeclarationProps): Declaration + + /** + * Creates a new `Rule` node. + * + * @param default Properties for the new node. + * @return New rule node. + */ + export function rule(defaults?: RuleProps): Rule + + /** + * Creates a new `Root` node. + * + * @param defaults Properties for the new node. + * @return New root node. + */ + export function root(defaults?: RootProps): Root + + /** + * Creates a new `Document` node. + * + * @param defaults Properties for the new node. + * @return New document node. + */ + export function document(defaults?: DocumentProps): Document + + export { postcss as default } +} + +/** + * Create a new `Processor` instance that will apply `plugins` + * as CSS processors. + * + * ```js + * let postcss = require('postcss') + * + * postcss(plugins).process(css, { from, to }).then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param plugins PostCSS plugins. + * @return Processor to process multiple CSS. + */ +declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor +declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor + +export = postcss diff --git a/node_modules/postcss/lib/postcss.js b/node_modules/postcss/lib/postcss.js new file mode 100644 index 0000000..080ee83 --- /dev/null +++ b/node_modules/postcss/lib/postcss.js @@ -0,0 +1,101 @@ +'use strict' + +let CssSyntaxError = require('./css-syntax-error') +let Declaration = require('./declaration') +let LazyResult = require('./lazy-result') +let Container = require('./container') +let Processor = require('./processor') +let stringify = require('./stringify') +let fromJSON = require('./fromJSON') +let Document = require('./document') +let Warning = require('./warning') +let Comment = require('./comment') +let AtRule = require('./at-rule') +let Result = require('./result.js') +let Input = require('./input') +let parse = require('./parse') +let list = require('./list') +let Rule = require('./rule') +let Root = require('./root') +let Node = require('./node') + +function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0] + } + return new Processor(plugins) +} + +postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true + // eslint-disable-next-line no-console + console.warn( + name + + ': postcss.plugin was deprecated. Migration guide:\n' + + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' + ) + if (process.env.LANG && process.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ + // eslint-disable-next-line no-console + console.warn( + name + + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + + 'https://www.w3ctech.com/topic/2226' + ) + } + } + let transformer = initializer(...args) + transformer.postcssPlugin = name + transformer.postcssVersion = new Processor().version + return transformer + } + + let cache + Object.defineProperty(creator, 'postcss', { + get() { + if (!cache) cache = creator() + return cache + } + }) + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts) + } + + return creator +} + +postcss.stringify = stringify +postcss.parse = parse +postcss.fromJSON = fromJSON +postcss.list = list + +postcss.comment = defaults => new Comment(defaults) +postcss.atRule = defaults => new AtRule(defaults) +postcss.decl = defaults => new Declaration(defaults) +postcss.rule = defaults => new Rule(defaults) +postcss.root = defaults => new Root(defaults) +postcss.document = defaults => new Document(defaults) + +postcss.CssSyntaxError = CssSyntaxError +postcss.Declaration = Declaration +postcss.Container = Container +postcss.Processor = Processor +postcss.Document = Document +postcss.Comment = Comment +postcss.Warning = Warning +postcss.AtRule = AtRule +postcss.Result = Result +postcss.Input = Input +postcss.Rule = Rule +postcss.Root = Root +postcss.Node = Node + +LazyResult.registerPostcss(postcss) + +module.exports = postcss +postcss.default = postcss diff --git a/node_modules/postcss/lib/postcss.mjs b/node_modules/postcss/lib/postcss.mjs new file mode 100644 index 0000000..3507598 --- /dev/null +++ b/node_modules/postcss/lib/postcss.mjs @@ -0,0 +1,30 @@ +import postcss from './postcss.js' + +export default postcss + +export const stringify = postcss.stringify +export const fromJSON = postcss.fromJSON +export const plugin = postcss.plugin +export const parse = postcss.parse +export const list = postcss.list + +export const document = postcss.document +export const comment = postcss.comment +export const atRule = postcss.atRule +export const rule = postcss.rule +export const decl = postcss.decl +export const root = postcss.root + +export const CssSyntaxError = postcss.CssSyntaxError +export const Declaration = postcss.Declaration +export const Container = postcss.Container +export const Processor = postcss.Processor +export const Document = postcss.Document +export const Comment = postcss.Comment +export const Warning = postcss.Warning +export const AtRule = postcss.AtRule +export const Result = postcss.Result +export const Input = postcss.Input +export const Rule = postcss.Rule +export const Root = postcss.Root +export const Node = postcss.Node diff --git a/node_modules/postcss/lib/previous-map.d.ts b/node_modules/postcss/lib/previous-map.d.ts new file mode 100644 index 0000000..23edeb5 --- /dev/null +++ b/node_modules/postcss/lib/previous-map.d.ts @@ -0,0 +1,81 @@ +import { SourceMapConsumer } from 'source-map-js' + +import { ProcessOptions } from './postcss.js' + +declare namespace PreviousMap { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { PreviousMap_ as default } +} + +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * ```js + * const root = parse(css, { from: 'a.sass.css' }) + * root.input.map //=> PreviousMap + * ``` + */ +declare class PreviousMap_ { + /** + * `sourceMappingURL` content. + */ + annotation?: string + + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + */ + file?: string + + /** + * Was source map inlined by data-uri to input CSS. + */ + inline: boolean + + /** + * Path to source map file. + */ + mapFile?: string + + /** + * The directory with source map file, if source map is in separated file. + */ + root?: string + + /** + * Source map file content. + */ + text?: string + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return Object with source map information. + */ + consumer(): SourceMapConsumer + + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return Is `sourcesContent` present. + */ + withContent(): boolean +} + +declare class PreviousMap extends PreviousMap_ {} + +export = PreviousMap diff --git a/node_modules/postcss/lib/previous-map.js b/node_modules/postcss/lib/previous-map.js new file mode 100644 index 0000000..f3093df --- /dev/null +++ b/node_modules/postcss/lib/previous-map.js @@ -0,0 +1,142 @@ +'use strict' + +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { existsSync, readFileSync } = require('fs') +let { dirname, join } = require('path') + +function fromBase64(str) { + if (Buffer) { + return Buffer.from(str, 'base64').toString() + } else { + /* c8 ignore next 2 */ + return window.atob(str) + } +} + +class PreviousMap { + constructor(css, opts) { + if (opts.map === false) return + this.loadAnnotation(css) + this.inline = this.startWith(this.annotation, 'data:') + + let prev = opts.map ? opts.map.prev : undefined + let text = this.loadMap(opts.from, prev) + if (!this.mapFile && opts.from) { + this.mapFile = opts.from + } + if (this.mapFile) this.root = dirname(this.mapFile) + if (text) this.text = text + } + + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer(this.text) + } + return this.consumerCache + } + + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/ + let baseUri = /^data:application\/json;base64,/ + let charsetUri = /^data:application\/json;charset=utf-?8,/ + let uri = /^data:application\/json,/ + + if (charsetUri.test(text) || uri.test(text)) { + return decodeURIComponent(text.substr(RegExp.lastMatch.length)) + } + + if (baseCharsetUri.test(text) || baseUri.test(text)) { + return fromBase64(text.substr(RegExp.lastMatch.length)) + } + + let encoding = text.match(/data:application\/json;([^,]+),/)[1] + throw new Error('Unsupported source map encoding ' + encoding) + } + + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() + } + + isMap(map) { + if (typeof map !== 'object') return false + return ( + typeof map.mappings === 'string' || + typeof map._mappings === 'string' || + Array.isArray(map.sections) + ) + } + + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/gm) + if (!comments) return + + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()) + let end = css.indexOf('*/', start) + + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)) + } + } + + loadFile(path) { + this.root = dirname(path) + if (existsSync(path)) { + this.mapFile = path + return readFileSync(path, 'utf-8').toString().trim() + } + } + + loadMap(file, prev) { + if (prev === false) return false + + if (prev) { + if (typeof prev === 'string') { + return prev + } else if (typeof prev === 'function') { + let prevPath = prev(file) + if (prevPath) { + let map = this.loadFile(prevPath) + if (!map) { + throw new Error( + 'Unable to load previous source map: ' + prevPath.toString() + ) + } + return map + } + } else if (prev instanceof SourceMapConsumer) { + return SourceMapGenerator.fromSourceMap(prev).toString() + } else if (prev instanceof SourceMapGenerator) { + return prev.toString() + } else if (this.isMap(prev)) { + return JSON.stringify(prev) + } else { + throw new Error( + 'Unsupported previous source map format: ' + prev.toString() + ) + } + } else if (this.inline) { + return this.decodeInline(this.annotation) + } else if (this.annotation) { + let map = this.annotation + if (file) map = join(dirname(file), map) + return this.loadFile(map) + } + } + + startWith(string, start) { + if (!string) return false + return string.substr(0, start.length) === start + } + + withContent() { + return !!( + this.consumer().sourcesContent && + this.consumer().sourcesContent.length > 0 + ) + } +} + +module.exports = PreviousMap +PreviousMap.default = PreviousMap diff --git a/node_modules/postcss/lib/processor.d.ts b/node_modules/postcss/lib/processor.d.ts new file mode 100644 index 0000000..50c9a07 --- /dev/null +++ b/node_modules/postcss/lib/processor.d.ts @@ -0,0 +1,115 @@ +import Document from './document.js' +import LazyResult from './lazy-result.js' +import NoWorkResult from './no-work-result.js' +import { + AcceptedPlugin, + Plugin, + ProcessOptions, + TransformCallback, + Transformer +} from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Processor { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Processor_ as default } +} + +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.process(css1).then(result => console.log(result.css)) + * processor.process(css2).then(result => console.log(result.css)) + * ``` + */ +declare class Processor_ { + /** + * Plugins added to this processor. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.plugins.length //=> 2 + * ``` + */ + plugins: (Plugin | TransformCallback | Transformer)[] + + /** + * Current PostCSS version. + * + * ```js + * if (result.processor.version.split('.')[0] !== '6') { + * throw new Error('This plugin works only with PostCSS 6') + * } + * ``` + */ + version: string + + /** + * @param plugins PostCSS plugins + */ + constructor(plugins?: AcceptedPlugin[]) + + /** + * Parses source CSS and returns a `LazyResult` Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the `LazyResult` methods. + * + * ```js + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param css String with input CSS or any object with a `toString()` method, + * like a Buffer. Optionally, send a `Result` instance + * and the processor will take the `Root` from it. + * @param opts Options. + * @return Promise proxy. + */ + process( + css: { toString(): string } | LazyResult | Result | Root | string + ): LazyResult | NoWorkResult + process( + css: { toString(): string } | LazyResult | Result | Root | string, + options: ProcessOptions + ): LazyResult + + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin in `Plugin` format. + * * A plugin creator function with `pluginCreator.postcss = true`. + * PostCSS will call this function without argument to get plugin. + * * A function. PostCSS will pass the function a {@link Root} + * as the first argument and current `Result` instance + * as the second. + * * Another `Processor` instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * ```js + * const processor = postcss() + * .use(autoprefixer) + * .use(postcssNested) + * ``` + * + * @param plugin PostCSS plugin or `Processor` with plugins. + * @return Current processor to make methods chain. + */ + use(plugin: AcceptedPlugin): this +} + +declare class Processor extends Processor_ {} + +export = Processor diff --git a/node_modules/postcss/lib/processor.js b/node_modules/postcss/lib/processor.js new file mode 100644 index 0000000..d8a16f4 --- /dev/null +++ b/node_modules/postcss/lib/processor.js @@ -0,0 +1,67 @@ +'use strict' + +let NoWorkResult = require('./no-work-result') +let LazyResult = require('./lazy-result') +let Document = require('./document') +let Root = require('./root') + +class Processor { + constructor(plugins = []) { + this.version = '8.4.38' + this.plugins = this.normalize(plugins) + } + + normalize(plugins) { + let normalized = [] + for (let i of plugins) { + if (i.postcss === true) { + i = i() + } else if (i.postcss) { + i = i.postcss + } + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins) + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i) + } else if (typeof i === 'function') { + normalized.push(i) + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error( + 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + + 'one of the syntax/parser/stringifier options as outlined ' + + 'in your PostCSS runner documentation.' + ) + } + } else { + throw new Error(i + ' is not a PostCSS plugin') + } + } + return normalized + } + + process(css, opts = {}) { + if ( + !this.plugins.length && + !opts.parser && + !opts.stringifier && + !opts.syntax + ) { + return new NoWorkResult(this, css, opts) + } else { + return new LazyResult(this, css, opts) + } + } + + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])) + return this + } +} + +module.exports = Processor +Processor.default = Processor + +Root.registerProcessor(Processor) +Document.registerProcessor(Processor) diff --git a/node_modules/postcss/lib/result.d.ts b/node_modules/postcss/lib/result.d.ts new file mode 100644 index 0000000..c3dcbda --- /dev/null +++ b/node_modules/postcss/lib/result.d.ts @@ -0,0 +1,206 @@ +import { + Document, + Node, + Plugin, + ProcessOptions, + Root, + SourceMap, + TransformCallback, + Warning, + WarningOptions +} from './postcss.js' +import Processor from './processor.js' + +declare namespace Result { + export interface Message { + [others: string]: any + + /** + * Source PostCSS plugin name. + */ + plugin?: string + + /** + * Message type. + */ + type: string + } + + export interface ResultOptions extends ProcessOptions { + /** + * The CSS node that was the source of the warning. + */ + node?: Node + + /** + * Name of plugin that created this warning. `Result#warn` will fill it + * automatically with `Plugin#postcssPlugin` value. + */ + plugin?: string + } + + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Result_ as default } +} + +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by `LazyResult#then` + * or `Root#toResult` methods. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }) + * ``` + * + * ```js + * const result2 = postcss.parse(css).toResult() + * ``` + */ +declare class Result_ { + /** + * A CSS string representing of `Result#root`. + * + * ```js + * postcss.parse('a{}').toResult().css //=> "a{}" + * ``` + */ + css: string + + /** + * Last runned PostCSS plugin. + */ + lastPlugin: Plugin | TransformCallback + + /** + * An instance of `SourceMapGenerator` class from the `source-map` library, + * representing changes to the `Result#root` instance. + * + * ```js + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * ``` + * + * ```js + * if (result.map) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()) + * } + * ``` + */ + map: SourceMap + + /** + * Contains messages from plugins (e.g., warnings or custom messages). + * Each message should have type and plugin properties. + * + * ```js + * AtRule: { + * import: (atRule, { result }) { + * const importedFile = parseImport(atRule) + * result.messages.push({ + * type: 'dependency', + * plugin: 'postcss-import', + * file: importedFile, + * parent: result.opts.from + * }) + * } + * } + * ``` + */ + messages: Result.Message[] + + /** + * Options from the `Processor#process` or `Root#toResult` call + * that produced this Result instance.] + * + * ```js + * root.toResult(opts).opts === opts + * ``` + */ + opts: Result.ResultOptions + + /** + * The Processor instance used for this transformation. + * + * ```js + * for (const plugin of result.processor.plugins) { + * if (plugin.postcssPlugin === 'postcss-bad') { + * throw 'postcss-good is incompatible with postcss-bad' + * } + * }) + * ``` + */ + processor: Processor + + /** + * Root node after all transformations. + * + * ```js + * root.toResult().root === root + * ``` + */ + root: RootNode + + /** + * @param processor Processor used for this transformation. + * @param root Root node after all transformations. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions) + + /** + * Returns for `Result#css` content. + * + * ```js + * result + '' === result.css + * ``` + * + * @return String representing of `Result#root`. + */ + toString(): string + + /** + * Creates an instance of `Warning` and adds it to `Result#messages`. + * + * ```js + * if (decl.important) { + * result.warn('Avoid !important', { node: decl, word: '!important' }) + * } + * ``` + * + * @param text Warning message. + * @param opts Warning options. + * @return Created warning. + */ + warn(message: string, options?: WarningOptions): Warning + + /** + * Returns warnings from plugins. Filters `Warning` instances + * from `Result#messages`. + * + * ```js + * result.warnings().forEach(warn => { + * console.warn(warn.toString()) + * }) + * ``` + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `Result#css` property. + * Use it with syntaxes that generate non-CSS output. + * + * ```js + * result.css === result.content + * ``` + */ + get content(): string +} + +declare class Result extends Result_ {} + +export = Result diff --git a/node_modules/postcss/lib/result.js b/node_modules/postcss/lib/result.js new file mode 100644 index 0000000..a39751d --- /dev/null +++ b/node_modules/postcss/lib/result.js @@ -0,0 +1,42 @@ +'use strict' + +let Warning = require('./warning') + +class Result { + constructor(processor, root, opts) { + this.processor = processor + this.messages = [] + this.root = root + this.opts = opts + this.css = undefined + this.map = undefined + } + + toString() { + return this.css + } + + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin + } + } + + let warning = new Warning(text, opts) + this.messages.push(warning) + + return warning + } + + warnings() { + return this.messages.filter(i => i.type === 'warning') + } + + get content() { + return this.css + } +} + +module.exports = Result +Result.default = Result diff --git a/node_modules/postcss/lib/root.d.ts b/node_modules/postcss/lib/root.d.ts new file mode 100644 index 0000000..9046aac --- /dev/null +++ b/node_modules/postcss/lib/root.d.ts @@ -0,0 +1,87 @@ +import Container, { ContainerProps } from './container.js' +import Document from './document.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' + +declare namespace Root { + export interface RootRaws extends Record { + /** + * The space symbols after the last child to the end of file. + */ + after?: string + + /** + * Non-CSS code after `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeAfter?: string + + /** + * Non-CSS code before `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeBefore?: string + + /** + * Is the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface RootProps extends ContainerProps { + /** + * Information used to generate byte-to-byte equal node string + * as it was in the origin input. + * */ + raws?: RootRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Root_ as default } +} + +/** + * Represents a CSS file and contains all its parsed nodes. + * + * ```js + * const root = postcss.parse('a{color:black} b{z-index:2}') + * root.type //=> 'root' + * root.nodes.length //=> 2 + * ``` + */ +declare class Root_ extends Container { + nodes: NonNullable + parent: Document | undefined + raws: Root.RootRaws + type: 'root' + + constructor(defaults?: Root.RootProps) + + assign(overrides: object | Root.RootProps): this + clone(overrides?: Partial): Root + cloneAfter(overrides?: Partial): Root + cloneBefore(overrides?: Partial): Root + + /** + * Returns a `Result` instance representing the root’s CSS. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * root1.append(root2) + * const result = root1.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current root’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Root extends Root_ {} + +export = Root diff --git a/node_modules/postcss/lib/root.js b/node_modules/postcss/lib/root.js new file mode 100644 index 0000000..ea574ed --- /dev/null +++ b/node_modules/postcss/lib/root.js @@ -0,0 +1,61 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Root extends Container { + constructor(defaults) { + super(defaults) + this.type = 'root' + if (!this.nodes) this.nodes = [] + } + + normalize(child, sample, type) { + let nodes = super.normalize(child) + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before + } else { + delete sample.raws.before + } + } else if (this.first !== sample) { + for (let node of nodes) { + node.raws.before = sample.raws.before + } + } + } + + return nodes + } + + removeChild(child, ignore) { + let index = this.index(child) + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before + } + + return super.removeChild(child) + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + return lazy.stringify() + } +} + +Root.registerLazyResult = dependant => { + LazyResult = dependant +} + +Root.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Root +Root.default = Root + +Container.registerRoot(Root) diff --git a/node_modules/postcss/lib/rule.d.ts b/node_modules/postcss/lib/rule.d.ts new file mode 100644 index 0000000..fc5dd72 --- /dev/null +++ b/node_modules/postcss/lib/rule.d.ts @@ -0,0 +1,117 @@ +import Container, { + ContainerProps, + ContainerWithChildren +} from './container.js' + +declare namespace Rule { + export interface RuleRaws extends Record { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the selector and `{` for rules. + */ + between?: string + + /** + * Contains `true` if there is semicolon after rule. + */ + ownSemicolon?: string + + /** + * The rule’s selector with comments. + */ + selector?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface RuleProps extends ContainerProps { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: RuleRaws + /** Selector or selectors of the rule. */ + selector?: string + /** Selectors of the rule represented as an array of strings. */ + selectors?: string[] + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Rule_ as default } +} + +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * ```js + * Once (root, { Rule }) { + * let a = new Rule({ selector: 'a' }) + * a.append(…) + * root.append(a) + * } + * ``` + * + * ```js + * const root = postcss.parse('a{}') + * const rule = root.first + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + * ``` + */ +declare class Rule_ extends Container { + nodes: NonNullable + parent: ContainerWithChildren | undefined + raws: Rule.RuleRaws + /** + * The rule’s full selector represented as a string. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * rule.selector //=> 'a, b' + * ``` + */ + selector: string + + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong'] + * rule.selector //=> 'a, strong' + * ``` + */ + selectors: string[] + + type: 'rule' + + constructor(defaults?: Rule.RuleProps) + assign(overrides: object | Rule.RuleProps): this + clone(overrides?: Partial): Rule + cloneAfter(overrides?: Partial): Rule + cloneBefore(overrides?: Partial): Rule +} + +declare class Rule extends Rule_ {} + +export = Rule diff --git a/node_modules/postcss/lib/rule.js b/node_modules/postcss/lib/rule.js new file mode 100644 index 0000000..a93ab25 --- /dev/null +++ b/node_modules/postcss/lib/rule.js @@ -0,0 +1,27 @@ +'use strict' + +let Container = require('./container') +let list = require('./list') + +class Rule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'rule' + if (!this.nodes) this.nodes = [] + } + + get selectors() { + return list.comma(this.selector) + } + + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen') + this.selector = values.join(sep) + } +} + +module.exports = Rule +Rule.default = Rule + +Container.registerRule(Rule) diff --git a/node_modules/postcss/lib/stringifier.d.ts b/node_modules/postcss/lib/stringifier.d.ts new file mode 100644 index 0000000..f707a6a --- /dev/null +++ b/node_modules/postcss/lib/stringifier.d.ts @@ -0,0 +1,46 @@ +import { + AnyNode, + AtRule, + Builder, + Comment, + Container, + Declaration, + Document, + Root, + Rule +} from './postcss.js' + +declare namespace Stringifier { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Stringifier_ as default } +} + +declare class Stringifier_ { + builder: Builder + constructor(builder: Builder) + atrule(node: AtRule, semicolon?: boolean): void + beforeAfter(node: AnyNode, detect: 'after' | 'before'): string + block(node: AnyNode, start: string): void + body(node: Container): void + comment(node: Comment): void + decl(node: Declaration, semicolon?: boolean): void + document(node: Document): void + raw(node: AnyNode, own: null | string, detect?: string): string + rawBeforeClose(root: Root): string | undefined + rawBeforeComment(root: Root, node: Comment): string | undefined + rawBeforeDecl(root: Root, node: Declaration): string | undefined + rawBeforeOpen(root: Root): string | undefined + rawBeforeRule(root: Root): string | undefined + rawColon(root: Root): string | undefined + rawEmptyBody(root: Root): string | undefined + rawIndent(root: Root): string | undefined + rawSemicolon(root: Root): boolean | undefined + rawValue(node: AnyNode, prop: string): string + root(node: Root): void + rule(node: Rule): void + stringify(node: AnyNode, semicolon?: boolean): void +} + +declare class Stringifier extends Stringifier_ {} + +export = Stringifier diff --git a/node_modules/postcss/lib/stringifier.js b/node_modules/postcss/lib/stringifier.js new file mode 100644 index 0000000..e07ad12 --- /dev/null +++ b/node_modules/postcss/lib/stringifier.js @@ -0,0 +1,353 @@ +'use strict' + +const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false +} + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1) +} + +class Stringifier { + constructor(builder) { + this.builder = builder + } + + atrule(node, semicolon) { + let name = '@' + node.name + let params = node.params ? this.rawValue(node, 'params') : '' + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName + } else if (params) { + name += ' ' + } + + if (node.nodes) { + this.block(node, name + params) + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : '') + this.builder(name + params + end, node) + } + } + + beforeAfter(node, detect) { + let value + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl') + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment') + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule') + } else { + value = this.raw(node, null, 'beforeClose') + } + + let buf = node.parent + let depth = 0 + while (buf && buf.type !== 'root') { + depth += 1 + buf = buf.parent + } + + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent') + if (indent.length) { + for (let step = 0; step < depth; step++) value += indent + } + } + + return value + } + + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen') + this.builder(start + between + '{', node, 'start') + + let after + if (node.nodes && node.nodes.length) { + this.body(node) + after = this.raw(node, 'after') + } else { + after = this.raw(node, 'after', 'emptyBody') + } + + if (after) this.builder(after) + this.builder('}', node, 'end') + } + + body(node) { + let last = node.nodes.length - 1 + while (last > 0) { + if (node.nodes[last].type !== 'comment') break + last -= 1 + } + + let semicolon = this.raw(node, 'semicolon') + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i] + let before = this.raw(child, 'before') + if (before) this.builder(before) + this.stringify(child, last !== i || semicolon) + } + } + + comment(node) { + let left = this.raw(node, 'left', 'commentLeft') + let right = this.raw(node, 'right', 'commentRight') + this.builder('/*' + left + node.text + right + '*/', node) + } + + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon') + let string = node.prop + between + this.rawValue(node, 'value') + + if (node.important) { + string += node.raws.important || ' !important' + } + + if (semicolon) string += ';' + this.builder(string, node) + } + + document(node) { + this.body(node) + } + + raw(node, own, detect) { + let value + if (!detect) detect = own + + // Already had + if (own) { + value = node.raws[own] + if (typeof value !== 'undefined') return value + } + + let parent = node.parent + + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || (parent.type === 'root' && parent.first === node)) { + return '' + } + + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return '' + } + } + + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect] + + // Detect style by other nodes + let root = node.root() + if (!root.rawCache) root.rawCache = {} + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect] + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect) + } else { + let method = 'raw' + capitalize(detect) + if (this[method]) { + value = this[method](root, node) + } else { + root.walk(i => { + value = i.raws[own] + if (typeof value !== 'undefined') return false + }) + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect] + + root.rawCache[detect] = value + return value + } + + rawBeforeClose(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawBeforeComment(root, node) { + let value + root.walkComments(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeDecl(root, node) { + let value + root.walkDecls(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeOpen(root) { + let value + root.walk(i => { + if (i.type !== 'decl') { + value = i.raws.between + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawBeforeRule(root) { + let value + root.walk(i => { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawColon(root) { + let value + root.walkDecls(i => { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, '') + return false + } + }) + return value + } + + rawEmptyBody(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawIndent(root) { + if (root.raws.indent) return root.raws.indent + let value + root.walk(i => { + let p = i.parent + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n') + value = parts[parts.length - 1] + value = value.replace(/\S/g, '') + return false + } + } + }) + return value + } + + rawSemicolon(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawValue(node, prop) { + let value = node[prop] + let raw = node.raws[prop] + if (raw && raw.value === value) { + return raw.raw + } + + return value + } + + root(node) { + this.body(node) + if (node.raws.after) this.builder(node.raws.after) + } + + rule(node) { + this.block(node, this.rawValue(node, 'selector')) + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end') + } + } + + stringify(node, semicolon) { + /* c8 ignore start */ + if (!this[node.type]) { + throw new Error( + 'Unknown AST node type ' + + node.type + + '. ' + + 'Maybe you need to change PostCSS stringifier.' + ) + } + /* c8 ignore stop */ + this[node.type](node, semicolon) + } +} + +module.exports = Stringifier +Stringifier.default = Stringifier diff --git a/node_modules/postcss/lib/stringify.d.ts b/node_modules/postcss/lib/stringify.d.ts new file mode 100644 index 0000000..06ad0b4 --- /dev/null +++ b/node_modules/postcss/lib/stringify.d.ts @@ -0,0 +1,9 @@ +import { Stringifier } from './postcss.js' + +interface Stringify extends Stringifier { + default: Stringify +} + +declare const stringify: Stringify + +export = stringify diff --git a/node_modules/postcss/lib/stringify.js b/node_modules/postcss/lib/stringify.js new file mode 100644 index 0000000..77bd017 --- /dev/null +++ b/node_modules/postcss/lib/stringify.js @@ -0,0 +1,11 @@ +'use strict' + +let Stringifier = require('./stringifier') + +function stringify(node, builder) { + let str = new Stringifier(builder) + str.stringify(node) +} + +module.exports = stringify +stringify.default = stringify diff --git a/node_modules/postcss/lib/symbols.js b/node_modules/postcss/lib/symbols.js new file mode 100644 index 0000000..a142c26 --- /dev/null +++ b/node_modules/postcss/lib/symbols.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports.isClean = Symbol('isClean') + +module.exports.my = Symbol('my') diff --git a/node_modules/postcss/lib/terminal-highlight.js b/node_modules/postcss/lib/terminal-highlight.js new file mode 100644 index 0000000..6196c9d --- /dev/null +++ b/node_modules/postcss/lib/terminal-highlight.js @@ -0,0 +1,70 @@ +'use strict' + +let pico = require('picocolors') + +let tokenizer = require('./tokenize') + +let Input + +function registerInput(dependant) { + Input = dependant +} + +const HIGHLIGHT_THEME = { + ';': pico.yellow, + ':': pico.yellow, + '(': pico.cyan, + ')': pico.cyan, + '[': pico.yellow, + ']': pico.yellow, + '{': pico.yellow, + '}': pico.yellow, + 'at-word': pico.cyan, + 'brackets': pico.cyan, + 'call': pico.cyan, + 'class': pico.yellow, + 'comment': pico.gray, + 'hash': pico.magenta, + 'string': pico.green +} + +function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class' + } + if (value[0] === '#') { + return 'hash' + } + } + + if (!processor.endOfFile()) { + let next = processor.nextToken() + processor.back(next) + if (next[0] === 'brackets' || next[0] === '(') return 'call' + } + + return type +} + +function terminalHighlight(css) { + let processor = tokenizer(new Input(css), { ignoreErrors: true }) + let result = '' + while (!processor.endOfFile()) { + let token = processor.nextToken() + let color = HIGHLIGHT_THEME[getTokenType(token, processor)] + if (color) { + result += token[1] + .split(/\r?\n/) + .map(i => color(i)) + .join('\n') + } else { + result += token[1] + } + } + return result +} + +terminalHighlight.registerInput = registerInput + +module.exports = terminalHighlight diff --git a/node_modules/postcss/lib/tokenize.js b/node_modules/postcss/lib/tokenize.js new file mode 100644 index 0000000..39a20a3 --- /dev/null +++ b/node_modules/postcss/lib/tokenize.js @@ -0,0 +1,266 @@ +'use strict' + +const SINGLE_QUOTE = "'".charCodeAt(0) +const DOUBLE_QUOTE = '"'.charCodeAt(0) +const BACKSLASH = '\\'.charCodeAt(0) +const SLASH = '/'.charCodeAt(0) +const NEWLINE = '\n'.charCodeAt(0) +const SPACE = ' '.charCodeAt(0) +const FEED = '\f'.charCodeAt(0) +const TAB = '\t'.charCodeAt(0) +const CR = '\r'.charCodeAt(0) +const OPEN_SQUARE = '['.charCodeAt(0) +const CLOSE_SQUARE = ']'.charCodeAt(0) +const OPEN_PARENTHESES = '('.charCodeAt(0) +const CLOSE_PARENTHESES = ')'.charCodeAt(0) +const OPEN_CURLY = '{'.charCodeAt(0) +const CLOSE_CURLY = '}'.charCodeAt(0) +const SEMICOLON = ';'.charCodeAt(0) +const ASTERISK = '*'.charCodeAt(0) +const COLON = ':'.charCodeAt(0) +const AT = '@'.charCodeAt(0) + +const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g +const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g +const RE_BAD_BRACKET = /.[\r\n"'(/\\]/ +const RE_HEX_ESCAPE = /[\da-f]/i + +module.exports = function tokenizer(input, options = {}) { + let css = input.css.valueOf() + let ignore = options.ignoreErrors + + let code, next, quote, content, escape + let escaped, escapePos, prev, n, currentToken + + let length = css.length + let pos = 0 + let buffer = [] + let returned = [] + + function position() { + return pos + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, pos) + } + + function endOfFile() { + return returned.length === 0 && pos >= length + } + + function nextToken(opts) { + if (returned.length) return returned.pop() + if (pos >= length) return + + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false + + code = css.charCodeAt(pos) + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: { + next = pos + do { + next += 1 + code = css.charCodeAt(next) + } while ( + code === SPACE || + code === NEWLINE || + code === TAB || + code === CR || + code === FEED + ) + + currentToken = ['space', css.slice(pos, next)] + pos = next - 1 + break + } + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: { + let controlChar = String.fromCharCode(code) + currentToken = [controlChar, controlChar, pos] + break + } + + case OPEN_PARENTHESES: { + prev = buffer.length ? buffer.pop()[1] : '' + n = css.charCodeAt(pos + 1) + if ( + prev === 'url' && + n !== SINGLE_QUOTE && + n !== DOUBLE_QUOTE && + n !== SPACE && + n !== NEWLINE && + n !== TAB && + n !== FEED && + n !== CR + ) { + next = pos + do { + escaped = false + next = css.indexOf(')', next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + break + } else { + unclosed('bracket') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['brackets', css.slice(pos, next + 1), pos, next] + + pos = next + } else { + next = css.indexOf(')', pos + 1) + content = css.slice(pos, next + 1) + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', pos] + } else { + currentToken = ['brackets', content, pos, next] + pos = next + } + } + + break + } + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: { + quote = code === SINGLE_QUOTE ? "'" : '"' + next = pos + do { + escaped = false + next = css.indexOf(quote, next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1 + break + } else { + unclosed('string') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['string', css.slice(pos, next + 1), pos, next] + pos = next + break + } + + case AT: { + RE_AT_END.lastIndex = pos + 1 + RE_AT_END.test(css) + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_AT_END.lastIndex - 2 + } + + currentToken = ['at-word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + case BACKSLASH: { + next = pos + escape = true + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1 + escape = !escape + } + code = css.charCodeAt(next + 1) + if ( + escape && + code !== SLASH && + code !== SPACE && + code !== NEWLINE && + code !== TAB && + code !== CR && + code !== FEED + ) { + next += 1 + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1 + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1 + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + default: { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1 + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length + } else { + unclosed('comment') + } + } + + currentToken = ['comment', css.slice(pos, next + 1), pos, next] + pos = next + } else { + RE_WORD_END.lastIndex = pos + 1 + RE_WORD_END.test(css) + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_WORD_END.lastIndex - 2 + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + buffer.push(currentToken) + pos = next + } + + break + } + } + + pos++ + return currentToken + } + + function back(token) { + returned.push(token) + } + + return { + back, + endOfFile, + nextToken, + position + } +} diff --git a/node_modules/postcss/lib/warn-once.js b/node_modules/postcss/lib/warn-once.js new file mode 100644 index 0000000..316e1cf --- /dev/null +++ b/node_modules/postcss/lib/warn-once.js @@ -0,0 +1,13 @@ +/* eslint-disable no-console */ +'use strict' + +let printed = {} + +module.exports = function warnOnce(message) { + if (printed[message]) return + printed[message] = true + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message) + } +} diff --git a/node_modules/postcss/lib/warning.d.ts b/node_modules/postcss/lib/warning.d.ts new file mode 100644 index 0000000..b25bba8 --- /dev/null +++ b/node_modules/postcss/lib/warning.d.ts @@ -0,0 +1,147 @@ +import { RangePosition } from './css-syntax-error.js' +import Node from './node.js' + +declare namespace Warning { + export interface WarningOptions { + /** + * End position, exclusive, in CSS node string that caused the warning. + */ + end?: RangePosition + + /** + * End index, exclusive, in CSS node string that caused the warning. + */ + endIndex?: number + + /** + * Start index, inclusive, in CSS node string that caused the warning. + */ + index?: number + + /** + * CSS node that caused the warning. + */ + node?: Node + + /** + * Name of the plugin that created this warning. `Result#warn` fills + * this property automatically. + */ + plugin?: string + + /** + * Start position, inclusive, in CSS node string that caused the warning. + */ + start?: RangePosition + + /** + * Word in CSS source that caused the warning. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Warning_ as default } +} + +/** + * Represents a plugin’s warning. It can be created using `Node#warn`. + * + * ```js + * if (decl.important) { + * decl.warn(result, 'Avoid !important', { word: '!important' }) + * } + * ``` + */ +declare class Warning_ { + /** + * Column for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.column //=> 6 + * ``` + */ + column: number + + /** + * Column for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endColumn //=> 4 + * ``` + */ + endColumn?: number + + /** + * Line for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endLine //=> 6 + * ``` + */ + endLine?: number + + /** + * Line for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.line //=> 5 + * ``` + */ + line: number + + /** + * Contains the CSS node that caused the warning. + * + * ```js + * warning.node.toString() //=> 'color: white !important' + * ``` + */ + node: Node + + /** + * The name of the plugin that created this warning. + * When you call `Node#warn` it will fill this property automatically. + * + * ```js + * warning.plugin //=> 'postcss-important' + * ``` + */ + plugin: string + + /** + * The warning message. + * + * ```js + * warning.text //=> 'Try to avoid !important' + * ``` + */ + text: string + + /** + * Type to filter warnings from `Result#messages`. + * Always equal to `"warning"`. + */ + type: 'warning' + + /** + * @param text Warning message. + * @param opts Warning options. + */ + constructor(text: string, opts?: Warning.WarningOptions) + + /** + * Returns a warning position and message. + * + * ```js + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * ``` + * + * @return Warning position and message. + */ + toString(): string +} + +declare class Warning extends Warning_ {} + +export = Warning diff --git a/node_modules/postcss/lib/warning.js b/node_modules/postcss/lib/warning.js new file mode 100644 index 0000000..3a3d79c --- /dev/null +++ b/node_modules/postcss/lib/warning.js @@ -0,0 +1,37 @@ +'use strict' + +class Warning { + constructor(text, opts = {}) { + this.type = 'warning' + this.text = text + + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts) + this.line = range.start.line + this.column = range.start.column + this.endLine = range.end.line + this.endColumn = range.end.column + } + + for (let opt in opts) this[opt] = opts[opt] + } + + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message + } + + if (this.plugin) { + return this.plugin + ': ' + this.text + } + + return this.text + } +} + +module.exports = Warning +Warning.default = Warning diff --git a/node_modules/postcss/package.json b/node_modules/postcss/package.json new file mode 100755 index 0000000..2cfe97f --- /dev/null +++ b/node_modules/postcss/package.json @@ -0,0 +1,88 @@ +{ + "name": "postcss", + "version": "8.4.38", + "description": "Tool for transforming styles with JS plugins", + "engines": { + "node": "^10 || ^12 || >=14" + }, + "exports": { + ".": { + "require": "./lib/postcss.js", + "import": "./lib/postcss.mjs" + }, + "./lib/at-rule": "./lib/at-rule.js", + "./lib/comment": "./lib/comment.js", + "./lib/container": "./lib/container.js", + "./lib/css-syntax-error": "./lib/css-syntax-error.js", + "./lib/declaration": "./lib/declaration.js", + "./lib/fromJSON": "./lib/fromJSON.js", + "./lib/input": "./lib/input.js", + "./lib/lazy-result": "./lib/lazy-result.js", + "./lib/no-work-result": "./lib/no-work-result.js", + "./lib/list": "./lib/list.js", + "./lib/map-generator": "./lib/map-generator.js", + "./lib/node": "./lib/node.js", + "./lib/parse": "./lib/parse.js", + "./lib/parser": "./lib/parser.js", + "./lib/postcss": "./lib/postcss.js", + "./lib/previous-map": "./lib/previous-map.js", + "./lib/processor": "./lib/processor.js", + "./lib/result": "./lib/result.js", + "./lib/root": "./lib/root.js", + "./lib/rule": "./lib/rule.js", + "./lib/stringifier": "./lib/stringifier.js", + "./lib/stringify": "./lib/stringify.js", + "./lib/symbols": "./lib/symbols.js", + "./lib/terminal-highlight": "./lib/terminal-highlight.js", + "./lib/tokenize": "./lib/tokenize.js", + "./lib/warn-once": "./lib/warn-once.js", + "./lib/warning": "./lib/warning.js", + "./package.json": "./package.json" + }, + "main": "./lib/postcss.js", + "types": "./lib/postcss.d.ts", + "keywords": [ + "css", + "postcss", + "rework", + "preprocessor", + "parser", + "source map", + "transform", + "manipulation", + "transpiler" + ], + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "homepage": "https://postcss.org/", + "repository": "postcss/postcss", + "bugs": { + "url": "https://github.com/postcss/postcss/issues" + }, + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "browser": { + "./lib/terminal-highlight": false, + "source-map-js": false, + "path": false, + "url": false, + "fs": false + } +} diff --git a/node_modules/queue-microtask/LICENSE b/node_modules/queue-microtask/LICENSE new file mode 100755 index 0000000..c7e6852 --- /dev/null +++ b/node_modules/queue-microtask/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/queue-microtask/README.md b/node_modules/queue-microtask/README.md new file mode 100644 index 0000000..0be05a6 --- /dev/null +++ b/node_modules/queue-microtask/README.md @@ -0,0 +1,90 @@ +# queue-microtask [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[ci-image]: https://img.shields.io/github/workflow/status/feross/queue-microtask/ci/master +[ci-url]: https://github.com/feross/queue-microtask/actions +[npm-image]: https://img.shields.io/npm/v/queue-microtask.svg +[npm-url]: https://npmjs.org/package/queue-microtask +[downloads-image]: https://img.shields.io/npm/dm/queue-microtask.svg +[downloads-url]: https://npmjs.org/package/queue-microtask +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +### fast, tiny [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) shim for modern engines + +- Use [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) in all modern JS engines. +- No dependencies. Less than 10 lines. No shims or complicated fallbacks. +- Optimal performance in all modern environments + - Uses `queueMicrotask` in modern environments + - Fallback to `Promise.resolve().then(fn)` in Node.js 10 and earlier, and old browsers (same performance as `queueMicrotask`) + +## install + +``` +npm install queue-microtask +``` + +## usage + +```js +const queueMicrotask = require('queue-microtask') + +queueMicrotask(() => { /* this will run soon */ }) +``` + +## What is `queueMicrotask` and why would one use it? + +The `queueMicrotask` function is a WHATWG standard. It queues a microtask to be executed prior to control returning to the event loop. + +A microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the event loop. + +The code `queueMicrotask(fn)` is equivalent to the code `Promise.resolve().then(fn)`. It is also very similar to [`process.nextTick(fn)`](https://nodejs.org/api/process.html#process_process_nexttick_callback_args) in Node. + +Using microtasks lets code run without interfering with any other, potentially higher priority, code that is pending, but before the JS engine regains control over the execution context. + +See the [spec](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing) or [Node documentation](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback) for more information. + +## Who is this package for? + +This package allows you to use `queueMicrotask` safely in all modern JS engines. Use it if you prioritize small JS bundle size over support for old browsers. + +If you just need to support Node 12 and later, use `queueMicrotask` directly. If you need to support all versions of Node, use this package. + +## Why not use `process.nextTick`? + +In Node, `queueMicrotask` and `process.nextTick` are [essentially equivalent](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback), though there are [subtle differences](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks) that don't matter in most situations. + +You can think of `queueMicrotask` as a standardized version of `process.nextTick` that works in the browser. No need to rely on your browser bundler to shim `process` for the browser environment. + +## Why not use `setTimeout(fn, 0)`? + +This approach is the most compatible, but it has problems. Modern browsers throttle timers severely, so `setTimeout(…, 0)` usually takes at least 4ms to run. Furthermore, the throttling gets even worse if the page is backgrounded. If you have many `setTimeout` calls, then this can severely limit the performance of your program. + +## Why not use a microtask library like [`immediate`](https://www.npmjs.com/package/immediate) or [`asap`](https://www.npmjs.com/package/asap)? + +These packages are great! However, if you prioritize small JS bundle size over optimal performance in old browsers then you may want to consider this package. + +This package (`queue-microtask`) is four times smaller than `immediate`, twice as small as `asap`, and twice as small as using `process.nextTick` and letting the browser bundler shim it automatically. + +Note: This package throws an exception in JS environments which lack `Promise` support -- which are usually very old browsers and Node.js versions. + +Since the `queueMicrotask` API is supported in Node.js, Chrome, Firefox, Safari, Opera, and Edge, **the vast majority of users will get optimal performance**. Any JS environment with `Promise`, which is almost all of them, also get optimal performance. If you need support for JS environments which lack `Promise` support, use one of the alternative packages. + +## What is a shim? + +> In computer programming, a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere. – [Wikipedia](https://en.wikipedia.org/wiki/Shim_(computing)) + +This package could also be described as a "ponyfill". + +> A ponyfill is almost the same as a polyfill, but not quite. Instead of patching functionality for older browsers, a ponyfill provides that functionality as a standalone module you can use. – [PonyFoo](https://ponyfoo.com/articles/polyfills-or-ponyfills) + +## API + +### `queueMicrotask(fn)` + +The `queueMicrotask()` method queues a microtask. + +The `fn` argument is a function to be executed after all pending tasks have completed but before yielding control to the browser's event loop. + +## license + +MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org). diff --git a/node_modules/queue-microtask/index.d.ts b/node_modules/queue-microtask/index.d.ts new file mode 100644 index 0000000..b6a8646 --- /dev/null +++ b/node_modules/queue-microtask/index.d.ts @@ -0,0 +1,2 @@ +declare const queueMicrotask: (cb: () => void) => void +export = queueMicrotask diff --git a/node_modules/queue-microtask/index.js b/node_modules/queue-microtask/index.js new file mode 100644 index 0000000..5560534 --- /dev/null +++ b/node_modules/queue-microtask/index.js @@ -0,0 +1,9 @@ +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ +let promise + +module.exports = typeof queueMicrotask === 'function' + ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) + // reuse resolved promise, and allocate it lazily + : cb => (promise || (promise = Promise.resolve())) + .then(cb) + .catch(err => setTimeout(() => { throw err }, 0)) diff --git a/node_modules/queue-microtask/package.json b/node_modules/queue-microtask/package.json new file mode 100644 index 0000000..d29a401 --- /dev/null +++ b/node_modules/queue-microtask/package.json @@ -0,0 +1,55 @@ +{ + "name": "queue-microtask", + "description": "fast, tiny `queueMicrotask` shim for modern engines", + "version": "1.2.3", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/queue-microtask/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^5.2.2" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "homepage": "https://github.com/feross/queue-microtask", + "keywords": [ + "asap", + "immediate", + "micro task", + "microtask", + "nextTick", + "process.nextTick", + "queue micro task", + "queue microtask", + "queue-microtask", + "queueMicrotask", + "setImmediate", + "task" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/queue-microtask.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/node_modules/quick-lru/index.d.ts b/node_modules/quick-lru/index.d.ts new file mode 100644 index 0000000..fa58889 --- /dev/null +++ b/node_modules/quick-lru/index.d.ts @@ -0,0 +1,97 @@ +declare namespace QuickLRU { + interface Options { + /** + The maximum number of items before evicting the least recently used items. + */ + readonly maxSize: number; + + /** + Called right before an item is evicted from the cache. + + Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`). + */ + onEviction?: (key: KeyType, value: ValueType) => void; + } +} + +declare class QuickLRU + implements Iterable<[KeyType, ValueType]> { + /** + The stored item count. + */ + readonly size: number; + + /** + Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29). + + The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. + + @example + ``` + import QuickLRU = require('quick-lru'); + + const lru = new QuickLRU({maxSize: 1000}); + + lru.set('🦄', '🌈'); + + lru.has('🦄'); + //=> true + + lru.get('🦄'); + //=> '🌈' + ``` + */ + constructor(options: QuickLRU.Options); + + [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>; + + /** + Set an item. + + @returns The list instance. + */ + set(key: KeyType, value: ValueType): this; + + /** + Get an item. + + @returns The stored item or `undefined`. + */ + get(key: KeyType): ValueType | undefined; + + /** + Check if an item exists. + */ + has(key: KeyType): boolean; + + /** + Get an item without marking it as recently used. + + @returns The stored item or `undefined`. + */ + peek(key: KeyType): ValueType | undefined; + + /** + Delete an item. + + @returns `true` if the item is removed or `false` if the item doesn't exist. + */ + delete(key: KeyType): boolean; + + /** + Delete all items. + */ + clear(): void; + + /** + Iterable for all the keys. + */ + keys(): IterableIterator; + + /** + Iterable for all the values. + */ + values(): IterableIterator; +} + +export = QuickLRU; diff --git a/node_modules/quick-lru/index.js b/node_modules/quick-lru/index.js new file mode 100644 index 0000000..7d7032e --- /dev/null +++ b/node_modules/quick-lru/index.js @@ -0,0 +1,123 @@ +'use strict'; + +class QuickLRU { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError('`maxSize` must be a number greater than 0'); + } + + this.maxSize = options.maxSize; + this.onEviction = options.onEviction; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; + } + + _set(key, value) { + this.cache.set(key, value); + this._size++; + + if (this._size >= this.maxSize) { + this._size = 0; + + if (typeof this.onEviction === 'function') { + for (const [key, value] of this.oldCache.entries()) { + this.onEviction(key, value); + } + } + + this.oldCache = this.cache; + this.cache = new Map(); + } + } + + get(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + + if (this.oldCache.has(key)) { + const value = this.oldCache.get(key); + this.oldCache.delete(key); + this._set(key, value); + return value; + } + } + + set(key, value) { + if (this.cache.has(key)) { + this.cache.set(key, value); + } else { + this._set(key, value); + } + + return this; + } + + has(key) { + return this.cache.has(key) || this.oldCache.has(key); + } + + peek(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + + if (this.oldCache.has(key)) { + return this.oldCache.get(key); + } + } + + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; + } + + return this.oldCache.delete(key) || deleted; + } + + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; + } + + * keys() { + for (const [key] of this) { + yield key; + } + } + + * values() { + for (const [, value] of this) { + yield value; + } + } + + * [Symbol.iterator]() { + for (const item of this.cache) { + yield item; + } + + for (const item of this.oldCache) { + const [key] = item; + if (!this.cache.has(key)) { + yield item; + } + } + } + + get size() { + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } + + return Math.min(this._size + oldCacheSize, this.maxSize); + } +} + +module.exports = QuickLRU; diff --git a/node_modules/quick-lru/license b/node_modules/quick-lru/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/quick-lru/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/quick-lru/package.json b/node_modules/quick-lru/package.json new file mode 100644 index 0000000..ff0dd9a --- /dev/null +++ b/node_modules/quick-lru/package.json @@ -0,0 +1,43 @@ +{ + "name": "quick-lru", + "version": "5.1.1", + "description": "Simple “Least Recently Used” (LRU) cache", + "license": "MIT", + "repository": "sindresorhus/quick-lru", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "lru", + "quick", + "cache", + "caching", + "least", + "recently", + "used", + "fast", + "map", + "hash", + "buffer" + ], + "devDependencies": { + "ava": "^2.0.0", + "coveralls": "^3.0.3", + "nyc": "^15.0.0", + "tsd": "^0.11.0", + "xo": "^0.26.0" + } +} diff --git a/node_modules/quick-lru/readme.md b/node_modules/quick-lru/readme.md new file mode 100644 index 0000000..234294a --- /dev/null +++ b/node_modules/quick-lru/readme.md @@ -0,0 +1,111 @@ +# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master) + +> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) + +Useful when you need to cache something and limit memory usage. + +Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`. + +## Install + +``` +$ npm install quick-lru +``` + +## Usage + +```js +const QuickLRU = require('quick-lru'); + +const lru = new QuickLRU({maxSize: 1000}); + +lru.set('🦄', '🌈'); + +lru.has('🦄'); +//=> true + +lru.get('🦄'); +//=> '🌈' +``` + +## API + +### new QuickLRU(options?) + +Returns a new instance. + +### options + +Type: `object` + +#### maxSize + +*Required*\ +Type: `number` + +The maximum number of items before evicting the least recently used items. + +#### onEviction + +*Optional*\ +Type: `(key, value) => void` + +Called right before an item is evicted from the cache. + +Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`). + +### Instance + +The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. + +Both `key` and `value` can be of any type. + +#### .set(key, value) + +Set an item. Returns the instance. + +#### .get(key) + +Get an item. + +#### .has(key) + +Check if an item exists. + +#### .peek(key) + +Get an item without marking it as recently used. + +#### .delete(key) + +Delete an item. + +Returns `true` if the item is removed or `false` if the item doesn't exist. + +#### .clear() + +Delete all items. + +#### .keys() + +Iterable for all the keys. + +#### .values() + +Iterable for all the values. + +#### .size + +The stored item count. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/read-cache/LICENSE b/node_modules/read-cache/LICENSE new file mode 100644 index 0000000..4b98a41 --- /dev/null +++ b/node_modules/read-cache/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2016 Bogdan Chadkin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-cache/README.md b/node_modules/read-cache/README.md new file mode 100644 index 0000000..16a5c36 --- /dev/null +++ b/node_modules/read-cache/README.md @@ -0,0 +1,46 @@ +# read-cache [![Build Status](https://travis-ci.org/TrySound/read-cache.svg?branch=master)](https://travis-ci.org/TrySound/read-cache) + +Reads and caches the entire contents of a file until it is modified. + + +## Install + +``` +$ npm i read-cache +``` + + +## Usage + +```js +// foo.js +var readCache = require('read-cache'); + +readCache('foo.js').then(function (contents) { + console.log(contents); +}); +``` + + +## API + +### readCache(path[, encoding]) + +Returns a promise that resolves with the file's contents. + +### readCache.sync(path[, encoding]) + +Returns the content of the file. + +### readCache.get(path[, encoding]) + +Returns the content of cached file or null. + +### readCache.clear() + +Clears the contents of the cache. + + +## License + +MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru) diff --git a/node_modules/read-cache/index.js b/node_modules/read-cache/index.js new file mode 100644 index 0000000..b5263e6 --- /dev/null +++ b/node_modules/read-cache/index.js @@ -0,0 +1,78 @@ +var fs = require('fs'); +var path = require('path'); +var pify = require('pify'); + +var stat = pify(fs.stat); +var readFile = pify(fs.readFile); +var resolve = path.resolve; + +var cache = Object.create(null); + +function convert(content, encoding) { + if (Buffer.isEncoding(encoding)) { + return content.toString(encoding); + } + return content; +} + +module.exports = function (path, encoding) { + path = resolve(path); + + return stat(path).then(function (stats) { + var item = cache[path]; + + if (item && item.mtime.getTime() === stats.mtime.getTime()) { + return convert(item.content, encoding); + } + + return readFile(path).then(function (data) { + cache[path] = { + mtime: stats.mtime, + content: data + }; + + return convert(data, encoding); + }); + }).catch(function (err) { + cache[path] = null; + return Promise.reject(err); + }); +}; + +module.exports.sync = function (path, encoding) { + path = resolve(path); + + try { + var stats = fs.statSync(path); + var item = cache[path]; + + if (item && item.mtime.getTime() === stats.mtime.getTime()) { + return convert(item.content, encoding); + } + + var data = fs.readFileSync(path); + + cache[path] = { + mtime: stats.mtime, + content: data + }; + + return convert(data, encoding); + } catch (err) { + cache[path] = null; + throw err; + } + +}; + +module.exports.get = function (path, encoding) { + path = resolve(path); + if (cache[path]) { + return convert(cache[path].content, encoding); + } + return null; +}; + +module.exports.clear = function () { + cache = Object.create(null); +}; diff --git a/node_modules/read-cache/package.json b/node_modules/read-cache/package.json new file mode 100644 index 0000000..87199b0 --- /dev/null +++ b/node_modules/read-cache/package.json @@ -0,0 +1,34 @@ +{ + "name": "read-cache", + "version": "1.0.0", + "description": "Reads and caches the entire contents of a file until it is modified", + "files": [ + "index.js" + ], + "main": "index.js", + "scripts": { + "test": "ava" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/TrySound/read-cache.git" + }, + "keywords": [ + "fs", + "read", + "cache" + ], + "author": "Bogdan Chadkin ", + "license": "MIT", + "bugs": { + "url": "https://github.com/TrySound/read-cache/issues" + }, + "homepage": "https://github.com/TrySound/read-cache#readme", + "devDependencies": { + "ava": "^0.9.1", + "del": "^2.2.0" + }, + "dependencies": { + "pify": "^2.3.0" + } +} diff --git a/node_modules/readdirp/LICENSE b/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..037cbb4 --- /dev/null +++ b/node_modules/readdirp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/readdirp/README.md b/node_modules/readdirp/README.md new file mode 100644 index 0000000..465593c --- /dev/null +++ b/node_modules/readdirp/README.md @@ -0,0 +1,122 @@ +# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp) + +Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. + + +```sh +npm install readdirp +``` + +```javascript +const readdirp = require('readdirp'); + +// Use streams to achieve small RAM & CPU footprint. +// 1) Streams example with for-await. +for await (const entry of readdirp('.')) { + const {path} = entry; + console.log(`${JSON.stringify({path})}`); +} + +// 2) Streams example, non for-await. +// Print out all JS files along with their size within the current folder & subfolders. +readdirp('.', {fileFilter: '*.js', alwaysStat: true}) + .on('data', (entry) => { + const {path, stats: {size}} = entry; + console.log(`${JSON.stringify({path, size})}`); + }) + // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted + .on('warn', error => console.error('non-fatal error', error)) + .on('error', error => console.error('fatal error', error)) + .on('end', () => console.log('done')); + +// 3) Promise example. More RAM and CPU than streams / for-await. +const files = await readdirp.promise('.'); +console.log(files.map(file => file.path)); + +// Other options. +readdirp('test', { + fileFilter: '*.js', + directoryFilter: ['!.git', '!*modules'] + // directoryFilter: (di) => di.basename.length === 9 + type: 'files_directories', + depth: 1 +}); +``` + +For more examples, check out `examples` directory. + +## API + +`const stream = readdirp(root[, options])` — **Stream API** + +- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) +- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). +- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. +- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. +- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. +- `on('end')` — we are done. Called when all entries were found and no more will be emitted. +- `on('close')` — stream is destroyed via `stream.destroy()`. + Could be useful if you want to manually abort even on a non fatal error. + At that point the stream is no longer `readable` and no more entries, warning or errors are emitted +- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) + or the [stream-handbook](https://github.com/substack/stream-handbook) + +`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). + +First argument is awalys `root`, path in which to start reading and recursing into subdirectories. + +### options + +- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings. + - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more + information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + `['*.json', '*.js']` includes all JavaScript and Json files. + `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'. + - Directories that do not pass a filter will not be recursed into. +- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. +- `depth: 5`: depth at which to stop recursing even if more subdirectories are found +- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. +- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. +- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` + +### `EntryInfo` + +Has the following properties: + +- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) +- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found +- `basename: 'react.js'`: name of the file/directory +- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` +- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` + +## Changelog + +- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. + Before, it could have entered infinite loop. +- 3.4 (Mar 19, 2020) adds support for directory-based symlinks. +- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. +- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. +- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". +- 3.0 brings huge performance improvements and stream backpressure support. +- Upgrading 2.x to 3.x: + - Signature changed from `readdirp(options)` to `readdirp(root, options)` + - Replaced callback API with promise API. + - Renamed `entryType` option to `type` + - Renamed `entryType: 'both'` to `'files_directories'` + - `EntryInfo` + - Renamed `stat` to `stats` + - Emitted only when `alwaysStat: true` + - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` + - Renamed `name` to `basename` + - Removed `parentDir` and `fullParentDir` properties +- Supported node.js versions: + - 3.x: node 8+ + - 2.x: node 0.6+ + +## License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller () + +MIT License, see [LICENSE](LICENSE) file. diff --git a/node_modules/readdirp/index.d.ts b/node_modules/readdirp/index.d.ts new file mode 100644 index 0000000..cbbd76c --- /dev/null +++ b/node_modules/readdirp/index.d.ts @@ -0,0 +1,43 @@ +// TypeScript Version: 3.2 + +/// + +import * as fs from 'fs'; +import { Readable } from 'stream'; + +declare namespace readdir { + interface EntryInfo { + path: string; + fullPath: string; + basename: string; + stats?: fs.Stats; + dirent?: fs.Dirent; + } + + interface ReaddirpOptions { + root?: string; + fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); + directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); + type?: 'files' | 'directories' | 'files_directories' | 'all'; + lstat?: boolean; + depth?: number; + alwaysStat?: boolean; + } + + interface ReaddirpStream extends Readable, AsyncIterable { + read(): EntryInfo; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + function promise( + root: string, + options?: ReaddirpOptions + ): Promise; +} + +declare function readdir( + root: string, + options?: readdir.ReaddirpOptions +): readdir.ReaddirpStream; + +export = readdir; diff --git a/node_modules/readdirp/index.js b/node_modules/readdirp/index.js new file mode 100644 index 0000000..cf739b2 --- /dev/null +++ b/node_modules/readdirp/index.js @@ -0,0 +1,287 @@ +'use strict'; + +const fs = require('fs'); +const { Readable } = require('stream'); +const sysPath = require('path'); +const { promisify } = require('util'); +const picomatch = require('picomatch'); + +const readdir = promisify(fs.readdir); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +/** + * @typedef {Object} EntryInfo + * @property {String} path + * @property {String} fullPath + * @property {fs.Stats=} stats + * @property {fs.Dirent=} dirent + * @property {String} basename + */ + +const BANG = '!'; +const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; + +const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); +const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10)); +const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5)); + +const normalizeFilter = filter => { + if (filter === undefined) return; + if (typeof filter === 'function') return filter; + + if (typeof filter === 'string') { + const glob = picomatch(filter.trim()); + return entry => glob(entry.basename); + } + + if (Array.isArray(filter)) { + const positive = []; + const negative = []; + for (const item of filter) { + const trimmed = item.trim(); + if (trimmed.charAt(0) === BANG) { + negative.push(picomatch(trimmed.slice(1))); + } else { + positive.push(picomatch(trimmed)); + } + } + + if (negative.length > 0) { + if (positive.length > 0) { + return entry => + positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); + } + return entry => !negative.some(f => f(entry.basename)); + } + return entry => positive.some(f => f(entry.basename)); + } +}; + +class ReaddirpStream extends Readable { + static get defaultOptions() { + return { + root: '.', + /* eslint-disable no-unused-vars */ + fileFilter: (path) => true, + directoryFilter: (path) => true, + /* eslint-enable no-unused-vars */ + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false + }; + } + + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark || 4096 + }); + const opts = { ...ReaddirpStream.defaultOptions, ...options }; + const { root, type } = opts; + + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + + const statMethod = opts.lstat ? lstat : stat; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (wantBigintFsStats) { + this._stat = path => statMethod(path, { bigint: true }); + } else { + this._stat = statMethod; + } + + this._maxDepth = opts.depth; + this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = sysPath.resolve(root); + this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + + // Launch stream with one parent, the root dir. + this.parents = [this._exploreDir(root, 1)]; + this.reading = false; + this.parent = undefined; + } + + async _read(batch) { + if (this.reading) return; + this.reading = true; + + try { + while (!this.destroyed && batch > 0) { + const { path, depth, files = [] } = this.parent || {}; + + if (files.length > 0) { + const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); + for (const entry of await Promise.all(slice)) { + if (this.destroyed) return; + + const entryType = await this._getEntryType(entry); + if (entryType === 'directory' && this._directoryFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + + if (this._wantsDir) { + this.push(entry); + batch--; + } + } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + if (this.destroyed) return; + } + } + } catch (error) { + this.destroy(error); + } finally { + this.reading = false; + } + } + + async _exploreDir(path, depth) { + let files; + try { + files = await readdir(path, this._rdOptions); + } catch (error) { + this._onError(error); + } + return { files, depth, path }; + } + + async _formatEntry(dirent, path) { + let entry; + try { + const basename = this._isDirent ? dirent.name : dirent; + const fullPath = sysPath.resolve(sysPath.join(path, basename)); + entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename }; + entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); + } catch (err) { + this._onError(err); + } + return entry; + } + + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } else { + this.destroy(err); + } + } + + async _getEntryType(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + const stats = entry && entry[this._statsProp]; + if (!stats) { + return; + } + if (stats.isFile()) { + return 'file'; + } + if (stats.isDirectory()) { + return 'directory'; + } + if (stats && stats.isSymbolicLink()) { + const full = entry.fullPath; + try { + const entryRealPath = await realpath(full); + const entryRealPathStats = await lstat(entryRealPath); + if (entryRealPathStats.isFile()) { + return 'file'; + } + if (entryRealPathStats.isDirectory()) { + const len = entryRealPath.length; + if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) { + const recursiveError = new Error( + `Circular symlink detected: "${full}" points to "${entryRealPath}"` + ); + recursiveError.code = RECURSIVE_ERROR_CODE; + return this._onError(recursiveError); + } + return 'directory'; + } + } catch (error) { + this._onError(error); + } + } + } + + _includeAsFile(entry) { + const stats = entry && entry[this._statsProp]; + + return stats && this._wantsEverything && !stats.isDirectory(); + } +} + +/** + * @typedef {Object} ReaddirpArguments + * @property {Function=} fileFilter + * @property {Function=} directoryFilter + * @property {String=} type + * @property {Number=} depth + * @property {String=} root + * @property {Boolean=} lstat + * @property {Boolean=} bigint + */ + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param {String} root Root directory + * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + let type = options.entryType || options.type; + if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility + if (type) options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + + options.root = root; + return new ReaddirpStream(options); +}; + +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', entry => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', error => reject(error)); + }); +}; + +readdirp.promise = readdirpPromise; +readdirp.ReaddirpStream = ReaddirpStream; +readdirp.default = readdirp; + +module.exports = readdirp; diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json new file mode 100644 index 0000000..dba5388 --- /dev/null +++ b/node_modules/readdirp/package.json @@ -0,0 +1,122 @@ +{ + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming API.", + "version": "3.6.0", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/paulmillr/readdirp/issues" + }, + "author": "Thorsten Lorenz (thlorenz.com)", + "contributors": [ + "Thorsten Lorenz (thlorenz.com)", + "Paul Miller (https://paulmillr.com)" + ], + "main": "index.js", + "engines": { + "node": ">=8.10.0" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "scripts": { + "dtslint": "dtslint", + "nyc": "nyc", + "mocha": "mocha --exit", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "test": "npm run lint && nyc npm run mocha" + }, + "dependencies": { + "picomatch": "^2.2.1" + }, + "devDependencies": { + "@types/node": "^14", + "chai": "^4.2", + "chai-subset": "^1.6", + "dtslint": "^3.3.0", + "eslint": "^7.0.0", + "mocha": "^7.1.1", + "nyc": "^15.0.0", + "rimraf": "^3.0.0", + "typescript": "^4.0.3" + }, + "nyc": { + "reporter": [ + "html", + "text" + ] + }, + "eslintConfig": { + "root": true, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "script" + }, + "env": { + "node": true, + "es6": true + }, + "rules": { + "array-callback-return": "error", + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-else-return": [ + "error", + { + "allowElseIf": false + } + ], + "no-lonely-if": "error", + "no-var": "error", + "object-shorthand": "error", + "prefer-arrow-callback": [ + "error", + { + "allowNamedFunctions": true + } + ], + "prefer-const": [ + "error", + { + "ignoreReadBeforeAssign": true + } + ], + "prefer-destructuring": [ + "error", + { + "object": true, + "array": false + } + ], + "prefer-spread": "error", + "prefer-template": "error", + "radix": "error", + "semi": "error", + "strict": "error", + "quotes": [ + "error", + "single" + ] + } + } +} diff --git a/node_modules/resolve/.DS_Store b/node_modules/resolve/.DS_Store new file mode 100644 index 0000000..afe2119 Binary files /dev/null and b/node_modules/resolve/.DS_Store differ diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig new file mode 100644 index 0000000..d63f0bb --- /dev/null +++ b/node_modules/resolve/.editorconfig @@ -0,0 +1,37 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 200 + +[*.js] +block_comment_start = /* +block_comment = * +block_comment_end = */ + +[*.yml] +indent_size = 1 + +[package.json] +indent_style = tab + +[lib/core.json] +indent_style = tab + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[{*.json,Makefile}] +max_line_length = off + +[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] +indent_style = off +indent_size = off +max_line_length = off +insert_final_newline = off diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000..ce1be6e --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,65 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 1, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines": [2, 350], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-shadow": 0, + "no-use-before-define": 0, + "sort-keys": 0, + }, + "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", + ], +} diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 0000000..d9c0595 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/resolve +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000..ff4fce2 --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/resolve/SECURITY.md b/node_modules/resolve/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/resolve/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 0000000..f38c581 --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 0000000..5ee329a --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env._ && path.resolve(process.env._) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000..20e65dc --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000..54b2cc1 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000..125d814 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000..60d2555 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,329 @@ +var fs = require('fs'); +var getHomedir = require('./homedir'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var readPackage = opts.readPackage || defaultReadPackage; + if (opts.readFile && opts.readPackage) { + var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); + return process.nextTick(function () { + cb(conflictErr); + }); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) return cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000..b14a280 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000..ecc5b2e --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,52 @@ +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function specifierIncluded(specifier) { + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(current[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { return false; } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(specifiers[i])) { return false; } + } + return true; +} + +function versionIncluded(specifierValue) { + if (typeof specifierValue === 'boolean') { return specifierValue; } + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(specifierValue[i])) { return true; } + } + return false; + } + return matchesRange(specifierValue); +} + +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000..058584b --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,153 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": ">= 18", + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 0000000..5ffdf73 --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js new file mode 100644 index 0000000..537f5c7 --- /dev/null +++ b/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000..1cff010 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,42 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + if ((/^([A-Za-z]:)/).test(absoluteStart)) { + prefix = ''; + } else if ((/^\\\\/).test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.resolve(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths( + request, + start, + function () { return getNodeModulesDirs(start, modules); }, + opts + ); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js new file mode 100644 index 0000000..4b56904 --- /dev/null +++ b/node_modules/resolve/lib/normalize-options.js @@ -0,0 +1,10 @@ +module.exports = function (x, opts) { + /** + * This file is purposefully a passthrough. It's expected that third-party + * environments will override it at runtime in order to inject special logic + * into `resolve` (by manipulating the options). One such example is the PnP + * code path in Yarn. + */ + + return opts || {}; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000..0b6cd58 --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,208 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var getHomedir = require('./homedir'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && (stat.isFile() || stat.isFIFO()); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var readPackageSync = opts.readPackageSync || defaultReadPackageSync; + if (opts.readFileSync && opts.readPackageSync) { + throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var pkg = readPackageSync(readFileSync, pkgfile); + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var pkg = readPackageSync(readFileSync, pkgfile); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000..7177e0f --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,71 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.22.1", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "bin": { + "resolve": "./bin/resolve" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "array.prototype.map": "^1.0.4", + "aud": "^2.0.0", + "copy-dir": "^1.3.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", + "object-keys": "^1.1.1", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tap": "0.4.13", + "tape": "^5.5.3", + "tmp": "^0.0.31" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml" + ] + } +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000..ad34d60 --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,301 @@ +# resolve [![Version Badge][2]][1] + +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve/async'); // or, require('resolve') +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file + * readFile - the passed `opts.readFile` or `fs.readFile` if not specified + * pkgfile - path to package.json + * cb - callback + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory that contains package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + readPackage: function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFileSync - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a file exists and is a directory + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.readPackageSync(readFileSync, pkgfile)` - function to synchronously read and parse a package.json file + * readFileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified + * pkgfile - path to package.json + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + readPackageSync: function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 0000000..cd0ee04 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000..a477adc --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,88 @@ +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); + +var resolve = require('../'); + +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + + st.ok(!resolve.isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(resolve.core); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + t.comment(mod + ': ' + resolve.core[mod]); + if (resolve.core[mod]) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); + } else { + st.throws(requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + var blacklist = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (blacklist.indexOf(mod) === -1) { + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + } + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..3080665 --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..643f9fc --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000..5f2141a --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var path = require('path'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(!!err, true); + }); +}); + +test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { + t.plan(2); + + var opts = { + basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), + preserveSymlinks: false + }; + + var module = './dotdot/abc'; + + resolve(module, opts, function (err, res) { + t.equal(err.code, 'MODULE_NOT_FOUND'); + t.equal(res, undefined); + }); +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000..8f8cccd --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,34 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg, pkgfile) { + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = [pkg, pkgfile]; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + var packageFile = packageFilterArgs[1]; + t.equal( + packageFile, + path.join(dir, 'baz/package.json'), + 'second packageFilter argument is "pkgfile"' + ); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000..8a43b98 --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,33 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + var res = resolve.sync('./baz', { + basedir: dir, + // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility + packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef + return pkg; + } + }); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + if (!'is 1.x') { // eslint-disable-line no-constant-condition + var packageFile = packageFilterArgs[1]; + t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); + } + + var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition + // eslint-disable-next-line no-constant-condition + t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); + + t.end(); +}); diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 0000000..3b8c9b3 --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 0000000..5d2c56f --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000..6116275 --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,315 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('symlinked', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + cb(null, resolved); + return; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + cb(null, path.join(dir, 'symlinked', base)); + } else { + cb(null, path.join(resolved, 'symlinked')); + } + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); +}); + +test('readPackage', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + t.test('with readFile', function (st) { + st.plan(3); + + resolve('bar', opts('/foo'), function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + st.equal(pkg && pkg.main, './baz.js'); + }); + }); + + var readPackage = function (readFile, file, cb) { + var barPackage = path.join('bar', 'package.json'); + if (file.slice(-barPackage.length) === barPackage) { + cb(null, { main: './something-else.js' }); + } else { + cb(null, JSON.parse(files[path.resolve(file)])); + } + }; + + t.test('with readPackage', function (st) { + st.plan(3); + + var options = opts('/foo'); + delete options.readFile; + options.readPackage = readPackage; + resolve('bar', options, function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js')); + st.equal(pkg && pkg.main, './something-else.js'); + }); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackage = readPackage; + resolve('bar', options, function (err) { + st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided'); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000..c5a7e2a --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,214 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); + +test('symlinked', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + return resolved; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + return path.join(dir, 'symlinked', base); + } + return path.join(resolved, 'symlinked'); + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); +}); + +test('readPackageSync', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir, useReadPackage) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: useReadPackage ? null : function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + t.test('with readFile', function (st) { + st.plan(1); + + st.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); + }); + + var readPackageSync = function (readFileSync, file) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { + return { main: './something-else.js' }; + } + return JSON.parse(files[path.resolve(file)]); + }; + + t.test('with readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + delete options.readFileSync; + options.readPackageSync = readPackageSync; + + st.equal( + resolve.sync('bar', options), + path.resolve('/foo/node_modules/bar/something-else.js') + ); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackageSync = readPackageSync; + st.throws( + function () { resolve.sync('bar', options); }, + TypeError, + 'errors when both readFile and readPackage are provided' + ); + }); +}); + diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000..b50e5bb --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000..dd7cf7b --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000..ef2d4d4 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000..e8ba629 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000..c13b8cf --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000..675441d --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,143 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + if (paths) { + for (var k = 0; k < paths.length; ++k) { + moduleDirs.push(path.basename(paths[k])); + } + } + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths=array option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with paths=function option', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); + }; + + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); + + verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); + + t.end(); + }); + + t.test('with paths=function skipping node modules resolution', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return []; + }; + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }); + t.deepEqual(dirs, [], 'no node_modules was computed'); + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); + + t.test('combine paths correctly on Windows', function (t) { + var start = 'C:\\Users\\username\\myProject\\src'; + var paths = []; + var moduleDirectories = ['node_modules', start]; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); + + t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { + var start = '/Users/username/git/myProject/src'; + var paths = []; + var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000..e463d6c --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,70 @@ +var fs = require('fs'); +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(8); + + var isDir = function (dir, cb) { + if (dir === '/node_path' || dir === 'node_path/x') { + return cb(null, true); + } + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); + }); + + // ensure that relative paths still resolve against the regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: path.join(__dirname, 'node_path/x'), + isDirectory: isDir + }, function (err, res) { + var root = require('tap/package.json').main; // eslint-disable-line global-require + t.error(err); + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000..ad70d0b --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000..a64132e --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000..4d0f32e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000..793315e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..ef63c40 --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000..16519ae --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,75 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + +var pathFilterFactory = function (t) { + return function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; +}; + +test('#62: deep module references and the pathFilter', function (t) { + t.test('deep/ref.js', function (st) { + st.plan(3); + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) st.fail(err); + + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + var res = resolve.sync('deep/ref', { basedir: resolverDir }); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + t.test('deep/deeper/ref', function (st) { + st.plan(4); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + st.notEqual(pkg, undefined); + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + var res = resolve.sync( + 'deep/deeper/ref', + { basedir: resolverDir } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + }); + + t.test('deep/ref alt', function (st) { + st.plan(8); + + var pathFilter = pathFilterFactory(st); + + var res = resolve.sync( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) st.fail(err); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + st.end(); + } + ); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000..2febb59 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000..b83a3e7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000..e0f8f6a --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000..93542a9 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000..2298f47 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000..716b81d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000..4903165 --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,595 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); + +test('async foo', function (t) { + t.plan(12); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg.main, 'bar'); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, 'grux'); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'tiv'); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(5); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('path iterator', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'baz/quux.js')); + t.equal(pkg && pkg.name, 'baz'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); + + resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); + +test('async dot main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('async dot slash main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_slash_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('not a directory', function (t) { + t.plan(6); + var path = './foo'; + resolve(path, { basedir: __filename }, function (err, res, pkg) { + t.ok(err, 'a non-directory errors'); + t.equal(arguments.length, 1); + t.equal(res, undefined); + t.equal(pkg, undefined); + + t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('browser field in package.json', function (t) { + t.plan(3); + + var dir = path.join(__dirname, 'resolver'); + resolve( + './browser_field', + { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.equal(pkg && pkg.main, 'b'); + t.equal(pkg && pkg.browser, undefined); + } + ); +}); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +test('malformed package.json', function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000..2f77720 --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,4 @@ +{ + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json new file mode 100644 index 0000000..bf406f0 --- /dev/null +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -0,0 +1,5 @@ +{ + "name": "browser_field", + "main": "a", + "browser": "b" +} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json new file mode 100644 index 0000000..d7f4fc8 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json new file mode 100644 index 0000000..f51287b --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 0000000..a7416c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000..bc1fb0a --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000..b718804 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json new file mode 100644 index 0000000..0590748 --- /dev/null +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -0,0 +1,7 @@ +{ + "name": "invalid_main", + "main": [ + "why is this a thing", + "srsly omg wtf" + ] +} diff --git a/node_modules/resolve/test/resolver/malformed_package_json/index.js b/node_modules/resolve/test/resolver/malformed_package_json/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/malformed_package_json/package.json b/node_modules/resolve/test/resolver/malformed_package_json/package.json new file mode 100644 index 0000000..98232c6 --- /dev/null +++ b/node_modules/resolve/test/resolver/malformed_package_json/package.json @@ -0,0 +1 @@ +{ diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json new file mode 100644 index 0000000..d6707ca --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json new file mode 100644 index 0000000..8508f9d --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -0,0 +1,20 @@ +{ + "name": "monorepo-symlink-test", + "private": true, + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "postinstall": "lerna bootstrap", + "test": "node packages/package-a" + }, + "author": "", + "license": "MIT", + "dependencies": { + "jquery": "^3.3.1", + "resolve": "../../../" + }, + "devDependencies": { + "lerna": "^3.4.3" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js new file mode 100644 index 0000000..8875a32 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var assert = require('assert'); +var path = require('path'); +var resolve = require('resolve'); + +var basedir = __dirname + '/node_modules/@my-scope/package-b'; + +var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); + +/* + * preserveSymlinks === false + * will search NPM package from + * - packages/package-b/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); +assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); + +/* + * preserveSymlinks === true + * will search NPM package from + * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules + * - packages/package-a/node_modules/@my-scope/packages/node_modules + * - packages/package-a/node_modules/@my-scope/node_modules + * - packages/package-a/node_modules/node_modules + * - packages/package-a/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); +assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); + +console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json new file mode 100644 index 0000000..204de51 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-a", + "version": "0.0.0", + "private": true, + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-b": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json new file mode 100644 index 0000000..f57c3b5 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-b", + "private": true, + "version": "0.0.0", + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-a": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 0000000..9b4846a --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b; +var c; + +var test = function test() { + console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); + console.log(b, ': preserveSymlinks true'); + console.log(c, ': preserveSymlinks false'); + + if (a !== b && a !== c) { + throw 'async: no match'; + } + console.log('async: success! a matched either b or c\n'); +}; + +require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { + if (err) { throw err; } + b = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); +require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { + if (err) { throw err; } + c = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); + diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 0000000..acfe9e9 --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "name": "mylib", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "buffer": "*" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 0000000..3283efc --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); +var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); + +console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); +console.log(b, ': preserveSymlinks true'); +console.log(c, ': preserveSymlinks false'); + +if (a !== b && a !== c) { + throw 'sync: no match'; +} +console.log('sync: success! a matched either b or c\n'); diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000..888cae3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 0000000..cb1c2c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 0000000..8e1b585 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000..5b31975 --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000..53453d6 --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,726 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); + +var resolve = require('../'); +var sync = require('../sync'); + +var requireResolveSupportsPaths = require.resolve.length > 1 + && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + +test('`./sync` entry point', function (t) { + t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); + t.end(); +}); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: dir }), + require.resolve('./foo', { paths: [dir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + require.resolve('./foo.js', { paths: [dir] }), + './foo.js: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + // Test that filename is reported as the "from" value when passed. + t.throws( + function () { + resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); + }, + { + name: 'Error', + message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" + } + ); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + var basedir = path.join(dir, 'bar'); + + t.equal( + resolve.sync('foo', { basedir: basedir }), + path.join(dir, 'bar/node_modules/foo/index.js'), + 'foo in bar' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('foo', { basedir: basedir }), + require.resolve('foo', { paths: [basedir] }), + 'foo in bar: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js'), + './baz' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./baz', { basedir: dir }), + require.resolve('./baz', { paths: [dir] }), + './baz: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./grux', { basedir: dir }), + require.resolve('./grux', { paths: [dir] }), + './grux: resolve.sync === require.resolve' + ); + } + + var tivDir = path.join(dir, 'grux'); + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + path.join(dir, 'tiv/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + require.resolve('tiv', { paths: [tivDir] }), + 'tiv: resolve.sync === require.resolve' + ); + } + + var gruxDir = path.join(dir, 'tiv'); + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + path.join(dir, 'grux/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + require.resolve('grux', { paths: [gruxDir] }), + 'grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('../grux', { basedir: dir }), + require.resolve('../grux', { paths: [dir] }), + '../grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee'), + './cup -> ./cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee'), + './cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), + require.resolve('./cup.coffee', { paths: [dir] }), + './cup.coffee: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./mug', { basedir: dir }), + require.resolve('./mug', { paths: [dir] }), + './mug: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee'), + './mug -> ./mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('path iterator', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + t.equal( + resolve.sync('baz', { packageIterator: exactIterator }), + path.join(resolverDir, 'baz/quux.js') + ); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + require.resolve('./incorrect_main', { paths: [resolverDir] }), + './incorrect_main: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('missing index', function (t) { + t.plan(requireResolveSupportsPaths ? 2 : 1); + + var resolverDir = path.join(__dirname, 'resolver'); + try { + resolve.sync('./missing_index', { basedir: resolverDir }); + t.fail('did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + require.resolve('./missing_index', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } +}); + +test('missing main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('null main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('main: false', function (t) { + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + require.resolve('./false_main', { paths: [basedir] }), + '`"main": false`: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names'); + + t.equal( + resolve.sync('./foo', { basedir: basedir }), + path.join(dir, 'same_names/foo.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: basedir }), + require.resolve('./foo', { paths: [basedir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + require.resolve('./foo/', { paths: [basedir] }), + './foo/: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names/foo'); + + t.equal( + resolve.sync('./', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + './' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./', { basedir: basedir }), + require.resolve('./', { paths: [basedir] }), + './: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('.', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + '.' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('.', { basedir: basedir }), + require.resolve('.', { paths: [basedir] }), + '.: resolve.sync === require.resolve', + { todo: true } + ); + } + + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.equal( + resolve.sync('./' + testFile), + require.resolve('./' + testFile), + 'sanity check: resolve.sync === require.resolve' + ); + + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); + +test('sync dot main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_main'), + path.join(__dirname, 'resolver/dot_main/index.js'), + './resolver/dot_main' + ); + t.equal( + resolve.sync('./resolver/dot_main'), + require.resolve('./resolver/dot_main'), + './resolver/dot_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('sync dot slash main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_slash_main'), + path.join(__dirname, 'resolver/dot_slash_main/index.js') + ); + t.equal( + resolve.sync('./resolver/dot_slash_main'), + require.resolve('./resolver/dot_slash_main'), + './resolver/dot_slash_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('not a directory', function (t) { + var path = './foo'; + try { + resolve.sync(path, { basedir: __filename }); + t.fail(); + } catch (err) { + t.ok(err, 'a non-directory errors'); + t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('browser field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./browser_field', { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.end(); +}); + +test('absolute paths', function (t) { + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + t.equal( + resolve.sync(__filename), + __filename, + 'absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(extensionless), + __filename, + 'extensionless absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + __filename, + 'absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + require.resolve(__filename, { paths: [process.cwd()] }), + 'absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + require.resolve(extensionless, { paths: [process.cwd()] }), + 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('malformed package.json', function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + var expected = path.join(basedir, 'index.js'); + + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + expected, + 'malformed package.json is silently ignored' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + require.resolve('./index.js', { paths: [basedir] }), + 'malformed package.json: resolve.sync === require.resolve' + ); + } + + var res1 = resolve.sync( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + } + ); + + t.equal( + res1, + expected, + 'with packageFilter: malformed package.json is silently ignored' + ); + + var res2 = resolve.sync( + './index.js', + { + basedir: basedir, + readPackageSync: function (readFileSync, pkgfile) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + var result = String(readFileSync(pkgfile)); + try { + return JSON.parse(result); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); + } + } + } + ); + + t.equal( + res2, + expected, + 'with readPackageSync: malformed package.json is silently ignored' + ); +}); diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js new file mode 100644 index 0000000..3a5f4fc --- /dev/null +++ b/node_modules/resolve/test/shadowed_core.js @@ -0,0 +1,54 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('shadowed core modules still return core module', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, 'util'); + }); +}); + +test('shadowed core modules still return core module [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, 'util'); +}); + +test('shadowed core modules return shadow when appending `/`', function (t) { + t.plan(2); + + resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow when appending `/` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000..b7b8450 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js new file mode 100644 index 0000000..35f881a --- /dev/null +++ b/node_modules/resolve/test/symlinks.js @@ -0,0 +1,176 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var map = require('array.prototype.map'); +var resolve = require('../'); + +var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); +var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); +var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); +var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); +try { + fs.unlinkSync(symlinkDir); +} catch (err) {} +try { + fs.unlinkSync(packageDir); +} catch (err) {} +try { + fs.unlinkSync(modADir); +} catch (err) {} +try { + fs.unlinkSync(symlinkModADir); +} catch (err) {} + +try { + fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); +} +try { + fs.symlinkSync('../../package', packageDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); +} +try { + fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); +} + +test('symlink', function (t) { + t.plan(2); + + resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { + t.error(err); + t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); + }); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.plan(4); + + resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { + t.ok(err, 'there is an error'); + t.notOk(res, 'no result'); + + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + t.equal( + err && err.message, + 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', + 'can not find nonexistent module' + ); + }); +}); + +test('sync symlink', function (t) { + var start = new Date(); + t.doesNotThrow(function () { + t.equal( + resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), + path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js') + ); + }); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.throws(function () { + resolve.sync('foo', { basedir: symlinkDir }); + }, /Cannot find module 'foo'/); + t.end(); +}); + +test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); + + t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); +}); + +test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + t.plan(2); + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { + t.notOk(err, 'no error'); + t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + }); +}); + +test('packageFilter', function (t) { + function relative(x) { + return path.relative(__dirname, x); + } + + function testPackageFilter(preserveSymlinks) { + return function (st) { + st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition + + var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; + var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; + var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; + var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; + var destDir = path.join(__dirname, 'symlinks', 'dest'); + + /* eslint multiline-comment-style: 0 */ + /* v2.x will restore these tests + var packageFilterPath = []; + var actualPath = resolve.sync('mod-a', { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile, dir) { + packageFilterPath.push(pkgfile); + } + }); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'sync: actual path is correct' + ); + st.deepEqual( + map(packageFilterPath, relative), + map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), + 'sync: packageFilter pkgfile arg is correct' + ); + */ + + var asyncPackageFilterPath = []; + resolve( + 'mod-a', + { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile) { + asyncPackageFilterPath.push(pkgfile); + } + }, + function (err, actualPath) { + st.error(err, 'no error'); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'async: actual path is correct' + ); + st.deepEqual( + map(asyncPackageFilterPath, relative), + map( + preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], + path.normalize + ), + 'async: packageFilter pkgfile arg is correct' + ); + } + ); + }; + } + + t.test('preserveSymlinks: false', testPackageFilter(false)); + + t.test('preserveSymlinks: true', testPackageFilter(true)); + + t.end(); +}); diff --git a/node_modules/reusify/.coveralls.yml b/node_modules/reusify/.coveralls.yml new file mode 100644 index 0000000..359f683 --- /dev/null +++ b/node_modules/reusify/.coveralls.yml @@ -0,0 +1 @@ +repo_token: yIxhFqtaaz5iGVYfie9mODehFYogm8S8L diff --git a/node_modules/reusify/.travis.yml b/node_modules/reusify/.travis.yml new file mode 100644 index 0000000..1970476 --- /dev/null +++ b/node_modules/reusify/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false + +node_js: + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 4.0 + - iojs-v3 + - iojs-v2 + - iojs-v1 + - 0.12 + - 0.10 + +cache: + directories: + - node_modules + +after_script: +- npm run coverage + +notifications: + email: + on_success: never + on_failure: always diff --git a/node_modules/reusify/LICENSE b/node_modules/reusify/LICENSE new file mode 100644 index 0000000..fbf3a01 --- /dev/null +++ b/node_modules/reusify/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/reusify/README.md b/node_modules/reusify/README.md new file mode 100644 index 0000000..badcb7c --- /dev/null +++ b/node_modules/reusify/README.md @@ -0,0 +1,145 @@ +# reusify + +[![npm version][npm-badge]][npm-url] +[![Build Status][travis-badge]][travis-url] +[![Coverage Status][coveralls-badge]][coveralls-url] + +Reuse your objects and functions for maximum speed. This technique will +make any function run ~10% faster. You call your functions a +lot, and it adds up quickly in hot code paths. + +``` +$ node benchmarks/createNoCodeFunction.js +Total time 53133 +Total iterations 100000000 +Iteration/s 1882069.5236482036 + +$ node benchmarks/reuseNoCodeFunction.js +Total time 50617 +Total iterations 100000000 +Iteration/s 1975620.838848608 +``` + +The above benchmark uses fibonacci to simulate a real high-cpu load. +The actual numbers might differ for your use case, but the difference +should not. + +The benchmark was taken using Node v6.10.0. + +This library was extracted from +[fastparallel](http://npm.im/fastparallel). + +## Example + +```js +var reusify = require('reusify') +var fib = require('reusify/benchmarks/fib') +var instance = reusify(MyObject) + +// get an object from the cache, +// or creates a new one when cache is empty +var obj = instance.get() + +// set the state +obj.num = 100 +obj.func() + +// reset the state. +// if the state contains any external object +// do not use delete operator (it is slow) +// prefer set them to null +obj.num = 0 + +// store an object in the cache +instance.release(obj) + +function MyObject () { + // you need to define this property + // so V8 can compile MyObject into an + // hidden class + this.next = null + this.num = 0 + + var that = this + + // this function is never reallocated, + // so it can be optimized by V8 + this.func = function () { + if (null) { + // do nothing + } else { + // calculates fibonacci + fib(that.num) + } + } +} +``` + +The above example was intended for synchronous code, let's see async: +```js +var reusify = require('reusify') +var instance = reusify(MyObject) + +for (var i = 0; i < 100; i++) { + getData(i, console.log) +} + +function getData (value, cb) { + var obj = instance.get() + + obj.value = value + obj.cb = cb + obj.run() +} + +function MyObject () { + this.next = null + this.value = null + + var that = this + + this.run = function () { + asyncOperation(that.value, that.handle) + } + + this.handle = function (err, result) { + that.cb(err, result) + that.value = null + that.cb = null + instance.release(that) + } +} +``` + +Also note how in the above examples, the code, that consumes an istance of `MyObject`, +reset the state to initial condition, just before storing it in the cache. +That's needed so that every subsequent request for an instance from the cache, +could get a clean instance. + +## Why + +It is faster because V8 doesn't have to collect all the functions you +create. On a short-lived benchmark, it is as fast as creating the +nested function, but on a longer time frame it creates less +pressure on the garbage collector. + +## Other examples +If you want to see some complex example, checkout [middie](https://github.com/fastify/middie) and [steed](https://github.com/mcollina/steed). + +## Acknowledgements + +Thanks to [Trevor Norris](https://github.com/trevnorris) for +getting me down the rabbit hole of performance, and thanks to [Mathias +Buss](http://github.com/mafintosh) for suggesting me to share this +trick. + +## License + +MIT + +[npm-badge]: https://badge.fury.io/js/reusify.svg +[npm-url]: https://badge.fury.io/js/reusify +[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg +[travis-url]: https://travis-ci.org/mcollina/reusify +[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github +[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master diff --git a/node_modules/reusify/benchmarks/createNoCodeFunction.js b/node_modules/reusify/benchmarks/createNoCodeFunction.js new file mode 100644 index 0000000..ce1aac7 --- /dev/null +++ b/node_modules/reusify/benchmarks/createNoCodeFunction.js @@ -0,0 +1,30 @@ +'use strict' + +var fib = require('./fib') +var max = 100000000 +var start = Date.now() + +// create a funcion with the typical error +// pattern, that delegates the heavy load +// to something else +function createNoCodeFunction () { + /* eslint no-constant-condition: "off" */ + var num = 100 + + ;(function () { + if (null) { + // do nothing + } else { + fib(num) + } + })() +} + +for (var i = 0; i < max; i++) { + createNoCodeFunction() +} + +var time = Date.now() - start +console.log('Total time', time) +console.log('Total iterations', max) +console.log('Iteration/s', max / time * 1000) diff --git a/node_modules/reusify/benchmarks/fib.js b/node_modules/reusify/benchmarks/fib.js new file mode 100644 index 0000000..e22cc48 --- /dev/null +++ b/node_modules/reusify/benchmarks/fib.js @@ -0,0 +1,13 @@ +'use strict' + +function fib (num) { + var fib = [] + + fib[0] = 0 + fib[1] = 1 + for (var i = 2; i <= num; i++) { + fib[i] = fib[i - 2] + fib[i - 1] + } +} + +module.exports = fib diff --git a/node_modules/reusify/benchmarks/reuseNoCodeFunction.js b/node_modules/reusify/benchmarks/reuseNoCodeFunction.js new file mode 100644 index 0000000..3358d6e --- /dev/null +++ b/node_modules/reusify/benchmarks/reuseNoCodeFunction.js @@ -0,0 +1,38 @@ +'use strict' + +var reusify = require('../') +var fib = require('./fib') +var instance = reusify(MyObject) +var max = 100000000 +var start = Date.now() + +function reuseNoCodeFunction () { + var obj = instance.get() + obj.num = 100 + obj.func() + obj.num = 0 + instance.release(obj) +} + +function MyObject () { + this.next = null + var that = this + this.num = 0 + this.func = function () { + /* eslint no-constant-condition: "off" */ + if (null) { + // do nothing + } else { + fib(that.num) + } + } +} + +for (var i = 0; i < max; i++) { + reuseNoCodeFunction() +} + +var time = Date.now() - start +console.log('Total time', time) +console.log('Total iterations', max) +console.log('Iteration/s', max / time * 1000) diff --git a/node_modules/reusify/package.json b/node_modules/reusify/package.json new file mode 100644 index 0000000..ee66aee --- /dev/null +++ b/node_modules/reusify/package.json @@ -0,0 +1,45 @@ +{ + "name": "reusify", + "version": "1.0.4", + "description": "Reuse objects and functions with style", + "main": "reusify.js", + "scripts": { + "lint": "standard", + "test": "tape test.js | faucet", + "istanbul": "istanbul cover tape test.js", + "coverage": "npm run istanbul; cat coverage/lcov.info | coveralls" + }, + "pre-commit": [ + "lint", + "test" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/reusify.git" + }, + "keywords": [ + "reuse", + "object", + "performance", + "function", + "fast" + ], + "author": "Matteo Collina ", + "license": "MIT", + "bugs": { + "url": "https://github.com/mcollina/reusify/issues" + }, + "homepage": "https://github.com/mcollina/reusify#readme", + "engines": { + "node": ">=0.10.0", + "iojs": ">=1.0.0" + }, + "devDependencies": { + "coveralls": "^2.13.3", + "faucet": "0.0.1", + "istanbul": "^0.4.5", + "pre-commit": "^1.2.2", + "standard": "^10.0.3", + "tape": "^4.8.0" + } +} diff --git a/node_modules/reusify/reusify.js b/node_modules/reusify/reusify.js new file mode 100644 index 0000000..e6f36f3 --- /dev/null +++ b/node_modules/reusify/reusify.js @@ -0,0 +1,33 @@ +'use strict' + +function reusify (Constructor) { + var head = new Constructor() + var tail = head + + function get () { + var current = head + + if (current.next) { + head = current.next + } else { + head = new Constructor() + tail = head + } + + current.next = null + + return current + } + + function release (obj) { + tail.next = obj + tail = obj + } + + return { + get: get, + release: release + } +} + +module.exports = reusify diff --git a/node_modules/reusify/test.js b/node_modules/reusify/test.js new file mode 100644 index 0000000..929cfd7 --- /dev/null +++ b/node_modules/reusify/test.js @@ -0,0 +1,66 @@ +'use strict' + +var test = require('tape') +var reusify = require('./') + +test('reuse objects', function (t) { + t.plan(6) + + function MyObject () { + t.pass('constructor called') + this.next = null + } + + var instance = reusify(MyObject) + var obj = instance.get() + + t.notEqual(obj, instance.get(), 'two instance created') + t.notOk(obj.next, 'next must be null') + + instance.release(obj) + + // the internals keeps a hot copy ready for reuse + // putting this one back in the queue + instance.release(instance.get()) + + // comparing the old one with the one we got + // never do this in real code, after release you + // should never reuse that instance + t.equal(obj, instance.get(), 'instance must be reused') +}) + +test('reuse more than 2 objects', function (t) { + function MyObject () { + t.pass('constructor called') + this.next = null + } + + var instance = reusify(MyObject) + var obj = instance.get() + var obj2 = instance.get() + var obj3 = instance.get() + + t.notOk(obj.next, 'next must be null') + t.notOk(obj2.next, 'next must be null') + t.notOk(obj3.next, 'next must be null') + + t.notEqual(obj, obj2) + t.notEqual(obj, obj3) + t.notEqual(obj3, obj2) + + instance.release(obj) + instance.release(obj2) + instance.release(obj3) + + // skip one + instance.get() + + var obj4 = instance.get() + var obj5 = instance.get() + var obj6 = instance.get() + + t.equal(obj4, obj) + t.equal(obj5, obj2) + t.equal(obj6, obj3) + t.end() +}) diff --git a/node_modules/run-parallel/LICENSE b/node_modules/run-parallel/LICENSE new file mode 100644 index 0000000..c7e6852 --- /dev/null +++ b/node_modules/run-parallel/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/run-parallel/README.md b/node_modules/run-parallel/README.md new file mode 100644 index 0000000..edc3da4 --- /dev/null +++ b/node_modules/run-parallel/README.md @@ -0,0 +1,85 @@ +# run-parallel [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/run-parallel/master.svg +[travis-url]: https://travis-ci.org/feross/run-parallel +[npm-image]: https://img.shields.io/npm/v/run-parallel.svg +[npm-url]: https://npmjs.org/package/run-parallel +[downloads-image]: https://img.shields.io/npm/dm/run-parallel.svg +[downloads-url]: https://npmjs.org/package/run-parallel +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +### Run an array of functions in parallel + +![parallel](https://raw.githubusercontent.com/feross/run-parallel/master/img.png) [![Sauce Test Status](https://saucelabs.com/browser-matrix/run-parallel.svg)](https://saucelabs.com/u/run-parallel) + +### install + +``` +npm install run-parallel +``` + +### usage + +#### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its callback, the main +`callback` is immediately called with the value of the error. Once the `tasks` have +completed, the results are passed to the final `callback` as an array. + +It is also possible to use an object instead of an array. Each property will be run as a +function and the results will be passed to the final `callback` as an object instead of +an array. This can be a more readable way of handling the results. + +##### arguments + +- `tasks` - An array or object containing functions to run. Each function is passed a +`callback(err, result)` which it must call on completion with an error `err` (which can +be `null`) and an optional `result` value. +- `callback(err, results)` - An optional callback to run once all the functions have +completed. This function gets a results array (or object) containing all the result +arguments passed to the task callbacks. + +##### example + +```js +var parallel = require('run-parallel') + +parallel([ + function (callback) { + setTimeout(function () { + callback(null, 'one') + }, 200) + }, + function (callback) { + setTimeout(function () { + callback(null, 'two') + }, 100) + } +], +// optional callback +function (err, results) { + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}) +``` + +This module is basically equavalent to +[`async.parallel`](https://github.com/caolan/async#paralleltasks-callback), but it's +handy to just have the one function you need instead of the kitchen sink. Modularity! +Especially handy if you're serving to the browser and need to reduce your javascript +bundle size. + +Works great in the browser with [browserify](http://browserify.org/)! + +### see also + +- [run-auto](https://github.com/feross/run-auto) +- [run-parallel-limit](https://github.com/feross/run-parallel-limit) +- [run-series](https://github.com/feross/run-series) +- [run-waterfall](https://github.com/feross/run-waterfall) + +### license + +MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/run-parallel/index.js b/node_modules/run-parallel/index.js new file mode 100644 index 0000000..6307141 --- /dev/null +++ b/node_modules/run-parallel/index.js @@ -0,0 +1,51 @@ +/*! run-parallel. MIT License. Feross Aboukhadijeh */ +module.exports = runParallel + +const queueMicrotask = require('queue-microtask') + +function runParallel (tasks, cb) { + let results, pending, keys + let isSync = true + + if (Array.isArray(tasks)) { + results = [] + pending = tasks.length + } else { + keys = Object.keys(tasks) + results = {} + pending = keys.length + } + + function done (err) { + function end () { + if (cb) cb(err, results) + cb = null + } + if (isSync) queueMicrotask(end) + else end() + } + + function each (i, err, result) { + results[i] = result + if (--pending === 0 || err) { + done(err) + } + } + + if (!pending) { + // empty + done(null) + } else if (keys) { + // object + keys.forEach(function (key) { + tasks[key](function (err, result) { each(key, err, result) }) + }) + } else { + // array + tasks.forEach(function (task, i) { + task(function (err, result) { each(i, err, result) }) + }) + } + + isSync = false +} diff --git a/node_modules/run-parallel/package.json b/node_modules/run-parallel/package.json new file mode 100644 index 0000000..1f14757 --- /dev/null +++ b/node_modules/run-parallel/package.json @@ -0,0 +1,58 @@ +{ + "name": "run-parallel", + "description": "Run an array of functions in parallel", + "version": "1.2.0", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/run-parallel/issues" + }, + "dependencies": { + "queue-microtask": "^1.2.2" + }, + "devDependencies": { + "airtap": "^3.0.0", + "standard": "*", + "tape": "^5.0.1" + }, + "homepage": "https://github.com/feross/run-parallel", + "keywords": [ + "parallel", + "async", + "function", + "callback", + "asynchronous", + "run", + "array", + "run parallel" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/run-parallel.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "airtap -- test/*.js", + "test-browser-local": "airtap --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/source-map-js/LICENSE b/node_modules/source-map-js/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/node_modules/source-map-js/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map-js/README.md b/node_modules/source-map-js/README.md new file mode 100644 index 0000000..614962d --- /dev/null +++ b/node_modules/source-map-js/README.md @@ -0,0 +1,765 @@ +# Source Map JS + +[![NPM](https://nodei.co/npm/source-map-js.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map-js) + +Difference between original [source-map](https://github.com/mozilla/source-map): + +> TL,DR: it's fork of original source-map@0.6, but with perfomance optimizations. + +This journey starts from [source-map@0.7.0](https://github.com/mozilla/source-map/blob/master/CHANGELOG.md#070). Some part of it was rewritten to Rust and WASM and API became async. + +It's still a major block for many libraries like PostCSS or Sass for example because they need to migrate the whole API to the async way. This is the reason why 0.6.1 has 2x more downloads than 0.7.3 while it's faster several times. + +![Downloads count](media/downloads.png) + +More important that WASM version has some optimizations in JS code too. This is why [community asked to create branch for 0.6 version](https://github.com/mozilla/source-map/issues/324) and port these optimizations but, sadly, the answer was «no». A bit later I discovered [the issue](https://github.com/mozilla/source-map/issues/370) created by [Ben Rothman (@benthemonkey)](https://github.com/benthemonkey) with no response at all. + +[Roman Dvornov (@lahmatiy)](https://github.com/lahmatiy) wrote a [serveral posts](https://t.me/gorshochekvarit/76) (russian, only, sorry) about source-map library in his own Telegram channel. He mentioned the article [«Maybe you don't need Rust and WASM to speed up your JS»](https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html) written by [Vyacheslav Egorov (@mraleph)](https://github.com/mraleph). This article contains optimizations and hacks that lead to almost the same performance compare to WASM implementation. + +I decided to fork the original source-map and port these optimizations from the article and several others PR from the original source-map. + +--------- + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map-js + + + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map-js/lib/array-set.js b/node_modules/source-map-js/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map-js/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map-js/lib/base64-vlq.js b/node_modules/source-map-js/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map-js/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map-js/lib/base64.js b/node_modules/source-map-js/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map-js/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map-js/lib/binary-search.js b/node_modules/source-map-js/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map-js/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map-js/lib/mapping-list.js b/node_modules/source-map-js/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map-js/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map-js/lib/quick-sort.js b/node_modules/source-map-js/lib/quick-sort.js new file mode 100644 index 0000000..23f9eda --- /dev/null +++ b/node_modules/source-map-js/lib/quick-sort.js @@ -0,0 +1,132 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +exports.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; diff --git a/node_modules/source-map-js/lib/source-map-consumer.js b/node_modules/source-map-js/lib/source-map-consumer.js new file mode 100644 index 0000000..db0a532 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.js @@ -0,0 +1,1184 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map-js/lib/source-map-generator.js b/node_modules/source-map-js/lib/source-map-generator.js new file mode 100644 index 0000000..bab04ff --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.js @@ -0,0 +1,444 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map-js/lib/source-node.js b/node_modules/source-map-js/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map-js/lib/util.js b/node_modules/source-map-js/lib/util.js new file mode 100644 index 0000000..430e2d0 --- /dev/null +++ b/node_modules/source-map-js/lib/util.js @@ -0,0 +1,594 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +var MAX_CACHED_INPUTS = 32; + +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ +function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; +} + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map-js/package.json b/node_modules/source-map-js/package.json new file mode 100644 index 0000000..f16eb36 --- /dev/null +++ b/node_modules/source-map-js/package.json @@ -0,0 +1,71 @@ +{ + "name": "source-map-js", + "description": "Generates and consumes source maps", + "version": "1.2.0", + "homepage": "https://github.com/7rulnik/source-map-js", + "author": "Valentin 7rulnik Semirulnik ", + "contributors": [ + "Nick Fitzgerald ", + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": "7rulnik/source-map-js", + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "clean-publish": "^3.1.0", + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "clean-publish": { + "cleanDocs": true + }, + "typings": "source-map.d.ts" +} diff --git a/node_modules/source-map-js/source-map.d.ts b/node_modules/source-map-js/source-map.d.ts new file mode 100644 index 0000000..9f8a4b3 --- /dev/null +++ b/node_modules/source-map-js/source-map.d.ts @@ -0,0 +1,115 @@ +declare module 'source-map-js' { + export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; + } + + export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; + } + + export interface Position { + line: number; + column: number; + } + + export interface LineRange extends Position { + lastColumn: number; + } + + export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; + } + + export interface SourceFindPosition extends FindPosition { + source: string; + } + + export interface MappedPosition extends Position { + source: string; + name?: string; + } + + export interface MappingItem { + source: string; + generatedLine: number; + generatedColumn: number; + originalLine: number; + originalColumn: number; + name: string; + } + + export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; + } + + export interface Mapping { + generated: Position; + original: Position; + source: string; + name?: string; + } + + export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; + } + + export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; + } + + export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; + } +} + +declare module 'source-map-js/lib/source-map-generator' { + import { SourceMapGenerator } from 'source-map-js' + export { SourceMapGenerator } +} + +declare module 'source-map-js/lib/source-map-consumer' { + import { SourceMapConsumer } from 'source-map-js' + export { SourceMapConsumer } +} + +declare module 'source-map-js/lib/source-node' { + import { SourceNode } from 'source-map-js' + export { SourceNode } +} diff --git a/node_modules/source-map-js/source-map.js b/node_modules/source-map-js/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map-js/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/supports-preserve-symlinks-flag/.DS_Store b/node_modules/supports-preserve-symlinks-flag/.DS_Store new file mode 100644 index 0000000..6887bde Binary files /dev/null and b/node_modules/supports-preserve-symlinks-flag/.DS_Store differ diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000..346ffec --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000..e8d64f3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000..61f607f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000..2e7b9a3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/supports-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000..eb05b12 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000..087be1f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000..86fd5d3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000..56edadc --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000..9938d67 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/node_modules/tailwindcss/.DS_Store b/node_modules/tailwindcss/.DS_Store new file mode 100644 index 0000000..27da690 Binary files /dev/null and b/node_modules/tailwindcss/.DS_Store differ diff --git a/node_modules/tailwindcss/CHANGELOG.md b/node_modules/tailwindcss/CHANGELOG.md new file mode 100644 index 0000000..d6ec8e5 --- /dev/null +++ b/node_modules/tailwindcss/CHANGELOG.md @@ -0,0 +1,2187 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +- Nothing yet! + +## [3.1.4] - 2022-06-21 + +### Fixed + +- Provide default to `` when using `theme()` ([#8652](https://github.com/tailwindlabs/tailwindcss/pull/8652)) +- Detect arbitrary variants with quotes ([#8687](https://github.com/tailwindlabs/tailwindcss/pull/8687)) +- Don’t add spaces around raw `/` that are preceded by numbers ([#8688](https://github.com/tailwindlabs/tailwindcss/pull/8688)) + +## [3.1.3] - 2022-06-14 + +### Fixed + +- Fix extraction of multi-word utilities with arbitrary values and quotes ([#8604](https://github.com/tailwindlabs/tailwindcss/pull/8604)) +- Fix casing of import of `corePluginList` type definition ([#8587](https://github.com/tailwindlabs/tailwindcss/pull/8587)) +- Ignore PostCSS nodes returned by `addVariant` ([#8608](https://github.com/tailwindlabs/tailwindcss/pull/8608)) +- Fix missing spaces around arithmetic operators ([#8615](https://github.com/tailwindlabs/tailwindcss/pull/8615)) +- Detect alpha value in CSS `theme()` function when using quotes ([#8625](https://github.com/tailwindlabs/tailwindcss/pull/8625)) +- Fix "Maximum call stack size exceeded" bug ([#8636](https://github.com/tailwindlabs/tailwindcss/pull/8636)) +- Allow functions returning parallel variants to mutate the container ([#8622](https://github.com/tailwindlabs/tailwindcss/pull/8622)) +- Remove text opacity CSS variables from `::marker` ([#8622](https://github.com/tailwindlabs/tailwindcss/pull/8622)) + +## [3.1.2] - 2022-06-10 + +### Fixed + +- Ensure `\` is a valid arbitrary variant token ([#8576](https://github.com/tailwindlabs/tailwindcss/pull/8576)) +- Enable `postcss-import` in the CLI by default in watch mode ([#8574](https://github.com/tailwindlabs/tailwindcss/pull/8574), [#8580](https://github.com/tailwindlabs/tailwindcss/pull/8580)) + +## [3.1.1] - 2022-06-09 + +### Fixed + +- Fix candidate extractor regression ([#8558](https://github.com/tailwindlabs/tailwindcss/pull/8558)) +- Split `::backdrop` into separate defaults group ([#8567](https://github.com/tailwindlabs/tailwindcss/pull/8567)) +- Fix postcss plugin type ([#8564](https://github.com/tailwindlabs/tailwindcss/pull/8564)) +- Fix class detection in markdown code fences and slim templates ([#8569](https://github.com/tailwindlabs/tailwindcss/pull/8569)) + +## [3.1.0] - 2022-06-08 + +### Fixed + +- Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926)) +- Don’t split vars with numbers in them inside arbitrary values ([#8091](https://github.com/tailwindlabs/tailwindcss/pull/8091)) +- Require matching prefix when detecting negatives ([#8121](https://github.com/tailwindlabs/tailwindcss/pull/8121)) +- Handle duplicate At Rules without children ([#8122](https://github.com/tailwindlabs/tailwindcss/pull/8122)) +- Allow arbitrary values with commas in `@apply` ([#8125](https://github.com/tailwindlabs/tailwindcss/pull/8125)) +- Fix intellisense for plugins with multiple `@apply` rules ([#8213](https://github.com/tailwindlabs/tailwindcss/pull/8213)) +- Improve type detection for arbitrary color values ([#8201](https://github.com/tailwindlabs/tailwindcss/pull/8201)) +- Support PostCSS config options in config file in CLI ([#8226](https://github.com/tailwindlabs/tailwindcss/pull/8226)) +- Remove default `[hidden]` style in preflight ([#8248](https://github.com/tailwindlabs/tailwindcss/pull/8248)) +- Only check selectors containing base apply candidates for circular dependencies ([#8222](https://github.com/tailwindlabs/tailwindcss/pull/8222)) +- Rewrite default class extractor ([#8204](https://github.com/tailwindlabs/tailwindcss/pull/8204)) +- Move `important` selector to the front when `@apply`-ing selector-modifying variants in custom utilities ([#8313](https://github.com/tailwindlabs/tailwindcss/pull/8313)) +- Error when registering an invalid custom variant ([#8345](https://github.com/tailwindlabs/tailwindcss/pull/8345)) +- Create tailwind.config.cjs file in ESM package when running init ([#8363](https://github.com/tailwindlabs/tailwindcss/pull/8363)) +- Fix `matchVariants` that use at-rules and placeholders ([#8392](https://github.com/tailwindlabs/tailwindcss/pull/8392)) +- Improve types of the `tailwindcss/plugin` ([#8400](https://github.com/tailwindlabs/tailwindcss/pull/8400)) +- Allow returning parallel variants from `addVariant` or `matchVariant` callback functions ([#8455](https://github.com/tailwindlabs/tailwindcss/pull/8455)) +- Try using local `postcss` installation first in the CLI ([#8270](https://github.com/tailwindlabs/tailwindcss/pull/8270)) +- Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587)) +- Don't inherit `to` value from parent gradients ([#8489](https://github.com/tailwindlabs/tailwindcss/pull/8489)) +- Remove process dependency from log functions ([#8530](https://github.com/tailwindlabs/tailwindcss/pull/8530)) +- Ensure we can use `@import 'tailwindcss/...'` without node_modules ([#8537](https://github.com/tailwindlabs/tailwindcss/pull/8537)) + +### Changed + +- Only apply hover styles when supported (future) ([#8394](https://github.com/tailwindlabs/tailwindcss/pull/8394)) +- Respect default ring color opacity (future) ([#8448](https://github.com/tailwindlabs/tailwindcss/pull/8448), [3f4005e](https://github.com/tailwindlabs/tailwindcss/commit/3f4005e833445f7549219eb5ae89728cbb3a2630)) + +### Added + +- Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291)) +- Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656)) +- Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800)) +- Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725)) +- Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102)) +- Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905)) +- Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891)) +- Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924), [#8526](https://github.com/tailwindlabs/tailwindcss/pull/8526)) +- Add `grid-flow-dense` utility ([#8193](https://github.com/tailwindlabs/tailwindcss/pull/8193)) +- Add `mix-blend-plus-lighter` utility ([#8288](https://github.com/tailwindlabs/tailwindcss/pull/8288)) +- Add arbitrary variants ([#8299](https://github.com/tailwindlabs/tailwindcss/pull/8299)) +- Add experimental `matchVariant` API ([#8310](https://github.com/tailwindlabs/tailwindcss/pull/8310), [34fd0fb8](https://github.com/tailwindlabs/tailwindcss/commit/34fd0fb82aa574cddc5c7aa3ad7d1af5e3735e5d)) +- Add `prefers-contrast` media query variants ([#8410](https://github.com/tailwindlabs/tailwindcss/pull/8410)) +- Add opacity support when referencing colors with `theme` function ([#8416](https://github.com/tailwindlabs/tailwindcss/pull/8416)) +- Add `postcss-import` support to the CLI ([#8437](https://github.com/tailwindlabs/tailwindcss/pull/8437)) +- Add `optional` variant ([#8486](https://github.com/tailwindlabs/tailwindcss/pull/8486)) +- Add `` placeholder support for custom colors ([#8501](https://github.com/tailwindlabs/tailwindcss/pull/8501)) + +## [3.0.24] - 2022-04-12 + +### Fixed + +- Prevent nesting plugin from breaking other plugins ([#7563](https://github.com/tailwindlabs/tailwindcss/pull/7563)) +- Recursively collapse adjacent rules ([#7565](https://github.com/tailwindlabs/tailwindcss/pull/7565)) +- Preserve source maps for generated CSS ([#7588](https://github.com/tailwindlabs/tailwindcss/pull/7588)) +- Split box shadows on top-level commas only ([#7479](https://github.com/tailwindlabs/tailwindcss/pull/7479)) +- Use local user CSS cache for `@apply` ([#7524](https://github.com/tailwindlabs/tailwindcss/pull/7524)) +- Invalidate context when main CSS changes ([#7626](https://github.com/tailwindlabs/tailwindcss/pull/7626)) +- Only add `!` to selector class matching template candidate when using important modifier with mutli-class selectors ([#7664](https://github.com/tailwindlabs/tailwindcss/pull/7664)) +- Correctly parse and prefix animation names with dots ([#7163](https://github.com/tailwindlabs/tailwindcss/pull/7163)) +- Fix extraction from template literal/function with array ([#7481](https://github.com/tailwindlabs/tailwindcss/pull/7481)) +- Don't output unparsable arbitrary values ([#7789](https://github.com/tailwindlabs/tailwindcss/pull/7789)) +- Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815)) +- Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933)) +- Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949)) +- Ensure the `percentage` data type is validated correctly ([#8015](https://github.com/tailwindlabs/tailwindcss/pull/8015)) +- Make sure `font-weight` is inherited by form controls in all browsers ([#8078](https://github.com/tailwindlabs/tailwindcss/pull/8078)) + +### Changed + +- Replace `chalk` with `picocolors` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6039)) +- Replace `cosmiconfig` with `lilconfig` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6038)) +- Update `cssnano` to avoid removing empty variables when minifying ([#7818](https://github.com/tailwindlabs/tailwindcss/pull/7818)) + +## [3.0.23] - 2022-02-16 + +### Fixed + +- Remove opacity variables from `:visited` pseudo class ([#7458](https://github.com/tailwindlabs/tailwindcss/pull/7458)) +- Support arbitrary values + calc + theme with quotes ([#7462](https://github.com/tailwindlabs/tailwindcss/pull/7462)) +- Don't duplicate layer output when scanning content with variants + wildcards ([#7478](https://github.com/tailwindlabs/tailwindcss/pull/7478)) +- Implement `getClassOrder` instead of `sortClassList` ([#7459](https://github.com/tailwindlabs/tailwindcss/pull/7459)) + +## [3.0.22] - 2022-02-11 + +### Fixed + +- Temporarily move `postcss` to dependencies ([#7424](https://github.com/tailwindlabs/tailwindcss/pull/7424)) + +## [3.0.21] - 2022-02-10 + +### Fixed + +- Move prettier plugin to dev dependencies ([#7418](https://github.com/tailwindlabs/tailwindcss/pull/7418)) + +## [3.0.20] - 2022-02-10 + +### Added + +- Expose `context.sortClassList(classes)` ([#7412](https://github.com/tailwindlabs/tailwindcss/pull/7412)) + +## [3.0.19] - 2022-02-07 + +### Fixed + +- Fix preflight border color fallback ([#7288](https://github.com/tailwindlabs/tailwindcss/pull/7288)) +- Correctly parse shadow lengths without a leading zero ([#7289](https://github.com/tailwindlabs/tailwindcss/pull/7289)) +- Don't crash when scanning extremely long class candidates ([#7331](https://github.com/tailwindlabs/tailwindcss/pull/7331)) +- Use less hacky fix for URLs detected as custom properties ([#7275](https://github.com/tailwindlabs/tailwindcss/pull/7275)) +- Correctly generate negative utilities when dash is before the prefix ([#7295](https://github.com/tailwindlabs/tailwindcss/pull/7295)) +- Detect prefixed negative utilities in the safelist ([#7295](https://github.com/tailwindlabs/tailwindcss/pull/7295)) + +## [3.0.18] - 2022-01-28 + +### Fixed + +- Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](https://github.com/tailwindlabs/tailwindcss/pull/7232)) +- Quick fix for incorrect arbitrary properties when using URLs ([#7252](https://github.com/tailwindlabs/tailwindcss/pull/7252)) + +## [3.0.17] - 2022-01-26 + +### Fixed + +- Remove false positive warning in CLI when using the `--content` option ([#7220](https://github.com/tailwindlabs/tailwindcss/pull/7220)) + +## [3.0.16] - 2022-01-24 + +### Fixed + +- Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](https://github.com/tailwindlabs/tailwindcss/pull/7080)) +- Improve various warnings ([#7118](https://github.com/tailwindlabs/tailwindcss/pull/7118)) +- Fix grammatical mistake ([cca5a38](https://github.com/tailwindlabs/tailwindcss/commit/cca5a3804e1d3ee0214491921e1aec35bf62a813)) + +## [3.0.15] - 2022-01-15 + +### Fixed + +- Temporarily remove optional chaining in nesting plugin ([#7077](https://github.com/tailwindlabs/tailwindcss/pull/7077)) + +## [3.0.14] - 2022-01-14 + +### Added + +- Show warnings for invalid content config ([#7065](https://github.com/tailwindlabs/tailwindcss/pull/7065)) + +### Fixed + +- Only emit utility/component variants when those layers exist ([#7066](https://github.com/tailwindlabs/tailwindcss/pull/7066)) +- Ensure nesting plugins can receive options ([#7016](https://github.com/tailwindlabs/tailwindcss/pull/7016)) + +## [3.0.13] - 2022-01-11 + +### Fixed + +- Fix consecutive builds with at apply producing different CSS ([#6999](https://github.com/tailwindlabs/tailwindcss/pull/6999)) + +## [3.0.12] - 2022-01-07 + +### Fixed + +- Allow use of falsy values in theme config ([#6917](https://github.com/tailwindlabs/tailwindcss/pull/6917)) +- Ensure we can apply classes that are grouped with non-class selectors ([#6922](https://github.com/tailwindlabs/tailwindcss/pull/6922)) +- Improve standalone CLI compatibility on Linux by switching to the `linuxstatic` build target ([#6914](https://github.com/tailwindlabs/tailwindcss/pull/6914)) +- Ensure `@apply` works consistently with or without `@layer` ([#6938](https://github.com/tailwindlabs/tailwindcss/pull/6938)) +- Only emit defaults when using base layer ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926)) +- Emit plugin defaults regardless of usage ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926)) +- Move default border color back to preflight ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926)) +- Change `experimental.optimizeUniversalDefaults` to only work with `@tailwind base` ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926)) + +## [3.0.11] - 2022-01-05 + +### Fixed + +- Preserve casing of CSS variables added by plugins ([#6888](https://github.com/tailwindlabs/tailwindcss/pull/6888)) +- Ignore content paths that are passed in but don't actually exist ([#6901](https://github.com/tailwindlabs/tailwindcss/pull/6901)) +- Revert change that applies Tailwind's defaults in isolated environments like CSS modules ([9fdc391](https://github.com/tailwindlabs/tailwindcss/commit/9fdc391d4ff93e7e350f5ce439060176b1f0162f)) + +## [3.0.10] - 2022-01-04 + +### Fixed + +- Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580), [#6875](https://github.com/tailwindlabs/tailwindcss/pull/6875)) +- CLI: avoid unnecessary writes to output files ([#6550](https://github.com/tailwindlabs/tailwindcss/pull/6550)) + +### Added + +- Allow piping data into the CLI ([#6876](https://github.com/tailwindlabs/tailwindcss/pull/6876)) + +## [3.0.9] - 2022-01-03 + +### Fixed + +- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804)) +- Ensure we can use `<` and `>` characters in modifiers ([#6851](https://github.com/tailwindlabs/tailwindcss/pull/6851)) +- Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852)) +- Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854)) +- Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856)) +- Remove support for `TAILWIND_MODE=watch` ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858)) + +## [3.0.8] - 2021-12-28 + +### Fixed + +- Reduce specificity of `abbr` rule in preflight ([#6671](https://github.com/tailwindlabs/tailwindcss/pull/6671)) +- Support HSL with hue units in arbitrary values ([#6726](https://github.com/tailwindlabs/tailwindcss/pull/6726)) +- Add `node16-linux-arm64` target for standalone CLI ([#6693](https://github.com/tailwindlabs/tailwindcss/pull/6693)) + +## [3.0.7] - 2021-12-17 + +### Fixed + +- Don't mutate custom color palette when overriding per-plugin colors ([#6546](https://github.com/tailwindlabs/tailwindcss/pull/6546)) +- Improve circular dependency detection when using `@apply` ([#6588](https://github.com/tailwindlabs/tailwindcss/pull/6588)) +- Only generate variants for non-`user` layers ([#6589](https://github.com/tailwindlabs/tailwindcss/pull/6589)) +- Properly extract classes with arbitrary values in arrays and classes followed by escaped quotes ([#6590](https://github.com/tailwindlabs/tailwindcss/pull/6590)) +- Improve jsx interpolation candidate matching ([#6593](https://github.com/tailwindlabs/tailwindcss/pull/6593)) +- Ensure `@apply` of a rule inside an AtRule works ([#6594](https://github.com/tailwindlabs/tailwindcss/pull/6594)) + +## [3.0.6] - 2021-12-16 + +### Fixed + +- Support square bracket notation in paths ([#6519](https://github.com/tailwindlabs/tailwindcss/pull/6519)) +- Ensure all plugins are executed for a given candidate ([#6540](https://github.com/tailwindlabs/tailwindcss/pull/6540)) + +## [3.0.5] - 2021-12-15 + +### Fixed + +- Revert: add `li` to list-style reset ([9777562d](https://github.com/tailwindlabs/tailwindcss/commit/9777562da37ee631bbf77374c0d14825f09ef9af)) + +## [3.0.4] - 2021-12-15 + +### Fixed + +- Insert always-on defaults layer in correct spot ([#6526](https://github.com/tailwindlabs/tailwindcss/pull/6526)) + +## [3.0.3] - 2021-12-15 + +### Added + +- Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449)) +- Add standalone tailwindcss CLI ([#6506](https://github.com/tailwindlabs/tailwindcss/pull/6506)) +- Add `li` to list-style reset ([00f60e6](https://github.com/tailwindlabs/tailwindcss/commit/00f60e61013c6e4e3419e4b699371a13eb30b75d)) + +### Fixed + +- Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469)) +- Fix text decoration utilities from overriding the new text decoration color/style/thickness utilities when used with a modifier ([#6378](https://github.com/tailwindlabs/tailwindcss/pull/6378)) +- Move defaults to their own always-on layer ([#6500](https://github.com/tailwindlabs/tailwindcss/pull/6500)) +- Support negative values in safelist patterns ([#6480](https://github.com/tailwindlabs/tailwindcss/pull/6480)) + +## [3.0.2] - 2021-12-13 + +### Fixed + +- Temporarily disable optimize universal defaults, fixes issue with transforms/filters/rings not being `@apply`-able in CSS modules/Svelte components/Vue components ([#6461](https://github.com/tailwindlabs/tailwindcss/pull/6461)) + +## [3.0.1] - 2021-12-10 + +### Fixed + +- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311)) +- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348)) +- Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365)) +- Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369)) + +## [3.0.0] - 2021-12-09 + +### Fixed + +- Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018)) + +### Added + +- Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106)) +- Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115)) +- Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161)) +- Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046)) +- Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004)) +- Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213)) +- Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259)) +- Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258)) +- Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7)) +- Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283)) + +### Changed + +- Deprecate `decoration-slice` and `decoration-break` in favor `box-decoration-slice` and `box-decoration-break` _(non-breaking)_ ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004)) + +## [3.0.0-alpha.2] - 2021-11-08 + +### Changed + +- Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772)) +- Set default content value in preflight instead of within each before/after utility ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820)) +- Remove `prefix` as a function ([#5829](https://github.com/tailwindlabs/tailwindcss/pull/5829)) + +### Added + +- Add `flex-basis` utilities ([#5671](https://github.com/tailwindlabs/tailwindcss/pull/5671)) +- Make negative values a first-class feature ([#5709](https://github.com/tailwindlabs/tailwindcss/pull/5709)) +- Add `fit-content` values for `min/max-width/height` utilities ([#5638](https://github.com/tailwindlabs/tailwindcss/pull/5638)) +- Add `min/max-content` values for `min/max-height` utilities ([#5729](https://github.com/tailwindlabs/tailwindcss/pull/5729)) +- Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734)) +- Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733)) +- Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760)) +- Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809)) +- Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885)) +- Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887)) +- Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933)) +- Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979)) + +### Fixed + +- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774)) +- Fix CLI `--content` option ([#5775](https://github.com/tailwindlabs/tailwindcss/pull/5775)) +- Fix before/after utilities overriding custom content values at larger breakpoints ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820)) +- Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830)) +- Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853)) +- Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854)) +- Handle color transformations properly with `theme(...)` for all relevant plugins ([#4533](https://github.com/tailwindlabs/tailwindcss/pull/4533), [#5871](https://github.com/tailwindlabs/tailwindcss/pull/5871)) +- Ensure `@apply`-ing a utility with multiple definitions works ([#5870](https://github.com/tailwindlabs/tailwindcss/pull/5870)) + +## [3.0.0-alpha.1] - 2021-10-01 + +### Changed + +- Remove AOT engine, make JIT the default ([#5340](https://github.com/tailwindlabs/tailwindcss/pull/5340)) +- Throw when trying to `@apply` the `group` class ([#4666](https://github.com/tailwindlabs/tailwindcss/pull/4666)) +- Remove dependency on `modern-normalize`, inline and consolidate with Preflight ([#5358](https://github.com/tailwindlabs/tailwindcss/pull/5358)) +- Enable extended color palette by default with updated color names ([#5384](https://github.com/tailwindlabs/tailwindcss/pull/5384)) +- Move `vertical-align` values to config file instead of hard-coding ([#5487](https://github.com/tailwindlabs/tailwindcss/pull/5487)) +- Rename `overflow-clip` to `text-clip` and `overflow-ellipsis` to `text-ellipsis` ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630)) + +### Added + +- Add native `aspect-ratio` utilities ([#5359](https://github.com/tailwindlabs/tailwindcss/pull/5359)) +- Unify config callback helpers into single object ([#5382](https://github.com/tailwindlabs/tailwindcss/pull/5382)) +- Preserve original color format when adding opacity whenever possible ([#5154](https://github.com/tailwindlabs/tailwindcss/pull/5154)) +- Add `accent-color` utilities ([#5387](https://github.com/tailwindlabs/tailwindcss/pull/5387)) +- Add `scroll-behavior` utilities ([#5388](https://github.com/tailwindlabs/tailwindcss/pull/5388)) +- Add `will-change` utilities ([#5448](https://github.com/tailwindlabs/tailwindcss/pull/5448)) +- Add `text-indent` utilities ([#5449](https://github.com/tailwindlabs/tailwindcss/pull/5449)) +- Add `column` utilities ([#5457](https://github.com/tailwindlabs/tailwindcss/pull/5457)) +- Add `border-hidden` utility ([#5485](https://github.com/tailwindlabs/tailwindcss/pull/5485)) +- Add `align-sub` and `align-super` utilities by default ([#5486](https://github.com/tailwindlabs/tailwindcss/pull/5486)) +- Add `break-before`, `break-inside` and `break-after` utilities ([#5530](https://github.com/tailwindlabs/tailwindcss/pull/5530)) +- Add `file` variant for `::file-selector-button` pseudo element ([#4936](https://github.com/tailwindlabs/tailwindcss/pull/4936)) +- Add comprehensive arbitrary value support ([#5568](https://github.com/tailwindlabs/tailwindcss/pull/5568)) +- Add `touch-action` utilities ([#5603](https://github.com/tailwindlabs/tailwindcss/pull/5603)) +- Add `inherit` to default color palette ([#5597](https://github.com/tailwindlabs/tailwindcss/pull/5597)) +- Add `overflow-clip`, `overflow-x-clip` and `overflow-y-clip` utilities ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630)) +- Add `[open]` variant ([#5627](https://github.com/tailwindlabs/tailwindcss/pull/5627)) +- Add `scroll-snap` utilities ([#5637](https://github.com/tailwindlabs/tailwindcss/pull/5637)) +- Add `border-x` and `border-y` width and color utilities ([#5639](https://github.com/tailwindlabs/tailwindcss/pull/5639)) + +### Fixed + +- Fix defining colors as functions when color opacity plugins are disabled ([#5470](https://github.com/tailwindlabs/tailwindcss/pull/5470)) +- Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625)) +- Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628)) + +## [2.2.19] - 2021-10-29 + +### Fixed + +- Ensure `corePlugins` order is consisent in AOT mode ([#5928](https://github.com/tailwindlabs/tailwindcss/pull/5928)) + +## [2.2.18] - 2021-10-29 + +### Fixed + +- Bump versions for security vulnerabilities ([#5924](https://github.com/tailwindlabs/tailwindcss/pull/5924)) + +## [2.2.17] - 2021-10-13 + +### Fixed + +- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5758](https://github.com/tailwindlabs/tailwindcss/pull/5758)) + +## [2.2.16] - 2021-09-26 + +### Fixed + +- JIT: Properly handle animations that use CSS custom properties ([#5602](https://github.com/tailwindlabs/tailwindcss/pull/5602)) + +## [2.2.15] - 2021-09-10 + +### Fixed + +- Ensure using CLI without `-i` for input file continues to work even though deprecated ([#5464](https://github.com/tailwindlabs/tailwindcss/pull/5464)) + +## [2.2.14] - 2021-09-08 + +### Fixed + +- Only use `@defaults` in JIT, switch back to `clean-css` in case there's any meaningful differences in the output ([bf248cb](https://github.com/tailwindlabs/tailwindcss/commit/bf248cb0de889d48854fbdd26536f4a492556efd)) + +## [2.2.13] - 2021-09-08 + +### Fixed + +- Replace `clean-css` with `cssnano` for CDN builds to fix minified builds ([75cc3ca](https://github.com/tailwindlabs/tailwindcss/commit/75cc3ca305aedddc8a85f3df1a420fefad3fb5c4)) + +## [2.2.12] - 2021-09-08 + +### Fixed + +- Ensure that divide utilities inject a default border color ([#5438](https://github.com/tailwindlabs/tailwindcss/pull/5438)) + +## [2.2.11] - 2021-09-07 + +### Fixed + +- Rebundle to fix missing CLI peer dependencies + +## [2.2.10] - 2021-09-06 + +### Fixed + +- Fix build error when using `presets: []` in config file ([#4903](https://github.com/tailwindlabs/tailwindcss/pull/4903)) + +### Added + +- Reintroduce universal selector optimizations under experimental `optimizeUniversalDefaults` flag ([a9e160c](https://github.com/tailwindlabs/tailwindcss/commit/a9e160cf9acb75a2bbac34f8864568b12940f89a)) + +## [2.2.9] - 2021-08-30 + +### Fixed + +- JIT: Fix `@apply`ing utilities that contain variants + the important modifier ([#4854](https://github.com/tailwindlabs/tailwindcss/pull/4854)) +- JIT: Don't strip "null" when parsing tracked file paths ([#5008](https://github.com/tailwindlabs/tailwindcss/pull/5008)) +- Pin `clean-css` to v5.1.4 to fix empty CSS variables in CDN builds ([#5338](https://github.com/tailwindlabs/tailwindcss/pull/5338)) + +## [2.2.8] - 2021-08-27 + +### Fixed + +- Improve accessibility of default link focus styles in Firefox ([#5082](https://github.com/tailwindlabs/tailwindcss/pull/5082)) +- JIT: Fix animation variants corrupting keyframes rules ([#5223](https://github.com/tailwindlabs/tailwindcss/pull/5223)) +- JIT: Ignore escaped commas when splitting selectors to apply prefixes ([#5239](https://github.com/tailwindlabs/tailwindcss/pull/5239/)) +- Nesting: Maintain PostCSS node sources when handling `@apply` ([#5249](https://github.com/tailwindlabs/tailwindcss/pull/5249)) +- JIT: Fix support for animation lists ([#5252](https://github.com/tailwindlabs/tailwindcss/pull/5252)) +- JIT: Fix arbitrary value support for `object-position` utilities ([#5245](https://github.com/tailwindlabs/tailwindcss/pull/5245)) +- CLI: Abort watcher if stdin is closed to avoid zombie processes ([#4997](https://github.com/tailwindlabs/tailwindcss/pull/4997)) +- JIT: Ignore arbitrary values with unbalanced brackets ([#5293](https://github.com/tailwindlabs/tailwindcss/pull/5293)) + +## [2.2.7] - 2021-07-23 + +### Fixed + +- Temporarily revert runtime performance optimizations introduced in v2.2.5, use universal selector again ([#5060](https://github.com/tailwindlabs/tailwindcss/pull/5060)) + +## [2.2.6] - 2021-07-21 + +### Fixed + +- Fix issue where base styles not generated for translate transforms in JIT ([#5038](https://github.com/tailwindlabs/tailwindcss/pull/5038)) + +## [2.2.5] - 2021-07-21 + +### Added + +- Added `self-baseline` utility (I know this is a patch release, no one's going to die relax) ([#5000](https://github.com/tailwindlabs/tailwindcss/pull/5000)) + +### Changed + +- JIT: Optimize universal selector usage by inlining only the relevant selectors ([#4850](https://github.com/tailwindlabs/tailwindcss/pull/4850))) + + This provides a very significant performance boost on pages with a huge number of DOM nodes, but there's a chance it could be a breaking change in very rare edge cases we haven't thought of. Please open an issue if anything related to shadows, rings, transforms, filters, or backdrop-filters seems to be behaving differently after upgrading. + +### Fixed + +- Fix support for `step-start` and `step-end` in animation utilities ([#4795](https://github.com/tailwindlabs/tailwindcss/pull/4795))) +- JIT: Prevent presence of `!*` in templates from ruining everything ([#4816](https://github.com/tailwindlabs/tailwindcss/pull/4816))) +- JIT: Improve support for quotes in arbitrary values ([#4817](https://github.com/tailwindlabs/tailwindcss/pull/4817))) +- Fix filter/backdrop-filter/transform utilities being inserted into the wrong position if not all core plugins are enabled ([#4852](https://github.com/tailwindlabs/tailwindcss/pull/4852))) +- JIT: Fix `@layer` rules being mistakenly inserted during incremental rebuilds ([#4853](https://github.com/tailwindlabs/tailwindcss/pull/4853))) +- Improve build performance for projects with many small non-Tailwind stylesheets ([#4644](https://github.com/tailwindlabs/tailwindcss/pull/4644)) +- Ensure `[hidden]` works as expected on elements where we override the default `display` value in Preflight ([#4873](https://github.com/tailwindlabs/tailwindcss/pull/4873)) +- Fix variant configuration not being applied to `backdropOpacity` utilities ([#4892](https://github.com/tailwindlabs/tailwindcss/pull/4892)) + +## [2.2.4] - 2021-06-23 + +### Fixed + +- Remove `postinstall` script that was preventing people from installing the library ([1eacfb9](https://github.com/tailwindlabs/tailwindcss/commit/1eacfb98849c0d4737e0af3595ddec8c73addaac)) + +## [2.2.3] - 2021-06-23 + +### Added + +- Pass extended color palette to theme closures so it can be used without installing Tailwind when using `npx tailwindcss` ([359252c](https://github.com/tailwindlabs/tailwindcss/commit/359252c9b429e81217c28eb3ca7bab73d8f81e6d)) + +### Fixed + +- JIT: Explicitly error when `-` is used as a custom separator ([#4704](https://github.com/tailwindlabs/tailwindcss/pull/4704)) +- JIT: Don't add multiple `~` when stacking `peer-*` variants ([#4757](https://github.com/tailwindlabs/tailwindcss/pull/4757)) +- Remove outdated focus style fix in Preflight ([#4780](https://github.com/tailwindlabs/tailwindcss/pull/4780)) +- Enable `purge` if provided on the CLI ([#4772](https://github.com/tailwindlabs/tailwindcss/pull/4772)) +- JIT: Fix error when not using a config file with postcss-cli ([#4773](https://github.com/tailwindlabs/tailwindcss/pull/4773)) +- Fix issue with `resolveConfig` not being importable in Next.js pags ([#4725](https://github.com/tailwindlabs/tailwindcss/pull/4725)) + +## [2.2.2] - 2021-06-18 + +### Fixed + +- JIT: Reintroduce `transform`, `filter`, and `backdrop-filter` classes purely to create stacking contexts to minimize the impact of the breaking change ([#4700](https://github.com/tailwindlabs/tailwindcss/pull/4700)) + +## [2.2.1] - 2021-06-18 + +### Fixed + +- Recover from errors gracefully in CLI watch mode ([#4693](https://github.com/tailwindlabs/tailwindcss/pull/4693)) +- Fix issue with media queries not being generated properly when using PostCSS 7 ([#4695](https://github.com/tailwindlabs/tailwindcss/pull/4695)) + +## [2.2.0] - 2021-06-17 + +### Changed + +- JIT: Use "tracking" context by default instead of "watching" context for improved reliability with most bundlers ([#4514](https://github.com/tailwindlabs/tailwindcss/pull/4514)) + + Depending on which tooling you use, you may need to explicitly set `TAILWIND_MODE=watch` until your build runner has been updated to support PostCSS's `dir-dependency` message type. + +### Added + +- Add `background-origin` utilities ([#4117](https://github.com/tailwindlabs/tailwindcss/pull/4117)) +- Improve `@apply` performance in projects that process many CSS sources ([#3178](https://github.com/tailwindlabs/tailwindcss/pull/3718)) +- JIT: Don't use CSS variables for color utilities if color opacity utilities are disabled ([#3984](https://github.com/tailwindlabs/tailwindcss/pull/3984)) +- JIT: Redesign `matchUtilities` API to make it more suitable for third-party use ([#4232](https://github.com/tailwindlabs/tailwindcss/pull/4232)) +- JIT: Support applying important utility variants ([#4260](https://github.com/tailwindlabs/tailwindcss/pull/4260)) +- JIT: Support coercing arbitrary values when the type isn't detectable ([#4263](https://github.com/tailwindlabs/tailwindcss/pull/4263)) +- JIT: Support for `raw` syntax in `purge` config ([#4272](https://github.com/tailwindlabs/tailwindcss/pull/4272)) +- Add `empty` variant ([#3298](https://github.com/tailwindlabs/tailwindcss/pull/3298)) +- Update `modern-normalize` to v1.1 ([#4287](https://github.com/tailwindlabs/tailwindcss/pull/4287)) +- Implement `theme` function internally, remove `postcss-functions` dependency ([#4317](https://github.com/tailwindlabs/tailwindcss/pull/4317)) +- Add `screen` function to improve nesting plugin compatibility ([#4318](https://github.com/tailwindlabs/tailwindcss/pull/4318)) +- JIT: Add universal shorthand color opacity syntax ([#4348](https://github.com/tailwindlabs/tailwindcss/pull/4348)) +- JIT: Add `@tailwind variants` directive to replace `@tailwind screens` ([#4356](https://github.com/tailwindlabs/tailwindcss/pull/4356)) +- JIT: Add support for PostCSS `dir-dependency` messages in `TAILWIND_DISABLE_TOUCH` mode ([#4388](https://github.com/tailwindlabs/tailwindcss/pull/4388)) +- JIT: Add per-side border color utilities ([#4404](https://github.com/tailwindlabs/tailwindcss/pull/4404)) +- JIT: Add support for `before` and `after` pseudo-element variants and `content` utilities ([#4461](https://github.com/tailwindlabs/tailwindcss/pull/4461)) +- Add new `transform` and `extract` APIs to simplify PurgeCSS/JIT customization ([#4469](https://github.com/tailwindlabs/tailwindcss/pull/4469)) +- JIT: Add exhaustive pseudo-class and pseudo-element variant support ([#4482](https://github.com/tailwindlabs/tailwindcss/pull/4482)) +- JIT: Add `caret-color` utilities ([#4499](https://github.com/tailwindlabs/tailwindcss/pull/4499)) +- Rename `lightBlue` to `sky`, emit console warning when using deprecated name ([#4513](https://github.com/tailwindlabs/tailwindcss/pull/4513)) +- New CLI with improved JIT support, `--watch` mode, and more ([#4526](https://github.com/tailwindlabs/tailwindcss/pull/4526), [4558](https://github.com/tailwindlabs/tailwindcss/pull/4558)) +- JIT: Add new `peer-*` variants for styling based on sibling state ([#4556](https://github.com/tailwindlabs/tailwindcss/pull/4556)) +- Expose `safelist` as a top-level option under `purge` for both JIT and classic engines ([#4580](https://github.com/tailwindlabs/tailwindcss/pull/4580)) +- JIT: Remove need for `transform` class when using classes like `scale-*`, `rotate-*`, etc. ([#4604](https://github.com/tailwindlabs/tailwindcss/pull/4604)) +- JIT: Remove need for `filter` and `backdrop-filter` classes when using classes like `contrast-*`, `backdrop-blur-*`, etc. ([#4614](https://github.com/tailwindlabs/tailwindcss/pull/4614)) +- Support passing a custom path for your PostCSS configuration in the Tailwind CLI ([#4607](https://github.com/tailwindlabs/tailwindcss/pull/4607)) +- Add `blur-none` by default with intent to deprecate `blur-0` ([#4614](https://github.com/tailwindlabs/tailwindcss/pull/4614)) + +### Fixed + +- JIT: Improve support for Svelte class bindings ([#4187](https://github.com/tailwindlabs/tailwindcss/pull/4187)) +- JIT: Improve support for `calc` and `var` in arbitrary values ([#4147](https://github.com/tailwindlabs/tailwindcss/pull/4147)) +- Convert `hsl` colors to `hsla` when transforming for opacity support instead of `rgba` ([#3850](https://github.com/tailwindlabs/tailwindcss/pull/3850)) +- Fix `backdropBlur` variants not being generated ([#4188](https://github.com/tailwindlabs/tailwindcss/pull/4188)) +- Improve animation value parsing ([#4250](https://github.com/tailwindlabs/tailwindcss/pull/4250)) +- Ignore unknown object types when hashing config ([82f4eaa](https://github.com/tailwindlabs/tailwindcss/commit/82f4eaa6832ef8a4e3fd90869e7068efdf6e34f2)) +- Ensure variants are grouped properly for plugins with order-dependent utilities ([#4273](https://github.com/tailwindlabs/tailwindcss/pull/4273)) +- JIT: Fix temp file storage when node temp directories are kept on a different drive than the project itself ([#4044](https://github.com/tailwindlabs/tailwindcss/pull/4044)) +- Support border-opacity utilities alongside default `border` utility ([#4277](https://github.com/tailwindlabs/tailwindcss/pull/4277)) +- JIT: Fix source maps for expanded `@tailwind` directives ([2f15411](https://github.com/tailwindlabs/tailwindcss/commit/2f1541123dea29d8a2ab0f1411bf60c79eeb96b4)) +- JIT: Ignore whitespace when collapsing adjacent rules ([15642fb](https://github.com/tailwindlabs/tailwindcss/commit/15642fbcc885eba9cc50b7678a922b09c90d6b51)) +- JIT: Generate group parent classes correctly when using custom separator ([#4508](https://github.com/tailwindlabs/tailwindcss/pull/4508)) +- JIT: Fix incorrect stacking of multiple `group` variants ([#4551](https://github.com/tailwindlabs/tailwindcss/pull/4551)) +- JIT: Fix memory leak due to holding on to unused contexts ([#4571](https://github.com/tailwindlabs/tailwindcss/pull/4571)) + +### Internals + +- Add integration tests for popular build runners ([#4354](https://github.com/tailwindlabs/tailwindcss/pull/4354)) + +## [2.1.4] - 2021-06-02 + +### Fixed + +- Skip `raw` PurgeCSS sources when registering template dependencies ([#4542](https://github.com/tailwindlabs/tailwindcss/pull/4542)) + +## [2.1.3] - 2021-06-01 + +### Fixed + +- Register PurgeCSS paths as PostCSS dependencies to guarantee proper cache-busting in webpack 5 ([#4530](https://github.com/tailwindlabs/tailwindcss/pull/4530)) + +## [2.1.2] - 2021-04-23 + +### Fixed + +- Fix issue where JIT engine would generate the wrong CSS when using PostCSS 7 ([#4078](https://github.com/tailwindlabs/tailwindcss/pull/4078)) + +## [2.1.1] - 2021-04-05 + +### Fixed + +- Fix issue where JIT engine would fail to compile when a source path isn't provided by the build runner for the current input file ([#3978](https://github.com/tailwindlabs/tailwindcss/pull/3978)) + +## [2.1.0] - 2021-04-05 + +### Added + +- Add alternate JIT engine (in preview) ([#3905](https://github.com/tailwindlabs/tailwindcss/pull/3905)) +- Add new `mix-blend-mode` and `background-blend-mode` utilities ([#3920](https://github.com/tailwindlabs/tailwindcss/pull/3920)) +- Add new `box-decoration-break` utilities ([#3911](https://github.com/tailwindlabs/tailwindcss/pull/3911)) +- Add new `isolation` utilities ([#3914](https://github.com/tailwindlabs/tailwindcss/pull/3914)) +- Add `inline-table` display utility ([#3563](https://github.com/tailwindlabs/tailwindcss/pull/3563)) +- Add `list-item` display utility ([#3929](https://github.com/tailwindlabs/tailwindcss/pull/3929)) +- Add new `filter` and `backdrop-filter` utilities ([#3923](https://github.com/tailwindlabs/tailwindcss/pull/3923)) + +## [2.0.4] - 2021-03-17 + +### Fixed + +- Pass full `var(--bg-opacity)` value as `opacityValue` when defining colors as functions + +## [2.0.3] - 2021-02-07 + +### Fixed + +- Ensure sourcemap input is deterministic when using `@apply` in Vue components ([#3356](https://github.com/tailwindlabs/tailwindcss/pull/3356)) +- Ensure placeholder opacity is consistent across browsers ([#3308](https://github.com/tailwindlabs/tailwindcss/pull/3308)) +- Fix issue where `theme()` didn't work with colors defined as functions ([#2919](https://github.com/tailwindlabs/tailwindcss/pull/2919)) +- Enable `dark` variants by default for color opacity utilities ([#2975](https://github.com/tailwindlabs/tailwindcss/pull/2975)) + +### Added + +- Add support for a `tailwind.config.cjs` file in Node ESM projects ([#3181](https://github.com/tailwindlabs/tailwindcss/pull/3181)) +- Add version comment to Preflight ([#3255](https://github.com/tailwindlabs/tailwindcss/pull/3255)) +- Add `cursor-help` by default ([#3199](https://github.com/tailwindlabs/tailwindcss/pull/3199)) + +## [2.0.2] - 2020-12-11 + +### Fixed + +- Fix issue with `@apply` not working as expected with `!important` inside an atrule ([#2824](https://github.com/tailwindlabs/tailwindcss/pull/2824)) +- Fix issue with `@apply` not working as expected with defined classes ([#2832](https://github.com/tailwindlabs/tailwindcss/pull/2832)) +- Fix memory leak, and broken `@apply` when splitting up files ([#3032](https://github.com/tailwindlabs/tailwindcss/pull/3032)) + +### Added + +- Add default values for the `ring` utility ([#2951](https://github.com/tailwindlabs/tailwindcss/pull/2951)) + +## [2.0.1] - 2020-11-18 + +- Nothing, just the only thing I could do when I found out npm won't let me publish the same version under two tags. + +## [2.0.0] - 2020-11-18 + +### Added + +- Add redesigned color palette ([#2623](https://github.com/tailwindlabs/tailwindcss/pull/2623), [700866c](https://github.com/tailwindlabs/tailwindcss/commit/700866ce5e0c0b8d140be161c4d07fc6f31242bc), [#2633](https://github.com/tailwindlabs/tailwindcss/pull/2633)) +- Add dark mode support ([#2279](https://github.com/tailwindlabs/tailwindcss/pull/2279), [#2631](https://github.com/tailwindlabs/tailwindcss/pull/2631)) +- Add `overflow-ellipsis` and `overflow-clip` utilities ([#1289](https://github.com/tailwindlabs/tailwindcss/pull/1289)) +- Add `transform-gpu` to force hardware acceleration on transforms when desired ([#1380](https://github.com/tailwindlabs/tailwindcss/pull/1380)) +- Extend default spacing scale ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630), [7f05204](https://github.com/tailwindlabs/tailwindcss/commit/7f05204ce7a5581b6845591448265c3c21afde86)) +- Add spacing scale to `inset` plugin ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630)) +- Add percentage sizes to `translate`, `inset`, and `height` plugins ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630), [5259560](https://github.com/tailwindlabs/tailwindcss/commit/525956065272dc53e8f8395f55f9ad13077a38d1)) +- Extend default font size scale ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609), [#2619](https://github.com/tailwindlabs/tailwindcss/pull/2619)) +- Support using `@apply` with complex classes, including variants like `lg:hover:bg-blue-500` ([#2159](https://github.com/tailwindlabs/tailwindcss/pull/2159)) +- Add new `2xl` breakpoint at 1536px by default ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609)) +- Add default line-height values for font-size utilities ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609)) +- Support defining theme values using arrays for CSS properties that support comma separated values ([e13f083c4](https://github.com/tailwindlabs/tailwindcss/commit/e13f083c4bc48bf9870d27c966136a9584943127)) +- Enable `group-hover` for color plugins, `boxShadow`, and `textDecoration` by default ([28985b6](https://github.com/tailwindlabs/tailwindcss/commit/28985b6cd592e72d4849fdb9ce97eb045744e09c), [f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Enable `focus` for z-index utilities by default ([ae5b3d3](https://github.com/tailwindlabs/tailwindcss/commit/ae5b3d312d5000ae9c2065001f3df7add72dc365)) +- Support `extend` in `variants` configuration ([#2651](https://github.com/tailwindlabs/tailwindcss/pull/2651)) +- Add `max-w-prose` class by default ([#2574](https://github.com/tailwindlabs/tailwindcss/pull/2574)) +- Support flattening deeply nested color objects ([#2148](https://github.com/tailwindlabs/tailwindcss/pull/2148)) +- Support defining presets as functions ([#2680](https://github.com/tailwindlabs/tailwindcss/pull/2680)) +- Support deep merging of objects under `extend` ([#2679](https://github.com/tailwindlabs/tailwindcss/pull/2679), [#2700](https://github.com/tailwindlabs/tailwindcss/pull/2700)) +- Enable `focus-within` for all plugins that have `focus` enabled by default ([1a21f072](https://github.com/tailwindlabs/tailwindcss/commit/1a21f0721c7368d61fa3feef33d616de3f78c7d7), [f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Added new `ring` utilities for creating outline/focus rings using box shadows ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747), [879f088](https://github.com/tailwindlabs/tailwindcss/commit/879f088), [e0788ef](https://github.com/tailwindlabs/tailwindcss/commit/879f088)) +- Added `5` and `95` to opacity scale ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747)) +- Add support for default duration and timing function values whenever enabling transitions ([#2755](https://github.com/tailwindlabs/tailwindcss/pull/2755)) + +### Changed + +- Completely redesign color palette ([#2623](https://github.com/tailwindlabs/tailwindcss/pull/2623), [700866c](https://github.com/tailwindlabs/tailwindcss/commit/700866ce5e0c0b8d140be161c4d07fc6f31242bc), [#2633](https://github.com/tailwindlabs/tailwindcss/pull/2633)) +- Drop support for Node 8 and 10 ([#2582](https://github.com/tailwindlabs/tailwindcss/pull/2582)) +- Removed `target` feature and dropped any compatibility with IE 11 ([#2571](https://github.com/tailwindlabs/tailwindcss/pull/2571)) +- Upgrade to PostCSS 8 (but include PostCSS 7 compatibility build) ([729b400](https://github.com/tailwindlabs/tailwindcss/commit/729b400a685973f46af73c8a68b364f20f7c5e1e), [1d8679d](https://github.com/tailwindlabs/tailwindcss/commit/1d8679d37e0eb1ba8281b2076bade5fc754f47dd), [c238ed1](https://github.com/tailwindlabs/tailwindcss/commit/c238ed15b5c02ff51978965511312018f2bc2cae)) +- Removed `shadow-outline`, `shadow-solid`, and `shadow-xs` by default in favor of new `ring` API ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747)) +- Switch `normalize.css` to `modern-normalize` ([#2572](https://github.com/tailwindlabs/tailwindcss/pull/2572)) +- Rename `whitespace-no-wrap` to `whitespace-nowrap` ([#2664](https://github.com/tailwindlabs/tailwindcss/pull/2664)) +- Rename `flex-no-wrap` to `flex-nowrap` ([#2676](https://github.com/tailwindlabs/tailwindcss/pull/2676)) +- Remove `clearfix` utility, recommend `flow-root` instead ([#2766](https://github.com/tailwindlabs/tailwindcss/pull/2766)) +- Disable `hover` and `focus` for `fontWeight` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Remove `grid-gap` fallbacks needed for old versions of Safari ([5ec45fa](https://github.com/tailwindlabs/tailwindcss/commit/5ec45fa)) +- Change special use of 'default' in config to 'DEFAULT' ([#2580](https://github.com/tailwindlabs/tailwindcss/pull/2580)) +- New `@apply` implementation, slight backwards incompatibilities with previous behavior ([#2159](https://github.com/tailwindlabs/tailwindcss/pull/2159)) +- Make `theme` retrieve the expected resolved value when theme value is complex ([e13f083c4](https://github.com/tailwindlabs/tailwindcss/commit/e13f083c4bc48bf9870d27c966136a9584943127)) +- Move `truncate` class to `textOverflow` core plugin ([#2562](https://github.com/tailwindlabs/tailwindcss/pull/2562)) +- Remove `scrolling-touch` and `scrolling-auto` utilities ([#2573](https://github.com/tailwindlabs/tailwindcss/pull/2573)) +- Modernize default system font stacks ([#1711](https://github.com/tailwindlabs/tailwindcss/pull/1711)) +- Upgrade to PurgeCSS 3.0 ([8e4e0a0](https://github.com/tailwindlabs/tailwindcss/commit/8e4e0a0eb8dcbf84347c7562988b4f9afd344081)) +- Change default `text-6xl` font-size to 3.75rem instead of 4rem ([#2619](https://github.com/tailwindlabs/tailwindcss/pull/2619)) +- Ignore `[hidden]` elements within `space` and `divide` utilities instead of `template` elements ([#2642](https://github.com/tailwindlabs/tailwindcss/pull/2642)) +- Automatically prefix keyframes and animation names when a prefix is configured ([#2621](https://github.com/tailwindlabs/tailwindcss/pull/2621), [#2641](https://github.com/tailwindlabs/tailwindcss/pull/2641)) +- Merge `extend` objects deeply by default ([#2679](https://github.com/tailwindlabs/tailwindcss/pull/2679)) +- Respect `preserveHtmlElements` option even when using custom PurgeCSS extractor ([#2704](https://github.com/tailwindlabs/tailwindcss/pull/2704)) +- Namespace all internal custom properties under `tw-` to avoid collisions with end-user custom properties ([#2771](https://github.com/tailwindlabs/tailwindcss/pull/2771)) + +## [2.0.0-alpha.25] - 2020-11-17 + +### Fixed + +- Fix issue where `ring-offset-0` didn't work due to unitless `0` in `calc` function ([3de0c48](https://github.com/tailwindlabs/tailwindcss/commit/3de0c48)) + +## [2.0.0-alpha.24] - 2020-11-16 + +### Changed + +- Don't override ring color when overriding ring width with a variant ([e40079a](https://github.com/tailwindlabs/tailwindcss/commit/e40079a)) + +### Fixed + +- Prevent shadow/ring styles from cascading to children ([e40079a](https://github.com/tailwindlabs/tailwindcss/commit/e40079a)) +- Ensure rings have a default color even if `colors.blue.500` is not present in config ([e40079a](https://github.com/tailwindlabs/tailwindcss/commit/e40079a)) + +## [2.0.0-alpha.23] - 2020-11-16 + +### Added + +- Add scripts for generating a PostCSS 7 compatible build alongside PostCSS 8 version ([#2773](https://github.com/tailwindlabs/tailwindcss/pull/2773)) + +### Changed + +- All custom properties have been internally namespaced under `tw-` to avoid collisions with end-user custom properties ([#2771](https://github.com/tailwindlabs/tailwindcss/pull/2771)) + +## [2.0.0-alpha.22] - 2020-11-16 + +### Changed + +- ~~All custom properties have been internally namespaced under `tw-` to avoid collisions with end-user custom properties ([#2771](https://github.com/tailwindlabs/tailwindcss/pull/2771))~~ I made a git boo-boo, check alpha.23 instead + +## [2.0.0-alpha.21] - 2020-11-15 + +### Changed + +- Upgrade to PostCSS 8, Autoprefixer 10, move `postcss` and `autoprefixer` to peerDependencies ([729b400](https://github.com/tailwindlabs/tailwindcss/commit/729b400)) + +## [2.0.0-alpha.20] - 2020-11-13 + +### Changed + +- Remove `clearfix` utility, recommend `flow-root` instead ([#2766](https://github.com/tailwindlabs/tailwindcss/pull/2766)) + +## [2.0.0-alpha.19] - 2020-11-13 + +### Fixed + +- Don't crash when color palette is empty ([278c203](https://github.com/tailwindlabs/tailwindcss/commit/278c203)) + +## [2.0.0-alpha.18] - 2020-11-13 + +### Changed + +- `black` and `white` have been added to `colors.js` ([b3ed724](https://github.com/tailwindlabs/tailwindcss/commit/b3ed724)) + +### Fixed + +- Add support for colors as closures to `ringColor` and `ringOffsetColor`, previously would crash build ([62a47f9](https://github.com/tailwindlabs/tailwindcss/commit/62a47f9)) + +## [2.0.0-alpha.17] - 2020-11-13 + +### Changed + +- Remove `grid-gap` fallbacks needed for old versions of Safari ([5ec45fa](https://github.com/tailwindlabs/tailwindcss/commit/5ec45fa)) + +## [2.0.0-alpha.16] - 2020-11-12 + +### Added + +- Enable `focus`, `focus-within`, and `dark` variants (when enabled) for all ring utilities by default ([e0788ef](https://github.com/tailwindlabs/tailwindcss/commit/879f088)) + +## [2.0.0-alpha.15] - 2020-11-11 + +### Added + +- Added `ring-inset` utility for rendering rings as inset shadows ([879f088](https://github.com/tailwindlabs/tailwindcss/commit/879f088)) + +### Changed + +- `ringWidth` utilities always reset ring styles to ensure no accidental variable inheritance through the cascade ([879f088](https://github.com/tailwindlabs/tailwindcss/commit/879f088)) + +## [2.0.0-alpha.14] - 2020-11-11 + +### Added + +- Enable `focus-within` for `outline` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Enable `focus-within` for `ringWidth` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Enable `group-hover` for `boxShadow` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) +- Enable `group-hover` and `focus-within` for `textDecoration` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) + +### Changed + +- Disable `hover` and `focus` for `fontWeight` utilities by default ([f6923b1](https://github.com/tailwindlabs/tailwindcss/commit/f6923b1)) + +## [2.0.0-alpha.13] - 2020-11-11 + +### Added + +- Add support for default duration and timing function values whenever enabling transitions ([#2755](https://github.com/tailwindlabs/tailwindcss/pull/2755)) + +## [2.0.0-alpha.12] - 2020-11-10 + +### Fixed + +- Prevent `boxShadow` utilities from overriding ring shadows added by components like in the custom forms plugin ([c3dd3b6](https://github.com/tailwindlabs/tailwindcss/commit/c3dd3b68454ad418833a9edf7f3409cad66fb5b0)) + +## [2.0.0-alpha.11] - 2020-11-09 + +### Fixed + +- Convert `none` to `0 0 #0000` when used for shadows to ensure compatibility with `ring` utilities ([4eecc27](https://github.com/tailwindlabs/tailwindcss/commit/4eecc2751ca0c461e8da5bd5772ae650197a2e5d)) + +## [2.0.0-alpha.10] - 2020-11-09 + +### Added + +- Added new `ring` utilities ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747)) +- Added `5` and `95` to opacity scale ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747)) + +### Changed + +- Removed `shadow-outline`, `shadow-solid`, and `shadow-xs` in favor of new `ring` API ([#2747](https://github.com/tailwindlabs/tailwindcss/pull/2747)) + +## [2.0.0-alpha.9] - 2020-11-07 + +### Added + +- Added `shadow-solid` utility, a 2px solid shadow that uses the current text color ([369cfae](https://github.com/tailwindlabs/tailwindcss/commit/369cfae2905a577033529c46a5e8ca58c69f5623)) +- Enable `focus-within` where useful by default ([1a21f072](https://github.com/tailwindlabs/tailwindcss/commit/1a21f0721c7368d61fa3feef33d616de3f78c7d7)) + +### Changed + +- Update `shadow-outline` to use the new blue ([b078238](https://github.com/tailwindlabs/tailwindcss/commit/b0782385c9832d35a10929b38b4fcaf27e055d6b)) + +## [2.0.0-alpha.8] - 2020-11-06 + +### Added + +- Add `11` to spacing scale ([7f05204](https://github.com/tailwindlabs/tailwindcss/commit/7f05204ce7a5581b6845591448265c3c21afde86)) +- Add percentage-based height values ([5259560](https://github.com/tailwindlabs/tailwindcss/commit/525956065272dc53e8f8395f55f9ad13077a38d1)) +- Add indigo to the color palette by default ([700866c](https://github.com/tailwindlabs/tailwindcss/commit/700866ce5e0c0b8d140be161c4d07fc6f31242bc)) + +### Changed + +- Use `coolGray` as the default gray ([700866c](https://github.com/tailwindlabs/tailwindcss/commit/700866ce5e0c0b8d140be161c4d07fc6f31242bc)) + +## [2.0.0-alpha.7] - 2020-11-05 + +### Changed + +- Revert upgrading to PostCSS 8 lol + +## [2.0.0-alpha.6] - 2020-11-04 + +### Changed + +- Respect `preserveHtmlElements` option even when using custom PurgeCSS extractor ([#2704](https://github.com/tailwindlabs/tailwindcss/pull/2704)) +- Set font-family and line-height to `inherit` on `body` to behave more like v1.x ([#2729](https://github.com/tailwindlabs/tailwindcss/pull/2729)) + +## [2.0.0-alpha.5] - 2020-10-30 + +### Changed + +- Upgrade to PostCSS 8 ([59aa484](https://github.com/tailwindlabs/tailwindcss/commit/59aa484dfea0607d96bff6ef41b1150c78576c37)) + +## [2.0.0-alpha.4] - 2020-10-29 + +### Added + +- Support deep merging of arrays of objects under `extend` ([#2700](https://github.com/tailwindlabs/tailwindcss/pull/2700)) + +## [2.0.0-alpha.3] - 2020-10-27 + +### Added + +- Support flattening deeply nested color objects ([#2148](https://github.com/tailwindlabs/tailwindcss/pull/2148)) +- Support defining presets as functions ([#2680](https://github.com/tailwindlabs/tailwindcss/pull/2680)) + +### Changed + +- Merge `extend` objects deeply by default ([#2679](https://github.com/tailwindlabs/tailwindcss/pull/2679)) +- Rename `flex-no-wrap` to `flex-nowrap` ([#2676](https://github.com/tailwindlabs/tailwindcss/pull/2676)) + +## [2.0.0-alpha.2] - 2020-10-25 + +### Added + +- Support `extend` in `variants` configuration ([#2651](https://github.com/tailwindlabs/tailwindcss/pull/2651)) +- Add `max-w-prose` class by default ([#2574](https://github.com/tailwindlabs/tailwindcss/pull/2574)) + +### Changed + +- Revert use of logical properties for `space` and `divide` utilities ([#2644](https://github.com/tailwindlabs/tailwindcss/pull/2644)) +- `space` and `divide` utilities ignore elements with `[hidden]` now instead of only ignoring `template` elements ([#2642](https://github.com/tailwindlabs/tailwindcss/pull/2642)) +- Set default font on `body`, not just `html` ([#2643](https://github.com/tailwindlabs/tailwindcss/pull/2643)) +- Automatically prefix keyframes and animation names when a prefix is configured ([#2621](https://github.com/tailwindlabs/tailwindcss/pull/2621), [#2641](https://github.com/tailwindlabs/tailwindcss/pull/2641)) +- Rename `whitespace-no-wrap` to `whitespace-nowrap` ([#2664](https://github.com/tailwindlabs/tailwindcss/pull/2664)) + +## [1.9.6] - 2020-10-23 + +### Changed + +- The `presets` feature had unexpected behavior where a preset config without its own `presets` key would not extend the default config. ([#2662](https://github.com/tailwindlabs/tailwindcss/pull/2662)) + + If you were depending on this unexpected behavior, just add `presets: []` to your own preset to exclude the default configuration. + +## [2.0.0-alpha.1] - 2020-10-20 + +### Added + +- Added dark mode support ([#2279](https://github.com/tailwindlabs/tailwindcss/pull/2279), [#2631](https://github.com/tailwindlabs/tailwindcss/pull/2631)) +- Added `overflow-ellipsis` and `overflow-clip` utilities ([#1289](https://github.com/tailwindlabs/tailwindcss/pull/1289)) +- Add `transform-gpu` to force hardware acceleration on transforms when beneficial ([#1380](https://github.com/tailwindlabs/tailwindcss/pull/1380)) +- Extended spacing scale ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630)) +- Add spacing scale to `inset` plugin ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630)) +- Enable useful relative sizes for more plugins ([#2630](https://github.com/tailwindlabs/tailwindcss/pull/2630)) +- Extend font size scale ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609), [#2619](https://github.com/tailwindlabs/tailwindcss/pull/2619)) +- Support using `@apply` with complex classes ([#2159](https://github.com/tailwindlabs/tailwindcss/pull/2159)) +- Add new `2xl` breakpoint ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609)) +- Add default line-height values for font-size utilities ([#2609](https://github.com/tailwindlabs/tailwindcss/pull/2609)) +- Support defining theme values using arrays wherever it makes sense (box-shadow, transition-property, etc.) ([e13f083c4](https://github.com/tailwindlabs/tailwindcss/commit/e13f083c4bc48bf9870d27c966136a9584943127)) +- Enable `group-hover` for color utilities by default ([28985b6](https://github.com/tailwindlabs/tailwindcss/commit/28985b6cd592e72d4849fdb9ce97eb045744e09c)) +- Enable `focus` for z-index utilities by default ([ae5b3d3](https://github.com/tailwindlabs/tailwindcss/commit/ae5b3d312d5000ae9c2065001f3df7add72dc365)) + +### Changed + +- New `@apply` implementation, slight backwards incompatibilities with previous behavior ([#2159](https://github.com/tailwindlabs/tailwindcss/pull/2159)) +- Move `truncate` class to `textOverflow` core plugin ([#2562](https://github.com/tailwindlabs/tailwindcss/pull/2562)) +- Removed `target` feature and dropped any compatibility with IE 11 ([#2571](https://github.com/tailwindlabs/tailwindcss/pull/2571)) +- Switch `normalize.css` to `modern-normalize` ([#2572](https://github.com/tailwindlabs/tailwindcss/pull/2572)) +- Remove `scrolling-touch` and `scrolling-auto` utilities ([#2573](https://github.com/tailwindlabs/tailwindcss/pull/2573)) +- Change special use of 'default' in config to 'DEFAULT' ([#2580](https://github.com/tailwindlabs/tailwindcss/pull/2580)) +- Drop support for Node 8 and 10 ([#2582](https://github.com/tailwindlabs/tailwindcss/pull/2582)) +- Modernize default system font stacks ([#1711](https://github.com/tailwindlabs/tailwindcss/pull/1711)) +- Upgrade to PurgeCSS 3.0 +- ~~Upgrade to PostCSS 8.0~~ Reverted for now +- Use logical properties for `space` and `divide` utilities ([#1883](https://github.com/tailwindlabs/tailwindcss/pull/1883)) +- Make `theme` retrieve the expected resolved value when theme value is complex ([e13f083c4](https://github.com/tailwindlabs/tailwindcss/commit/e13f083c4bc48bf9870d27c966136a9584943127)) +- Adjust default font-size scale to include 60px instead of 64px ([#2619](https://github.com/tailwindlabs/tailwindcss/pull/2619)) +- Update default colors in Preflight to match new color palette ([#2633](https://github.com/tailwindlabs/tailwindcss/pull/2633)) + +## [1.9.5] - 2020-10-19 + +### Fixed + +- Fix issue where using `theme` with default line-heights did not resolve correctly + +## [1.9.4] - 2020-10-17 + +### Fixed + +- Fix issue changing plugins defined using the `withOptions` API would not trigger rebuilds in watch processes + +## [1.9.3] - 2020-10-16 + +### Fixed + +- Fix issue where `tailwindcss init --full` scaffolded a corrupt config file (https://github.com/tailwindlabs/tailwindcss/issues/2556) + +### Changed + +- Remove console warnings about upcoming breaking changes + +## [1.9.2] - 2020-10-14 + +### Fixed + +- Merge plugins when merging config with preset ([#2561](https://github.com/tailwindlabs/tailwindcss/pulls/#2561) +- Use `word-wrap` and `overflow-wrap` together, not one or the other since `word-wrap` is IE-only + +## [1.9.1] - 2020-10-14 + +### Fixed + +- Don't import `corePlugins` in `resolveConfig` to avoid bundling browser-incompatible code ([#2548](https://github.com/tailwindlabs/tailwindcss/pull/2548)) + +## [1.9.0] - 2020-10-12 + +### Added + +- Add new `presets` config option ([#2474](https://github.com/tailwindlabs/tailwindcss/pull/2474)) +- Scaffold new `tailwind.config.js` files with available `future` flags commented out ([#2379](https://github.com/tailwindlabs/tailwindcss/pull/2379)) +- Add `col-span-full` and `row-span-full` ([#2471](https://github.com/tailwindlabs/tailwindcss/pull/2471)) +- Make `outline` configurable, `outline-none` more accessible by default, and add `outline-black` and `outline-white` ([#2460](https://github.com/tailwindlabs/tailwindcss/pull/2460)) +- Add additional small `rotate` and `skew` values ([#2528](https://github.com/tailwindlabs/tailwindcss/pull/2528)) +- Add `xl`, `2xl`, and `3xl` border radius values ([#2529](https://github.com/tailwindlabs/tailwindcss/pull/2529)) +- Add new utilities for `grid-auto-columns` and `grid-auto-rows` ([#2531](https://github.com/tailwindlabs/tailwindcss/pull/2531)) +- Promote `defaultLineHeights` and `standardFontWeights` from experimental to future + +### Fixed + +- Don't escape keyframe values ([#2432](https://github.com/tailwindlabs/tailwindcss/pull/2432)) +- Use `word-wrap` instead of `overflow-wrap` in `ie11` target mode ([#2391](https://github.com/tailwindlabs/tailwindcss/pull/2391)) + +### Experimental + +- Add experimental `2xl` breakpoint ([#2468](https://github.com/tailwindlabs/tailwindcss/pull/2468)) +- Rename `{u}-max-content` and `{u}-min-content` utilities to `{u}-max` and `{u}-min` in experimental extended spacing scale ([#2532](https://github.com/tailwindlabs/tailwindcss/pull/2532)) +- Support disabling dark mode variants globally ([#2530](https://github.com/tailwindlabs/tailwindcss/pull/2530)) + +## [1.8.13] - 2020-10-09 + +### Fixed + +- Support defining colors as closures even when opacity variables are not supported ([#2536](https://github.com/tailwindlabs/tailwindcss/pull/2515)) + +## [1.8.12] - 2020-10-07 + +### Fixed + +- Reset color opacity variable in utilities generated using closure colors ([#2515](https://github.com/tailwindlabs/tailwindcss/pull/2515)) + +## [1.8.11] - 2020-10-06 + +- Make `tailwindcss.plugin` work in ESM environments for reasons + +## [1.8.10] - 2020-09-14 + +### Fixed + +- Prevent new `dark` experiment from causing third-party `dark` variants to inherit stacking behavior ([#2382](https://github.com/tailwindlabs/tailwindcss/pull/2382)) + +## [1.8.9] - 2020-09-13 + +### Fixed + +- Add negative spacing values to inset plugin in the `extendedSpacingScale` experiment ([#2358](https://github.com/tailwindlabs/tailwindcss/pull/2358)) +- Fix issue where `!important` was stripped from declarations within rules that used `@apply` with `applyComplexClasses` ([#2376](https://github.com/tailwindlabs/tailwindcss/pull/2376)) + +### Changed + +- Add `future` section to config stubs ([#2372](https://github.com/tailwindlabs/tailwindcss/pull/2372), [3090b98](https://github.com/tailwindlabs/tailwindcss/commit/3090b98ece766b1046abe5bbaa94204e811f7fac)) + +## [1.8.8] - 2020-09-11 + +### Fixed + +- Register dark mode plugin outside of `resolveConfig` code path ([#2368](https://github.com/tailwindlabs/tailwindcss/pull/2368)) + +## [1.8.7] - 2020-09-10 + +### Fixed + +- Fix issue where classes in escaped strings (like `class=\"block\"`) weren't extracted properly for purging ([#2364](https://github.com/tailwindlabs/tailwindcss/pull/2364)) + +## [1.8.6] - 2020-09-09 + +### Fixed + +- Fix issue where container padding not applied when using object syntax ([#2353](https://github.com/tailwindlabs/tailwindcss/pull/2353)) + +## [1.8.5] - 2020-09-07 + +### Fixed + +- Fix issue where `resolveConfig` didn't take into account configs added by feature flags ([#2347](https://github.com/tailwindlabs/tailwindcss/pull/2347)) + +## [1.8.4] - 2020-09-06 + +### Fixed + +- Fix [issue](https://github.com/tailwindlabs/tailwindcss/issues/2258) where inserting extra PurgeCSS control comments could break integrated PurgeCSS support +- Fix issue where dark variant in 'class' mode was incompatible with 'group-hover' variant ([#2337](https://github.com/tailwindlabs/tailwindcss/pull/2337)) +- Support basic nesting structure with `@apply` when using the `applyComplexClasses` experiment ([#2271](https://github.com/tailwindlabs/tailwindcss/pull/2271)) + +### Changed + +- Rename `font-hairline` and `font-thin` to `font-thin` and `font-extralight` behind `standardFontWeights` flag (experimental until v1.9.0) ([#2333](https://github.com/tailwindlabs/tailwindcss/pull/2333)) + +## [1.8.3] - 2020-09-05 + +### Fixed + +- Fix issue where `font-variant-numeric` utilities would break in combination with most CSS minifier configurations ([f3660ce](https://github.com/tailwindlabs/tailwindcss/commit/f3660ceed391cfc9390ca4ea1a729a955e64b895)) +- Only warn about `conservative` purge mode being deprecated once per process ([58781b5](https://github.com/tailwindlabs/tailwindcss/commit/58781b517daffbaf80fc5c0791d311f53b2d67d8)) + +## [1.8.2] - 2020-09-04 + +### Fixed + +- Fix bug where dark mode variants would cause an error if you had a `plugins` array in your config ([#2322](https://github.com/tailwindlabs/tailwindcss/pull/2322)) + +## [1.8.1] - 2020-09-04 + +### Fixed + +- Fix bug in the new font-variant-numeric utilities which broke the whole rule ([#2318](https://github.com/tailwindlabs/tailwindcss/pull/2318)) +- Fix bug while purging ([#2320](https://github.com/tailwindlabs/tailwindcss/pull/2320)) + +## [1.8.0] - 2020-09-04 + +### Added + +- Dark mode variant (experimental) ([#2279](https://github.com/tailwindlabs/tailwindcss/pull/2279)) +- New `preserveHtmlElements` option for `purge` ([#2283](https://github.com/tailwindlabs/tailwindcss/pull/2283)) +- New `layers` mode for `purge` ([#2288](https://github.com/tailwindlabs/tailwindcss/pull/2288)) +- New `font-variant-numeric` utilities ([#2305](https://github.com/tailwindlabs/tailwindcss/pull/2305)) +- New `place-items`, `place-content`, `place-self`, `justify-items`, and `justify-self` utilities ([#2306](https://github.com/tailwindlabs/tailwindcss/pull/2306)) +- Support configuring variants as functions ([#2309](https://github.com/tailwindlabs/tailwindcss/pull/2309)) + +### Changed + +- CSS within `@layer` at-rules are now grouped with the corresponding `@tailwind` at-rule ([#2312](https://github.com/tailwindlabs/tailwindcss/pull/2312)) + +### Deprecated + +- `conservative` purge mode, deprecated in favor of `layers` + +## [1.7.6] - 2020-08-29 + +### Fixed + +- Fix bug where the new experimental `@apply` implementation broke when applying a variant class with the important option globally enabled + +## [1.7.5] - 2020-08-28 + +### Changed + +- Update lodash to latest to silence security warnings + +## [1.7.4] - 2020-08-26 + +### Added + +- Add new -p flag to CLI to quickly scaffold a `postcss.config.js` file + +### Changed + +- Make `@apply` insensitive to whitespace in the new `applyComplexClasses` experiment + +### Fixed + +- Fix bug where the new `applyComplexClasses` experiment didn't behave as expected with rules with multiple selectors, like `.foo, .bar { color: red }` + +## [1.7.3] - 2020-08-20 + +### Changed + +- Log feature flag notices to stderr instead of stdout to preserve compatibility with pipe-based build systems +- Add missing bg-none utility for disabling background images + +### Fixed + +- Fix bug that prevented defining colors as closures when the `gradientColorStops` plugin was enabled + +## [1.7.2] - 2020-08-19 + +### Added + +- Reuse generated CSS as much as possible in long-running processes instead of needlessly recalculating + +## [1.7.1] - 2020-08-28 + +### Changed + +- Don't issue duplicate flag notices in long-running build processes + +## [1.7.0] - 2020-08-28 + +### Added + +- Gradients +- New background-clip utilities +- New `contents` display utility +- Default letter-spacing per font-size +- Divide border styles +- Access entire config object from plugins +- Define colors as closures +- Use `@apply` with variants and other complex classes (experimental) +- New additional color-palette (experimental) +- Extended spacing scale (experimental) +- Default line-heights per font-size by default (experimental) +- Extended font size scale (experimental) + +### Deprecated + +- Deprecated gap utilities + +## [1.6.3] - 2020-08-18 + +### Fixed + +- Fixes issue where motion-safe and motion-reduce variants didn't stack correctly with group-hover variants + +## [1.6.2] - 2020-08-03 + +### Fixed + +- Fixes issue where `@keyframes` respecting the important option would break animations in Chrome + +## [1.6.1] - 2020-08-02 + +### Fixed + +- Fixes an issue where animation keyframes weren't included in the build without @tailwind base (#2108) + +## [1.6.0] - 2020-07-28 + +### Added + +- Animation support +- New `prefers-reduced-motion` variants +- New `overscroll-behaviour` utilities +- Generate CSS without an input file + +## [1.5.2] - 2020-07-21 + +### Fixed + +- Fixes issue where you could no longer use `@apply` with unprefixed class names if you had configured a prefix + +## [1.5.1] - 2020-07-15 + +### Fixed + +- Fixes accidental breaking change where adding component variants using the old manual syntax (as recommended in the docs) stopped working + +## [1.5.0] - 2020-07-15 + +### Added + +- Component `variants` support +- Responsive `container` variants +- New `focus-visible` variant +- New `checked` variant + +## v0.0.0-658250a96 - 2020-07-12 [YANKED] + +No release notes + +## [1.4.6] - 2020-05-08 + +### Changed + +- Explicitly error when using a class as the important config option instead of just generating the wrong CSS + +## [1.4.5] - 2020-05-06 + +### Fixed + +- Fix bug where the `divideColor` plugin was using the wrong '' in IE11 target mode + +## [1.4.4] - 2020-05-01 + +### Fixed + +- Fix bug where target: 'browserslist' didn't work, only `target: ['browserslist', {...}]` did + +## [1.4.3] - 2020-05-01 + +### Changed + +- Don't generate unnecessary CSS in color plugins when color opacity utilities are disabled + +## [1.4.2] - 2020-05-01 + +### Fixed + +- Fix issue where `purge: { enabled: false }` was ignored, add `purge: false` shorthand + +## [1.4.1] - 2020-04-30 + +### Changed + +- Improve built-in PurgeCSS extractor to better support Haml and Slim templates + +## [1.4.0] - 2020-04-29 + +### Added + +- New color opacity utilities +- Built-in PurgeCSS +- IE 11 target mode (experimental) + +## [1.3.5] - 2020-04-23 + +### Removed + +- Drop `fs-extra` dependency to `^8.0.0` to preserve Node 8 compatibility until Tailwind 2.0 + +### Fixed + +- Fix missing unit in calc bug in space plugin (`space-x-0` didn't work for example) + +## [1.3.4] - 2020-04-21 + +### Fixed + +- Fix bug where `divide-{x/y}-0` utilities didn't work due to missing unit in `calc` call + +## [1.3.3] - 2020-04-21 + +### Added + +- Add forgotten responsive variants for `space`, `divideWidth`, and `divideColor` utilities + +## [1.3.1] - 2020-04-21 + +### Fixed + +- Fix bug where the `space-x` utilities were not being applied correctly due to referencing `--space-y-reverse` instead of `--space-x-reverse` + +## [1.3.0] - 2020-04-21 + +### Added + +- New `space` and `divide` layout utilities +- New `transition-delay` utilities +- New `group-focus` variant +- Support for specifying a default line-height for each font-size utility +- Support for breakpoint-specific padding for `container` class +- Added `current` to the default color palette +- New `inline-grid` utility +- New `flow-root` display utility +- New `clear-none` utility + +## [1.2.0] - 2020-02-05 + +### Added + +- CSS Transition support +- CSS Transform support +- CSS Grid support +- Added `max-w-{screen}` utilities +- Added `max-w-none` utility +- Added `rounded-md` utility +- Added `shadow-sm` utility +- Added `shadow-xs` utility +- Added `stroke-width` utilities +- Added fixed line-height utilities +- Added additional display utilities for table elements +- Added box-sizing utilities +- Added clear utilities +- Config file dependencies are now watchable +- Added new `plugin` and `plugin.withOptions` APIs + +### Changed + +- Allow plugins to extend the user's config + +## [1.2.0-canary.8] - 2020-02-05 + +### Added + +- Add additional fixed-size line-height utilities + +## [1.2.0-canary.7] - 2020-02-04 + +### Removed + +- Remove Inter from font-sans, plan to add later under new class + +## [1.2.0-canary.6] - 2020-02-03 + +### Added + +- Add system-ui to default font stack +- Add shadow-xs, increase shadow-sm alpha to 0.05 +- Support import syntax even without postcss-import +- Alias tailwind bin to tailwindcss +- Add fill/stroke to transition-colors +- Add transition-shadow, add box-shadow to default transition +- Combine gap/columnGap/rowGap +- Add grid row utilities +- Add skew utilities + +### Changed + +- Use font-sans as default font + +## [1.2.0-canary.5] - 2020-01-08 + +### Added + +- Adds missing dependency `resolve` which is required for making config dependencies watchable + +## [1.2.0-canary.4] - 2020-01-08 + +### Added + +- CSS Transition support +- CSS Transform support +- CSS Grid support +- New `max-w-{screen}` utilities +- Added `max-w-none` utility +- Added "Inter" to the default sans-serif font stack +- Add `rounded-md` utility +- Add `shadow-sm` utility +- Added stroke-width utilities +- Added additional display utilities for table elements +- Added box-sizing utilities +- Added clear utilities +- Config file dependencies are now watchable +- Allow plugins to extend the user's config +- Add new `plugin` and `plugin.withOptions` APIs + +## [v1.2.0-canary.3] - 2020-01-08 [YANKED] + +No release notes + +## [1.1.4] - 2019-11-25 + +### Changed + +- Note: Although this is a bugfix it could affect your site if you were working around the bug in your own code by not prefixing the `.group` class. I'm sorry 😞 + +### Fixed + +- Fixes a bug where the `.group` class was not receiving the user's configured prefix when using the `prefix` option + +## [1.2.0-canary.1] - 2019-10-22 + +### Changed + +- Don't watch `node_modules` files for changes + +### Fixed + +- Fixes significant build performance regression in `v1.2.0-canary.0` + +## [1.1.3] - 2019-10-22 + +### Fixed + +- Fixes an issue where in some cases function properties in the user's `theme` config didn't receive the second utils argument + +## [1.2.0-canary.0] - 2019-10-14 + +### Added + +- Automatically watch all config file dependencies (plugins, design tokens imported from other files, etc.) for changes when build watcher is running +- Add `justify-evenly` utility + +### Changed + +- Allow plugins to add their own config file to be resolved with the user's custom config + +## [1.1.2] - 2019-08-14 + +### Fixed + +- Fixes a bug with horizontal rules where they were displayed with a 2px border instead of a 1px border +- Fixes a bug with horizontal rules where they were rendered with default top/bottom margin + +## [1.1.1] - 2019-08-09 + +### Fixed + +- Fixes issue where values like `auto` would fail to make it through the default negative margin config + +## [1.1.0] - 2019-08-06 + +### Added + +- Added utilities for screenreader visibility +- Added utilities for placeholder color +- First, last, even, and odd child variants +- Disabled variant +- Visited variant +- Increase utility specificity using a scope instead of !important +- Add hover/focus variants for opacity by default +- Added `border-double` utility +- Support negative prefix for boxShadow and letterSpacing plugins +- Support passing config path via object + +### Fixed + +- Placeholders no longer have a default opacity +- Make horizontal rules visible by default +- Generate correct negative margins when using calc + +## [1.0.6] - 2019-08-01 + +### Fixed + +- Fixes issue where modifiers would mutate nested rules + +## [1.0.5] - 2019-07-11 + +### Added + +- Support built-in variants for utilities that include pseudo-elements + +### Changed + +- Update several dependencies, including postcss-js which fixes an issue with using `!important` directly in Tailwind utility plugins + +## [1.0.4] - 2019-06-11 + +### Changed + +- Increase precision of percentage width values to avoid 1px rounding issues in grid layouts + +## [1.0.3] - 2019-06-01 + +### Changed + +- Throws an error when someone tries to use `@tailwind preflight` instead of `@tailwind base`, this is the source of many support requests + +## [1.0.2] - 2019-05-27 + +### Fixed + +- Fixes a bug where `@screen` rules weren't bubbled properly when nested in plugins + +## [1.0.1] - 2019-05-13 + +### Fixed + +- Fixes a bug where global variants weren't properly merged + +## [1.0.0] - 2019-05-13 + +No release notes + +## [1.0.0-beta.10] - 2019-05-12 + +### Changed + +- Use `9999` and `-9999` for `order-last` and `order-first` utilities respectively + +## [1.0.0-beta.9] - 2019-05-12 + +### Added + +- Add `bg-repeat-round` and `bg-repeat-space` utilities +- Add `select-all` and `select-auto` utilities + +### Changed + +- Make all utilities responsive by default + +## [1.0.0-beta.8] - 2019-04-28 + +### Added + +- Adds `responsive` variants for the new order utilities by default, should have been there all along + +## [1.0.0-beta.7] - 2019-04-27 + +### Fixed + +- Fixes a bug where you couldn't extend the margin config + +## [1.0.0-beta.6] - 2019-04-27 + +### Added + +- Added support for negative inset (`-top-6`, `-right-4`) and z-index (`-z-10`) utilities, using the same negative key syntax supported by the margin plugin +- Add missing fractions as well as x/12 fractions to width scale +- Add `order` utilities +- Add `cursor-text` class by default + +### Changed + +- Make it possible to access your fully merged config file in JS + +### Removed + +- Removed `negativeMargin` plugin, now the regular `margin` plugin supports generating negative classes (like `-mx-6`) by using negative keys in the config, like `-6` + +## [1.0.0-beta.5] - 2019-04-18 + +### Changed + +- Make it possible to disable all core plugins using `corePlugins: false` +- Make it possible to configure a single list of variants that applies to all utility plugins +- Make it possible to whitelist which core plugins should be enabled + +### Fixed + +- Fix a bug where stroke and fill plugins didn't properly handle the next object syntax for color definitions +- Fix a bug where you couldn't have comments near `@apply` directives + +## [1.0.0-beta.4] - 2019-03-29 + +### Added + +- Add the `container` key to the scaffolded config file when generated with `--full` + +### Changed + +- Bumps node dependency to 8.9.0 so we can keep our default config file clean, 6.9.0 is EOL next month anyways + +### Removed + +- Removes `SFMono-Regular` from the beginning of the default monospace font stack, it has no italic support and Menlo looks better anyways + +### Fixed + +- Fixes an issue where the user's config object was being mutated during processing (only affects @bradlc 😅) +- Fixes an issue where you couldn't use a closure to define theme sections under `extend` + +## [1.0.0-beta.3] - 2019-03-18 + +### Added + +- Support lazy evaluation in `theme.extend` + +### Changed + +- Use lighter default border color +- Revert #745 and use `bolder` for strong tags by default instead of `fontWeight.bold` + +## [1.0.0-beta.2] - 2019-03-17 + +### Changed + +- Closures in the `theme` section of the config file are now passed a `theme` function instead of an object + +### Fixed + +- Fix issue where `@screen` didn't work at all 🙃 + +## [1.0.0-beta.1] - 2019-03-17 + +### Added + +- New config file structure +- New expanded default color palette +- New default `maxWidth` scale +- Added utilities for `list-style-type` and `list-style-position` +- Added `break-all` utility + +### Changed + +- `object-position` utilities are now customizable under `theme.objectPosition` +- `cursor` utilities are now customizable under `theme.cursors` +- `flex-grow/shrink` utilities are now customizable under `theme.flexGrow/flexShrink` +- Default variant output position can be customized +- Extended default line-height scale +- Extended default letter-spacing scale + +## [0.7.4] - 2019-01-23 + +### Changed + +- Update our PostCSS related dependencies + +### Fixed + +- Fix bug where class names containing a `.`character had the responsive prefix added in the wrong place + +## [0.7.3] - 2018-12-03 + +### Changed + +- Update Normalize to v8.0.1 + +## [0.7.2] - 2018-11-05 + +### Added + +- Add `--no-autoprefixer` option to CLI `build` command + +## [0.7.1] - 2018-11-05 + +### Changed + +- Update autoprefixer dependency + +## [0.7.0] - 2018-10-31 + +### Added + +- Registering new variants from plugins +- Variant order can be customized per module +- Added focus-within variant +- Fancy CLI updates +- Option to generate config without comments +- Make configured prefix optional when using @apply +- Improve Flexbox behavior in IE 10/11 + +### Changed + +- Variant order in modules is now significant +- Normalize.css updated to v8.0.0 +- Removed CSS fix for Chrome 62 button border radius change + +## [0.6.6] - 2018-09-21 + +### Changed + +- Promote `shadowLookup` from experiment to official feature + +## [0.6.5] - 2018-08-18 + +### Fixed + +- Fixes an issue where units were stripped from zero value properties + +## [0.6.4] - 2018-07-16 + +### Fixed + +- Fixes an issue where changes to your configuration file were ignored when using `webpack --watch` + +## [0.6.3] - 2018-07-11 + +### Fixed + +- Fixes an issue where `@tailwind utilities` generated no output + +## [0.6.2] - 2018-03-11 + +### Added + +- Added table layout utilities for styling tables +- Configuration can now be passed as an object +- Registering new variants from plugins (experimental) +- Allow `@apply`-ing classes that aren't defined but would be generated (experimental) + +### Changed + +- Default config file changes + +## [0.6.1] - 2018-06-22 + +### Fixed + +- Fix incorrect box-shadow syntax for the `.shadow-outline` utility 🤦‍♂️ + +## [0.6.0] - 2018-06-21 + +### Added + +- Added border collapse utilities for styling tables +- Added more axis-specific overflow utilities +- Added `.outline-none` utility for suppressing focus styles +- Added `.shadow-outline` utility as an alternative to default browser focus styles +- Extended default padding, margin, negative margin, width, and height scales +- Enable focus and hover variants for more modules by default + +### Changed + +- Removed default `outline: none !important` styles from focusable but keyboard-inaccessible elements +- Moved screen prefix for responsive `group-hover` variants +- Default config file changes + +## [0.5.3] - 2018-05-07 + +### Changed + +- Improve sourcemaps for replaced styles like `preflight` + +### Fixed + +- Fix bug where informational messages were being logged to stdout during build, preventing the ability to use Tailwind's output in Unix pipelines + +## [0.5.2] - 2018-03-29 + +### Fixed + +- Fixes an issue with a dependency that had a security vulnerability + +## [0.5.1] - 2018-03-13 + +### Removed + +- Reverts a change that renamed the `.roman` class to `.not-italic` due to the fact that it breaks compatibility with cssnext: [postcss/postcss-selector-not#10](https://github.com/postcss/postcss-selector-not/issues/10). We'll stick with `.roman` for now with a plan to switch to `.not-italic` in another breaking version should that issue get resolved in postcss-selector-not. + +## [0.5.0] - 2018-03-13 + +### Added + +- Plugin system +- Added `.sticky position` utility +- Added `.cursor-wait` and `.cursor-move` utilities +- Added `.bg-auto` background size utility +- Background sizes are now customizable +- Support for active variants +- Better postcss-import support +- Configuration options for the `.container` component + +### Changed + +- The `.container` component is now a built-in plugin +- State variant precedence changes +- New config file keys +- `.overflow-x/y-scroll` now set `overflow: scroll` instead of `overflow: auto` +- `.roman` renamed to `.not-italic` + +## [0.4.3] - 2018-03-13 + +### Changed + +- Use `global.Object` to avoid issues with polyfills when importing the Tailwind config into other JS + +## [0.4.2] - 2018-03-01 + +### Added + +- Add support for using a function to define class prefixes in addition to a simple string + +### Changed + +- Improve the performance of @apply by using a lookup table instead of searching + +### Fixed + +- Fix an issue where borders couldn't be applied to `img` tags without specifying a border style + +## [0.4.1] - 2018-01-22 + +### Changed + +- Make default sans-serif font stack more future proof and safe to use with CSS `font` shorthand +- Replace stylefmt with Perfectionist to avoid weird stylelint conflicts + +## [0.4.0] - 2017-12-15 + +### Added + +- `@apply`'d classes can now be made `!important` explicitly + +### Changed + +- `@apply` now strips `!important` from any mixed in classes +- Default color palette tweaks + +## [0.3.0] - 2017-12-01 + +### Added + +- Enable/disable modules and control which variants are generated for each +- Focus variants +- Group hover variants +- New `@variants` at-rule +- Customize the separator character +- Missing config keys now fallback to their default values +- New utilities + +### Changed + +- Lists now have no margins by default +- `.pin` no longer sets width and height to 100% +- SVG `fill` no longer defaults to currentColor + +## [0.2.2] - 2017-11-19 + +### Fixed + +- Fix issue with dist files not being published due to bug in latest npm + +## [0.2.1] - 2017-11-18 + +### Fixed + +- Fix overly specific border-radius reset for Chrome 62 button styles + +## [0.2.0] - 2017-11-17 + +### Added + +- Add a custom prefix to all utilities +- Optionally make all utilities `!important` +- Round element corners independently +- Cascading border colors and styles + +### Changed + +- `auto` is no longer a hard-coded margin value +- The `defaultConfig` function is now a separate module +- Rounded utilities now combine position and radius size +- Border width utilities no longer affect border color/style +- `@apply` is now very strict about what classes can be applied +- Add `options` key to your config +- Spacing, radius, and border width utility declaration order changes + +## [0.1.6] - 2017-11-09 + +### Fixed + +- Fix CDN files not being published to npm + +## [0.1.5] - 2017-11-08 + +### Changed + +- Apply the same default placeholder styling that's applied to inputs to textareas + +### Fixed + +- Fix CLI tool not loading config files properly + +## [0.1.4] - 2017-11-06 + +### Added + +- Autoprefix dist assets for quick hacking and prototyping +- Add `my-auto`, `mt-auto`, and `mb-auto` margin utilities +- Add `sans-serif` to end of default `sans` font stack + +### Changed + +- If using Webpack, it will now watch your config file changes +- When running `tailwind init [filename]`, automatically append `.js` to filename if not present +- Support default fallback value in `config(...)` function, ie. `config('colors.blue', #0000ff)` +- Don't output empty media queries if Tailwind processes a file that doesn't use Tailwind + +### Fixed + +- Move list utilities earlier in stylesheet to allow overriding with spacing utilities + +## [0.1.3] - 2017-11-02 + +### Added + +- Add new `.scrolling-touch` and `.scrolling-auto` utilities for controlling inertial scroll behavior on WebKit touch devices +- Generate separate dist files for preflight, utilities, and tailwind for CDN usage + +## [0.1.2] - 2017-11-01 + +### Changed + +- Target Node 6.9.0 explicitly (instead of 8.6 implicitly) to support more users + +### Fixed + +- Fix issue with config option not being respected in `tailwind build` + +## [0.1.1] - 2017-11-01 + +### Fixed + +- Fix `tailwind build` CLI command not writing output files + +## [0.1.0] - 2017-11-01 + +### Added + +- Everything! + +[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.4...HEAD +[3.1.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.3...v3.1.4 +[3.1.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.2...v3.1.3 +[3.1.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.1...v3.1.2 +[3.1.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.0...v3.1.1 +[3.1.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.24...v3.1.0 +[3.0.24]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24 +[3.0.23]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.22...v3.0.23 +[3.0.22]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.21...v3.0.22 +[3.0.21]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.20...v3.0.21 +[3.0.20]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.19...v3.0.20 +[3.0.19]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.18...v3.0.19 +[3.0.18]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.17...v3.0.18 +[3.0.17]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.16...v3.0.17 +[3.0.16]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.15...v3.0.16 +[3.0.15]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.14...v3.0.15 +[3.0.14]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.13...v3.0.14 +[3.0.13]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.12...v3.0.13 +[3.0.12]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.11...v3.0.12 +[3.0.11]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.10...v3.0.11 +[3.0.10]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.9...v3.0.10 +[3.0.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...v3.0.9 +[3.0.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.7...v3.0.8 +[3.0.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.7 +[3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.5...v3.0.6 +[3.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.4...v3.0.5 +[3.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...v3.0.4 +[3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3 +[3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0 +[3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2 +[3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1 +[2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19 +[2.2.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.17...v2.2.18 +[2.2.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v2.2.17 +[2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16 +[2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15 +[2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14 +[2.2.13]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.12...v2.2.13 +[2.2.12]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.11...v2.2.12 +[2.2.11]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.10...v2.2.11 +[2.2.10]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.9...v2.2.10 +[2.2.9]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.8...v2.2.9 +[2.2.8]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.7...v2.2.8 +[2.2.7]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.6...v2.2.7 +[2.2.6]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.5...v2.2.6 +[2.2.5]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.4...v2.2.5 +[2.2.4]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.3...v2.2.4 +[2.2.3]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.2...v2.2.3 +[2.2.2]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.1...v2.2.2 +[2.2.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/tailwindlabs/tailwindcss/compare/v2.1.4...v2.2.0 +[2.1.4]: https://github.com/tailwindlabs/tailwindcss/compare/v2.1.3...v2.1.4 +[2.1.3]: https://github.com/tailwindlabs/tailwindcss/compare/v2.1.2...v2.1.3 +[2.1.2]: https://github.com/tailwindlabs/tailwindcss/compare/v2.1.1...v2.1.2 +[2.1.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.1.0...v2.1.1 +[2.1.0]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.4...v2.1.0 +[2.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.3...v2.0.4 +[2.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.2...v2.0.3 +[2.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.1...v2.0.2 +[2.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.6...v2.0.0 +[2.0.0-alpha.25]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.24...v2.0.0-alpha.25 +[2.0.0-alpha.24]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.23...v2.0.0-alpha.24 +[2.0.0-alpha.23]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.22...v2.0.0-alpha.23 +[2.0.0-alpha.22]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.21...v2.0.0-alpha.22 +[2.0.0-alpha.21]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.20...v2.0.0-alpha.21 +[2.0.0-alpha.20]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.19...v2.0.0-alpha.20 +[2.0.0-alpha.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.18...v2.0.0-alpha.19 +[2.0.0-alpha.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.17...v2.0.0-alpha.18 +[2.0.0-alpha.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.16...v2.0.0-alpha.17 +[2.0.0-alpha.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.15...v2.0.0-alpha.16 +[2.0.0-alpha.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.14...v2.0.0-alpha.15 +[2.0.0-alpha.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.13...v2.0.0-alpha.14 +[2.0.0-alpha.13]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.12...v2.0.0-alpha.13 +[2.0.0-alpha.12]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.11...v2.0.0-alpha.12 +[2.0.0-alpha.11]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.10...v2.0.0-alpha.11 +[2.0.0-alpha.10]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.9...v2.0.0-alpha.10 +[2.0.0-alpha.9]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.8...v2.0.0-alpha.9 +[2.0.0-alpha.8]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.7...v2.0.0-alpha.8 +[2.0.0-alpha.7]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.6...v2.0.0-alpha.7 +[2.0.0-alpha.6]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.5...v2.0.0-alpha.6 +[2.0.0-alpha.5]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.4...v2.0.0-alpha.5 +[2.0.0-alpha.4]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.3...v2.0.0-alpha.4 +[2.0.0-alpha.3]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.2...v2.0.0-alpha.3 +[2.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v2.0.0-alpha.1...v2.0.0-alpha.2 +[1.9.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.5...v1.9.6 +[2.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.5...v2.0.0-alpha.1 +[1.9.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.4...v1.9.5 +[1.9.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.3...v1.9.4 +[1.9.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.3 +[1.9.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.1...v1.9.2 +[1.9.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.9.0...v1.9.1 +[1.9.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.13...v1.9.0 +[1.8.13]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.12...v1.8.13 +[1.8.12]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.11...v1.8.12 +[1.8.11]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.10...v1.8.11 +[1.8.10]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.9...v1.8.10 +[1.8.9]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.8...v1.8.9 +[1.8.8]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.7...v1.8.8 +[1.8.7]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.6...v1.8.7 +[1.8.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.5...v1.8.6 +[1.8.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.4...v1.8.5 +[1.8.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.3...v1.8.4 +[1.8.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.2...v1.8.3 +[1.8.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.1...v1.8.2 +[1.8.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.8.0...v1.8.1 +[1.8.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.6...v1.8.0 +[1.7.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.5...v1.7.6 +[1.7.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.4...v1.7.5 +[1.7.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.3...v1.7.4 +[1.7.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.2...v1.7.3 +[1.7.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.1...v1.7.2 +[1.7.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.6.3...v1.7.0 +[1.6.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.6.2...v1.6.3 +[1.6.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.6.1...v1.6.2 +[1.6.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.6.0...v1.6.1 +[1.6.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.5.2...v1.6.0 +[1.5.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.5.1...v1.5.2 +[1.5.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.5.0...v1.5.1 +[1.5.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.6...v1.5.0 +[1.4.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.5...v1.4.6 +[1.4.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.4...v1.4.5 +[1.4.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.3...v1.4.4 +[1.4.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.2...v1.4.3 +[1.4.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.1...v1.4.2 +[1.4.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.4.0...v1.4.1 +[1.4.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.3.5...v1.4.0 +[1.3.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.3.4...v1.3.5 +[1.3.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.3.3...v1.3.4 +[1.3.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.3.1...v1.3.3 +[1.3.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.3.0...v1.3.1 +[1.3.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0...v1.3.0 +[1.2.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.4...v1.2.0 +[1.2.0-canary.8]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.7...v1.2.0-canary.8 +[1.2.0-canary.7]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.6...v1.2.0-canary.7 +[1.2.0-canary.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.5...v1.2.0-canary.6 +[1.2.0-canary.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.4...v1.2.0-canary.5 +[1.2.0-canary.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.3...v1.2.0-canary.4 +[1.1.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.3...v1.1.4 +[1.2.0-canary.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.2.0-canary.0...v1.2.0-canary.1 +[1.1.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.2...v1.1.3 +[1.2.0-canary.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.2...v1.2.0-canary.0 +[1.1.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.6...v1.1.0 +[1.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.10...v1.0.0 +[1.0.0-beta.10]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.9...v1.0.0-beta.10 +[1.0.0-beta.9]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.8...v1.0.0-beta.9 +[1.0.0-beta.8]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.7...v1.0.0-beta.8 +[1.0.0-beta.7]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.6...v1.0.0-beta.7 +[1.0.0-beta.6]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.5...v1.0.0-beta.6 +[1.0.0-beta.5]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.4...v1.0.0-beta.5 +[1.0.0-beta.4]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.3...v1.0.0-beta.4 +[1.0.0-beta.3]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.2...v1.0.0-beta.3 +[1.0.0-beta.2]: https://github.com/tailwindlabs/tailwindcss/compare/v1.0.0-beta.1...v1.0.0-beta.2 +[1.0.0-beta.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.7.4...v1.0.0-beta.1 +[0.7.4]: https://github.com/tailwindlabs/tailwindcss/compare/v0.7.3...v0.7.4 +[0.7.3]: https://github.com/tailwindlabs/tailwindcss/compare/v0.7.2...v0.7.3 +[0.7.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.7.1...v0.7.2 +[0.7.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.6...v0.7.0 +[0.6.6]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.5...v0.6.6 +[0.6.5]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.4...v0.6.5 +[0.6.4]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.3...v0.6.4 +[0.6.3]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.2...v0.6.3 +[0.6.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.1...v0.6.2 +[0.6.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.6.0...v0.6.1 +[0.6.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.5.3...v0.6.0 +[0.5.3]: https://github.com/tailwindlabs/tailwindcss/compare/v0.5.2...v0.5.3 +[0.5.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.5.1...v0.5.2 +[0.5.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.5.0...v0.5.1 +[0.5.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.4.3...v0.5.0 +[0.4.3]: https://github.com/tailwindlabs/tailwindcss/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.2.2...v0.3.0 +[0.2.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.6...v0.2.0 +[0.1.6]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.5...v0.1.6 +[0.1.5]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.4...v0.1.5 +[0.1.4]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/tailwindlabs/tailwindcss/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/tailwindlabs/tailwindcss/releases/tag/v0.1.0 diff --git a/node_modules/tailwindcss/LICENSE b/node_modules/tailwindcss/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/tailwindcss/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tailwindcss/README.md b/node_modules/tailwindcss/README.md new file mode 100644 index 0000000..2ffaaf8 --- /dev/null +++ b/node_modules/tailwindcss/README.md @@ -0,0 +1,37 @@ +

+ + Tailwind CSS + + + Tailwind CSS + +

+ +A utility-first CSS framework for rapidly building custom user interfaces. + +

+ Build Status + Total Downloads + Latest Release + License +

+ +------ + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com/). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For casual chit-chat with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/tailwindcss/base.css b/node_modules/tailwindcss/base.css new file mode 100644 index 0000000..2f02db5 --- /dev/null +++ b/node_modules/tailwindcss/base.css @@ -0,0 +1 @@ +@tailwind base; diff --git a/node_modules/tailwindcss/colors.d.ts b/node_modules/tailwindcss/colors.d.ts new file mode 100644 index 0000000..d85ab86 --- /dev/null +++ b/node_modules/tailwindcss/colors.d.ts @@ -0,0 +1,3 @@ +import type { DefaultColors } from './types/generated/colors' +declare const colors: DefaultColors +export = colors diff --git a/node_modules/tailwindcss/colors.js b/node_modules/tailwindcss/colors.js new file mode 100644 index 0000000..c6f9149 --- /dev/null +++ b/node_modules/tailwindcss/colors.js @@ -0,0 +1,2 @@ +let colors = require('./lib/public/colors') +module.exports = (colors.__esModule ? colors : { default: colors }).default diff --git a/node_modules/tailwindcss/components.css b/node_modules/tailwindcss/components.css new file mode 100644 index 0000000..020aaba --- /dev/null +++ b/node_modules/tailwindcss/components.css @@ -0,0 +1 @@ +@tailwind components; diff --git a/node_modules/tailwindcss/defaultConfig.d.ts b/node_modules/tailwindcss/defaultConfig.d.ts new file mode 100644 index 0000000..2c2bccf --- /dev/null +++ b/node_modules/tailwindcss/defaultConfig.d.ts @@ -0,0 +1,3 @@ +import type { Config } from './types/config' +declare const config: Config +export = config diff --git a/node_modules/tailwindcss/defaultConfig.js b/node_modules/tailwindcss/defaultConfig.js new file mode 100644 index 0000000..7b63587 --- /dev/null +++ b/node_modules/tailwindcss/defaultConfig.js @@ -0,0 +1,2 @@ +let defaultConfig = require('./lib/public/default-config') +module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default diff --git a/node_modules/tailwindcss/defaultTheme.d.ts b/node_modules/tailwindcss/defaultTheme.d.ts new file mode 100644 index 0000000..9172051 --- /dev/null +++ b/node_modules/tailwindcss/defaultTheme.d.ts @@ -0,0 +1,3 @@ +import type { Config } from './types/config' +declare const theme: Config['theme'] +export = theme diff --git a/node_modules/tailwindcss/defaultTheme.js b/node_modules/tailwindcss/defaultTheme.js new file mode 100644 index 0000000..991526d --- /dev/null +++ b/node_modules/tailwindcss/defaultTheme.js @@ -0,0 +1,2 @@ +let defaultTheme = require('./lib/public/default-theme') +module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default diff --git a/node_modules/tailwindcss/lib/cli-peer-dependencies.js b/node_modules/tailwindcss/lib/cli-peer-dependencies.js new file mode 100644 index 0000000..d4b19ff --- /dev/null +++ b/node_modules/tailwindcss/lib/cli-peer-dependencies.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.lazyPostcss = lazyPostcss; +exports.lazyPostcssImport = lazyPostcssImport; +exports.lazyAutoprefixer = lazyAutoprefixer; +exports.lazyCssnano = lazyCssnano; +function lazyPostcss() { + return require("postcss"); +} +function lazyPostcssImport() { + return require("postcss-import"); +} +function lazyAutoprefixer() { + return require("autoprefixer"); +} +function lazyCssnano() { + return require("cssnano"); +} diff --git a/node_modules/tailwindcss/lib/cli.js b/node_modules/tailwindcss/lib/cli.js new file mode 100755 index 0000000..ee81eb8 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli.js @@ -0,0 +1,805 @@ +#!/usr/bin/env node +"use strict"; +var _indexJs = require("../peers/index.js"); +var _chokidar = _interopRequireDefault(require("chokidar")); +var _path = _interopRequireDefault(require("path")); +var _arg = _interopRequireDefault(require("arg")); +var _fs = _interopRequireDefault(require("fs")); +var _postcssLoadConfig = _interopRequireDefault(require("postcss-load-config")); +var _lilconfig = require("lilconfig"); +var _plugins // Little bit scary, looking at private/internal API + = _interopRequireDefault(require("postcss-load-config/src/plugins")); +var _options // Little bit scary, looking at private/internal API + = _interopRequireDefault(require("postcss-load-config/src/options")); +var _processTailwindFeatures = _interopRequireDefault(require("./processTailwindFeatures")); +var _resolveConfig = _interopRequireDefault(require("../resolveConfig")); +var _fastGlob = _interopRequireDefault(require("fast-glob")); +var _getModuleDependencies = _interopRequireDefault(require("./lib/getModuleDependencies")); +var _log = _interopRequireDefault(require("./util/log")); +var _packageJson = _interopRequireDefault(require("../package.json")); +var _normalizePath = _interopRequireDefault(require("normalize-path")); +var _validateConfigJs = require("./util/validateConfig.js"); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +let env = { + DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== "0" +}; +function isESM() { + const pkgPath = _path.default.resolve("./package.json"); + try { + let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8")); + return pkg.type && pkg.type === "module"; + } catch (err) { + return false; + } +} +let configs = isESM() ? { + tailwind: "tailwind.config.cjs", + postcss: "postcss.config.cjs" +} : { + tailwind: "tailwind.config.js", + postcss: "postcss.config.js" +}; +// --- +function indentRecursive(node, indent = 0) { + node.each && node.each((child, i)=>{ + if (!child.raws.before || !child.raws.before.trim() || child.raws.before.includes("\n")) { + child.raws.before = `\n${node.type !== "rule" && i > 0 ? "\n" : ""}${" ".repeat(indent)}`; + } + child.raws.after = `\n${" ".repeat(indent)}`; + indentRecursive(child, indent + 1); + }); +} +function formatNodes(root) { + indentRecursive(root); + if (root.first) { + root.first.raws.before = ""; + } +} +async function outputFile(file, contents) { + if (_fs.default.existsSync(file) && await _fs.default.promises.readFile(file, "utf8") === contents) { + return; // Skip writing the file + } + // Write the file + await _fs.default.promises.writeFile(file, contents, "utf8"); +} +function drainStdin() { + return new Promise((resolve, reject)=>{ + let result = ""; + process.stdin.on("data", (chunk)=>{ + result += chunk; + }); + process.stdin.on("end", ()=>resolve(result)); + process.stdin.on("error", (err)=>reject(err)); + }); +} +function help({ message , usage , commands: commands1 , options }) { + let indent = 2; + // Render header + console.log(); + console.log(`${_packageJson.default.name} v${_packageJson.default.version}`); + // Render message + if (message) { + console.log(); + for (let msg of message.split("\n")){ + console.log(msg); + } + } + // Render usage + if (usage && usage.length > 0) { + console.log(); + console.log("Usage:"); + for (let example of usage){ + console.log(" ".repeat(indent), example); + } + } + // Render commands + if (commands1 && commands1.length > 0) { + console.log(); + console.log("Commands:"); + for (let command1 of commands1){ + console.log(" ".repeat(indent), command1); + } + } + // Render options + if (options) { + let groupedOptions = {}; + for (let [key, value] of Object.entries(options)){ + if (typeof value === "object") { + groupedOptions[key] = { + ...value, + flags: [ + key + ] + }; + } else { + groupedOptions[value].flags.push(key); + } + } + console.log(); + console.log("Options:"); + for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){ + if (deprecated) continue; + if (flags1.length === 1) { + console.log(" ".repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(", ").padEnd(20, " "), description); + } else { + console.log(" ".repeat(indent), flags1.slice().reverse().join(", ").padEnd(24, " "), description); + } + } + } + console.log(); +} +function oneOf(...options) { + return Object.assign((value = true)=>{ + for (let option of options){ + let parsed = option(value); + if (parsed === value) { + return parsed; + } + } + throw new Error("..."); + }, { + manualParsing: true + }); +} +function loadPostcss() { + // Try to load a local `postcss` version first + try { + return require("postcss"); + } catch {} + return (0, _indexJs).lazyPostcss(); +} +let commands = { + init: { + run: init, + args: { + "--full": { + type: Boolean, + description: `Initialize a full \`${configs.tailwind}\` file` + }, + "--postcss": { + type: Boolean, + description: `Initialize a \`${configs.postcss}\` file` + }, + "-f": "--full", + "-p": "--postcss" + } + }, + build: { + run: build, + args: { + "--input": { + type: String, + description: "Input file" + }, + "--output": { + type: String, + description: "Output file" + }, + "--watch": { + type: Boolean, + description: "Watch for changes and rebuild as needed" + }, + "--poll": { + type: Boolean, + description: "Use polling instead of filesystem events when watching" + }, + "--content": { + type: String, + description: "Content paths to use for removing unused classes" + }, + "--purge": { + type: String, + deprecated: true + }, + "--postcss": { + type: oneOf(String, Boolean), + description: "Load custom PostCSS configuration" + }, + "--minify": { + type: Boolean, + description: "Minify the output" + }, + "--config": { + type: String, + description: "Path to a custom config file" + }, + "--no-autoprefixer": { + type: Boolean, + description: "Disable autoprefixer" + }, + "-c": "--config", + "-i": "--input", + "-o": "--output", + "-m": "--minify", + "-w": "--watch", + "-p": "--poll" + } + } +}; +let sharedFlags = { + "--help": { + type: Boolean, + description: "Display usage information" + }, + "-h": "--help" +}; +if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.argv[2] === undefined || process.argv.slice(2).every((flag)=>sharedFlags[flag] !== undefined))) { + help({ + usage: [ + "tailwindcss [--input input.css] [--output output.css] [--watch] [options...]", + "tailwindcss init [--full] [--postcss] [options...]", + ], + commands: Object.keys(commands).filter((command2)=>command2 !== "build").map((command3)=>`${command3} [options]`), + options: { + ...commands.build.args, + ...sharedFlags + } + }); + process.exit(0); +} +let command = ((arg = "")=>arg.startsWith("-") ? undefined : arg)(process.argv[2]) || "build"; +if (commands[command] === undefined) { + if (_fs.default.existsSync(_path.default.resolve(command))) { + // TODO: Deprecate this in future versions + // Check if non-existing command, might be a file. + command = "build"; + } else { + help({ + message: `Invalid command: ${command}`, + usage: [ + "tailwindcss [options]" + ], + commands: Object.keys(commands).filter((command4)=>command4 !== "build").map((command5)=>`${command5} [options]`), + options: sharedFlags + }); + process.exit(1); + } +} +// Execute command +let { args: flags , run } = commands[command]; +let args = (()=>{ + try { + let result = (0, _arg).default(Object.fromEntries(Object.entries({ + ...flags, + ...sharedFlags + }).filter(([_key, value])=>{ + var ref; + return !(value === null || value === void 0 ? void 0 : (ref = value.type) === null || ref === void 0 ? void 0 : ref.manualParsing); + }).map(([key, value])=>[ + key, + typeof value === "object" ? value.type : value + ])), { + permissive: true + }); + // Manual parsing of flags to allow for special flags like oneOf(Boolean, String) + for(let i = result["_"].length - 1; i >= 0; --i){ + let flag = result["_"][i]; + if (!flag.startsWith("-")) continue; + let flagName = flag; + let handler = flags[flag]; + // Resolve flagName & handler + while(typeof handler === "string"){ + flagName = handler; + handler = flags[handler]; + } + if (!handler) continue; + let args1 = []; + let offset = i + 1; + // Parse args for current flag + while(result["_"][offset] && !result["_"][offset].startsWith("-")){ + args1.push(result["_"][offset++]); + } + // Cleanup manually parsed flags + args + result["_"].splice(i, 1 + args1.length); + // Set the resolved value in the `result` object + result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName); + } + // Ensure that the `command` is always the first argument in the `args`. + // This is important so that we don't have to check if a default command + // (build) was used or not from within each plugin. + // + // E.g.: tailwindcss input.css -> _: ['build', 'input.css'] + // E.g.: tailwindcss build input.css -> _: ['build', 'input.css'] + if (result["_"][0] !== command) { + result["_"].unshift(command); + } + return result; + } catch (err) { + if (err.code === "ARG_UNKNOWN_OPTION") { + help({ + message: err.message, + usage: [ + "tailwindcss [options]" + ], + options: sharedFlags + }); + process.exit(1); + } + throw err; + } +})(); +if (args["--help"]) { + help({ + options: { + ...flags, + ...sharedFlags + }, + usage: [ + `tailwindcss ${command} [options]` + ] + }); + process.exit(0); +} +run(); +// --- +function init() { + let messages = []; + var ref; + let tailwindConfigLocation = _path.default.resolve((ref = args["_"][1]) !== null && ref !== void 0 ? ref : `./${configs.tailwind}`); + if (_fs.default.existsSync(tailwindConfigLocation)) { + messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`); + } else { + let stubFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../stubs/defaultConfig.stub.js") : _path.default.resolve(__dirname, "../stubs/simpleConfig.stub.js"), "utf8"); + // Change colors import + stubFile = stubFile.replace("../colors", "tailwindcss/colors"); + _fs.default.writeFileSync(tailwindConfigLocation, stubFile, "utf8"); + messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`); + } + if (args["--postcss"]) { + let postcssConfigLocation = _path.default.resolve(`./${configs.postcss}`); + if (_fs.default.existsSync(postcssConfigLocation)) { + messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`); + } else { + let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, "../stubs/defaultPostCssConfig.stub.js"), "utf8"); + _fs.default.writeFileSync(postcssConfigLocation, stubFile, "utf8"); + messages.push(`Created PostCSS config file: ${_path.default.basename(postcssConfigLocation)}`); + } + } + if (messages.length > 0) { + console.log(); + for (let message of messages){ + console.log(message); + } + } +} +async function build() { + let input = args["--input"]; + let output = args["--output"]; + let shouldWatch = args["--watch"]; + let shouldPoll = args["--poll"]; + let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32"; + let includePostCss = args["--postcss"]; + // Polling interval in milliseconds + // Used only when polling or coalescing add/change events on Windows + let pollInterval = 10; + // TODO: Deprecate this in future versions + if (!input && args["_"][1]) { + console.error("[deprecation] Running tailwindcss without -i, please provide an input file."); + input = args["--input"] = args["_"][1]; + } + if (input && input !== "-" && !_fs.default.existsSync(input = _path.default.resolve(input))) { + console.error(`Specified input file ${args["--input"]} does not exist.`); + process.exit(9); + } + if (args["--config"] && !_fs.default.existsSync(args["--config"] = _path.default.resolve(args["--config"]))) { + console.error(`Specified config file ${args["--config"]} does not exist.`); + process.exit(9); + } + let configPath = args["--config"] ? args["--config"] : ((defaultPath)=>_fs.default.existsSync(defaultPath) ? defaultPath : null)(_path.default.resolve(`./${configs.tailwind}`)); + async function loadPostCssPlugins() { + let customPostCssPath = typeof args["--postcss"] === "string" ? args["--postcss"] : undefined; + let config1 = customPostCssPath ? await (async ()=>{ + let file = _path.default.resolve(customPostCssPath); + // Implementation, see: https://unpkg.com/browse/postcss-load-config@3.1.0/src/index.js + let { config ={} } = await (0, _lilconfig).lilconfig("postcss").load(file); + if (typeof config === "function") { + config = config(); + } else { + config = Object.assign({}, config); + } + if (!config.plugins) { + config.plugins = []; + } + return { + file, + plugins: (0, _plugins).default(config, file), + options: (0, _options).default(config, file) + }; + })() : await (0, _postcssLoadConfig).default(); + let configPlugins = config1.plugins; + let configPluginTailwindIdx = configPlugins.findIndex((plugin)=>{ + if (typeof plugin === "function" && plugin.name === "tailwindcss") { + return true; + } + if (typeof plugin === "object" && plugin !== null && plugin.postcssPlugin === "tailwindcss") { + return true; + } + return false; + }); + let beforePlugins = configPluginTailwindIdx === -1 ? [] : configPlugins.slice(0, configPluginTailwindIdx); + let afterPlugins = configPluginTailwindIdx === -1 ? configPlugins : configPlugins.slice(configPluginTailwindIdx + 1); + return [ + beforePlugins, + afterPlugins, + config1.options + ]; + } + function loadBuiltinPostcssPlugins() { + let postcss = loadPostcss(); + let IMPORT_COMMENT = "__TAILWIND_RESTORE_IMPORT__: "; + return [ + [ + (root)=>{ + root.walkAtRules("import", (rule)=>{ + if (rule.params.slice(1).startsWith("tailwindcss/")) { + rule.after(postcss.comment({ + text: IMPORT_COMMENT + rule.params + })); + rule.remove(); + } + }); + }, + (()=>{ + try { + return require("postcss-import"); + } catch {} + return (0, _indexJs).lazyPostcssImport(); + })(), + (root)=>{ + root.walkComments((rule)=>{ + if (rule.text.startsWith(IMPORT_COMMENT)) { + rule.after(postcss.atRule({ + name: "import", + params: rule.text.replace(IMPORT_COMMENT, "") + })); + rule.remove(); + } + }); + }, + ], + [], + {}, + ]; + } + function resolveConfig() { + let config = configPath ? require(configPath) : {}; + if (args["--purge"]) { + _log.default.warn("purge-flag-deprecated", [ + "The `--purge` flag has been deprecated.", + "Please use `--content` instead.", + ]); + if (!args["--content"]) { + args["--content"] = args["--purge"]; + } + } + if (args["--content"]) { + let files = args["--content"].split(/(?{ + // Strings in this case are files / globs. If it is something else, + // like an object it's probably a raw content object. But this object + // is not watchable, so let's remove it. + return typeof file === "string"; + }).map((glob)=>(0, _normalizePath).default(glob)); + } + function extractRawContent(config) { + return config.content.files.filter((file)=>{ + return typeof file === "object" && file !== null; + }); + } + function getChangedContent(config) { + let changedContent = []; + // Resolve globs from the content config + let globs = extractFileGlobs(config); + let files = _fastGlob.default.sync(globs); + for (let file of files){ + changedContent.push({ + content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"), + extension: _path.default.extname(file).slice(1) + }); + } + // Resolve raw content in the tailwind config + for (let { raw: content , extension ="html" } of extractRawContent(config)){ + changedContent.push({ + content, + extension + }); + } + return changedContent; + } + async function buildOnce() { + let config = resolveConfig(); + let changedContent = getChangedContent(config); + let tailwindPlugin = ()=>{ + return { + postcssPlugin: "tailwindcss", + Once (root, { result }) { + (0, _processTailwindFeatures).default(({ createContext })=>{ + return ()=>{ + return createContext(config, changedContent); + }; + })(root, result); + } + }; + }; + tailwindPlugin.postcss = true; + let [beforePlugins, afterPlugins, postcssOptions] = includePostCss ? await loadPostCssPlugins() : loadBuiltinPostcssPlugins(); + let plugins = [ + ...beforePlugins, + tailwindPlugin, + !args["--minify"] && formatNodes, + ...afterPlugins, + !args["--no-autoprefixer"] && (()=>{ + // Try to load a local `autoprefixer` version first + try { + return require("autoprefixer"); + } catch {} + return (0, _indexJs).lazyAutoprefixer(); + })(), + args["--minify"] && (()=>{ + let options = { + preset: [ + "default", + { + cssDeclarationSorter: false + } + ] + }; + // Try to load a local `cssnano` version first + try { + return require("cssnano"); + } catch {} + return (0, _indexJs).lazyCssnano()(options); + })(), + ].filter(Boolean); + let postcss = loadPostcss(); + let processor = postcss(plugins); + function processCSS(css) { + let start = process.hrtime.bigint(); + return Promise.resolve().then(()=>output ? _fs.default.promises.mkdir(_path.default.dirname(output), { + recursive: true + }) : null).then(()=>processor.process(css, { + ...postcssOptions, + from: input, + to: output + })).then((result)=>{ + if (!output) { + return process.stdout.write(result.css); + } + return Promise.all([ + outputFile(output, result.css), + result.map && outputFile(output + ".map", result.map.toString()), + ].filter(Boolean)); + }).then(()=>{ + let end = process.hrtime.bigint(); + console.error(); + console.error("Done in", (end - start) / BigInt(1e6) + "ms."); + }); + } + let css1 = await (()=>{ + // Piping in data, let's drain the stdin + if (input === "-") { + return drainStdin(); + } + // Input file has been provided + if (input) { + return _fs.default.readFileSync(_path.default.resolve(input), "utf8"); + } + // No input file provided, fallback to default atrules + return "@tailwind base; @tailwind components; @tailwind utilities"; + })(); + return processCSS(css1); + } + let context = null; + async function startWatcher() { + let changedContent = []; + let configDependencies = []; + let contextDependencies = new Set(); + let watcher = null; + function refreshConfig() { + env.DEBUG && console.time("Module dependencies"); + for (let file1 of configDependencies){ + delete require.cache[require.resolve(file1)]; + } + if (configPath) { + configDependencies = (0, _getModuleDependencies).default(configPath).map(({ file })=>file); + for (let dependency of configDependencies){ + contextDependencies.add(dependency); + } + } + env.DEBUG && console.timeEnd("Module dependencies"); + return resolveConfig(); + } + let [beforePlugins, afterPlugins] = includePostCss ? await loadPostCssPlugins() : loadBuiltinPostcssPlugins(); + let plugins = [ + ...beforePlugins, + "__TAILWIND_PLUGIN_POSITION__", + !args["--minify"] && formatNodes, + ...afterPlugins, + !args["--no-autoprefixer"] && (()=>{ + // Try to load a local `autoprefixer` version first + try { + return require("autoprefixer"); + } catch {} + return (0, _indexJs).lazyAutoprefixer(); + })(), + args["--minify"] && (()=>{ + let options = { + preset: [ + "default", + { + cssDeclarationSorter: false + } + ] + }; + // Try to load a local `cssnano` version first + try { + return require("cssnano"); + } catch {} + return (0, _indexJs).lazyCssnano()(options); + })(), + ].filter(Boolean); + async function rebuild(config) { + env.DEBUG && console.time("Finished in"); + let tailwindPlugin = ()=>{ + return { + postcssPlugin: "tailwindcss", + Once (root, { result }) { + env.DEBUG && console.time("Compiling CSS"); + (0, _processTailwindFeatures).default(({ createContext })=>{ + console.error(); + console.error("Rebuilding..."); + return ()=>{ + if (context !== null) { + context.changedContent = changedContent.splice(0); + return context; + } + env.DEBUG && console.time("Creating context"); + context = createContext(config, changedContent.splice(0)); + env.DEBUG && console.timeEnd("Creating context"); + return context; + }; + })(root, result); + env.DEBUG && console.timeEnd("Compiling CSS"); + } + }; + }; + tailwindPlugin.postcss = true; + let tailwindPluginIdx = plugins.indexOf("__TAILWIND_PLUGIN_POSITION__"); + let copy = plugins.slice(); + copy.splice(tailwindPluginIdx, 1, tailwindPlugin); + let postcss = loadPostcss(); + let processor = postcss(copy); + function processCSS(css) { + let start = process.hrtime.bigint(); + return Promise.resolve().then(()=>output ? _fs.default.promises.mkdir(_path.default.dirname(output), { + recursive: true + }) : null).then(()=>processor.process(css, { + from: input, + to: output + })).then(async (result)=>{ + for (let message of result.messages){ + if (message.type === "dependency") { + contextDependencies.add(message.file); + } + } + watcher.add([ + ...contextDependencies + ]); + if (!output) { + return process.stdout.write(result.css); + } + return Promise.all([ + outputFile(output, result.css), + result.map && outputFile(output + ".map", result.map.toString()), + ].filter(Boolean)); + }).then(()=>{ + let end = process.hrtime.bigint(); + console.error("Done in", (end - start) / BigInt(1e6) + "ms."); + }).catch((err)=>{ + if (err.name === "CssSyntaxError") { + console.error(err.toString()); + } else { + console.error(err); + } + }); + } + let css2 = await (()=>{ + // Piping in data, let's drain the stdin + if (input === "-") { + return drainStdin(); + } + // Input file has been provided + if (input) { + return _fs.default.readFileSync(_path.default.resolve(input), "utf8"); + } + // No input file provided, fallback to default atrules + return "@tailwind base; @tailwind components; @tailwind utilities"; + })(); + let result1 = await processCSS(css2); + env.DEBUG && console.timeEnd("Finished in"); + return result1; + } + let config2 = refreshConfig(configPath); + if (input) { + contextDependencies.add(_path.default.resolve(input)); + } + watcher = _chokidar.default.watch([ + ...contextDependencies, + ...extractFileGlobs(config2) + ], { + usePolling: shouldPoll, + interval: shouldPoll ? pollInterval : undefined, + ignoreInitial: true, + awaitWriteFinish: shouldCoalesceWriteEvents ? { + stabilityThreshold: 50, + pollInterval: pollInterval + } : false + }); + let chain = Promise.resolve(); + watcher.on("change", async (file)=>{ + if (contextDependencies.has(file)) { + env.DEBUG && console.time("Resolve config"); + context = null; + config2 = refreshConfig(configPath); + env.DEBUG && console.timeEnd("Resolve config"); + env.DEBUG && console.time("Watch new files"); + let globs = extractFileGlobs(config2); + watcher.add(configDependencies); + watcher.add(globs); + env.DEBUG && console.timeEnd("Watch new files"); + chain = chain.then(async ()=>{ + changedContent.push(...getChangedContent(config2)); + await rebuild(config2); + }); + } else { + chain = chain.then(async ()=>{ + changedContent.push({ + content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"), + extension: _path.default.extname(file).slice(1) + }); + await rebuild(config2); + }); + } + }); + watcher.on("add", async (file)=>{ + chain = chain.then(async ()=>{ + changedContent.push({ + content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"), + extension: _path.default.extname(file).slice(1) + }); + await rebuild(config2); + }); + }); + chain = chain.then(()=>{ + changedContent.push(...getChangedContent(config2)); + return rebuild(config2); + }); + } + if (shouldWatch) { + /* Abort the watcher if stdin is closed to avoid zombie processes */ if (process.stdin.isTTY) { + process.stdin.on("end", ()=>process.exit(0)); + process.stdin.resume(); + } + startWatcher(); + } else { + buildOnce(); + } +} diff --git a/node_modules/tailwindcss/lib/constants.js b/node_modules/tailwindcss/lib/constants.js new file mode 100644 index 0000000..6cbf3c8 --- /dev/null +++ b/node_modules/tailwindcss/lib/constants.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.defaultPostCssConfigStubFile = exports.simpleConfigStubFile = exports.defaultConfigStubFile = exports.supportedPostCssConfigFile = exports.supportedConfigFiles = exports.cjsPostCssConfigFile = exports.cjsConfigFile = exports.defaultPostCssConfigFile = exports.defaultConfigFile = exports.cli = void 0; +var _path = _interopRequireDefault(require("path")); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +const cli = "tailwind"; +exports.cli = cli; +const defaultConfigFile = "./tailwind.config.js"; +exports.defaultConfigFile = defaultConfigFile; +const defaultPostCssConfigFile = "./postcss.config.js"; +exports.defaultPostCssConfigFile = defaultPostCssConfigFile; +const cjsConfigFile = "./tailwind.config.cjs"; +exports.cjsConfigFile = cjsConfigFile; +const cjsPostCssConfigFile = "./postcss.config.cjs"; +exports.cjsPostCssConfigFile = cjsPostCssConfigFile; +const supportedConfigFiles = [ + cjsConfigFile, + defaultConfigFile +]; +exports.supportedConfigFiles = supportedConfigFiles; +const supportedPostCssConfigFile = [ + cjsPostCssConfigFile, + defaultPostCssConfigFile +]; +exports.supportedPostCssConfigFile = supportedPostCssConfigFile; +const defaultConfigStubFile = _path.default.resolve(__dirname, "../stubs/defaultConfig.stub.js"); +exports.defaultConfigStubFile = defaultConfigStubFile; +const simpleConfigStubFile = _path.default.resolve(__dirname, "../stubs/simpleConfig.stub.js"); +exports.simpleConfigStubFile = simpleConfigStubFile; +const defaultPostCssConfigStubFile = _path.default.resolve(__dirname, "../stubs/defaultPostCssConfig.stub.js"); +exports.defaultPostCssConfigStubFile = defaultPostCssConfigStubFile; diff --git a/node_modules/tailwindcss/lib/corePluginList.js b/node_modules/tailwindcss/lib/corePluginList.js new file mode 100644 index 0000000..660fb22 --- /dev/null +++ b/node_modules/tailwindcss/lib/corePluginList.js @@ -0,0 +1,179 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = [ + "preflight", + "container", + "accessibility", + "pointerEvents", + "visibility", + "position", + "inset", + "isolation", + "zIndex", + "order", + "gridColumn", + "gridColumnStart", + "gridColumnEnd", + "gridRow", + "gridRowStart", + "gridRowEnd", + "float", + "clear", + "margin", + "boxSizing", + "display", + "aspectRatio", + "height", + "maxHeight", + "minHeight", + "width", + "minWidth", + "maxWidth", + "flex", + "flexShrink", + "flexGrow", + "flexBasis", + "tableLayout", + "borderCollapse", + "borderSpacing", + "transformOrigin", + "translate", + "rotate", + "skew", + "scale", + "transform", + "animation", + "cursor", + "touchAction", + "userSelect", + "resize", + "scrollSnapType", + "scrollSnapAlign", + "scrollSnapStop", + "scrollMargin", + "scrollPadding", + "listStylePosition", + "listStyleType", + "appearance", + "columns", + "breakBefore", + "breakInside", + "breakAfter", + "gridAutoColumns", + "gridAutoFlow", + "gridAutoRows", + "gridTemplateColumns", + "gridTemplateRows", + "flexDirection", + "flexWrap", + "placeContent", + "placeItems", + "alignContent", + "alignItems", + "justifyContent", + "justifyItems", + "gap", + "space", + "divideWidth", + "divideStyle", + "divideColor", + "divideOpacity", + "placeSelf", + "alignSelf", + "justifySelf", + "overflow", + "overscrollBehavior", + "scrollBehavior", + "textOverflow", + "whitespace", + "wordBreak", + "borderRadius", + "borderWidth", + "borderStyle", + "borderColor", + "borderOpacity", + "backgroundColor", + "backgroundOpacity", + "backgroundImage", + "gradientColorStops", + "boxDecorationBreak", + "backgroundSize", + "backgroundAttachment", + "backgroundClip", + "backgroundPosition", + "backgroundRepeat", + "backgroundOrigin", + "fill", + "stroke", + "strokeWidth", + "objectFit", + "objectPosition", + "padding", + "textAlign", + "textIndent", + "verticalAlign", + "fontFamily", + "fontSize", + "fontWeight", + "textTransform", + "fontStyle", + "fontVariantNumeric", + "lineHeight", + "letterSpacing", + "textColor", + "textOpacity", + "textDecoration", + "textDecorationColor", + "textDecorationStyle", + "textDecorationThickness", + "textUnderlineOffset", + "fontSmoothing", + "placeholderColor", + "placeholderOpacity", + "caretColor", + "accentColor", + "opacity", + "backgroundBlendMode", + "mixBlendMode", + "boxShadow", + "boxShadowColor", + "outlineStyle", + "outlineWidth", + "outlineOffset", + "outlineColor", + "ringWidth", + "ringColor", + "ringOpacity", + "ringOffsetWidth", + "ringOffsetColor", + "blur", + "brightness", + "contrast", + "dropShadow", + "grayscale", + "hueRotate", + "invert", + "saturate", + "sepia", + "filter", + "backdropBlur", + "backdropBrightness", + "backdropContrast", + "backdropGrayscale", + "backdropHueRotate", + "backdropInvert", + "backdropOpacity", + "backdropSaturate", + "backdropSepia", + "backdropFilter", + "transitionProperty", + "transitionDelay", + "transitionDuration", + "transitionTimingFunction", + "willChange", + "content" +]; +exports.default = _default; diff --git a/node_modules/tailwindcss/lib/corePlugins.js b/node_modules/tailwindcss/lib/corePlugins.js new file mode 100644 index 0000000..115b48d --- /dev/null +++ b/node_modules/tailwindcss/lib/corePlugins.js @@ -0,0 +1,3659 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.corePlugins = exports.variantPlugins = void 0; +var _fs = _interopRequireDefault(require("fs")); +var path = _interopRequireWildcard(require("path")); +var _postcss = _interopRequireDefault(require("postcss")); +var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin")); +var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery")); +var _escapeClassName = _interopRequireDefault(require("./util/escapeClassName")); +var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue")); +var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette")); +var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable")); +var _toColorValue = _interopRequireDefault(require("./util/toColorValue")); +var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject")); +var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue")); +var _packageJson = require("../package.json"); +var _log = _interopRequireDefault(require("./util/log")); +var _normalizeScreens = require("./util/normalizeScreens"); +var _parseBoxShadowValue = require("./util/parseBoxShadowValue"); +var _removeAlphaVariables = require("./util/removeAlphaVariables"); +var _featureFlags = require("./featureFlags"); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function _getRequireWildcardCache() { + if (typeof WeakMap !== "function") return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function() { + return cache; + }; + return cache; +} +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +let variantPlugins = { + pseudoElementVariants: ({ addVariant })=>{ + addVariant("first-letter", "&::first-letter"); + addVariant("first-line", "&::first-line"); + addVariant("marker", [ + ({ container })=>{ + (0, _removeAlphaVariables).removeAlphaVariables(container, [ + "--tw-text-opacity" + ]); + return "& *::marker"; + }, + ({ container })=>{ + (0, _removeAlphaVariables).removeAlphaVariables(container, [ + "--tw-text-opacity" + ]); + return "&::marker"; + }, + ]); + addVariant("selection", [ + "& *::selection", + "&::selection" + ]); + addVariant("file", "&::file-selector-button"); + addVariant("placeholder", "&::placeholder"); + addVariant("backdrop", "&::backdrop"); + addVariant("before", ({ container })=>{ + container.walkRules((rule)=>{ + let foundContent = false; + rule.walkDecls("content", ()=>{ + foundContent = true; + }); + if (!foundContent) { + rule.prepend(_postcss.default.decl({ + prop: "content", + value: "var(--tw-content)" + })); + } + }); + return "&::before"; + }); + addVariant("after", ({ container })=>{ + container.walkRules((rule)=>{ + let foundContent = false; + rule.walkDecls("content", ()=>{ + foundContent = true; + }); + if (!foundContent) { + rule.prepend(_postcss.default.decl({ + prop: "content", + value: "var(--tw-content)" + })); + } + }); + return "&::after"; + }); + }, + pseudoClassVariants: ({ addVariant , config })=>{ + let pseudoVariants = [ + // Positional + [ + "first", + "&:first-child" + ], + [ + "last", + "&:last-child" + ], + [ + "only", + "&:only-child" + ], + [ + "odd", + "&:nth-child(odd)" + ], + [ + "even", + "&:nth-child(even)" + ], + "first-of-type", + "last-of-type", + "only-of-type", + // State + [ + "visited", + ({ container })=>{ + (0, _removeAlphaVariables).removeAlphaVariables(container, [ + "--tw-text-opacity", + "--tw-border-opacity", + "--tw-bg-opacity", + ]); + return "&:visited"; + }, + ], + "target", + [ + "open", + "&[open]" + ], + // Forms + "default", + "checked", + "indeterminate", + "placeholder-shown", + "autofill", + "optional", + "required", + "valid", + "invalid", + "in-range", + "out-of-range", + "read-only", + // Content + "empty", + // Interactive + "focus-within", + [ + "hover", + !(0, _featureFlags).flagEnabled(config(), "hoverOnlyWhenSupported") ? "&:hover" : "@media (hover: hover) and (pointer: fine) { &:hover }", + ], + "focus", + "focus-visible", + "active", + "enabled", + "disabled", + ].map((variant)=>Array.isArray(variant) ? variant : [ + variant, + `&:${variant}` + ]); + for (let [variantName, state] of pseudoVariants){ + addVariant(variantName, (ctx)=>{ + let result = typeof state === "function" ? state(ctx) : state; + return result; + }); + } + for (let [variantName1, state1] of pseudoVariants){ + addVariant(`group-${variantName1}`, (ctx)=>{ + let result = typeof state1 === "function" ? state1(ctx) : state1; + return result.replace(/&(\S+)/, ":merge(.group)$1 &"); + }); + } + for (let [variantName2, state2] of pseudoVariants){ + addVariant(`peer-${variantName2}`, (ctx)=>{ + let result = typeof state2 === "function" ? state2(ctx) : state2; + return result.replace(/&(\S+)/, ":merge(.peer)$1 ~ &"); + }); + } + }, + directionVariants: ({ addVariant })=>{ + addVariant("ltr", ()=>{ + _log.default.warn("rtl-experimental", [ + "The RTL features in Tailwind CSS are currently in preview.", + "Preview features are not covered by semver, and may be improved in breaking ways at any time.", + ]); + return '[dir="ltr"] &'; + }); + addVariant("rtl", ()=>{ + _log.default.warn("rtl-experimental", [ + "The RTL features in Tailwind CSS are currently in preview.", + "Preview features are not covered by semver, and may be improved in breaking ways at any time.", + ]); + return '[dir="rtl"] &'; + }); + }, + reducedMotionVariants: ({ addVariant })=>{ + addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)"); + addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)"); + }, + darkVariants: ({ config , addVariant })=>{ + let [mode, className = ".dark"] = [].concat(config("darkMode", "media")); + if (mode === false) { + mode = "media"; + _log.default.warn("darkmode-false", [ + "The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.", + "Change `darkMode` to `media` or remove it entirely.", + "https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration", + ]); + } + if (mode === "class") { + addVariant("dark", `${className} &`); + } else if (mode === "media") { + addVariant("dark", "@media (prefers-color-scheme: dark)"); + } + }, + printVariant: ({ addVariant })=>{ + addVariant("print", "@media print"); + }, + screenVariants: ({ theme , addVariant })=>{ + for (let screen of (0, _normalizeScreens).normalizeScreens(theme("screens"))){ + let query = (0, _buildMediaQuery).default(screen); + addVariant(screen.name, `@media ${query}`); + } + }, + orientationVariants: ({ addVariant })=>{ + addVariant("portrait", "@media (orientation: portrait)"); + addVariant("landscape", "@media (orientation: landscape)"); + }, + prefersContrastVariants: ({ addVariant })=>{ + addVariant("contrast-more", "@media (prefers-contrast: more)"); + addVariant("contrast-less", "@media (prefers-contrast: less)"); + } +}; +exports.variantPlugins = variantPlugins; +let cssTransformValue = [ + "translate(var(--tw-translate-x), var(--tw-translate-y))", + "rotate(var(--tw-rotate))", + "skewX(var(--tw-skew-x))", + "skewY(var(--tw-skew-y))", + "scaleX(var(--tw-scale-x))", + "scaleY(var(--tw-scale-y))", +].join(" "); +let cssFilterValue = [ + "var(--tw-blur)", + "var(--tw-brightness)", + "var(--tw-contrast)", + "var(--tw-grayscale)", + "var(--tw-hue-rotate)", + "var(--tw-invert)", + "var(--tw-saturate)", + "var(--tw-sepia)", + "var(--tw-drop-shadow)", +].join(" "); +let cssBackdropFilterValue = [ + "var(--tw-backdrop-blur)", + "var(--tw-backdrop-brightness)", + "var(--tw-backdrop-contrast)", + "var(--tw-backdrop-grayscale)", + "var(--tw-backdrop-hue-rotate)", + "var(--tw-backdrop-invert)", + "var(--tw-backdrop-opacity)", + "var(--tw-backdrop-saturate)", + "var(--tw-backdrop-sepia)", +].join(" "); +let corePlugins = { + preflight: ({ addBase })=>{ + let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, "./css/preflight.css"), "utf8")); + addBase([ + _postcss.default.comment({ + text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com` + }), + ...preflightStyles.nodes, + ]); + }, + container: (()=>{ + function extractMinWidths(breakpoints = []) { + return breakpoints.flatMap((breakpoint1)=>breakpoint1.values.map((breakpoint)=>breakpoint.min)).filter((v)=>v !== undefined); + } + function mapMinWidthsToPadding(minWidths, screens, paddings) { + if (typeof paddings === "undefined") { + return []; + } + if (!(typeof paddings === "object" && paddings !== null)) { + return [ + { + screen: "DEFAULT", + minWidth: 0, + padding: paddings + }, + ]; + } + let mapping = []; + if (paddings.DEFAULT) { + mapping.push({ + screen: "DEFAULT", + minWidth: 0, + padding: paddings.DEFAULT + }); + } + for (let minWidth of minWidths){ + for (let screen of screens){ + for (let { min } of screen.values){ + if (min === minWidth) { + mapping.push({ + minWidth, + padding: paddings[screen.name] + }); + } + } + } + } + return mapping; + } + return function({ addComponents , theme }) { + let screens = (0, _normalizeScreens).normalizeScreens(theme("container.screens", theme("screens"))); + let minWidths = extractMinWidths(screens); + let paddings = mapMinWidthsToPadding(minWidths, screens, theme("container.padding")); + let generatePaddingFor = (minWidth)=>{ + let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth); + if (!paddingConfig) { + return {}; + } + return { + paddingRight: paddingConfig.padding, + paddingLeft: paddingConfig.padding + }; + }; + let atRules = Array.from(new Set(minWidths.slice().sort((a, z)=>parseInt(a) - parseInt(z)))).map((minWidth)=>({ + [`@media (min-width: ${minWidth})`]: { + ".container": { + "max-width": minWidth, + ...generatePaddingFor(minWidth) + } + } + })); + addComponents([ + { + ".container": Object.assign({ + width: "100%" + }, theme("container.center", false) ? { + marginRight: "auto", + marginLeft: "auto" + } : {}, generatePaddingFor(0)) + }, + ...atRules, + ]); + }; + })(), + accessibility: ({ addUtilities })=>{ + addUtilities({ + ".sr-only": { + position: "absolute", + width: "1px", + height: "1px", + padding: "0", + margin: "-1px", + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + borderWidth: "0" + }, + ".not-sr-only": { + position: "static", + width: "auto", + height: "auto", + padding: "0", + margin: "0", + overflow: "visible", + clip: "auto", + whiteSpace: "normal" + } + }); + }, + pointerEvents: ({ addUtilities })=>{ + addUtilities({ + ".pointer-events-none": { + "pointer-events": "none" + }, + ".pointer-events-auto": { + "pointer-events": "auto" + } + }); + }, + visibility: ({ addUtilities })=>{ + addUtilities({ + ".visible": { + visibility: "visible" + }, + ".invisible": { + visibility: "hidden" + } + }); + }, + position: ({ addUtilities })=>{ + addUtilities({ + ".static": { + position: "static" + }, + ".fixed": { + position: "fixed" + }, + ".absolute": { + position: "absolute" + }, + ".relative": { + position: "relative" + }, + ".sticky": { + position: "sticky" + } + }); + }, + inset: (0, _createUtilityPlugin).default("inset", [ + [ + "inset", + [ + "top", + "right", + "bottom", + "left" + ] + ], + [ + [ + "inset-x", + [ + "left", + "right" + ] + ], + [ + "inset-y", + [ + "top", + "bottom" + ] + ], + ], + [ + [ + "top", + [ + "top" + ] + ], + [ + "right", + [ + "right" + ] + ], + [ + "bottom", + [ + "bottom" + ] + ], + [ + "left", + [ + "left" + ] + ], + ], + ], { + supportsNegativeValues: true + }), + isolation: ({ addUtilities })=>{ + addUtilities({ + ".isolate": { + isolation: "isolate" + }, + ".isolation-auto": { + isolation: "auto" + } + }); + }, + zIndex: (0, _createUtilityPlugin).default("zIndex", [ + [ + "z", + [ + "zIndex" + ] + ] + ], { + supportsNegativeValues: true + }), + order: (0, _createUtilityPlugin).default("order", undefined, { + supportsNegativeValues: true + }), + gridColumn: (0, _createUtilityPlugin).default("gridColumn", [ + [ + "col", + [ + "gridColumn" + ] + ] + ]), + gridColumnStart: (0, _createUtilityPlugin).default("gridColumnStart", [ + [ + "col-start", + [ + "gridColumnStart" + ] + ] + ]), + gridColumnEnd: (0, _createUtilityPlugin).default("gridColumnEnd", [ + [ + "col-end", + [ + "gridColumnEnd" + ] + ] + ]), + gridRow: (0, _createUtilityPlugin).default("gridRow", [ + [ + "row", + [ + "gridRow" + ] + ] + ]), + gridRowStart: (0, _createUtilityPlugin).default("gridRowStart", [ + [ + "row-start", + [ + "gridRowStart" + ] + ] + ]), + gridRowEnd: (0, _createUtilityPlugin).default("gridRowEnd", [ + [ + "row-end", + [ + "gridRowEnd" + ] + ] + ]), + float: ({ addUtilities })=>{ + addUtilities({ + ".float-right": { + float: "right" + }, + ".float-left": { + float: "left" + }, + ".float-none": { + float: "none" + } + }); + }, + clear: ({ addUtilities })=>{ + addUtilities({ + ".clear-left": { + clear: "left" + }, + ".clear-right": { + clear: "right" + }, + ".clear-both": { + clear: "both" + }, + ".clear-none": { + clear: "none" + } + }); + }, + margin: (0, _createUtilityPlugin).default("margin", [ + [ + "m", + [ + "margin" + ] + ], + [ + [ + "mx", + [ + "margin-left", + "margin-right" + ] + ], + [ + "my", + [ + "margin-top", + "margin-bottom" + ] + ], + ], + [ + [ + "mt", + [ + "margin-top" + ] + ], + [ + "mr", + [ + "margin-right" + ] + ], + [ + "mb", + [ + "margin-bottom" + ] + ], + [ + "ml", + [ + "margin-left" + ] + ], + ], + ], { + supportsNegativeValues: true + }), + boxSizing: ({ addUtilities })=>{ + addUtilities({ + ".box-border": { + "box-sizing": "border-box" + }, + ".box-content": { + "box-sizing": "content-box" + } + }); + }, + display: ({ addUtilities })=>{ + addUtilities({ + ".block": { + display: "block" + }, + ".inline-block": { + display: "inline-block" + }, + ".inline": { + display: "inline" + }, + ".flex": { + display: "flex" + }, + ".inline-flex": { + display: "inline-flex" + }, + ".table": { + display: "table" + }, + ".inline-table": { + display: "inline-table" + }, + ".table-caption": { + display: "table-caption" + }, + ".table-cell": { + display: "table-cell" + }, + ".table-column": { + display: "table-column" + }, + ".table-column-group": { + display: "table-column-group" + }, + ".table-footer-group": { + display: "table-footer-group" + }, + ".table-header-group": { + display: "table-header-group" + }, + ".table-row-group": { + display: "table-row-group" + }, + ".table-row": { + display: "table-row" + }, + ".flow-root": { + display: "flow-root" + }, + ".grid": { + display: "grid" + }, + ".inline-grid": { + display: "inline-grid" + }, + ".contents": { + display: "contents" + }, + ".list-item": { + display: "list-item" + }, + ".hidden": { + display: "none" + } + }); + }, + aspectRatio: (0, _createUtilityPlugin).default("aspectRatio", [ + [ + "aspect", + [ + "aspect-ratio" + ] + ] + ]), + height: (0, _createUtilityPlugin).default("height", [ + [ + "h", + [ + "height" + ] + ] + ]), + maxHeight: (0, _createUtilityPlugin).default("maxHeight", [ + [ + "max-h", + [ + "maxHeight" + ] + ] + ]), + minHeight: (0, _createUtilityPlugin).default("minHeight", [ + [ + "min-h", + [ + "minHeight" + ] + ] + ]), + width: (0, _createUtilityPlugin).default("width", [ + [ + "w", + [ + "width" + ] + ] + ]), + minWidth: (0, _createUtilityPlugin).default("minWidth", [ + [ + "min-w", + [ + "minWidth" + ] + ] + ]), + maxWidth: (0, _createUtilityPlugin).default("maxWidth", [ + [ + "max-w", + [ + "maxWidth" + ] + ] + ]), + flex: (0, _createUtilityPlugin).default("flex"), + flexShrink: (0, _createUtilityPlugin).default("flexShrink", [ + [ + "flex-shrink", + [ + "flex-shrink" + ] + ], + [ + "shrink", + [ + "flex-shrink" + ] + ], + ]), + flexGrow: (0, _createUtilityPlugin).default("flexGrow", [ + [ + "flex-grow", + [ + "flex-grow" + ] + ], + [ + "grow", + [ + "flex-grow" + ] + ], + ]), + flexBasis: (0, _createUtilityPlugin).default("flexBasis", [ + [ + "basis", + [ + "flex-basis" + ] + ] + ]), + tableLayout: ({ addUtilities })=>{ + addUtilities({ + ".table-auto": { + "table-layout": "auto" + }, + ".table-fixed": { + "table-layout": "fixed" + } + }); + }, + borderCollapse: ({ addUtilities })=>{ + addUtilities({ + ".border-collapse": { + "border-collapse": "collapse" + }, + ".border-separate": { + "border-collapse": "separate" + } + }); + }, + borderSpacing: ({ addDefaults , matchUtilities , theme })=>{ + addDefaults("border-spacing", { + "--tw-border-spacing-x": 0, + "--tw-border-spacing-y": 0 + }); + matchUtilities({ + "border-spacing": (value)=>{ + return { + "--tw-border-spacing-x": value, + "--tw-border-spacing-y": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + }, + "border-spacing-x": (value)=>{ + return { + "--tw-border-spacing-x": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + }, + "border-spacing-y": (value)=>{ + return { + "--tw-border-spacing-y": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + } + }, { + values: theme("borderSpacing") + }); + }, + transformOrigin: (0, _createUtilityPlugin).default("transformOrigin", [ + [ + "origin", + [ + "transformOrigin" + ] + ] + ]), + translate: (0, _createUtilityPlugin).default("translate", [ + [ + [ + "translate-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-translate-x", + [ + "transform", + cssTransformValue + ] + ], + ], + [ + "translate-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-translate-y", + [ + "transform", + cssTransformValue + ] + ], + ], + ], + ], { + supportsNegativeValues: true + }), + rotate: (0, _createUtilityPlugin).default("rotate", [ + [ + "rotate", + [ + [ + "@defaults transform", + {} + ], + "--tw-rotate", + [ + "transform", + cssTransformValue + ] + ] + ] + ], { + supportsNegativeValues: true + }), + skew: (0, _createUtilityPlugin).default("skew", [ + [ + [ + "skew-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-skew-x", + [ + "transform", + cssTransformValue + ] + ] + ], + [ + "skew-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-skew-y", + [ + "transform", + cssTransformValue + ] + ] + ], + ], + ], { + supportsNegativeValues: true + }), + scale: (0, _createUtilityPlugin).default("scale", [ + [ + "scale", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-x", + "--tw-scale-y", + [ + "transform", + cssTransformValue + ], + ], + ], + [ + [ + "scale-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-x", + [ + "transform", + cssTransformValue + ] + ], + ], + [ + "scale-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-y", + [ + "transform", + cssTransformValue + ] + ], + ], + ], + ], { + supportsNegativeValues: true + }), + transform: ({ addDefaults , addUtilities })=>{ + addDefaults("transform", { + "--tw-translate-x": "0", + "--tw-translate-y": "0", + "--tw-rotate": "0", + "--tw-skew-x": "0", + "--tw-skew-y": "0", + "--tw-scale-x": "1", + "--tw-scale-y": "1" + }); + addUtilities({ + ".transform": { + "@defaults transform": {}, + transform: cssTransformValue + }, + ".transform-cpu": { + transform: cssTransformValue + }, + ".transform-gpu": { + transform: cssTransformValue.replace("translate(var(--tw-translate-x), var(--tw-translate-y))", "translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)") + }, + ".transform-none": { + transform: "none" + } + }); + }, + animation: ({ matchUtilities , theme , config })=>{ + let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName).default(name)}`; + var ref; + let keyframes = Object.fromEntries(Object.entries((ref = theme("keyframes")) !== null && ref !== void 0 ? ref : {}).map(([key, value])=>{ + return [ + key, + { + [`@keyframes ${prefixName(key)}`]: value + } + ]; + })); + matchUtilities({ + animate: (value1)=>{ + let animations = (0, _parseAnimationValue).default(value1); + return [ + ...animations.flatMap((animation)=>keyframes[animation.name]), + { + animation: animations.map(({ name , value })=>{ + if (name === undefined || keyframes[name] === undefined) { + return value; + } + return value.replace(name, prefixName(name)); + }).join(", ") + }, + ]; + } + }, { + values: theme("animation") + }); + }, + cursor: (0, _createUtilityPlugin).default("cursor"), + touchAction: ({ addDefaults , addUtilities })=>{ + addDefaults("touch-action", { + "--tw-pan-x": " ", + "--tw-pan-y": " ", + "--tw-pinch-zoom": " " + }); + let cssTouchActionValue = "var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"; + addUtilities({ + ".touch-auto": { + "touch-action": "auto" + }, + ".touch-none": { + "touch-action": "none" + }, + ".touch-pan-x": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-x", + "touch-action": cssTouchActionValue + }, + ".touch-pan-left": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-left", + "touch-action": cssTouchActionValue + }, + ".touch-pan-right": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-right", + "touch-action": cssTouchActionValue + }, + ".touch-pan-y": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-y", + "touch-action": cssTouchActionValue + }, + ".touch-pan-up": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-up", + "touch-action": cssTouchActionValue + }, + ".touch-pan-down": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-down", + "touch-action": cssTouchActionValue + }, + ".touch-pinch-zoom": { + "@defaults touch-action": {}, + "--tw-pinch-zoom": "pinch-zoom", + "touch-action": cssTouchActionValue + }, + ".touch-manipulation": { + "touch-action": "manipulation" + } + }); + }, + userSelect: ({ addUtilities })=>{ + addUtilities({ + ".select-none": { + "user-select": "none" + }, + ".select-text": { + "user-select": "text" + }, + ".select-all": { + "user-select": "all" + }, + ".select-auto": { + "user-select": "auto" + } + }); + }, + resize: ({ addUtilities })=>{ + addUtilities({ + ".resize-none": { + resize: "none" + }, + ".resize-y": { + resize: "vertical" + }, + ".resize-x": { + resize: "horizontal" + }, + ".resize": { + resize: "both" + } + }); + }, + scrollSnapType: ({ addDefaults , addUtilities })=>{ + addDefaults("scroll-snap-type", { + "--tw-scroll-snap-strictness": "proximity" + }); + addUtilities({ + ".snap-none": { + "scroll-snap-type": "none" + }, + ".snap-x": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "x var(--tw-scroll-snap-strictness)" + }, + ".snap-y": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "y var(--tw-scroll-snap-strictness)" + }, + ".snap-both": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "both var(--tw-scroll-snap-strictness)" + }, + ".snap-mandatory": { + "--tw-scroll-snap-strictness": "mandatory" + }, + ".snap-proximity": { + "--tw-scroll-snap-strictness": "proximity" + } + }); + }, + scrollSnapAlign: ({ addUtilities })=>{ + addUtilities({ + ".snap-start": { + "scroll-snap-align": "start" + }, + ".snap-end": { + "scroll-snap-align": "end" + }, + ".snap-center": { + "scroll-snap-align": "center" + }, + ".snap-align-none": { + "scroll-snap-align": "none" + } + }); + }, + scrollSnapStop: ({ addUtilities })=>{ + addUtilities({ + ".snap-normal": { + "scroll-snap-stop": "normal" + }, + ".snap-always": { + "scroll-snap-stop": "always" + } + }); + }, + scrollMargin: (0, _createUtilityPlugin).default("scrollMargin", [ + [ + "scroll-m", + [ + "scroll-margin" + ] + ], + [ + [ + "scroll-mx", + [ + "scroll-margin-left", + "scroll-margin-right" + ] + ], + [ + "scroll-my", + [ + "scroll-margin-top", + "scroll-margin-bottom" + ] + ], + ], + [ + [ + "scroll-mt", + [ + "scroll-margin-top" + ] + ], + [ + "scroll-mr", + [ + "scroll-margin-right" + ] + ], + [ + "scroll-mb", + [ + "scroll-margin-bottom" + ] + ], + [ + "scroll-ml", + [ + "scroll-margin-left" + ] + ], + ], + ], { + supportsNegativeValues: true + }), + scrollPadding: (0, _createUtilityPlugin).default("scrollPadding", [ + [ + "scroll-p", + [ + "scroll-padding" + ] + ], + [ + [ + "scroll-px", + [ + "scroll-padding-left", + "scroll-padding-right" + ] + ], + [ + "scroll-py", + [ + "scroll-padding-top", + "scroll-padding-bottom" + ] + ], + ], + [ + [ + "scroll-pt", + [ + "scroll-padding-top" + ] + ], + [ + "scroll-pr", + [ + "scroll-padding-right" + ] + ], + [ + "scroll-pb", + [ + "scroll-padding-bottom" + ] + ], + [ + "scroll-pl", + [ + "scroll-padding-left" + ] + ], + ], + ]), + listStylePosition: ({ addUtilities })=>{ + addUtilities({ + ".list-inside": { + "list-style-position": "inside" + }, + ".list-outside": { + "list-style-position": "outside" + } + }); + }, + listStyleType: (0, _createUtilityPlugin).default("listStyleType", [ + [ + "list", + [ + "listStyleType" + ] + ] + ]), + appearance: ({ addUtilities })=>{ + addUtilities({ + ".appearance-none": { + appearance: "none" + } + }); + }, + columns: (0, _createUtilityPlugin).default("columns", [ + [ + "columns", + [ + "columns" + ] + ] + ]), + breakBefore: ({ addUtilities })=>{ + addUtilities({ + ".break-before-auto": { + "break-before": "auto" + }, + ".break-before-avoid": { + "break-before": "avoid" + }, + ".break-before-all": { + "break-before": "all" + }, + ".break-before-avoid-page": { + "break-before": "avoid-page" + }, + ".break-before-page": { + "break-before": "page" + }, + ".break-before-left": { + "break-before": "left" + }, + ".break-before-right": { + "break-before": "right" + }, + ".break-before-column": { + "break-before": "column" + } + }); + }, + breakInside: ({ addUtilities })=>{ + addUtilities({ + ".break-inside-auto": { + "break-inside": "auto" + }, + ".break-inside-avoid": { + "break-inside": "avoid" + }, + ".break-inside-avoid-page": { + "break-inside": "avoid-page" + }, + ".break-inside-avoid-column": { + "break-inside": "avoid-column" + } + }); + }, + breakAfter: ({ addUtilities })=>{ + addUtilities({ + ".break-after-auto": { + "break-after": "auto" + }, + ".break-after-avoid": { + "break-after": "avoid" + }, + ".break-after-all": { + "break-after": "all" + }, + ".break-after-avoid-page": { + "break-after": "avoid-page" + }, + ".break-after-page": { + "break-after": "page" + }, + ".break-after-left": { + "break-after": "left" + }, + ".break-after-right": { + "break-after": "right" + }, + ".break-after-column": { + "break-after": "column" + } + }); + }, + gridAutoColumns: (0, _createUtilityPlugin).default("gridAutoColumns", [ + [ + "auto-cols", + [ + "gridAutoColumns" + ] + ] + ]), + gridAutoFlow: ({ addUtilities })=>{ + addUtilities({ + ".grid-flow-row": { + gridAutoFlow: "row" + }, + ".grid-flow-col": { + gridAutoFlow: "column" + }, + ".grid-flow-dense": { + gridAutoFlow: "dense" + }, + ".grid-flow-row-dense": { + gridAutoFlow: "row dense" + }, + ".grid-flow-col-dense": { + gridAutoFlow: "column dense" + } + }); + }, + gridAutoRows: (0, _createUtilityPlugin).default("gridAutoRows", [ + [ + "auto-rows", + [ + "gridAutoRows" + ] + ] + ]), + gridTemplateColumns: (0, _createUtilityPlugin).default("gridTemplateColumns", [ + [ + "grid-cols", + [ + "gridTemplateColumns" + ] + ], + ]), + gridTemplateRows: (0, _createUtilityPlugin).default("gridTemplateRows", [ + [ + "grid-rows", + [ + "gridTemplateRows" + ] + ] + ]), + flexDirection: ({ addUtilities })=>{ + addUtilities({ + ".flex-row": { + "flex-direction": "row" + }, + ".flex-row-reverse": { + "flex-direction": "row-reverse" + }, + ".flex-col": { + "flex-direction": "column" + }, + ".flex-col-reverse": { + "flex-direction": "column-reverse" + } + }); + }, + flexWrap: ({ addUtilities })=>{ + addUtilities({ + ".flex-wrap": { + "flex-wrap": "wrap" + }, + ".flex-wrap-reverse": { + "flex-wrap": "wrap-reverse" + }, + ".flex-nowrap": { + "flex-wrap": "nowrap" + } + }); + }, + placeContent: ({ addUtilities })=>{ + addUtilities({ + ".place-content-center": { + "place-content": "center" + }, + ".place-content-start": { + "place-content": "start" + }, + ".place-content-end": { + "place-content": "end" + }, + ".place-content-between": { + "place-content": "space-between" + }, + ".place-content-around": { + "place-content": "space-around" + }, + ".place-content-evenly": { + "place-content": "space-evenly" + }, + ".place-content-stretch": { + "place-content": "stretch" + } + }); + }, + placeItems: ({ addUtilities })=>{ + addUtilities({ + ".place-items-start": { + "place-items": "start" + }, + ".place-items-end": { + "place-items": "end" + }, + ".place-items-center": { + "place-items": "center" + }, + ".place-items-stretch": { + "place-items": "stretch" + } + }); + }, + alignContent: ({ addUtilities })=>{ + addUtilities({ + ".content-center": { + "align-content": "center" + }, + ".content-start": { + "align-content": "flex-start" + }, + ".content-end": { + "align-content": "flex-end" + }, + ".content-between": { + "align-content": "space-between" + }, + ".content-around": { + "align-content": "space-around" + }, + ".content-evenly": { + "align-content": "space-evenly" + } + }); + }, + alignItems: ({ addUtilities })=>{ + addUtilities({ + ".items-start": { + "align-items": "flex-start" + }, + ".items-end": { + "align-items": "flex-end" + }, + ".items-center": { + "align-items": "center" + }, + ".items-baseline": { + "align-items": "baseline" + }, + ".items-stretch": { + "align-items": "stretch" + } + }); + }, + justifyContent: ({ addUtilities })=>{ + addUtilities({ + ".justify-start": { + "justify-content": "flex-start" + }, + ".justify-end": { + "justify-content": "flex-end" + }, + ".justify-center": { + "justify-content": "center" + }, + ".justify-between": { + "justify-content": "space-between" + }, + ".justify-around": { + "justify-content": "space-around" + }, + ".justify-evenly": { + "justify-content": "space-evenly" + } + }); + }, + justifyItems: ({ addUtilities })=>{ + addUtilities({ + ".justify-items-start": { + "justify-items": "start" + }, + ".justify-items-end": { + "justify-items": "end" + }, + ".justify-items-center": { + "justify-items": "center" + }, + ".justify-items-stretch": { + "justify-items": "stretch" + } + }); + }, + gap: (0, _createUtilityPlugin).default("gap", [ + [ + "gap", + [ + "gap" + ] + ], + [ + [ + "gap-x", + [ + "columnGap" + ] + ], + [ + "gap-y", + [ + "rowGap" + ] + ], + ], + ]), + space: ({ matchUtilities , addUtilities , theme })=>{ + matchUtilities({ + "space-x": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "--tw-space-x-reverse": "0", + "margin-right": `calc(${value} * var(--tw-space-x-reverse))`, + "margin-left": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))` + } + }; + }, + "space-y": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "--tw-space-y-reverse": "0", + "margin-top": `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`, + "margin-bottom": `calc(${value} * var(--tw-space-y-reverse))` + } + }; + } + }, { + values: theme("space"), + supportsNegativeValues: true + }); + addUtilities({ + ".space-y-reverse > :not([hidden]) ~ :not([hidden])": { + "--tw-space-y-reverse": "1" + }, + ".space-x-reverse > :not([hidden]) ~ :not([hidden])": { + "--tw-space-x-reverse": "1" + } + }); + }, + divideWidth: ({ matchUtilities , addUtilities , theme })=>{ + matchUtilities({ + "divide-x": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-x-reverse": "0", + "border-right-width": `calc(${value} * var(--tw-divide-x-reverse))`, + "border-left-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))` + } + }; + }, + "divide-y": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-y-reverse": "0", + "border-top-width": `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`, + "border-bottom-width": `calc(${value} * var(--tw-divide-y-reverse))` + } + }; + } + }, { + values: theme("divideWidth"), + type: [ + "line-width", + "length" + ] + }); + addUtilities({ + ".divide-y-reverse > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-y-reverse": "1" + }, + ".divide-x-reverse > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-x-reverse": "1" + } + }); + }, + divideStyle: ({ addUtilities })=>{ + addUtilities({ + ".divide-solid > :not([hidden]) ~ :not([hidden])": { + "border-style": "solid" + }, + ".divide-dashed > :not([hidden]) ~ :not([hidden])": { + "border-style": "dashed" + }, + ".divide-dotted > :not([hidden]) ~ :not([hidden])": { + "border-style": "dotted" + }, + ".divide-double > :not([hidden]) ~ :not([hidden])": { + "border-style": "double" + }, + ".divide-none > :not([hidden]) ~ :not([hidden])": { + "border-style": "none" + } + }); + }, + divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{ + matchUtilities({ + divide: (value)=>{ + if (!corePlugins1("divideOpacity")) { + return { + ["& > :not([hidden]) ~ :not([hidden])"]: { + "border-color": (0, _toColorValue).default(value) + } + }; + } + return { + ["& > :not([hidden]) ~ :not([hidden])"]: (0, _withAlphaVariable).default({ + color: value, + property: "border-color", + variable: "--tw-divide-opacity" + }) + }; + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette).default(theme("divideColor"))), + type: "color" + }); + }, + divideOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "divide-opacity": (value)=>{ + return { + [`& > :not([hidden]) ~ :not([hidden])`]: { + "--tw-divide-opacity": value + } + }; + } + }, { + values: theme("divideOpacity") + }); + }, + placeSelf: ({ addUtilities })=>{ + addUtilities({ + ".place-self-auto": { + "place-self": "auto" + }, + ".place-self-start": { + "place-self": "start" + }, + ".place-self-end": { + "place-self": "end" + }, + ".place-self-center": { + "place-self": "center" + }, + ".place-self-stretch": { + "place-self": "stretch" + } + }); + }, + alignSelf: ({ addUtilities })=>{ + addUtilities({ + ".self-auto": { + "align-self": "auto" + }, + ".self-start": { + "align-self": "flex-start" + }, + ".self-end": { + "align-self": "flex-end" + }, + ".self-center": { + "align-self": "center" + }, + ".self-stretch": { + "align-self": "stretch" + }, + ".self-baseline": { + "align-self": "baseline" + } + }); + }, + justifySelf: ({ addUtilities })=>{ + addUtilities({ + ".justify-self-auto": { + "justify-self": "auto" + }, + ".justify-self-start": { + "justify-self": "start" + }, + ".justify-self-end": { + "justify-self": "end" + }, + ".justify-self-center": { + "justify-self": "center" + }, + ".justify-self-stretch": { + "justify-self": "stretch" + } + }); + }, + overflow: ({ addUtilities })=>{ + addUtilities({ + ".overflow-auto": { + overflow: "auto" + }, + ".overflow-hidden": { + overflow: "hidden" + }, + ".overflow-clip": { + overflow: "clip" + }, + ".overflow-visible": { + overflow: "visible" + }, + ".overflow-scroll": { + overflow: "scroll" + }, + ".overflow-x-auto": { + "overflow-x": "auto" + }, + ".overflow-y-auto": { + "overflow-y": "auto" + }, + ".overflow-x-hidden": { + "overflow-x": "hidden" + }, + ".overflow-y-hidden": { + "overflow-y": "hidden" + }, + ".overflow-x-clip": { + "overflow-x": "clip" + }, + ".overflow-y-clip": { + "overflow-y": "clip" + }, + ".overflow-x-visible": { + "overflow-x": "visible" + }, + ".overflow-y-visible": { + "overflow-y": "visible" + }, + ".overflow-x-scroll": { + "overflow-x": "scroll" + }, + ".overflow-y-scroll": { + "overflow-y": "scroll" + } + }); + }, + overscrollBehavior: ({ addUtilities })=>{ + addUtilities({ + ".overscroll-auto": { + "overscroll-behavior": "auto" + }, + ".overscroll-contain": { + "overscroll-behavior": "contain" + }, + ".overscroll-none": { + "overscroll-behavior": "none" + }, + ".overscroll-y-auto": { + "overscroll-behavior-y": "auto" + }, + ".overscroll-y-contain": { + "overscroll-behavior-y": "contain" + }, + ".overscroll-y-none": { + "overscroll-behavior-y": "none" + }, + ".overscroll-x-auto": { + "overscroll-behavior-x": "auto" + }, + ".overscroll-x-contain": { + "overscroll-behavior-x": "contain" + }, + ".overscroll-x-none": { + "overscroll-behavior-x": "none" + } + }); + }, + scrollBehavior: ({ addUtilities })=>{ + addUtilities({ + ".scroll-auto": { + "scroll-behavior": "auto" + }, + ".scroll-smooth": { + "scroll-behavior": "smooth" + } + }); + }, + textOverflow: ({ addUtilities })=>{ + addUtilities({ + ".truncate": { + overflow: "hidden", + "text-overflow": "ellipsis", + "white-space": "nowrap" + }, + ".overflow-ellipsis": { + "text-overflow": "ellipsis" + }, + ".text-ellipsis": { + "text-overflow": "ellipsis" + }, + ".text-clip": { + "text-overflow": "clip" + } + }); + }, + whitespace: ({ addUtilities })=>{ + addUtilities({ + ".whitespace-normal": { + "white-space": "normal" + }, + ".whitespace-nowrap": { + "white-space": "nowrap" + }, + ".whitespace-pre": { + "white-space": "pre" + }, + ".whitespace-pre-line": { + "white-space": "pre-line" + }, + ".whitespace-pre-wrap": { + "white-space": "pre-wrap" + } + }); + }, + wordBreak: ({ addUtilities })=>{ + addUtilities({ + ".break-normal": { + "overflow-wrap": "normal", + "word-break": "normal" + }, + ".break-words": { + "overflow-wrap": "break-word" + }, + ".break-all": { + "word-break": "break-all" + } + }); + }, + borderRadius: (0, _createUtilityPlugin).default("borderRadius", [ + [ + "rounded", + [ + "border-radius" + ] + ], + [ + [ + "rounded-t", + [ + "border-top-left-radius", + "border-top-right-radius" + ] + ], + [ + "rounded-r", + [ + "border-top-right-radius", + "border-bottom-right-radius" + ] + ], + [ + "rounded-b", + [ + "border-bottom-right-radius", + "border-bottom-left-radius" + ] + ], + [ + "rounded-l", + [ + "border-top-left-radius", + "border-bottom-left-radius" + ] + ], + ], + [ + [ + "rounded-tl", + [ + "border-top-left-radius" + ] + ], + [ + "rounded-tr", + [ + "border-top-right-radius" + ] + ], + [ + "rounded-br", + [ + "border-bottom-right-radius" + ] + ], + [ + "rounded-bl", + [ + "border-bottom-left-radius" + ] + ], + ], + ]), + borderWidth: (0, _createUtilityPlugin).default("borderWidth", [ + [ + "border", + [ + [ + "@defaults border-width", + {} + ], + "border-width" + ] + ], + [ + [ + "border-x", + [ + [ + "@defaults border-width", + {} + ], + "border-left-width", + "border-right-width" + ] + ], + [ + "border-y", + [ + [ + "@defaults border-width", + {} + ], + "border-top-width", + "border-bottom-width" + ] + ], + ], + [ + [ + "border-t", + [ + [ + "@defaults border-width", + {} + ], + "border-top-width" + ] + ], + [ + "border-r", + [ + [ + "@defaults border-width", + {} + ], + "border-right-width" + ] + ], + [ + "border-b", + [ + [ + "@defaults border-width", + {} + ], + "border-bottom-width" + ] + ], + [ + "border-l", + [ + [ + "@defaults border-width", + {} + ], + "border-left-width" + ] + ], + ], + ], { + type: [ + "line-width", + "length" + ] + }), + borderStyle: ({ addUtilities })=>{ + addUtilities({ + ".border-solid": { + "border-style": "solid" + }, + ".border-dashed": { + "border-style": "dashed" + }, + ".border-dotted": { + "border-style": "dotted" + }, + ".border-double": { + "border-style": "double" + }, + ".border-hidden": { + "border-style": "hidden" + }, + ".border-none": { + "border-style": "none" + } + }); + }, + borderColor: ({ matchUtilities , theme , corePlugins: corePlugins2 })=>{ + matchUtilities({ + border: (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "border-color", + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette).default(theme("borderColor"))), + type: [ + "color" + ] + }); + matchUtilities({ + "border-x": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-left-color": (0, _toColorValue).default(value), + "border-right-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: [ + "border-left-color", + "border-right-color" + ], + variable: "--tw-border-opacity" + }); + }, + "border-y": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-top-color": (0, _toColorValue).default(value), + "border-bottom-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: [ + "border-top-color", + "border-bottom-color" + ], + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette).default(theme("borderColor"))), + type: "color" + }); + matchUtilities({ + "border-t": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-top-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "border-top-color", + variable: "--tw-border-opacity" + }); + }, + "border-r": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-right-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "border-right-color", + variable: "--tw-border-opacity" + }); + }, + "border-b": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-bottom-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "border-bottom-color", + variable: "--tw-border-opacity" + }); + }, + "border-l": (value)=>{ + if (!corePlugins2("borderOpacity")) { + return { + "border-left-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "border-left-color", + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette).default(theme("borderColor"))), + type: "color" + }); + }, + borderOpacity: (0, _createUtilityPlugin).default("borderOpacity", [ + [ + "border-opacity", + [ + "--tw-border-opacity" + ] + ], + ]), + backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{ + matchUtilities({ + bg: (value)=>{ + if (!corePlugins3("backgroundOpacity")) { + return { + "background-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "background-color", + variable: "--tw-bg-opacity" + }); + } + }, { + values: (0, _flattenColorPalette).default(theme("backgroundColor")), + type: "color" + }); + }, + backgroundOpacity: (0, _createUtilityPlugin).default("backgroundOpacity", [ + [ + "bg-opacity", + [ + "--tw-bg-opacity" + ] + ], + ]), + backgroundImage: (0, _createUtilityPlugin).default("backgroundImage", [ + [ + "bg", + [ + "background-image" + ] + ] + ], { + type: [ + "lookup", + "image", + "url" + ] + }), + gradientColorStops: (()=>{ + function transparentTo(value) { + return (0, _withAlphaVariable).withAlphaValue(value, 0, "rgb(255 255 255 / 0)"); + } + return function({ matchUtilities , theme }) { + let options = { + values: (0, _flattenColorPalette).default(theme("gradientColorStops")), + type: [ + "color", + "any" + ] + }; + matchUtilities({ + from: (value)=>{ + let transparentToValue = transparentTo(value); + return { + "--tw-gradient-from": (0, _toColorValue).default(value, "from"), + "--tw-gradient-to": transparentToValue, + "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)` + }; + } + }, options); + matchUtilities({ + via: (value)=>{ + let transparentToValue = transparentTo(value); + return { + "--tw-gradient-to": transparentToValue, + "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue).default(value, "via")}, var(--tw-gradient-to)` + }; + } + }, options); + matchUtilities({ + to: (value)=>({ + "--tw-gradient-to": (0, _toColorValue).default(value, "to") + }) + }, options); + }; + })(), + boxDecorationBreak: ({ addUtilities })=>{ + addUtilities({ + ".decoration-slice": { + "box-decoration-break": "slice" + }, + ".decoration-clone": { + "box-decoration-break": "clone" + }, + ".box-decoration-slice": { + "box-decoration-break": "slice" + }, + ".box-decoration-clone": { + "box-decoration-break": "clone" + } + }); + }, + backgroundSize: (0, _createUtilityPlugin).default("backgroundSize", [ + [ + "bg", + [ + "background-size" + ] + ] + ], { + type: [ + "lookup", + "length", + "percentage" + ] + }), + backgroundAttachment: ({ addUtilities })=>{ + addUtilities({ + ".bg-fixed": { + "background-attachment": "fixed" + }, + ".bg-local": { + "background-attachment": "local" + }, + ".bg-scroll": { + "background-attachment": "scroll" + } + }); + }, + backgroundClip: ({ addUtilities })=>{ + addUtilities({ + ".bg-clip-border": { + "background-clip": "border-box" + }, + ".bg-clip-padding": { + "background-clip": "padding-box" + }, + ".bg-clip-content": { + "background-clip": "content-box" + }, + ".bg-clip-text": { + "background-clip": "text" + } + }); + }, + backgroundPosition: (0, _createUtilityPlugin).default("backgroundPosition", [ + [ + "bg", + [ + "background-position" + ] + ] + ], { + type: [ + "lookup", + "position" + ] + }), + backgroundRepeat: ({ addUtilities })=>{ + addUtilities({ + ".bg-repeat": { + "background-repeat": "repeat" + }, + ".bg-no-repeat": { + "background-repeat": "no-repeat" + }, + ".bg-repeat-x": { + "background-repeat": "repeat-x" + }, + ".bg-repeat-y": { + "background-repeat": "repeat-y" + }, + ".bg-repeat-round": { + "background-repeat": "round" + }, + ".bg-repeat-space": { + "background-repeat": "space" + } + }); + }, + backgroundOrigin: ({ addUtilities })=>{ + addUtilities({ + ".bg-origin-border": { + "background-origin": "border-box" + }, + ".bg-origin-padding": { + "background-origin": "padding-box" + }, + ".bg-origin-content": { + "background-origin": "content-box" + } + }); + }, + fill: ({ matchUtilities , theme })=>{ + matchUtilities({ + fill: (value)=>{ + return { + fill: (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("fill")), + type: [ + "color", + "any" + ] + }); + }, + stroke: ({ matchUtilities , theme })=>{ + matchUtilities({ + stroke: (value)=>{ + return { + stroke: (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("stroke")), + type: [ + "color", + "url" + ] + }); + }, + strokeWidth: (0, _createUtilityPlugin).default("strokeWidth", [ + [ + "stroke", + [ + "stroke-width" + ] + ] + ], { + type: [ + "length", + "number", + "percentage" + ] + }), + objectFit: ({ addUtilities })=>{ + addUtilities({ + ".object-contain": { + "object-fit": "contain" + }, + ".object-cover": { + "object-fit": "cover" + }, + ".object-fill": { + "object-fit": "fill" + }, + ".object-none": { + "object-fit": "none" + }, + ".object-scale-down": { + "object-fit": "scale-down" + } + }); + }, + objectPosition: (0, _createUtilityPlugin).default("objectPosition", [ + [ + "object", + [ + "object-position" + ] + ] + ]), + padding: (0, _createUtilityPlugin).default("padding", [ + [ + "p", + [ + "padding" + ] + ], + [ + [ + "px", + [ + "padding-left", + "padding-right" + ] + ], + [ + "py", + [ + "padding-top", + "padding-bottom" + ] + ], + ], + [ + [ + "pt", + [ + "padding-top" + ] + ], + [ + "pr", + [ + "padding-right" + ] + ], + [ + "pb", + [ + "padding-bottom" + ] + ], + [ + "pl", + [ + "padding-left" + ] + ], + ], + ]), + textAlign: ({ addUtilities })=>{ + addUtilities({ + ".text-left": { + "text-align": "left" + }, + ".text-center": { + "text-align": "center" + }, + ".text-right": { + "text-align": "right" + }, + ".text-justify": { + "text-align": "justify" + }, + ".text-start": { + "text-align": "start" + }, + ".text-end": { + "text-align": "end" + } + }); + }, + textIndent: (0, _createUtilityPlugin).default("textIndent", [ + [ + "indent", + [ + "text-indent" + ] + ] + ], { + supportsNegativeValues: true + }), + verticalAlign: ({ addUtilities , matchUtilities })=>{ + addUtilities({ + ".align-baseline": { + "vertical-align": "baseline" + }, + ".align-top": { + "vertical-align": "top" + }, + ".align-middle": { + "vertical-align": "middle" + }, + ".align-bottom": { + "vertical-align": "bottom" + }, + ".align-text-top": { + "vertical-align": "text-top" + }, + ".align-text-bottom": { + "vertical-align": "text-bottom" + }, + ".align-sub": { + "vertical-align": "sub" + }, + ".align-super": { + "vertical-align": "super" + } + }); + matchUtilities({ + align: (value)=>({ + "vertical-align": value + }) + }); + }, + fontFamily: (0, _createUtilityPlugin).default("fontFamily", [ + [ + "font", + [ + "fontFamily" + ] + ] + ], { + type: [ + "lookup", + "generic-name", + "family-name" + ] + }), + fontSize: ({ matchUtilities , theme })=>{ + matchUtilities({ + text: (value)=>{ + let [fontSize, options] = Array.isArray(value) ? value : [ + value + ]; + let { lineHeight , letterSpacing } = (0, _isPlainObject).default(options) ? options : { + lineHeight: options + }; + return { + "font-size": fontSize, + ...lineHeight === undefined ? {} : { + "line-height": lineHeight + }, + ...letterSpacing === undefined ? {} : { + "letter-spacing": letterSpacing + } + }; + } + }, { + values: theme("fontSize"), + type: [ + "absolute-size", + "relative-size", + "length", + "percentage" + ] + }); + }, + fontWeight: (0, _createUtilityPlugin).default("fontWeight", [ + [ + "font", + [ + "fontWeight" + ] + ] + ], { + type: [ + "lookup", + "number" + ] + }), + textTransform: ({ addUtilities })=>{ + addUtilities({ + ".uppercase": { + "text-transform": "uppercase" + }, + ".lowercase": { + "text-transform": "lowercase" + }, + ".capitalize": { + "text-transform": "capitalize" + }, + ".normal-case": { + "text-transform": "none" + } + }); + }, + fontStyle: ({ addUtilities })=>{ + addUtilities({ + ".italic": { + "font-style": "italic" + }, + ".not-italic": { + "font-style": "normal" + } + }); + }, + fontVariantNumeric: ({ addDefaults , addUtilities })=>{ + let cssFontVariantNumericValue = "var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)"; + addDefaults("font-variant-numeric", { + "--tw-ordinal": " ", + "--tw-slashed-zero": " ", + "--tw-numeric-figure": " ", + "--tw-numeric-spacing": " ", + "--tw-numeric-fraction": " " + }); + addUtilities({ + ".normal-nums": { + "font-variant-numeric": "normal" + }, + ".ordinal": { + "@defaults font-variant-numeric": {}, + "--tw-ordinal": "ordinal", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".slashed-zero": { + "@defaults font-variant-numeric": {}, + "--tw-slashed-zero": "slashed-zero", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".lining-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-figure": "lining-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".oldstyle-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-figure": "oldstyle-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".proportional-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-spacing": "proportional-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".tabular-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-spacing": "tabular-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".diagonal-fractions": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-fraction": "diagonal-fractions", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".stacked-fractions": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-fraction": "stacked-fractions", + "font-variant-numeric": cssFontVariantNumericValue + } + }); + }, + lineHeight: (0, _createUtilityPlugin).default("lineHeight", [ + [ + "leading", + [ + "lineHeight" + ] + ] + ]), + letterSpacing: (0, _createUtilityPlugin).default("letterSpacing", [ + [ + "tracking", + [ + "letterSpacing" + ] + ] + ], { + supportsNegativeValues: true + }), + textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{ + matchUtilities({ + text: (value)=>{ + if (!corePlugins4("textOpacity")) { + return { + color: (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "color", + variable: "--tw-text-opacity" + }); + } + }, { + values: (0, _flattenColorPalette).default(theme("textColor")), + type: "color" + }); + }, + textOpacity: (0, _createUtilityPlugin).default("textOpacity", [ + [ + "text-opacity", + [ + "--tw-text-opacity" + ] + ] + ]), + textDecoration: ({ addUtilities })=>{ + addUtilities({ + ".underline": { + "text-decoration-line": "underline" + }, + ".overline": { + "text-decoration-line": "overline" + }, + ".line-through": { + "text-decoration-line": "line-through" + }, + ".no-underline": { + "text-decoration-line": "none" + } + }); + }, + textDecorationColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + decoration: (value)=>{ + return { + "text-decoration-color": (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("textDecorationColor")), + type: [ + "color" + ] + }); + }, + textDecorationStyle: ({ addUtilities })=>{ + addUtilities({ + ".decoration-solid": { + "text-decoration-style": "solid" + }, + ".decoration-double": { + "text-decoration-style": "double" + }, + ".decoration-dotted": { + "text-decoration-style": "dotted" + }, + ".decoration-dashed": { + "text-decoration-style": "dashed" + }, + ".decoration-wavy": { + "text-decoration-style": "wavy" + } + }); + }, + textDecorationThickness: (0, _createUtilityPlugin).default("textDecorationThickness", [ + [ + "decoration", + [ + "text-decoration-thickness" + ] + ] + ], { + type: [ + "length", + "percentage" + ] + }), + textUnderlineOffset: (0, _createUtilityPlugin).default("textUnderlineOffset", [ + [ + "underline-offset", + [ + "text-underline-offset" + ] + ] + ], { + type: [ + "length", + "percentage" + ] + }), + fontSmoothing: ({ addUtilities })=>{ + addUtilities({ + ".antialiased": { + "-webkit-font-smoothing": "antialiased", + "-moz-osx-font-smoothing": "grayscale" + }, + ".subpixel-antialiased": { + "-webkit-font-smoothing": "auto", + "-moz-osx-font-smoothing": "auto" + } + }); + }, + placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{ + matchUtilities({ + placeholder: (value)=>{ + if (!corePlugins5("placeholderOpacity")) { + return { + "&::placeholder": { + color: (0, _toColorValue).default(value) + } + }; + } + return { + "&::placeholder": (0, _withAlphaVariable).default({ + color: value, + property: "color", + variable: "--tw-placeholder-opacity" + }) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("placeholderColor")), + type: [ + "color", + "any" + ] + }); + }, + placeholderOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "placeholder-opacity": (value)=>{ + return { + ["&::placeholder"]: { + "--tw-placeholder-opacity": value + } + }; + } + }, { + values: theme("placeholderOpacity") + }); + }, + caretColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + caret: (value)=>{ + return { + "caret-color": (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("caretColor")), + type: [ + "color", + "any" + ] + }); + }, + accentColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + accent: (value)=>{ + return { + "accent-color": (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("accentColor")), + type: [ + "color", + "any" + ] + }); + }, + opacity: (0, _createUtilityPlugin).default("opacity", [ + [ + "opacity", + [ + "opacity" + ] + ] + ]), + backgroundBlendMode: ({ addUtilities })=>{ + addUtilities({ + ".bg-blend-normal": { + "background-blend-mode": "normal" + }, + ".bg-blend-multiply": { + "background-blend-mode": "multiply" + }, + ".bg-blend-screen": { + "background-blend-mode": "screen" + }, + ".bg-blend-overlay": { + "background-blend-mode": "overlay" + }, + ".bg-blend-darken": { + "background-blend-mode": "darken" + }, + ".bg-blend-lighten": { + "background-blend-mode": "lighten" + }, + ".bg-blend-color-dodge": { + "background-blend-mode": "color-dodge" + }, + ".bg-blend-color-burn": { + "background-blend-mode": "color-burn" + }, + ".bg-blend-hard-light": { + "background-blend-mode": "hard-light" + }, + ".bg-blend-soft-light": { + "background-blend-mode": "soft-light" + }, + ".bg-blend-difference": { + "background-blend-mode": "difference" + }, + ".bg-blend-exclusion": { + "background-blend-mode": "exclusion" + }, + ".bg-blend-hue": { + "background-blend-mode": "hue" + }, + ".bg-blend-saturation": { + "background-blend-mode": "saturation" + }, + ".bg-blend-color": { + "background-blend-mode": "color" + }, + ".bg-blend-luminosity": { + "background-blend-mode": "luminosity" + } + }); + }, + mixBlendMode: ({ addUtilities })=>{ + addUtilities({ + ".mix-blend-normal": { + "mix-blend-mode": "normal" + }, + ".mix-blend-multiply": { + "mix-blend-mode": "multiply" + }, + ".mix-blend-screen": { + "mix-blend-mode": "screen" + }, + ".mix-blend-overlay": { + "mix-blend-mode": "overlay" + }, + ".mix-blend-darken": { + "mix-blend-mode": "darken" + }, + ".mix-blend-lighten": { + "mix-blend-mode": "lighten" + }, + ".mix-blend-color-dodge": { + "mix-blend-mode": "color-dodge" + }, + ".mix-blend-color-burn": { + "mix-blend-mode": "color-burn" + }, + ".mix-blend-hard-light": { + "mix-blend-mode": "hard-light" + }, + ".mix-blend-soft-light": { + "mix-blend-mode": "soft-light" + }, + ".mix-blend-difference": { + "mix-blend-mode": "difference" + }, + ".mix-blend-exclusion": { + "mix-blend-mode": "exclusion" + }, + ".mix-blend-hue": { + "mix-blend-mode": "hue" + }, + ".mix-blend-saturation": { + "mix-blend-mode": "saturation" + }, + ".mix-blend-color": { + "mix-blend-mode": "color" + }, + ".mix-blend-luminosity": { + "mix-blend-mode": "luminosity" + }, + ".mix-blend-plus-lighter": { + "mix-blend-mode": "plus-lighter" + } + }); + }, + boxShadow: (()=>{ + let transformValue = (0, _transformThemeValue).default("boxShadow"); + let defaultBoxShadow = [ + `var(--tw-ring-offset-shadow, 0 0 #0000)`, + `var(--tw-ring-shadow, 0 0 #0000)`, + `var(--tw-shadow)`, + ].join(", "); + return function({ matchUtilities , addDefaults , theme }) { + addDefaults(" box-shadow", { + "--tw-ring-offset-shadow": "0 0 #0000", + "--tw-ring-shadow": "0 0 #0000", + "--tw-shadow": "0 0 #0000", + "--tw-shadow-colored": "0 0 #0000" + }); + matchUtilities({ + shadow: (value)=>{ + value = transformValue(value); + let ast = (0, _parseBoxShadowValue).parseBoxShadowValue(value); + for (let shadow of ast){ + // Don't override color if the whole shadow is a variable + if (!shadow.valid) { + continue; + } + shadow.color = "var(--tw-shadow-color)"; + } + return { + "@defaults box-shadow": {}, + "--tw-shadow": value === "none" ? "0 0 #0000" : value, + "--tw-shadow-colored": value === "none" ? "0 0 #0000" : (0, _parseBoxShadowValue).formatBoxShadowValue(ast), + "box-shadow": defaultBoxShadow + }; + } + }, { + values: theme("boxShadow"), + type: [ + "shadow" + ] + }); + }; + })(), + boxShadowColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + shadow: (value)=>{ + return { + "--tw-shadow-color": (0, _toColorValue).default(value), + "--tw-shadow": "var(--tw-shadow-colored)" + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("boxShadowColor")), + type: [ + "color" + ] + }); + }, + outlineStyle: ({ addUtilities })=>{ + addUtilities({ + ".outline-none": { + outline: "2px solid transparent", + "outline-offset": "2px" + }, + ".outline": { + "outline-style": "solid" + }, + ".outline-dashed": { + "outline-style": "dashed" + }, + ".outline-dotted": { + "outline-style": "dotted" + }, + ".outline-double": { + "outline-style": "double" + }, + ".outline-hidden": { + "outline-style": "hidden" + } + }); + }, + outlineWidth: (0, _createUtilityPlugin).default("outlineWidth", [ + [ + "outline", + [ + "outline-width" + ] + ] + ], { + type: [ + "length", + "number", + "percentage" + ] + }), + outlineOffset: (0, _createUtilityPlugin).default("outlineOffset", [ + [ + "outline-offset", + [ + "outline-offset" + ] + ] + ], { + type: [ + "length", + "number", + "percentage" + ] + }), + outlineColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + outline: (value)=>{ + return { + "outline-color": (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("outlineColor")), + type: [ + "color" + ] + }); + }, + ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme , config })=>{ + let ringColorDefault = (()=>{ + var ref, ref1; + if ((0, _featureFlags).flagEnabled(config(), "respectDefaultRingColorOpacity")) { + return theme("ringColor.DEFAULT"); + } + let ringOpacityDefault = theme("ringOpacity.DEFAULT", "0.5"); + if (!((ref = theme("ringColor")) === null || ref === void 0 ? void 0 : ref.DEFAULT)) { + return `rgb(147 197 253 / ${ringOpacityDefault})`; + } + return (0, _withAlphaVariable).withAlphaValue((ref1 = theme("ringColor")) === null || ref1 === void 0 ? void 0 : ref1.DEFAULT, ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`); + })(); + addDefaults("ring-width", { + "--tw-ring-inset": " ", + "--tw-ring-offset-width": theme("ringOffsetWidth.DEFAULT", "0px"), + "--tw-ring-offset-color": theme("ringOffsetColor.DEFAULT", "#fff"), + "--tw-ring-color": ringColorDefault, + "--tw-ring-offset-shadow": "0 0 #0000", + "--tw-ring-shadow": "0 0 #0000", + "--tw-shadow": "0 0 #0000", + "--tw-shadow-colored": "0 0 #0000" + }); + matchUtilities({ + ring: (value)=>{ + return { + "@defaults ring-width": {}, + "--tw-ring-offset-shadow": `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + "--tw-ring-shadow": `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + "box-shadow": [ + `var(--tw-ring-offset-shadow)`, + `var(--tw-ring-shadow)`, + `var(--tw-shadow, 0 0 #0000)`, + ].join(", ") + }; + } + }, { + values: theme("ringWidth"), + type: "length" + }); + addUtilities({ + ".ring-inset": { + "@defaults ring-width": {}, + "--tw-ring-inset": "inset" + } + }); + }, + ringColor: ({ matchUtilities , theme , corePlugins: corePlugins6 })=>{ + matchUtilities({ + ring: (value)=>{ + if (!corePlugins6("ringOpacity")) { + return { + "--tw-ring-color": (0, _toColorValue).default(value) + }; + } + return (0, _withAlphaVariable).default({ + color: value, + property: "--tw-ring-color", + variable: "--tw-ring-opacity" + }); + } + }, { + values: Object.fromEntries(Object.entries((0, _flattenColorPalette).default(theme("ringColor"))).filter(([modifier])=>modifier !== "DEFAULT")), + type: "color" + }); + }, + ringOpacity: (helpers)=>{ + let { config } = helpers; + return (0, _createUtilityPlugin).default("ringOpacity", [ + [ + "ring-opacity", + [ + "--tw-ring-opacity" + ] + ] + ], { + filterDefault: !(0, _featureFlags).flagEnabled(config(), "respectDefaultRingColorOpacity") + })(helpers); + }, + ringOffsetWidth: (0, _createUtilityPlugin).default("ringOffsetWidth", [ + [ + "ring-offset", + [ + "--tw-ring-offset-width" + ] + ] + ], { + type: "length" + }), + ringOffsetColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + "ring-offset": (value)=>{ + return { + "--tw-ring-offset-color": (0, _toColorValue).default(value) + }; + } + }, { + values: (0, _flattenColorPalette).default(theme("ringOffsetColor")), + type: "color" + }); + }, + blur: ({ matchUtilities , theme })=>{ + matchUtilities({ + blur: (value)=>{ + return { + "--tw-blur": `blur(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("blur") + }); + }, + brightness: ({ matchUtilities , theme })=>{ + matchUtilities({ + brightness: (value)=>{ + return { + "--tw-brightness": `brightness(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("brightness") + }); + }, + contrast: ({ matchUtilities , theme })=>{ + matchUtilities({ + contrast: (value)=>{ + return { + "--tw-contrast": `contrast(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("contrast") + }); + }, + dropShadow: ({ matchUtilities , theme })=>{ + matchUtilities({ + "drop-shadow": (value)=>{ + return { + "--tw-drop-shadow": Array.isArray(value) ? value.map((v)=>`drop-shadow(${v})`).join(" ") : `drop-shadow(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("dropShadow") + }); + }, + grayscale: ({ matchUtilities , theme })=>{ + matchUtilities({ + grayscale: (value)=>{ + return { + "--tw-grayscale": `grayscale(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("grayscale") + }); + }, + hueRotate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "hue-rotate": (value)=>{ + return { + "--tw-hue-rotate": `hue-rotate(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("hueRotate"), + supportsNegativeValues: true + }); + }, + invert: ({ matchUtilities , theme })=>{ + matchUtilities({ + invert: (value)=>{ + return { + "--tw-invert": `invert(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("invert") + }); + }, + saturate: ({ matchUtilities , theme })=>{ + matchUtilities({ + saturate: (value)=>{ + return { + "--tw-saturate": `saturate(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("saturate") + }); + }, + sepia: ({ matchUtilities , theme })=>{ + matchUtilities({ + sepia: (value)=>{ + return { + "--tw-sepia": `sepia(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("sepia") + }); + }, + filter: ({ addDefaults , addUtilities })=>{ + addDefaults("filter", { + "--tw-blur": " ", + "--tw-brightness": " ", + "--tw-contrast": " ", + "--tw-grayscale": " ", + "--tw-hue-rotate": " ", + "--tw-invert": " ", + "--tw-saturate": " ", + "--tw-sepia": " ", + "--tw-drop-shadow": " " + }); + addUtilities({ + ".filter": { + "@defaults filter": {}, + filter: cssFilterValue + }, + ".filter-none": { + filter: "none" + } + }); + }, + backdropBlur: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-blur": (value)=>{ + return { + "--tw-backdrop-blur": `blur(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropBlur") + }); + }, + backdropBrightness: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-brightness": (value)=>{ + return { + "--tw-backdrop-brightness": `brightness(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropBrightness") + }); + }, + backdropContrast: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-contrast": (value)=>{ + return { + "--tw-backdrop-contrast": `contrast(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropContrast") + }); + }, + backdropGrayscale: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-grayscale": (value)=>{ + return { + "--tw-backdrop-grayscale": `grayscale(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropGrayscale") + }); + }, + backdropHueRotate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-hue-rotate": (value)=>{ + return { + "--tw-backdrop-hue-rotate": `hue-rotate(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropHueRotate"), + supportsNegativeValues: true + }); + }, + backdropInvert: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-invert": (value)=>{ + return { + "--tw-backdrop-invert": `invert(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropInvert") + }); + }, + backdropOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-opacity": (value)=>{ + return { + "--tw-backdrop-opacity": `opacity(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropOpacity") + }); + }, + backdropSaturate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-saturate": (value)=>{ + return { + "--tw-backdrop-saturate": `saturate(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropSaturate") + }); + }, + backdropSepia: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-sepia": (value)=>{ + return { + "--tw-backdrop-sepia": `sepia(${value})`, + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropSepia") + }); + }, + backdropFilter: ({ addDefaults , addUtilities })=>{ + addDefaults("backdrop-filter", { + "--tw-backdrop-blur": " ", + "--tw-backdrop-brightness": " ", + "--tw-backdrop-contrast": " ", + "--tw-backdrop-grayscale": " ", + "--tw-backdrop-hue-rotate": " ", + "--tw-backdrop-invert": " ", + "--tw-backdrop-opacity": " ", + "--tw-backdrop-saturate": " ", + "--tw-backdrop-sepia": " " + }); + addUtilities({ + ".backdrop-filter": { + "@defaults backdrop-filter": {}, + "backdrop-filter": cssBackdropFilterValue + }, + ".backdrop-filter-none": { + "backdrop-filter": "none" + } + }); + }, + transitionProperty: ({ matchUtilities , theme })=>{ + let defaultTimingFunction = theme("transitionTimingFunction.DEFAULT"); + let defaultDuration = theme("transitionDuration.DEFAULT"); + matchUtilities({ + transition: (value)=>{ + return { + "transition-property": value, + ...value === "none" ? {} : { + "transition-timing-function": defaultTimingFunction, + "transition-duration": defaultDuration + } + }; + } + }, { + values: theme("transitionProperty") + }); + }, + transitionDelay: (0, _createUtilityPlugin).default("transitionDelay", [ + [ + "delay", + [ + "transitionDelay" + ] + ] + ]), + transitionDuration: (0, _createUtilityPlugin).default("transitionDuration", [ + [ + "duration", + [ + "transitionDuration" + ] + ] + ], { + filterDefault: true + }), + transitionTimingFunction: (0, _createUtilityPlugin).default("transitionTimingFunction", [ + [ + "ease", + [ + "transitionTimingFunction" + ] + ] + ], { + filterDefault: true + }), + willChange: (0, _createUtilityPlugin).default("willChange", [ + [ + "will-change", + [ + "will-change" + ] + ] + ]), + content: (0, _createUtilityPlugin).default("content", [ + [ + "content", + [ + "--tw-content", + [ + "content", + "var(--tw-content)" + ] + ] + ], + ]) +}; +exports.corePlugins = corePlugins; diff --git a/node_modules/tailwindcss/lib/css/LICENSE b/node_modules/tailwindcss/lib/css/LICENSE new file mode 100644 index 0000000..a1fb039 --- /dev/null +++ b/node_modules/tailwindcss/lib/css/LICENSE @@ -0,0 +1,25 @@ +MIT License + +Copyright (c) Nicolas Gallagher +Copyright (c) Jonathan Neal +Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Adam Wathan +Copyright (c) Jonathan Reinink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tailwindcss/lib/css/preflight.css b/node_modules/tailwindcss/lib/css/preflight.css new file mode 100644 index 0000000..bf36495 --- /dev/null +++ b/node_modules/tailwindcss/lib/css/preflight.css @@ -0,0 +1,360 @@ +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +*/ + +html { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -moz-tab-size: 4; /* 3 */ + tab-size: 4; /* 3 */ + font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font family by default. +2. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */ + font-size: 1em; /* 2 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + font-weight: inherit; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::placeholder, +textarea::placeholder { + opacity: 1; /* 1 */ + color: theme('colors.gray.400', #9ca3af); /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} diff --git a/node_modules/tailwindcss/lib/featureFlags.js b/node_modules/tailwindcss/lib/featureFlags.js new file mode 100644 index 0000000..9e1fa98 --- /dev/null +++ b/node_modules/tailwindcss/lib/featureFlags.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.flagEnabled = flagEnabled; +exports.issueFlagNotices = issueFlagNotices; +exports.default = void 0; +var _picocolors = _interopRequireDefault(require("picocolors")); +var _log = _interopRequireDefault(require("./util/log")); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +let defaults = { + optimizeUniversalDefaults: false +}; +let featureFlags = { + future: [ + "hoverOnlyWhenSupported", + "respectDefaultRingColorOpacity" + ], + experimental: [ + "optimizeUniversalDefaults", + "matchVariant" /* , 'variantGrouping' */ + ] +}; +function flagEnabled(config, flag) { + if (featureFlags.future.includes(flag)) { + var ref; + var ref1, ref2; + return config.future === "all" || ((ref2 = (ref1 = config === null || config === void 0 ? void 0 : (ref = config.future) === null || ref === void 0 ? void 0 : ref[flag]) !== null && ref1 !== void 0 ? ref1 : defaults[flag]) !== null && ref2 !== void 0 ? ref2 : false); + } + if (featureFlags.experimental.includes(flag)) { + var ref3; + var ref4, ref5; + return config.experimental === "all" || ((ref5 = (ref4 = config === null || config === void 0 ? void 0 : (ref3 = config.experimental) === null || ref3 === void 0 ? void 0 : ref3[flag]) !== null && ref4 !== void 0 ? ref4 : defaults[flag]) !== null && ref5 !== void 0 ? ref5 : false); + } + return false; +} +function experimentalFlagsEnabled(config) { + if (config.experimental === "all") { + return featureFlags.experimental; + } + var ref; + return Object.keys((ref = config === null || config === void 0 ? void 0 : config.experimental) !== null && ref !== void 0 ? ref : {}).filter((flag)=>featureFlags.experimental.includes(flag) && config.experimental[flag]); +} +function issueFlagNotices(config) { + if (process.env.JEST_WORKER_ID !== undefined) { + return; + } + if (experimentalFlagsEnabled(config).length > 0) { + let changes = experimentalFlagsEnabled(config).map((s)=>_picocolors.default.yellow(s)).join(", "); + _log.default.warn("experimental-flags-enabled", [ + `You have enabled experimental features: ${changes}`, + "Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time.", + ]); + } +} +var _default = featureFlags; +exports.default = _default; diff --git a/node_modules/tailwindcss/lib/index.js b/node_modules/tailwindcss/lib/index.js new file mode 100644 index 0000000..12e67ba --- /dev/null +++ b/node_modules/tailwindcss/lib/index.js @@ -0,0 +1,40 @@ +"use strict"; +var _setupTrackingContext = _interopRequireDefault(require("./lib/setupTrackingContext")); +var _processTailwindFeatures = _interopRequireDefault(require("./processTailwindFeatures")); +var _sharedState = require("./lib/sharedState"); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +module.exports = function tailwindcss(configOrPath) { + return { + postcssPlugin: "tailwindcss", + plugins: [ + _sharedState.env.DEBUG && function(root) { + console.log("\n"); + console.time("JIT TOTAL"); + return root; + }, + function(root, result) { + let context = (0, _setupTrackingContext).default(configOrPath); + if (root.type === "document") { + let roots = root.nodes.filter((node)=>node.type === "root"); + for (const root1 of roots){ + if (root1.type === "root") { + (0, _processTailwindFeatures).default(context)(root1, result); + } + } + return; + } + (0, _processTailwindFeatures).default(context)(root, result); + }, + _sharedState.env.DEBUG && function(root) { + console.timeEnd("JIT TOTAL"); + console.log("\n"); + return root; + }, + ].filter(Boolean) + }; +}; +module.exports.postcss = true; diff --git a/node_modules/tailwindcss/lib/lib/cacheInvalidation.js b/node_modules/tailwindcss/lib/lib/cacheInvalidation.js new file mode 100644 index 0000000..5244a59 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/cacheInvalidation.js @@ -0,0 +1,87 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasContentChanged = hasContentChanged; +var _crypto = _interopRequireDefault(require("crypto")); +var sharedState = _interopRequireWildcard(require("./sharedState")); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function _getRequireWildcardCache() { + if (typeof WeakMap !== "function") return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function() { + return cache; + }; + return cache; +} +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +/** + * Calculate the hash of a string. + * + * This doesn't need to be cryptographically secure or + * anything like that since it's used only to detect + * when the CSS changes to invalidate the context. + * + * This is wrapped in a try/catch because it's really dependent + * on how Node itself is build and the environment and OpenSSL + * version / build that is installed on the user's machine. + * + * Based on the environment this can just outright fail. + * + * See https://github.com/nodejs/node/issues/40455 + * + * @param {string} str + */ function getHash(str) { + try { + return _crypto.default.createHash("md5").update(str, "utf-8").digest("binary"); + } catch (err) { + return ""; + } +} +function hasContentChanged(sourcePath, root) { + let css = root.toString(); + // We only care about files with @tailwind directives + // Other files use an existing context + if (!css.includes("@tailwind")) { + return false; + } + let existingHash = sharedState.sourceHashMap.get(sourcePath); + let rootHash = getHash(css); + let didChange = existingHash !== rootHash; + sharedState.sourceHashMap.set(sourcePath, rootHash); + return didChange; +} diff --git a/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js b/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js new file mode 100644 index 0000000..af2ab2d --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = collapseAdjacentRules; +function collapseAdjacentRules() { + function collapseRulesIn(root) { + let currentRule = null; + root.each((node)=>{ + if (!types.has(node.type)) { + currentRule = null; + return; + } + if (currentRule === null) { + currentRule = node; + return; + } + let properties = comparisonMap[node.type]; + var _property, _property1; + if (node.type === "atrule" && node.name === "font-face") { + currentRule = node; + } else if (properties.every((property)=>((_property = node[property]) !== null && _property !== void 0 ? _property : "").replace(/\s+/g, " ") === ((_property1 = currentRule[property]) !== null && _property1 !== void 0 ? _property1 : "").replace(/\s+/g, " "))) { + // An AtRule may not have children (for example if we encounter duplicate @import url(…) rules) + if (node.nodes) { + currentRule.append(node.nodes); + } + node.remove(); + } else { + currentRule = node; + } + }); + // After we've collapsed adjacent rules & at-rules, we need to collapse + // adjacent rules & at-rules that are children of at-rules. + // We do not care about nesting rules because Tailwind CSS + // explicitly does not handle rule nesting on its own as + // the user is expected to use a nesting plugin + root.each((node)=>{ + if (node.type === "atrule") { + collapseRulesIn(node); + } + }); + } + return (root)=>{ + collapseRulesIn(root); + }; +} +let comparisonMap = { + atrule: [ + "name", + "params" + ], + rule: [ + "selector" + ] +}; +let types = new Set(Object.keys(comparisonMap)); diff --git a/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js b/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js new file mode 100644 index 0000000..e21f660 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = collapseDuplicateDeclarations; +function collapseDuplicateDeclarations() { + return (root)=>{ + root.walkRules((node)=>{ + let seen = new Map(); + let droppable = new Set([]); + let byProperty = new Map(); + node.walkDecls((decl)=>{ + // This could happen if we have nested selectors. In that case the + // parent will loop over all its declarations but also the declarations + // of nested rules. With this we ensure that we are shallowly checking + // declarations. + if (decl.parent !== node) { + return; + } + if (seen.has(decl.prop)) { + // Exact same value as what we have seen so far + if (seen.get(decl.prop).value === decl.value) { + // Keep the last one, drop the one we've seen so far + droppable.add(seen.get(decl.prop)); + // Override the existing one with the new value. This is necessary + // so that if we happen to have more than one declaration with the + // same value, that we keep removing the previous one. Otherwise we + // will only remove the *first* one. + seen.set(decl.prop, decl); + return; + } + // Not the same value, so we need to check if we can merge it so + // let's collect it first. + if (!byProperty.has(decl.prop)) { + byProperty.set(decl.prop, new Set()); + } + byProperty.get(decl.prop).add(seen.get(decl.prop)); + byProperty.get(decl.prop).add(decl); + } + seen.set(decl.prop, decl); + }); + // Drop all the duplicate declarations with the exact same value we've + // already seen so far. + for (let decl1 of droppable){ + decl1.remove(); + } + // Analyze the declarations based on its unit, drop all the declarations + // with the same unit but the last one in the list. + for (let declarations of byProperty.values()){ + let byUnit = new Map(); + for (let decl of declarations){ + let unit = resolveUnit(decl.value); + if (unit === null) { + continue; + } + if (!byUnit.has(unit)) { + byUnit.set(unit, new Set()); + } + byUnit.get(unit).add(decl); + } + for (let declarations1 of byUnit.values()){ + // Get all but the last one + let removableDeclarations = Array.from(declarations1).slice(0, -1); + for (let decl of removableDeclarations){ + decl.remove(); + } + } + } + }); + }; +} +let UNITLESS_NUMBER = Symbol("unitless-number"); +function resolveUnit(input) { + let result = /^-?\d*.?\d+([\w%]+)?$/g.exec(input); + if (result) { + var ref; + return (ref = result[1]) !== null && ref !== void 0 ? ref : UNITLESS_NUMBER; + } + return null; +} diff --git a/node_modules/tailwindcss/lib/lib/defaultExtractor.js b/node_modules/tailwindcss/lib/lib/defaultExtractor.js new file mode 100644 index 0000000..ce2d68b --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/defaultExtractor.js @@ -0,0 +1,223 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.defaultExtractor = defaultExtractor; +var _featureFlagsJs = require("../featureFlags.js"); +var regex = _interopRequireWildcard(require("./regex")); +function _getRequireWildcardCache() { + if (typeof WeakMap !== "function") return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function() { + return cache; + }; + return cache; +} +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +function defaultExtractor(context) { + let patterns = Array.from(buildRegExps(context)); + /** + * @param {string} content + */ return (content)=>{ + /** @type {(string|string)[]} */ let results = []; + for (let pattern of patterns){ + var ref; + results = [ + ...results, + ...(ref = content.match(pattern)) !== null && ref !== void 0 ? ref : [] + ]; + } + return results.filter((v)=>v !== undefined).map(clipAtBalancedParens); + }; +} +function* buildRegExps(context) { + let separator = context.tailwindConfig.separator; + let variantGroupingEnabled = (0, _featureFlagsJs).flagEnabled(context.tailwindConfig, "variantGrouping"); + let utility = regex.any([ + // Arbitrary properties + /\[[^\s:'"`]+:[^\s\]]+\]/, + // Utilities + regex.pattern([ + // Utility Name / Group Name + /-?(?:\w+)/, + // Normal/Arbitrary values + regex.optional(regex.any([ + regex.pattern([ + // Arbitrary values + /-(?:\w+-)*\[[^\s:]+\]/, + // Not immediately followed by an `{[(` + /(?![{([]])/, + // optionally followed by an opacity modifier + /(?:\/[^\s'"`\\><$]*)?/, + ]), + regex.pattern([ + // Arbitrary values + /-(?:\w+-)*\[[^\s]+\]/, + // Not immediately followed by an `{[(` + /(?![{([]])/, + // optionally followed by an opacity modifier + /(?:\/[^\s'"`\\$]*)?/, + ]), + // Normal values w/o quotes — may include an opacity modifier + /[-\/][^\s'"`\\$={><]*/, + ])), + ]), + ]); + let variantPatterns = [ + // Without quotes + regex.any([ + regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, + separator + ]), + regex.pattern([ + /[^\s"'`\[\\]+/, + separator + ]), + ]), + // With quotes allowed + regex.any([ + regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s`]+\]/, + separator + ]), + regex.pattern([ + /[^\s`\[\\]+/, + separator + ]), + ]), + ]; + for (const variantPattern of variantPatterns){ + yield regex.pattern([ + // Variants + "((?=((", + variantPattern, + ")+))\\2)?", + // Important (optional) + /!?/, + variantGroupingEnabled ? regex.any([ + // Or any of those things but grouped separated by commas + regex.pattern([ + /\(/, + utility, + regex.zeroOrMore([ + /,/, + utility + ]), + /\)/ + ]), + // Arbitrary properties, constrained utilities, arbitrary values, etc… + utility, + ]) : utility, + ]); + } + // 5. Inner matches + yield /[^<>"'`\s.(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g; +} +// We want to capture any "special" characters +// AND the characters immediately following them (if there is one) +let SPECIALS = /([\[\]'"`])([^\[\]'"`])?/g; +let ALLOWED_CLASS_CHARACTERS = /[^"'`\s<>\]]+/; +/** + * Clips a string ensuring that parentheses, quotes, etc… are balanced + * Used for arbitrary values only + * + * We will go past the end of the balanced parens until we find a non-class character + * + * Depth matching behavior: + * w-[calc(100%-theme('spacing[some_key][1.5]'))]'] + * ┬ ┬ ┬┬ ┬ ┬┬ ┬┬┬┬┬┬┬ + * 1 2 3 4 34 3 210 END + * ╰────┴──────────┴────────┴────────┴┴───┴─┴┴┴ + * + * @param {string} input + */ function clipAtBalancedParens(input) { + // We are care about this for arbitrary values + if (!input.includes("-[")) { + return input; + } + let depth = 0; + let openStringTypes = []; + // Find all parens, brackets, quotes, etc + // Stop when we end at a balanced pair + // This is naive and will treat mismatched parens as balanced + // This shouldn't be a problem in practice though + let matches = input.matchAll(SPECIALS); + // We can't use lookbehind assertions because we have to support Safari + // So, instead, we've emulated it using capture groups and we'll re-work the matches to accommodate + matches = Array.from(matches).flatMap((match)=>{ + const [, ...groups] = match; + return groups.map((group, idx)=>Object.assign([], match, { + index: match.index + idx, + 0: group + })); + }); + for (let match1 of matches){ + let char = match1[0]; + let inStringType = openStringTypes[openStringTypes.length - 1]; + if (char === inStringType) { + openStringTypes.pop(); + } else if (char === "'" || char === '"' || char === "`") { + openStringTypes.push(char); + } + if (inStringType) { + continue; + } else if (char === "[") { + depth++; + continue; + } else if (char === "]") { + depth--; + continue; + } + // We've gone one character past the point where we should stop + // This means that there was an extra closing `]` + // We'll clip to just before it + if (depth < 0) { + return input.substring(0, match1.index); + } + // We've finished balancing the brackets but there still may be characters that can be included + // For example in the class `text-[#336699]/[.35]` + // The depth goes to `0` at the closing `]` but goes up again at the `[` + // If we're at zero and encounter a non-class character then we clip the class there + if (depth === 0 && !ALLOWED_CLASS_CHARACTERS.test(char)) { + return input.substring(0, match1.index); + } + } + return input; +} // Regular utilities + // {{modifier}:}*{namespace}{-{suffix}}*{/{opacityModifier}}? + // Arbitrary values + // {{modifier}:}*{namespace}-[{arbitraryValue}]{/{opacityModifier}}? + // arbitraryValue: no whitespace, balanced quotes unless within quotes, balanced brackets unless within quotes + // Arbitrary properties + // {{modifier}:}*[{validCssPropertyName}:{arbitraryValue}] diff --git a/node_modules/tailwindcss/lib/lib/detectNesting.js b/node_modules/tailwindcss/lib/lib/detectNesting.js new file mode 100644 index 0000000..0602b08 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/detectNesting.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(_context) { + return (root, result)=>{ + let found = false; + root.walkAtRules("tailwind", (node)=>{ + if (found) return false; + if (node.parent && node.parent.type !== "root") { + found = true; + node.warn(result, [ + "Nested @tailwind rules were detected, but are not supported.", + "Consider using a prefix to scope Tailwind's classes: https://tailwindcss.com/docs/configuration#prefix", + "Alternatively, use the important selector strategy: https://tailwindcss.com/docs/configuration#selector-strategy", + ].join("\n")); + return false; + } + }); + root.walkRules((rule)=>{ + if (found) return false; + rule.walkRules((nestedRule)=>{ + found = true; + nestedRule.warn(result, [ + "Nested CSS was detected, but CSS nesting has not been configured correctly.", + "Please enable a CSS nesting plugin *before* Tailwind in your configuration.", + "See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting", + ].join("\n")); + return false; + }); + }); + }; +} diff --git a/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js b/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js new file mode 100644 index 0000000..86d80d7 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js @@ -0,0 +1,187 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +var _dlv = _interopRequireDefault(require("dlv")); +var _didyoumean = _interopRequireDefault(require("didyoumean")); +var _transformThemeValue = _interopRequireDefault(require("../util/transformThemeValue")); +var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser")); +var _normalizeScreens = require("../util/normalizeScreens"); +var _buildMediaQuery = _interopRequireDefault(require("../util/buildMediaQuery")); +var _toPath = require("../util/toPath"); +var _withAlphaVariable = require("../util/withAlphaVariable"); +var _pluginUtils = require("../util/pluginUtils"); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function isObject(input) { + return typeof input === "object" && input !== null; +} +function findClosestExistingPath(theme, path) { + let parts = (0, _toPath).toPath(path); + do { + parts.pop(); + if ((0, _dlv).default(theme, parts) !== undefined) break; + }while (parts.length); + return parts.length ? parts : undefined; +} +function pathToString(path) { + if (typeof path === "string") return path; + return path.reduce((acc, cur, i)=>{ + if (cur.includes(".")) return `${acc}[${cur}]`; + return i === 0 ? cur : `${acc}.${cur}`; + }, ""); +} +function list(items) { + return items.map((key)=>`'${key}'`).join(", "); +} +function listKeys(obj) { + return list(Object.keys(obj)); +} +function validatePath(config, path, defaultValue, themeOpts = {}) { + const pathString = Array.isArray(path) ? pathToString(path) : path.replace(/^['"]+|['"]+$/g, ""); + const pathSegments = Array.isArray(path) ? path : (0, _toPath).toPath(pathString); + const value = (0, _dlv).default(config.theme, pathSegments, defaultValue); + if (value === undefined) { + let error = `'${pathString}' does not exist in your theme config.`; + const parentSegments = pathSegments.slice(0, -1); + const parentValue = (0, _dlv).default(config.theme, parentSegments); + if (isObject(parentValue)) { + const validKeys = Object.keys(parentValue).filter((key)=>validatePath(config, [ + ...parentSegments, + key + ]).isValid); + const suggestion = (0, _didyoumean).default(pathSegments[pathSegments.length - 1], validKeys); + if (suggestion) { + error += ` Did you mean '${pathToString([ + ...parentSegments, + suggestion + ])}'?`; + } else if (validKeys.length > 0) { + error += ` '${pathToString(parentSegments)}' has the following valid keys: ${list(validKeys)}`; + } + } else { + const closestPath = findClosestExistingPath(config.theme, pathString); + if (closestPath) { + const closestValue = (0, _dlv).default(config.theme, closestPath); + if (isObject(closestValue)) { + error += ` '${pathToString(closestPath)}' has the following keys: ${listKeys(closestValue)}`; + } else { + error += ` '${pathToString(closestPath)}' is not an object.`; + } + } else { + error += ` Your theme has the following top-level keys: ${listKeys(config.theme)}`; + } + } + return { + isValid: false, + error + }; + } + if (!(typeof value === "string" || typeof value === "number" || typeof value === "function" || value instanceof String || value instanceof Number || Array.isArray(value))) { + let error = `'${pathString}' was found but does not resolve to a string.`; + if (isObject(value)) { + let validKeys = Object.keys(value).filter((key)=>validatePath(config, [ + ...pathSegments, + key + ]).isValid); + if (validKeys.length) { + error += ` Did you mean something like '${pathToString([ + ...pathSegments, + validKeys[0] + ])}'?`; + } + } + return { + isValid: false, + error + }; + } + const [themeSection] = pathSegments; + return { + isValid: true, + value: (0, _transformThemeValue).default(themeSection)(value, themeOpts) + }; +} +function extractArgs(node, vNodes, functions) { + vNodes = vNodes.map((vNode)=>resolveVNode(node, vNode, functions)); + let args = [ + "" + ]; + for (let vNode1 of vNodes){ + if (vNode1.type === "div" && vNode1.value === ",") { + args.push(""); + } else { + args[args.length - 1] += _postcssValueParser.default.stringify(vNode1); + } + } + return args; +} +function resolveVNode(node, vNode, functions) { + if (vNode.type === "function" && functions[vNode.value] !== undefined) { + let args = extractArgs(node, vNode.nodes, functions); + vNode.type = "word"; + vNode.value = functions[vNode.value](node, ...args); + } + return vNode; +} +function resolveFunctions(node, input, functions) { + return (0, _postcssValueParser).default(input).walk((vNode)=>{ + resolveVNode(node, vNode, functions); + }).toString(); +} +let nodeTypePropertyMap = { + atrule: "params", + decl: "value" +}; +function _default({ tailwindConfig: config }) { + let functions = { + theme: (node, path, ...defaultValue)=>{ + // Strip quotes from beginning and end of string + // This allows the alpha value to be present inside of quotes + path = path.replace(/^['"]+|['"]+$/g, ""); + let matches = path.match(/^([^\s]+)(?![^\[]*\])(?:\s*\/\s*([^\/\s]+))$/); + let alpha = undefined; + if (matches) { + path = matches[1]; + alpha = matches[2]; + } + let { isValid , value , error } = validatePath(config, path, defaultValue.length ? defaultValue : undefined, { + opacityValue: alpha + }); + if (!isValid) { + throw node.error(error); + } + let maybeColor = (0, _pluginUtils).parseColorFormat(value); + let isColorFunction = maybeColor !== undefined && typeof maybeColor === "function"; + if (alpha !== undefined || isColorFunction) { + if (alpha === undefined) { + alpha = 1.0; + } + value = (0, _withAlphaVariable).withAlphaValue(maybeColor, alpha, maybeColor); + } + return value; + }, + screen: (node, screen)=>{ + screen = screen.replace(/^['"]+/g, "").replace(/['"]+$/g, ""); + let screens = (0, _normalizeScreens).normalizeScreens(config.theme.screens); + let screenDefinition = screens.find(({ name })=>name === screen); + if (!screenDefinition) { + throw node.error(`The '${screen}' screen does not exist in your theme.`); + } + return (0, _buildMediaQuery).default(screenDefinition); + } + }; + return (root)=>{ + root.walk((node)=>{ + let property = nodeTypePropertyMap[node.type]; + if (property === undefined) { + return; + } + node[property] = resolveFunctions(node, node[property], functions); + }); + }; +} diff --git a/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js b/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js new file mode 100644 index 0000000..6f6df8b --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js @@ -0,0 +1,470 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = expandApplyAtRules; +var _postcss = _interopRequireDefault(require("postcss")); +var _postcssSelectorParser = _interopRequireDefault(require("postcss-selector-parser")); +var _generateRules = require("./generateRules"); +var _bigSign = _interopRequireDefault(require("../util/bigSign")); +var _escapeClassName = _interopRequireDefault(require("../util/escapeClassName")); +function expandApplyAtRules(context) { + return (root)=>{ + // Build a cache of the user's CSS so we can use it to resolve classes used by @apply + let localCache = lazyCache(()=>buildLocalApplyCache(root, context)); + processApply(root, context, localCache); + }; +} +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** @typedef {Map} ApplyCache */ function extractClasses(node) { + /** @type {Map>} */ let groups = new Map(); + let container = _postcss.default.root({ + nodes: [ + node.clone() + ] + }); + container.walkRules((rule)=>{ + (0, _postcssSelectorParser).default((selectors)=>{ + selectors.walkClasses((classSelector)=>{ + let parentSelector = classSelector.parent.toString(); + let classes = groups.get(parentSelector); + if (!classes) { + groups.set(parentSelector, classes = new Set()); + } + classes.add(classSelector.value); + }); + }).processSync(rule.selector); + }); + let normalizedGroups = Array.from(groups.values(), (classes)=>Array.from(classes)); + let classes1 = normalizedGroups.flat(); + return Object.assign(classes1, { + groups: normalizedGroups + }); +} +let selectorExtractor = (0, _postcssSelectorParser).default((root)=>root.nodes.map((node)=>node.toString())); +/** + * @param {string} ruleSelectors + */ function extractSelectors(ruleSelectors) { + return selectorExtractor.transformSync(ruleSelectors); +} +function extractBaseCandidates(candidates, separator) { + let baseClasses = new Set(); + for (let candidate of candidates){ + baseClasses.add(candidate.split(separator).pop()); + } + return Array.from(baseClasses); +} +function prefix(context, selector) { + let prefix1 = context.tailwindConfig.prefix; + return typeof prefix1 === "function" ? prefix1(selector) : prefix1 + selector; +} +function* pathToRoot(node) { + yield node; + while(node.parent){ + yield node.parent; + node = node.parent; + } +} +/** + * Only clone the node itself and not its children + * + * @param {*} node + * @param {*} overrides + * @returns + */ function shallowClone(node, overrides = {}) { + let children = node.nodes; + node.nodes = []; + let tmp = node.clone(overrides); + node.nodes = children; + return tmp; +} +/** + * Clone just the nodes all the way to the top that are required to represent + * this singular rule in the tree. + * + * For example, if we have CSS like this: + * ```css + * @media (min-width: 768px) { + * @supports (display: grid) { + * .foo { + * display: grid; + * grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + * } + * } + * + * @supports (backdrop-filter: blur(1px)) { + * .bar { + * backdrop-filter: blur(1px); + * } + * } + * + * .baz { + * color: orange; + * } + * } + * ``` + * + * And we're cloning `.bar` it'll return a cloned version of what's required for just that single node: + * + * ```css + * @media (min-width: 768px) { + * @supports (backdrop-filter: blur(1px)) { + * .bar { + * backdrop-filter: blur(1px); + * } + * } + * } + * ``` + * + * @param {import('postcss').Node} node + */ function nestedClone(node) { + for (let parent of pathToRoot(node)){ + if (node === parent) { + continue; + } + if (parent.type === "root") { + break; + } + node = shallowClone(parent, { + nodes: [ + node + ] + }); + } + return node; +} +/** + * @param {import('postcss').Root} root + */ function buildLocalApplyCache(root, context) { + /** @type {ApplyCache} */ let cache = new Map(); + let highestOffset = context.layerOrder.user >> 4n; + root.walkRules((rule, idx)=>{ + // Ignore rules generated by Tailwind + for (let node of pathToRoot(rule)){ + var ref; + if (((ref = node.raws.tailwind) === null || ref === void 0 ? void 0 : ref.layer) !== undefined) { + return; + } + } + // Clone what's required to represent this singular rule in the tree + let container = nestedClone(rule); + for (let className of extractClasses(rule)){ + let list = cache.get(className) || []; + cache.set(className, list); + list.push([ + { + layer: "user", + sort: BigInt(idx) + highestOffset, + important: false + }, + container, + ]); + } + }); + return cache; +} +/** + * @returns {ApplyCache} + */ function buildApplyCache(applyCandidates, context) { + for (let candidate of applyCandidates){ + if (context.notClassCache.has(candidate) || context.applyClassCache.has(candidate)) { + continue; + } + if (context.classCache.has(candidate)) { + context.applyClassCache.set(candidate, context.classCache.get(candidate).map(([meta, rule])=>[ + meta, + rule.clone() + ])); + continue; + } + let matches = Array.from((0, _generateRules).resolveMatches(candidate, context)); + if (matches.length === 0) { + context.notClassCache.add(candidate); + continue; + } + context.applyClassCache.set(candidate, matches); + } + return context.applyClassCache; +} +/** + * Build a cache only when it's first used + * + * @param {() => ApplyCache} buildCacheFn + * @returns {ApplyCache} + */ function lazyCache(buildCacheFn) { + let cache = null; + return { + get: (name)=>{ + cache = cache || buildCacheFn(); + return cache.get(name); + }, + has: (name)=>{ + cache = cache || buildCacheFn(); + return cache.has(name); + } + }; +} +/** + * Take a series of multiple caches and merge + * them so they act like one large cache + * + * @param {ApplyCache[]} caches + * @returns {ApplyCache} + */ function combineCaches(caches) { + return { + get: (name)=>caches.flatMap((cache)=>cache.get(name) || []), + has: (name)=>caches.some((cache)=>cache.has(name)) + }; +} +function extractApplyCandidates(params) { + let candidates = params.split(/[\s\t\n]+/g); + if (candidates[candidates.length - 1] === "!important") { + return [ + candidates.slice(0, -1), + true + ]; + } + return [ + candidates, + false + ]; +} +function processApply(root, context, localCache) { + let applyCandidates = new Set(); + // Collect all @apply rules and candidates + let applies = []; + root.walkAtRules("apply", (rule)=>{ + let [candidates] = extractApplyCandidates(rule.params); + for (let util of candidates){ + applyCandidates.add(util); + } + applies.push(rule); + }); + // Start the @apply process if we have rules with @apply in them + if (applies.length === 0) { + return; + } + // Fill up some caches! + let applyClassCache = combineCaches([ + localCache, + buildApplyCache(applyCandidates, context) + ]); + /** + * When we have an apply like this: + * + * .abc { + * @apply hover:font-bold; + * } + * + * What we essentially will do is resolve to this: + * + * .abc { + * @apply .hover\:font-bold:hover { + * font-weight: 500; + * } + * } + * + * Notice that the to-be-applied class is `.hover\:font-bold:hover` and that the utility candidate was `hover:font-bold`. + * What happens in this function is that we prepend a `.` and escape the candidate. + * This will result in `.hover\:font-bold` + * Which means that we can replace `.hover\:font-bold` with `.abc` in `.hover\:font-bold:hover` resulting in `.abc:hover` + */ // TODO: Should we use postcss-selector-parser for this instead? + function replaceSelector(selector, utilitySelectors, candidate) { + let needle1 = `.${(0, _escapeClassName).default(candidate)}`; + let needles = [ + ...new Set([ + needle1, + needle1.replace(/\\2c /g, "\\,") + ]) + ]; + let utilitySelectorsList = extractSelectors(utilitySelectors); + return extractSelectors(selector).map((s)=>{ + let replaced = []; + for (let utilitySelector of utilitySelectorsList){ + let replacedSelector = utilitySelector; + for (const needle of needles){ + replacedSelector = replacedSelector.replace(needle, s); + } + if (replacedSelector === utilitySelector) { + continue; + } + replaced.push(replacedSelector); + } + return replaced.join(", "); + }).join(", "); + } + let perParentApplies = new Map(); + // Collect all apply candidates and their rules + for (let apply of applies){ + let [candidates] = perParentApplies.get(apply.parent) || [ + [], + apply.source + ]; + perParentApplies.set(apply.parent, [ + candidates, + apply.source + ]); + let [applyCandidates, important] = extractApplyCandidates(apply.params); + if (apply.parent.type === "atrule") { + if (apply.parent.name === "screen") { + const screenType = apply.parent.params; + throw apply.error(`@apply is not supported within nested at-rules like @screen. We suggest you write this as @apply ${applyCandidates.map((c)=>`${screenType}:${c}`).join(" ")} instead.`); + } + throw apply.error(`@apply is not supported within nested at-rules like @${apply.parent.name}. You can fix this by un-nesting @${apply.parent.name}.`); + } + for (let applyCandidate of applyCandidates){ + if ([ + prefix(context, "group"), + prefix(context, "peer") + ].includes(applyCandidate)) { + // TODO: Link to specific documentation page with error code. + throw apply.error(`@apply should not be used with the '${applyCandidate}' utility`); + } + if (!applyClassCache.has(applyCandidate)) { + throw apply.error(`The \`${applyCandidate}\` class does not exist. If \`${applyCandidate}\` is a custom class, make sure it is defined within a \`@layer\` directive.`); + } + let rules = applyClassCache.get(applyCandidate); + candidates.push([ + applyCandidate, + important, + rules + ]); + } + } + for (const [parent, [candidates1, atApplySource]] of perParentApplies){ + let siblings = []; + for (let [applyCandidate, important, rules] of candidates1){ + let potentialApplyCandidates = [ + applyCandidate, + ...extractBaseCandidates([ + applyCandidate + ], context.tailwindConfig.separator), + ]; + for (let [meta, node1] of rules){ + let parentClasses = extractClasses(parent); + let nodeClasses = extractClasses(node1); + // When we encounter a rule like `.dark .a, .b { … }` we only want to be left with `[.dark, .a]` if the base applyCandidate is `.a` or with `[.b]` if the base applyCandidate is `.b` + // So we've split them into groups + nodeClasses = nodeClasses.groups.filter((classList)=>classList.some((className)=>potentialApplyCandidates.includes(className))).flat(); + // Add base utility classes from the @apply node to the list of + // classes to check whether it intersects and therefore results in a + // circular dependency or not. + // + // E.g.: + // .foo { + // @apply hover:a; // This applies "a" but with a modifier + // } + // + // We only have to do that with base classes of the `node`, not of the `parent` + // E.g.: + // .hover\:foo { + // @apply bar; + // } + // .bar { + // @apply foo; + // } + // + // This should not result in a circular dependency because we are + // just applying `.foo` and the rule above is `.hover\:foo` which is + // unrelated. However, if we were to apply `hover:foo` then we _did_ + // have to include this one. + nodeClasses = nodeClasses.concat(extractBaseCandidates(nodeClasses, context.tailwindConfig.separator)); + let intersects = parentClasses.some((selector)=>nodeClasses.includes(selector)); + if (intersects) { + throw node1.error(`You cannot \`@apply\` the \`${applyCandidate}\` utility here because it creates a circular dependency.`); + } + let root = _postcss.default.root({ + nodes: [ + node1.clone() + ] + }); + // Make sure every node in the entire tree points back at the @apply rule that generated it + root.walk((node)=>{ + node.source = atApplySource; + }); + let canRewriteSelector = node1.type !== "atrule" || node1.type === "atrule" && node1.name !== "keyframes"; + if (canRewriteSelector) { + root.walkRules((rule)=>{ + // Let's imagine you have the following structure: + // + // .foo { + // @apply bar; + // } + // + // @supports (a: b) { + // .bar { + // color: blue + // } + // + // .something-unrelated {} + // } + // + // In this case we want to apply `.bar` but it happens to be in + // an atrule node. We clone that node instead of the nested one + // because we still want that @supports rule to be there once we + // applied everything. + // + // However it happens to be that the `.something-unrelated` is + // also in that same shared @supports atrule. This is not good, + // and this should not be there. The good part is that this is + // a clone already and it can be safely removed. The question is + // how do we know we can remove it. Basically what we can do is + // match it against the applyCandidate that you want to apply. If + // it doesn't match the we can safely delete it. + // + // If we didn't do this, then the `replaceSelector` function + // would have replaced this with something that didn't exist and + // therefore it removed the selector altogether. In this specific + // case it would result in `{}` instead of `.something-unrelated {}` + if (!extractClasses(rule).some((candidate)=>candidate === applyCandidate)) { + rule.remove(); + return; + } + // Strip the important selector from the parent selector if at the beginning + let importantSelector = typeof context.tailwindConfig.important === "string" ? context.tailwindConfig.important : null; + // We only want to move the "important" selector if this is a Tailwind-generated utility + // We do *not* want to do this for user CSS that happens to be structured the same + let isGenerated = parent.raws.tailwind !== undefined; + let parentSelector = isGenerated && importantSelector && parent.selector.indexOf(importantSelector) === 0 ? parent.selector.slice(importantSelector.length) : parent.selector; + rule.selector = replaceSelector(parentSelector, rule.selector, applyCandidate); + // And then re-add it if it was removed + if (importantSelector && parentSelector !== parent.selector) { + rule.selector = `${importantSelector} ${rule.selector}`; + } + rule.walkDecls((d)=>{ + d.important = meta.important || important; + }); + }); + } + // Insert it + siblings.push([ + // Ensure that when we are sorting, that we take the layer order into account + { + ...meta, + sort: meta.sort | context.layerOrder[meta.layer] + }, + root.nodes[0], + ]); + } + } + // Inject the rules, sorted, correctly + let nodes = siblings.sort(([a], [z])=>(0, _bigSign).default(a.sort - z.sort)).map((s)=>s[1]); + // `parent` refers to the node at `.abc` in: .abc { @apply mt-2 } + parent.after(nodes); + } + for (let apply1 of applies){ + // If there are left-over declarations, just remove the @apply + if (apply1.parent.nodes.length > 1) { + apply1.remove(); + } else { + // The node is empty, drop the full node + apply1.parent.remove(); + } + } + // Do it again, in case we have other `@apply` rules + processApply(root, context, localCache); +} diff --git a/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js b/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js new file mode 100644 index 0000000..fcf1077 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js @@ -0,0 +1,276 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = expandTailwindAtRules; +var _quickLru = _interopRequireDefault(require("quick-lru")); +var sharedState = _interopRequireWildcard(require("./sharedState")); +var _generateRules = require("./generateRules"); +var _bigSign = _interopRequireDefault(require("../util/bigSign")); +var _log = _interopRequireDefault(require("../util/log")); +var _cloneNodes = _interopRequireDefault(require("../util/cloneNodes")); +var _defaultExtractor = require("./defaultExtractor"); +function expandTailwindAtRules(context) { + return (root)=>{ + let layerNodes = { + base: null, + components: null, + utilities: null, + variants: null + }; + root.walkAtRules((rule)=>{ + // Make sure this file contains Tailwind directives. If not, we can save + // a lot of work and bail early. Also we don't have to register our touch + // file as a dependency since the output of this CSS does not depend on + // the source of any templates. Think Vue