├── .gitignore ├── modules ├── Book.js ├── storage.js └── time_date.js ├── .hintrc ├── .eslintrc.json ├── .stylelintrc.json ├── package.json ├── LICENSE ├── index.html ├── .github └── workflows │ └── linters.yml ├── index.css ├── index.js └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /modules/Book.js: -------------------------------------------------------------------------------- 1 | export default class Book { 2 | constructor(id, title, author) { 3 | this.id = id; 4 | this.title = title; 5 | this.author = author; 6 | } 7 | } -------------------------------------------------------------------------------- /modules/storage.js: -------------------------------------------------------------------------------- 1 | export default class Storage { 2 | static saveToStorage = (books) => { 3 | localStorage.setItem('collections', JSON.stringify(books)); 4 | } 5 | 6 | static getBooksFromStorage = () => { 7 | const storedBooks = localStorage.getItem('collections'); 8 | return storedBooks ? JSON.parse(storedBooks) : []; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "connector": { 3 | "name": "local", 4 | "options": { 5 | "pattern": ["**", "!.git/**", "!node_modules/**"] 6 | } 7 | }, 8 | "extends": ["development"], 9 | "formatters": ["stylish"], 10 | "hints": [ 11 | "button-type", 12 | "disown-opener", 13 | "html-checker", 14 | "meta-charset-utf-8", 15 | "meta-viewport", 16 | "no-inline-styles:error" 17 | ] 18 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "jest": true 6 | }, 7 | "parser": "babel-eslint", 8 | "parserOptions": { 9 | "ecmaVersion": 2018, 10 | "sourceType": "module" 11 | }, 12 | "extends": ["airbnb-base"], 13 | "rules": { 14 | "no-shadow": "off", 15 | "no-param-reassign": "off", 16 | "eol-last": "off", 17 | "import/extensions": [ 1, { 18 | "js": "always", "json": "always" 19 | }] 20 | }, 21 | "ignorePatterns": [ 22 | "dist/", 23 | "build/" 24 | ] 25 | } -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["stylelint-config-standard"], 3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"], 4 | "rules": { 5 | "at-rule-no-unknown": [ 6 | true, 7 | { 8 | "ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"] 9 | } 10 | ], 11 | "scss/at-rule-no-unknown": [ 12 | true, 13 | { 14 | "ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"] 15 | } 16 | ], 17 | "csstree/validator": true 18 | }, 19 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"] 20 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-books-modules", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "Book.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "babel-eslint": "^10.1.0", 14 | "eslint": "^7.32.0", 15 | "eslint-config-airbnb-base": "^14.2.1", 16 | "eslint-plugin-import": "^2.27.5", 17 | "hint": "^7.1.5", 18 | "stylelint": "^13.13.1", 19 | "stylelint-config-standard": "^21.0.0", 20 | "stylelint-csstree-validator": "^1.9.0", 21 | "stylelint-scss": "^3.21.0" 22 | }, 23 | "dependencies": { 24 | "luxon": "^3.3.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2023] [Ismaila Damilare Elijah] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Awesome Books Project 12 | 13 | 14 |
15 |
16 |

Awesome Books

17 | 24 |
25 |
26 |

AWESOME BOOKS

27 |
28 |


29 | 30 |
31 |

Add a new book

32 |
33 | 34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 |

Contact Information

42 |

Do you have any question or you just want to say "Hello!"?
You can reach out to us!

43 | 44 | 49 |
50 | 51 | 56 | 57 | 58 |
59 | 60 | 61 | -------------------------------------------------------------------------------- /.github/workflows/linters.yml: -------------------------------------------------------------------------------- 1 | name: Linters 2 | 3 | on: pull_request 4 | 5 | env: 6 | FORCE_COLOR: 1 7 | 8 | jobs: 9 | lighthouse: 10 | name: Lighthouse 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-node@v1 15 | with: 16 | node-version: "12.x" 17 | - name: Setup Lighthouse 18 | run: npm install -g @lhci/cli@0.7.x 19 | - name: Lighthouse Report 20 | run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=. 21 | webhint: 22 | name: Webhint 23 | runs-on: ubuntu-22.04 24 | steps: 25 | - uses: actions/checkout@v2 26 | - uses: actions/setup-node@v1 27 | with: 28 | node-version: "18.x" 29 | - name: Setup Webhint 30 | run: | 31 | npm install --save-dev hint@7.x 32 | [ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc 33 | - name: Webhint Report 34 | run: npx hint . 35 | stylelint: 36 | name: Stylelint 37 | runs-on: ubuntu-22.04 38 | steps: 39 | - uses: actions/checkout@v2 40 | - uses: actions/setup-node@v1 41 | with: 42 | node-version: "12.x" 43 | - name: Setup Stylelint 44 | run: | 45 | npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x 46 | [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json 47 | - name: Stylelint Report 48 | run: npx stylelint "**/*.{css,scss}" 49 | eslint: 50 | name: ESLint 51 | runs-on: ubuntu-22.04 52 | steps: 53 | - uses: actions/checkout@v2 54 | - uses: actions/setup-node@v1 55 | with: 56 | node-version: "12.x" 57 | - name: Setup ESLint 58 | run: | 59 | npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x 60 | [ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json 61 | - name: ESLint Report 62 | run: npx eslint . 63 | nodechecker: 64 | name: node_modules checker 65 | runs-on: ubuntu-22.04 66 | steps: 67 | - uses: actions/checkout@v2 68 | - name: Check node_modules existence 69 | run: | 70 | if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | font-family: 'Courier New', Courier, monospace; 9 | 10 | /* font-family: 'Lato', sans-serif; */ 11 | } 12 | 13 | header { 14 | display: flex; 15 | background-color: rgba(85, 107, 47, 0.7); 16 | width: 100%; 17 | justify-content: space-between; 18 | padding: 1rem; 19 | font-size: 1.5rem; 20 | font-family: 'Verdana', Tahoma, sans-serif; 21 | color: antiquewhite; 22 | } 23 | 24 | header p a { 25 | text-decoration: none; 26 | color: antiquewhite; 27 | } 28 | 29 | header nav ul { 30 | list-style-type: none; 31 | } 32 | 33 | header nav ul li { 34 | display: inline; 35 | margin-right: 1rem; 36 | cursor: pointer; 37 | } 38 | 39 | #date { 40 | align-self: flex-end; 41 | font-size: 1rem; 42 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; 43 | font-weight: bolder; 44 | background-color: antiquewhite; 45 | } 46 | 47 | .header-title { 48 | padding-top: 30px; 49 | font-family: 'Sacramento', cursive; 50 | font-size: 4rem; 51 | } 52 | 53 | #add-book { 54 | width: 60%; 55 | border: 2px solid red; 56 | display: flex; 57 | flex-direction: column; 58 | } 59 | 60 | .book-div h2 { 61 | font-size: 1.3rem; 62 | } 63 | 64 | .contact h2 { 65 | align-self: center; 66 | margin: 3rem auto; 67 | font-family: 'Sacramento', cursive; 68 | font-size: 4rem; 69 | } 70 | 71 | #add-book h2 { 72 | align-self: center; 73 | font-family: 'Sacramento', cursive; 74 | font-size: 4rem; 75 | } 76 | 77 | form { 78 | display: flex; 79 | flex-direction: column; 80 | width: 100%; 81 | padding: 10px; 82 | } 83 | 84 | input { 85 | padding: 15px; 86 | margin: 10px auto; 87 | width: 100%; 88 | font-size: 1.4rem; 89 | } 90 | 91 | #add { 92 | align-self: flex-end; 93 | width: 40%; 94 | padding: 10px; 95 | box-shadow: 3px 3px 3px 3px; 96 | margin-bottom: 1.5rem; 97 | font-size: 1.4rem; 98 | transition: all 0.5s ease-in-out; 99 | cursor: pointer; 100 | } 101 | 102 | input:focus, 103 | #add:focus { 104 | box-shadow: 0 0 3px 3px; 105 | } 106 | 107 | #add:hover { 108 | filter: invert(100%); 109 | } 110 | 111 | .container { 112 | display: flex; 113 | flex-direction: column; 114 | align-items: center; 115 | background: linear-gradient(-45deg, rgba(241, 102, 102, 0.9), rgba(165, 226, 22, 0.9)); 116 | } 117 | 118 | .shelve { 119 | width: 75%; 120 | padding: 10px; 121 | background: linear-gradient(45deg, rgba(241, 102, 102, 0.9), rgba(165, 226, 22, 0.9)); 122 | margin-top: 2rem; 123 | } 124 | 125 | .book-div { 126 | display: flex; 127 | justify-content: space-between; 128 | margin: 10px auto; 129 | padding: 10px; 130 | transition: all 0.5s ease-in-out; 131 | } 132 | 133 | .book-div:hover { 134 | box-shadow: 3px 3px 3px 3px; 135 | } 136 | 137 | .remove { 138 | padding: 10px; 139 | box-shadow: 3px 3px 3px 3px; 140 | font-size: 1.3rem; 141 | height: 2.5rem; 142 | transition: all 0.5s ease-in-out; 143 | cursor: pointer; 144 | } 145 | 146 | .remove:hover { 147 | filter: invert(100%); 148 | } 149 | 150 | .short { 151 | width: 20%; 152 | margin-bottom: 2rem; 153 | border: 2px solid black; 154 | } 155 | 156 | .contact { 157 | margin: 3rem auto; 158 | background-color: rgb(250, 235, 215, 0.5); 159 | display: flex; 160 | flex-direction: column; 161 | line-height: 1.9rem; 162 | padding: 1rem; 163 | } 164 | 165 | .contact ul li { 166 | list-style-type: circle; 167 | margin-left: 15px; 168 | } 169 | 170 | footer { 171 | margin: 4.5rem 0 0 0; 172 | border: 2px solid red; 173 | text-align: center; 174 | color: azure; 175 | background-color: rgb(0, 0, 0, 0.3); 176 | padding: 1.5rem; 177 | width: 100%; 178 | font-family: Georgia, 'Times New Roman', Times, serif; 179 | line-height: 1.7rem; 180 | } 181 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { DateTime } from './modules/time_date.js'; 2 | import Book from './modules/Book.js'; 3 | import Storage from './modules/storage.js'; 4 | 5 | export default class Library { 6 | constructor() { 7 | this.books = []; 8 | this.newTitle = document.querySelector('form #title'); 9 | this.newAuthor = document.querySelector('form #author'); 10 | this.addButton = document.querySelector('#add'); 11 | this.shelve = document.querySelector('.shelve'); 12 | this.currenttimeDate = DateTime.now(); 13 | } 14 | 15 | displayBooks = () => { 16 | this.shelve.innerHTML = ''; 17 | this.books.forEach((book, i) => { 18 | const bookDiv = document.createElement('div'); 19 | bookDiv.classList.add('book-div'); 20 | 21 | if (i % 2 === 0) bookDiv.style.backgroundColor = 'rgb(221,221,221)'; 22 | 23 | const button = document.createElement('button'); 24 | button.className = 'remove'; 25 | button.innerHTML = 'Remove'; 26 | 27 | bookDiv.innerHTML += `

"${book.title}" by ${book.author}

`; 28 | bookDiv.appendChild(button); 29 | 30 | this.shelve.appendChild(bookDiv); 31 | }); 32 | 33 | const removeBtns = document.querySelectorAll('.remove'); 34 | removeBtns.forEach((removeBtn, btnIndex) => { 35 | removeBtn.addEventListener('click', () => { 36 | this.books = this.books.filter((book) => book.id !== btnIndex); 37 | const removeBtnParent = removeBtn.parentNode; 38 | removeBtnParent.remove(); 39 | Storage.saveToStorage(this.books); 40 | }); 41 | }); 42 | this.theDate(); 43 | } 44 | 45 | addBook = (e) => { 46 | if (this.newTitle.value === '' || this.newAuthor.value === '') return; 47 | e.preventDefault(); 48 | let id = this.books.length; 49 | this.books.forEach((c) => { 50 | while (c.id === id) { 51 | id += 1; 52 | } 53 | }); 54 | 55 | const title = this.newTitle.value; 56 | const author = this.newAuthor.value; 57 | const newBook = new Book(id, title, author); 58 | this.books.push(newBook); 59 | this.newTitle.value = ''; 60 | this.newAuthor.value = ''; 61 | 62 | this.displayBooks(); 63 | Storage.saveToStorage(this.books); 64 | } 65 | 66 | initialize = () => { 67 | this.books = Storage.getBooksFromStorage(); 68 | this.displayBooks(); 69 | this.addButton.addEventListener('click', this.addBook.bind(this)); 70 | this.navigationBar(); 71 | } 72 | 73 | theDate= () => { 74 | const dateDiv = document.querySelector('#date'); 75 | 76 | setInterval(() => { 77 | this.currenttimeDate = DateTime.now(); 78 | const dt = this.currenttimeDate; 79 | const day = dt.toFormat('dd'); 80 | const month = dt.toFormat('MMMM'); 81 | const year = dt.toFormat('yyyy'); 82 | const hour = dt.toFormat('hh'); 83 | const minute = dt.toFormat('mm'); 84 | const second = dt.toFormat('ss'); 85 | const amPm = dt.toFormat('a'); 86 | const now = `${day}-${month}-${year} ${hour}:${minute}:${second} ${amPm}`; 87 | dateDiv.innerHTML = now; 88 | }, 1000); 89 | } 90 | 91 | navigationBar = () => { 92 | const { shelve } = this; 93 | const addBook = document.querySelector('#add-book'); 94 | const contact = document.querySelector('.contact'); 95 | const short = document.querySelector('.short'); 96 | 97 | const links = document.querySelectorAll('header nav ul li'); 98 | links.forEach((link, index) => { 99 | link.onclick = () => { 100 | if (index === 0) { 101 | shelve.style.display = 'block'; 102 | addBook.style.display = 'none'; 103 | contact.style.display = 'none'; 104 | short.style.display = 'none'; 105 | links[0].style.backgroundColor = 'rgba(241, 102, 102, 0.9)'; 106 | links[1].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 107 | links[2].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 108 | } else if (index === 1) { 109 | shelve.style.display = 'none'; 110 | addBook.style.display = 'flex'; 111 | contact.style.display = 'none'; 112 | short.style.display = 'none'; 113 | links[1].style.backgroundColor = 'rgba(241, 102, 102, 0.9)'; 114 | links[0].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 115 | links[2].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 116 | } else if (index === 2) { 117 | shelve.style.display = 'none'; 118 | addBook.style.display = 'none'; 119 | contact.style.display = 'flex'; 120 | short.style.display = 'none'; 121 | links[2].style.backgroundColor = 'rgba(241, 102, 102, 0.9)'; 122 | links[0].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 123 | links[1].style.backgroundColor = 'rgba(241, 102, 102, 0.1)'; 124 | } else { 125 | shelve.style.display = 'none'; 126 | addBook.style.display = 'none'; 127 | contact.style.display = 'none'; 128 | short.style.display = 'block'; 129 | } 130 | }; 131 | }); 132 | } 133 | } 134 | 135 | const myLibrary = new Library(); 136 | myLibrary.initialize(); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 |

Awesome Books Project

8 | 9 |
10 | 11 | 12 | 13 | # 📗 Table of Contents 14 | 15 | - [📖 About the Project](#about-project) 16 | - [🛠 Built With](#built-with) 17 | - [Tech Stack](#tech-stack) 18 | - [Key Features](#key-features) 19 | - [🚀 Live Demo](#live-demo) 20 | - [💻 Getting Started](#getting-started) 21 | - [Setup](#setup) 22 | - [Prerequisites](#prerequisites) 23 | - [Install](#install) 24 | - [Usage](#usage) 25 | - [Run tests](#run-tests) 26 | - [Deployment](#triangular_flag_on_post-deployment) 27 | - [👥 Authors](#authors) 28 | - [🔭 Future Features](#future-features) 29 | - [🤝 Contributing](#contributing) 30 | - [⭐️ Show your support](#support) 31 | - [🙏 Acknowledgements](#acknowledgements) 32 | - [📝 License](#license) 33 | 34 | 35 | 36 | # 📖 [Awesome Books Project] 37 | 38 | **[Awesome Books Project](https://bestbynature.github.io/awesome-books-project/)** is a a basic website that allows users to add and/or remove books from a list of books on the website. The Project is achieved by using JavaScript objects and arrays. The project also implemented features that dynamically modify the DOM and add basic events and listeners.. 39 | 40 | ## 🛠 Built With 41 | 42 | ### Tech Stack 43 | 44 |
45 | Client 46 | 51 |
52 | 53 | 54 | 55 | ### Key Features 56 | 57 | - **[Responsive design]** 58 | - **[Page Jumps]** 59 | - **[Add/Remove buttons]** 60 | 61 |

(back to top)

62 | 63 | 64 | 65 | ## 🚀 Live Demo 66 | 67 | - [Awesome Books Project](https://bestbynature.github.io/awesome-books-project/) 68 | 69 |

(back to top)

70 | 71 | 72 | 73 | ## 💻 Getting Started 74 | 75 | To get a local copy up and running, follow these steps. 76 | 77 | ### Prerequisites 78 | 79 | In order to run this project you need: 80 | 81 | 87 | 88 | ### Setup 89 | 90 | Clone this repository to your desired folder: 91 | 92 | 98 | 99 | ### Install 100 | 101 | Install this project with: 102 | 103 | - In the first commit of your feature branch create a .github/workflows folder and add a copy of [.github/workflows/linters.yml](https://github.com/microverseinc/linters-config/blob/master/html-css-js/.github/workflows/linters.yml) to that folder. 104 | - create a .gitignore file and add 'node_modules' to it 105 | - run 'npm init -y' 106 | - run 'npm install --save-dev hint@7.x' 107 | - Copy [hintrc](https://github.com/microverseinc/linters-config/blob/master/html-css-js/.hintrc) to the root directory of your project. 108 | - run 'npx hint .' 109 | - Fix validation errors. 110 | - run 'npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x' 111 | - Copy [stylelintrc.json](https://github.com/microverseinc/linters-config/blob/master/html-css-js/.stylelintrc.json) to the root directory of your project. 112 | - Run 'npx stylelint "\*_/_.{css,scss}"' 113 | - fix linter errors 114 | - run 'npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x' 115 | - Copy [eslintrc.json](https://github.com/microverseinc/linters-config/tree/master/html-css-js) 116 | - Run npx eslint . on the root of your directory of your project 117 | - Fix linter error. 118 | 119 | ### Usage 120 | 121 | To run the project, execute the following command: 122 | 123 | ```sh 124 | use git bash to open in Vs code 125 | ``` 126 | 127 | ### Run tests 128 | 129 | To run tests, run the following command: 130 | 131 | ```sh 132 | Run "npx hint ." 133 | Run "npx stylelint "**/*.{css,scss} --fix " to fix linters 134 | Run "npx eslint . --fix to fix linters" 135 | ``` 136 | 137 | ### Deployment 138 | 139 | You can deploy this project using: 140 | 141 | - github pages 142 | 143 |

(back to top)

144 | 145 | 146 | 147 | ## 👥 Authors 148 | 149 | 👤 **Author** 150 | 151 | - GitHub: [@githubhandle](https://github.com/Bestbynature) 152 | - Twitter: [@twitterhandle](https://twitter.com/Dammybest) 153 | - LinkedIn: [LinkedIn](https://www.linkedin.com/in/damilare-ismaila-4a5a8b30/) 154 | 155 |

(back to top)

156 | 157 | 158 | 159 | ## 🔭 Future Features 160 | 161 | - [ ] **[contact form page]** 162 | - [ ] **[A feature for price inclusion]** 163 | - [ ] **[A feature for updating the cart]** 164 | 165 |

(back to top)

166 | 167 | 168 | 169 | ## 🤝 Contributing 170 | 171 | Contributions, issues, and feature requests are welcome! 172 | 173 | Feel free to check the [issues page](../../issues/). 174 | 175 |

(back to top)

176 | 177 | 178 | 179 | ## ⭐️ Show your support 180 | 181 | If you like this project, kindly drop a star for me. 182 | 183 |

(back to top)

184 | 185 | 186 | 187 | ## 🙏 Acknowledgments 188 | 189 | I would like to use this medium to appreciate [Microverse](https://microverse.org) for giving me this type of opportunity. 190 | 191 |

(back to top)

192 | 193 | 194 | 195 | ## 📝 License 196 | 197 | This project is [MIT](./LICENSE) licensed. 198 | 199 |

(back to top)

200 | -------------------------------------------------------------------------------- /modules/time_date.js: -------------------------------------------------------------------------------- 1 | /*eslint-disable*/ 2 | class e extends Error {} class z extends e {constructor(e) { super(`Invalid DateTime: ${e.toMessage()}`); }} class A extends e {constructor(e) { super(`Invalid Interval: ${e.toMessage()}`); }} class q extends e {constructor(e) { super(`Invalid Duration: ${e.toMessage()}`); }} class j extends e {} class _ extends e {constructor(e) { super(`Invalid unit ${e}`); }} class o extends e {} class r extends e {constructor() { super('Zone is an abstract class'); }} var t = 'numeric'; var n = 'short'; var s = 'long'; const U = { year: t, month: t, day: t }; const $ = { year: t, month: n, day: t }; const H = { 3 | year: t, month: n, day: t, weekday: n, 4 | }; const W = { year: t, month: s, day: t }; const R = { 5 | year: t, month: s, day: t, weekday: s, 6 | }; const J = { hour: t, minute: t }; const Y = { hour: t, minute: t, second: t }; const P = { 7 | hour: t, minute: t, second: t, timeZoneName: n, 8 | }; const G = { 9 | hour: t, minute: t, second: t, timeZoneName: s, 10 | }; const B = { hour: t, minute: t, hourCycle: 'h23' }; const Q = { 11 | hour: t, minute: t, second: t, hourCycle: 'h23', 12 | }; const K = { 13 | hour: t, minute: t, second: t, hourCycle: 'h23', timeZoneName: n, 14 | }; const X = { 15 | hour: t, minute: t, second: t, hourCycle: 'h23', timeZoneName: s, 16 | }; const ee = { 17 | year: t, month: t, day: t, hour: t, minute: t, 18 | }; const te = { 19 | year: t, month: t, day: t, hour: t, minute: t, second: t, 20 | }; const re = { 21 | year: t, month: n, day: t, hour: t, minute: t, 22 | }; const ne = { 23 | year: t, month: n, day: t, hour: t, minute: t, second: t, 24 | }; const se = { 25 | year: t, month: n, day: t, weekday: n, hour: t, minute: t, 26 | }; const ie = { 27 | year: t, month: s, day: t, hour: t, minute: t, timeZoneName: n, 28 | }; const ae = { 29 | year: t, month: s, day: t, hour: t, minute: t, second: t, timeZoneName: n, 30 | }; const oe = { 31 | year: t, month: s, day: t, weekday: s, hour: t, minute: t, timeZoneName: s, 32 | }; const ue = { 33 | year: t, month: s, day: t, weekday: s, hour: t, minute: t, second: t, timeZoneName: s, 34 | }; class i { 35 | get type() { throw new r(); } 36 | 37 | get name() { throw new r(); } 38 | 39 | get ianaName() { return this.name; } 40 | 41 | get isUniversal() { throw new r(); } 42 | 43 | offsetName(e, t) { throw new r(); } 44 | 45 | formatOffset(e, t) { throw new r(); } 46 | 47 | offset(e) { throw new r(); } 48 | 49 | equals(e) { throw new r(); } 50 | 51 | get isValid() { throw new r(); } 52 | }let le = null; class ce extends i { 53 | static get instance() { return le = le === null ? new ce() : le; } 54 | 55 | get type() { return 'system'; } 56 | 57 | get name() { return (new Intl.DateTimeFormat()).resolvedOptions().timeZone; } 58 | 59 | get isUniversal() { return !1; } 60 | 61 | offsetName(e, { format: t, locale: r }) { return st(e, t, r); } 62 | 63 | formatOffset(e, t) { return ut(this.offset(e), t); } 64 | 65 | offset(e) { return -new Date(e).getTimezoneOffset(); } 66 | 67 | equals(e) { return e.type === 'system'; } 68 | 69 | get isValid() { return !0; } 70 | }let he = {}; function de(e) { 71 | return he[e] || (he[e] = new Intl.DateTimeFormat('en-US', { 72 | hour12: !1, timeZone: e, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', era: 'short', 73 | })), he[e]; 74 | } const me = { 75 | year: 0, month: 1, day: 2, era: 3, hour: 4, minute: 5, second: 6, 76 | }; function fe(e, t) { var e = e.format(t).replace(/\u200E/g, ''); var [, t, e, r, n, s, i, a] = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(e); return [r, t, e, n, s, i, a]; } function ye(e, t) { const r = e.formatToParts(t); const n = []; for (let e = 0; e < r.length; e++) { const { type: s, value: i } = r[e]; const a = me[s]; s === 'era' ? n[a] = i : w(a) || (n[a] = parseInt(i, 10)); } return n; }let ge = {}; class u extends i { 77 | static create(e) { return ge[e] || (ge[e] = new u(e)), ge[e]; } 78 | 79 | static resetCache() { ge = {}, he = {}; } 80 | 81 | static isValidSpecifier(e) { return this.isValidZone(e); } 82 | 83 | static isValidZone(e) { if (!e) return !1; try { return new Intl.DateTimeFormat('en-US', { timeZone: e }).format(), !0; } catch (e) { return !1; } } 84 | 85 | constructor(e) { super(), this.zoneName = e, this.valid = u.isValidZone(e); } 86 | 87 | get type() { return 'iana'; } 88 | 89 | get name() { return this.zoneName; } 90 | 91 | get isUniversal() { return !1; } 92 | 93 | offsetName(e, { format: t, locale: r }) { return st(e, t, r, this.name); } 94 | 95 | formatOffset(e, t) { return ut(this.offset(e), t); } 96 | 97 | offset(e) { 98 | e = new Date(e); if (isNaN(e)) return NaN; let t = de(this.name); let[r, n, s, i, a, o, u] = (t.formatToParts ? ye : fe)(t, e); t = +e, e = t % 1e3; return (tt({ 99 | year: r = i === 'BC' ? 1 - Math.abs(r) : r, month: n, day: s, hour: a === 24 ? 0 : a, minute: o, second: u, millisecond: 0, 100 | }) - (t -= e >= 0 ? e : 1e3 + e)) / 6e4; 101 | } 102 | 103 | equals(e) { return e.type === 'iana' && e.name === this.name; } 104 | 105 | get isValid() { return this.valid; } 106 | } const ve = {}; function we(e, t = {}) { const r = JSON.stringify([e, t]); let n = ve[r]; return n || (n = new Intl.ListFormat(e, t), ve[r] = n), n; }let pe = {}; function Te(e, t = {}) { const r = JSON.stringify([e, t]); let n = pe[r]; return n || (n = new Intl.DateTimeFormat(e, t), pe[r] = n), n; }let Se = {}; function Oe(e, t = {}) { const r = JSON.stringify([e, t]); let n = Se[r]; return n || (n = new Intl.NumberFormat(e, t), Se[r] = n), n; }let be = {}; function ke(e, t = {}) { const { base: r, ...n } = t; const s = JSON.stringify([e, n]); let i = be[s]; return i || (i = new Intl.RelativeTimeFormat(e, t), be[s] = i), i; }let Ne = null; function Me() { return Ne = Ne || (new Intl.DateTimeFormat()).resolvedOptions().locale; } function De(n) { var s = n.indexOf('-x-'); var s = (n = s !== -1 ? n.substring(0, s) : n).indexOf('-u-'); if (s === -1) return [n]; { let t; let r; try { t = Te(n).resolvedOptions(), r = n; } catch (e) { n = n.substring(0, s); t = Te(n).resolvedOptions(), r = n; } var { numberingSystem: s, calendar: n } = t; return [r, s, n]; } } function Ee(e, t, r) { return (r || t) && (e.includes('-u-') || (e += '-u'), r && (e += `-ca-${r}`), t) && (e += `-nu-${t}`), e; } function Ve(t) { const r = []; for (let e = 1; e <= 12; e++) { const n = L.utc(2016, e, 1); r.push(t(n)); } return r; } function xe(t) { const r = []; for (let e = 1; e <= 7; e++) { const n = L.utc(2016, 11, 13 + e); r.push(t(n)); } return r; } function Ie(e, t, r, n, s) { e = e.listingMode(r); return e === 'error' ? null : (e === 'en' ? n : s)(t); } function Ce(e) { return (!e.numberingSystem || e.numberingSystem === 'latn') && (e.numberingSystem === 'latn' || !e.locale || e.locale.startsWith('en') || new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem === 'latn'); } class Ze { 107 | constructor(e, t, r) { this.padTo = r.padTo || 0, this.floor = r.floor || !1; const { padTo: n, floor: s, ...i } = r; (!t || Object.keys(i).length > 0) && (t = { useGrouping: !1, ...r }, r.padTo > 0 && (t.minimumIntegerDigits = r.padTo), this.inf = Oe(e, t)); } 108 | 109 | format(e) { let t; return this.inf ? (t = this.floor ? Math.floor(e) : e, this.inf.format(t)) : m(this.floor ? Math.floor(e) : Qe(e, 3), this.padTo); } 110 | } class Fe { 111 | constructor(e, t, r) { this.opts = r; let n = this.originalZone = void 0; this.opts.timeZone ? this.dt = e : e.zone.type === 'fixed' ? (r = (r = e.offset / 60 * -1) >= 0 ? `Etc/GMT+${r}` : `Etc/GMT${r}`, e.offset !== 0 && u.create(r).valid ? (n = r, this.dt = e) : (n = 'UTC', this.dt = e.offset === 0 ? e : e.setZone('UTC').plus({ minutes: e.offset }), this.originalZone = e.zone)) : e.zone.type === 'system' ? this.dt = e : e.zone.type === 'iana' ? (this.dt = e, n = e.zone.name) : (n = 'UTC', this.dt = e.setZone('UTC').plus({ minutes: e.offset }), this.originalZone = e.zone); r = { ...this.opts }; r.timeZone = r.timeZone || n, this.dtf = Te(t, r); } 112 | 113 | format() { return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join('') : this.dtf.format(this.dt.toJSDate()); } 114 | 115 | formatToParts() { const e = this.dtf.formatToParts(this.dt.toJSDate()); return this.originalZone ? e.map((e) => { let t; return e.type === 'timeZoneName' ? (t = this.originalZone.offsetName(this.dt.ts, { locale: this.dt.locale, format: this.opts.timeZoneName }), { ...e, value: t }) : e; }) : e; } 116 | 117 | resolvedOptions() { return this.dtf.resolvedOptions(); } 118 | } class Le { 119 | constructor(e, t, r) { this.opts = { style: 'long', ...r }, !t && Ye() && (this.rtf = ke(e, r)); } 120 | 121 | format(e, t) { return this.rtf ? this.rtf.format(e, t) : Dt(t, e, this.opts.numeric, this.opts.style !== 'long'); } 122 | 123 | formatToParts(e, t) { return this.rtf ? this.rtf.formatToParts(e, t) : []; } 124 | } class y { 125 | static fromOpts(e) { return y.create(e.locale, e.numberingSystem, e.outputCalendar, e.defaultToEN); } 126 | 127 | static create(e, t, r, n = !1) { e = e || v.defaultLocale, n = e || (n ? 'en-US' : Me()), t = t || v.defaultNumberingSystem, r = r || v.defaultOutputCalendar; return new y(n, t, r, e); } 128 | 129 | static resetCache() { Ne = null, pe = {}, Se = {}, be = {}; } 130 | 131 | static fromObject({ locale: e, numberingSystem: t, outputCalendar: r } = {}) { return y.create(e, t, r); } 132 | 133 | constructor(e, t, r, n) { var [e, s, i] = De(e); this.locale = e, this.numberingSystem = t || s || null, this.outputCalendar = r || i || null, this.intl = Ee(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = n, this.fastNumbersCached = null; } 134 | 135 | get fastNumbers() { return this.fastNumbersCached == null && (this.fastNumbersCached = Ce(this)), this.fastNumbersCached; } 136 | 137 | listingMode() { const e = this.isEnglish(); const t = !(this.numberingSystem !== null && this.numberingSystem !== 'latn' || this.outputCalendar !== null && this.outputCalendar !== 'gregory'); return e && t ? 'en' : 'intl'; } 138 | 139 | clone(e) { return e && Object.getOwnPropertyNames(e).length !== 0 ? y.create(e.locale || this.specifiedLocale, e.numberingSystem || this.numberingSystem, e.outputCalendar || this.outputCalendar, e.defaultToEN || !1) : this; } 140 | 141 | redefaultToEN(e = {}) { return this.clone({ ...e, defaultToEN: !0 }); } 142 | 143 | redefaultToSystem(e = {}) { return this.clone({ ...e, defaultToEN: !1 }); } 144 | 145 | months(r, n = !1, e = !0) { return Ie(this, r, e, mt, () => { const t = n ? { month: r, day: 'numeric' } : { month: r }; const e = n ? 'format' : 'standalone'; return this.monthsCache[e][r] || (this.monthsCache[e][r] = Ve((e) => this.extract(e, t, 'month'))), this.monthsCache[e][r]; }); } 146 | 147 | weekdays(r, n = !1, e = !0) { 148 | return Ie(this, r, e, vt, () => { 149 | const t = n ? { 150 | weekday: r, year: 'numeric', month: 'long', day: 'numeric', 151 | } : { weekday: r }; const e = n ? 'format' : 'standalone'; return this.weekdaysCache[e][r] || (this.weekdaysCache[e][r] = xe((e) => this.extract(e, t, 'weekday'))), this.weekdaysCache[e][r]; 152 | }); 153 | } 154 | 155 | meridiems(e = !0) { return Ie(this, void 0, e, () => wt, () => { if (!this.meridiemCache) { const t = { hour: 'numeric', hourCycle: 'h12' }; this.meridiemCache = [L.utc(2016, 11, 13, 9), L.utc(2016, 11, 13, 19)].map((e) => this.extract(e, t, 'dayperiod')); } return this.meridiemCache; }); } 156 | 157 | eras(e, t = !0) { return Ie(this, e, t, Ot, () => { const t = { era: e }; return this.eraCache[e] || (this.eraCache[e] = [L.utc(-40, 1, 1), L.utc(2017, 1, 1)].map((e) => this.extract(e, t, 'era'))), this.eraCache[e]; }); } 158 | 159 | extract(e, t, r) { e = this.dtFormatter(e, t).formatToParts().find((e) => e.type.toLowerCase() === r); return e ? e.value : null; } 160 | 161 | numberFormatter(e = {}) { return new Ze(this.intl, e.forceSimple || this.fastNumbers, e); } 162 | 163 | dtFormatter(e, t = {}) { return new Fe(e, this.intl, t); } 164 | 165 | relFormatter(e = {}) { return new Le(this.intl, this.isEnglish(), e); } 166 | 167 | listFormatter(e = {}) { return we(this.intl, e); } 168 | 169 | isEnglish() { return this.locale === 'en' || this.locale.toLowerCase() === 'en-us' || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith('en-us'); } 170 | 171 | equals(e) { return this.locale === e.locale && this.numberingSystem === e.numberingSystem && this.outputCalendar === e.outputCalendar; } 172 | }let ze = null; class d extends i { 173 | static get utcInstance() { return ze = ze === null ? new d(0) : ze; } 174 | 175 | static instance(e) { return e === 0 ? d.utcInstance : new d(e); } 176 | 177 | static parseSpecifier(e) { if (e) { e = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); if (e) return new d(it(e[1], e[2])); } return null; } 178 | 179 | constructor(e) { super(), this.fixed = e; } 180 | 181 | get type() { return 'fixed'; } 182 | 183 | get name() { return this.fixed === 0 ? 'UTC' : `UTC${ut(this.fixed, 'narrow')}`; } 184 | 185 | get ianaName() { return this.fixed === 0 ? 'Etc/UTC' : `Etc/GMT${ut(-this.fixed, 'narrow')}`; } 186 | 187 | offsetName() { return this.name; } 188 | 189 | formatOffset(e, t) { return ut(this.fixed, t); } 190 | 191 | get isUniversal() { return !0; } 192 | 193 | offset() { return this.fixed; } 194 | 195 | equals(e) { return e.type === 'fixed' && e.fixed === this.fixed; } 196 | 197 | get isValid() { return !0; } 198 | } class Ae extends i { 199 | constructor(e) { super(), this.zoneName = e; } 200 | 201 | get type() { return 'invalid'; } 202 | 203 | get name() { return this.zoneName; } 204 | 205 | get isUniversal() { return !1; } 206 | 207 | offsetName() { return null; } 208 | 209 | formatOffset() { return ''; } 210 | 211 | offset() { return NaN; } 212 | 213 | equals() { return !1; } 214 | 215 | get isValid() { return !1; } 216 | } function g(e, t) { let r; return w(e) || e === null ? t : e instanceof i ? e : typeof e === 'string' ? (r = e.toLowerCase()) === 'default' ? t : r === 'local' || r === 'system' ? ce.instance : r === 'utc' || r === 'gmt' ? d.utcInstance : d.parseSpecifier(r) || u.create(e) : c(e) ? d.instance(e) : typeof e === 'object' && e.offset && typeof e.offset === 'number' ? e : new Ae(e); }let qe = () => Date.now(); let je = 'system'; let _e = null; let Ue = null; let $e = null; let He = 60; let We; class v { 217 | static get now() { return qe; } 218 | 219 | static set now(e) { qe = e; } 220 | 221 | static set defaultZone(e) { je = e; } 222 | 223 | static get defaultZone() { return g(je, ce.instance); } 224 | 225 | static get defaultLocale() { return _e; } 226 | 227 | static set defaultLocale(e) { _e = e; } 228 | 229 | static get defaultNumberingSystem() { return Ue; } 230 | 231 | static set defaultNumberingSystem(e) { Ue = e; } 232 | 233 | static get defaultOutputCalendar() { return $e; } 234 | 235 | static set defaultOutputCalendar(e) { $e = e; } 236 | 237 | static get twoDigitCutoffYear() { return He; } 238 | 239 | static set twoDigitCutoffYear(e) { He = e % 100; } 240 | 241 | static get throwOnInvalid() { return We; } 242 | 243 | static set throwOnInvalid(e) { We = e; } 244 | 245 | static resetCaches() { y.resetCache(), u.resetCache(); } 246 | } function w(e) { return void 0 === e; } function c(e) { return typeof e === 'number'; } function Re(e) { return typeof e === 'number' && e % 1 == 0; } function Je(e) { return Object.prototype.toString.call(e) === '[object Date]'; } function Ye() { try { return typeof Intl !== 'undefined' && !!Intl.RelativeTimeFormat; } catch (e) { return !1; } } function Pe(e) { return Array.isArray(e) ? e : [e]; } function Ge(e, r, n) { if (e.length !== 0) return e.reduce((e, t) => { t = [r(t), t]; return e && n(e[0], t[0]) === e[0] ? e : t; }, null)[1]; } function l(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } function h(e, t, r) { return Re(e) && t <= e && e <= r; } function m(e, t = 2) { let r; return r = e < 0 ? `-${(`${-e}`).padStart(t, '0')}` : (`${e}`).padStart(t, '0'); } function f(e) { if (!w(e) && e !== null && e !== '') return parseInt(e, 10); } function p(e) { if (!w(e) && e !== null && e !== '') return parseFloat(e); } function Be(e) { if (!w(e) && e !== null && e !== '') return e = 1e3 * parseFloat(`0.${e}`), Math.floor(e); } function Qe(e, t, r = !1) { t = 10 ** t; return (r ? Math.trunc : Math.round)(e * t) / t; } function Ke(e) { return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0); } function Xe(e) { return Ke(e) ? 366 : 365; } function et(e, t) { let r; var n = (n = t - 1) - (r = 12) * Math.floor(n / r) + 1; return n == 2 ? Ke(e + (t - n) / 12) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1]; } function tt(e) { let t = Date.UTC(e.year, e.month - 1, e.day, e.hour, e.minute, e.second, e.millisecond); return e.year < 100 && e.year >= 0 && (t = new Date(t)).setUTCFullYear(e.year, e.month - 1, e.day), +t; } function rt(e) { const t = (e + Math.floor(e / 4) - Math.floor(e / 100) + Math.floor(e / 400)) % 7; var e = e - 1; var e = (e + Math.floor(e / 4) - Math.floor(e / 100) + Math.floor(e / 400)) % 7; return t == 4 || e == 3 ? 53 : 52; } function nt(e) { return e > 99 ? e : e > v.twoDigitCutoffYear ? 1900 + e : 2e3 + e; } function st(e, t, r, n = null) { 247 | var e = new Date(e); const s = { 248 | hourCycle: 'h23', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', 249 | }; var n = (n && (s.timeZone = n), { timeZoneName: t, ...s }); var t = new Intl.DateTimeFormat(r, n).formatToParts(e).find((e) => e.type.toLowerCase() === 'timezonename'); return t ? t.value : null; 250 | } function it(e, t) { let r = parseInt(e, 10); Number.isNaN(r) && (r = 0); e = parseInt(t, 10) || 0, t = r < 0 || Object.is(r, -0) ? -e : e; return 60 * r + t; } function at(e) { const t = Number(e); if (typeof e === 'boolean' || e === '' || Number.isNaN(t)) throw new o(`Invalid unit value ${e}`); return t; } function ot(e, t) { let r; const n = {}; for (const s in e)l(e, s) && (r = e[s]) != null && (n[t(s)] = at(r)); return n; } function ut(e, t) { const r = Math.trunc(Math.abs(e / 60)); const n = Math.trunc(Math.abs(e % 60)); const s = e >= 0 ? '+' : '-'; switch (t) { case 'short': return `${s + m(r, 2)}:${m(n, 2)}`; case 'narrow': return s + r + (n > 0 ? `:${n}` : ''); case 'techie': return s + m(r, 2) + m(n, 2); default: throw new RangeError(`Value format ${t} is out of range for property format`); } } function lt(e) { return r = e, ['hour', 'minute', 'second', 'millisecond'].reduce((e, t) => (e[t] = r[t], e), {}); let r; } const ct = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; const ht = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; const dt = ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']; function mt(e) { switch (e) { case 'narrow': return [...dt]; case 'short': return [...ht]; case 'long': return [...ct]; case 'numeric': return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']; case '2-digit': return ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']; default: return null; } } const ft = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; const yt = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; const gt = ['M', 'T', 'W', 'T', 'F', 'S', 'S']; function vt(e) { switch (e) { case 'narrow': return [...gt]; case 'short': return [...yt]; case 'long': return [...ft]; case 'numeric': return ['1', '2', '3', '4', '5', '6', '7']; default: return null; } } const wt = ['AM', 'PM']; const pt = ['Before Christ', 'Anno Domini']; const Tt = ['BC', 'AD']; const St = ['B', 'A']; function Ot(e) { switch (e) { case 'narrow': return [...St]; case 'short': return [...Tt]; case 'long': return [...pt]; default: return null; } } function bt(e) { return wt[e.hour < 12 ? 0 : 1]; } function kt(e, t) { return vt(t)[e.weekday - 1]; } function Nt(e, t) { return mt(t)[e.month - 1]; } function Mt(e, t) { return Ot(t)[e.year < 0 ? 0 : 1]; } function Dt(e, t, r = 'always', n = !1) { 251 | const s = { 252 | years: ['year', 'yr.'], quarters: ['quarter', 'qtr.'], months: ['month', 'mo.'], weeks: ['week', 'wk.'], days: ['day', 'day', 'days'], hours: ['hour', 'hr.'], minutes: ['minute', 'min.'], seconds: ['second', 'sec.'], 253 | }; var i = ['hours', 'minutes', 'seconds'].indexOf(e) === -1; if (r === 'auto' && i) { const a = e === 'days'; switch (t) { case 1: return a ? 'tomorrow' : `next ${s[e][0]}`; case -1: return a ? 'yesterday' : `last ${s[e][0]}`; case 0: return a ? 'today' : `this ${s[e][0]}`; } } var r = Object.is(t, -0) || t < 0; var i = Math.abs(t); var t = i === 1; const o = s[e]; var n = n ? !t && o[2] || o[1] : t ? s[e][0] : e; return r ? `${i} ${n} ago` : `in ${i} ${n}`; 254 | } function Et(e, t) { let r = ''; for (const n of e)n.literal ? r += n.val : r += t(n.val); return r; } const Vt = { 255 | D: U, DD: $, DDD: W, DDDD: R, t: J, tt: Y, ttt: P, tttt: G, T: B, TT: Q, TTT: K, TTTT: X, f: ee, ff: re, fff: ie, ffff: oe, F: te, FF: ne, FFF: ae, FFFF: ue, 256 | }; class T { 257 | static create(e, t = {}) { return new T(e, t); } 258 | 259 | static parseFormat(t) { let r = null; let n = ''; let s = !1; const i = []; for (let e = 0; e < t.length; e++) { const a = t.charAt(e); a === "'" ? (n.length > 0 && i.push({ literal: s || /^\s+$/.test(n), val: n }), r = null, n = '', s = !s) : s || a === r ? n += a : (n.length > 0 && i.push({ literal: /^\s+$/.test(n), val: n }), n = a, r = a); } return n.length > 0 && i.push({ literal: s || /^\s+$/.test(n), val: n }), i; } 260 | 261 | static macroTokenToFormatOpts(e) { return Vt[e]; } 262 | 263 | constructor(e, t) { this.opts = t, this.loc = e, this.systemLoc = null; } 264 | 265 | formatWithSystemDefault(e, t) { return this.systemLoc === null && (this.systemLoc = this.loc.redefaultToSystem()), this.systemLoc.dtFormatter(e, { ...this.opts, ...t }).format(); } 266 | 267 | formatDateTime(e, t = {}) { return this.loc.dtFormatter(e, { ...this.opts, ...t }).format(); } 268 | 269 | formatDateTimeParts(e, t = {}) { return this.loc.dtFormatter(e, { ...this.opts, ...t }).formatToParts(); } 270 | 271 | formatInterval(e, t = {}) { return this.loc.dtFormatter(e.start, { ...this.opts, ...t }).dtf.formatRange(e.start.toJSDate(), e.end.toJSDate()); } 272 | 273 | resolvedOptions(e, t = {}) { return this.loc.dtFormatter(e, { ...this.opts, ...t }).resolvedOptions(); } 274 | 275 | num(e, t = 0) { let r; return this.opts.forceSimple ? m(e, t) : (r = { ...this.opts }, t > 0 && (r.padTo = t), this.loc.numberFormatter(r).format(e)); } 276 | 277 | formatDateTimeFromString(r, e) { const n = this.loc.listingMode() === 'en'; const t = this.loc.outputCalendar && this.loc.outputCalendar !== 'gregory'; const s = (e, t) => this.loc.extract(r, e, t); const i = (e) => (r.isOffsetFixed && r.offset === 0 && e.allowZ ? 'Z' : r.isValid ? r.zone.formatOffset(r.ts, e.format) : ''); const a = () => (n ? bt(r) : s({ hour: 'numeric', hourCycle: 'h12' }, 'dayperiod')); const o = (e, t) => (n ? Nt(r, e) : s(t ? { month: e } : { month: e, day: 'numeric' }, 'month')); const u = (e, t) => (n ? kt(r, e) : s(t ? { weekday: e } : { weekday: e, month: 'long', day: 'numeric' }, 'weekday')); const l = (e) => { const t = T.macroTokenToFormatOpts(e); return t ? this.formatWithSystemDefault(r, t) : e; }; const c = (e) => (n ? Mt(r, e) : s({ era: e }, 'era')); return Et(T.parseFormat(e), (e) => { switch (e) { case 'S': return this.num(r.millisecond); case 'u': case 'SSS': return this.num(r.millisecond, 3); case 's': return this.num(r.second); case 'ss': return this.num(r.second, 2); case 'uu': return this.num(Math.floor(r.millisecond / 10), 2); case 'uuu': return this.num(Math.floor(r.millisecond / 100)); case 'm': return this.num(r.minute); case 'mm': return this.num(r.minute, 2); case 'h': return this.num(r.hour % 12 == 0 ? 12 : r.hour % 12); case 'hh': return this.num(r.hour % 12 == 0 ? 12 : r.hour % 12, 2); case 'H': return this.num(r.hour); case 'HH': return this.num(r.hour, 2); case 'Z': return i({ format: 'narrow', allowZ: this.opts.allowZ }); case 'ZZ': return i({ format: 'short', allowZ: this.opts.allowZ }); case 'ZZZ': return i({ format: 'techie', allowZ: this.opts.allowZ }); case 'ZZZZ': return r.zone.offsetName(r.ts, { format: 'short', locale: this.loc.locale }); case 'ZZZZZ': return r.zone.offsetName(r.ts, { format: 'long', locale: this.loc.locale }); case 'z': return r.zoneName; case 'a': return a(); case 'd': return t ? s({ day: 'numeric' }, 'day') : this.num(r.day); case 'dd': return t ? s({ day: '2-digit' }, 'day') : this.num(r.day, 2); case 'c': return this.num(r.weekday); case 'ccc': return u('short', !0); case 'cccc': return u('long', !0); case 'ccccc': return u('narrow', !0); case 'E': return this.num(r.weekday); case 'EEE': return u('short', !1); case 'EEEE': return u('long', !1); case 'EEEEE': return u('narrow', !1); case 'L': return t ? s({ month: 'numeric', day: 'numeric' }, 'month') : this.num(r.month); case 'LL': return t ? s({ month: '2-digit', day: 'numeric' }, 'month') : this.num(r.month, 2); case 'LLL': return o('short', !0); case 'LLLL': return o('long', !0); case 'LLLLL': return o('narrow', !0); case 'M': return t ? s({ month: 'numeric' }, 'month') : this.num(r.month); case 'MM': return t ? s({ month: '2-digit' }, 'month') : this.num(r.month, 2); case 'MMM': return o('short', !1); case 'MMMM': return o('long', !1); case 'MMMMM': return o('narrow', !1); case 'y': return t ? s({ year: 'numeric' }, 'year') : this.num(r.year); case 'yy': return t ? s({ year: '2-digit' }, 'year') : this.num(r.year.toString().slice(-2), 2); case 'yyyy': return t ? s({ year: 'numeric' }, 'year') : this.num(r.year, 4); case 'yyyyyy': return t ? s({ year: 'numeric' }, 'year') : this.num(r.year, 6); case 'G': return c('short'); case 'GG': return c('long'); case 'GGGGG': return c('narrow'); case 'kk': return this.num(r.weekYear.toString().slice(-2), 2); case 'kkkk': return this.num(r.weekYear, 4); case 'W': return this.num(r.weekNumber); case 'WW': return this.num(r.weekNumber, 2); case 'o': return this.num(r.ordinal); case 'ooo': return this.num(r.ordinal, 3); case 'q': return this.num(r.quarter); case 'qq': return this.num(r.quarter, 2); case 'X': return this.num(Math.floor(r.ts / 1e3)); case 'x': return this.num(r.ts); default: return l(e); } }); } 278 | 279 | formatDurationFromString(e, t) { const r = (e) => { switch (e[0]) { case 'S': return 'millisecond'; case 's': return 'second'; case 'm': return 'minute'; case 'h': return 'hour'; case 'd': return 'day'; case 'w': return 'week'; case 'M': return 'month'; case 'y': return 'year'; default: return null; } }; const n = T.parseFormat(t); const s = n.reduce((e, { literal: t, val: r }) => (t ? e : e.concat(r)), []); const i = e.shiftTo(...s.map(r).filter((e) => e)); return Et(n, (a = i, (e) => { const t = r(e); return t ? this.num(a.get(t), e.length) : e; })); let a; } 280 | } class S { 281 | constructor(e, t) { this.reason = e, this.explanation = t; } 282 | 283 | toMessage() { return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason; } 284 | }n = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; function a(...e) { e = e.reduce((e, t) => e + t.source, ''); return RegExp(`^${e}$`); } function O(...e) { return (i) => e.reduce(([e, t, r], n) => { var [n, r, s] = n(i, r); return [{ ...e, ...n }, r || t, s]; }, [{}, null, 1]).slice(0, 2); } function b(e, ...t) { if (e != null) for (let[r, n] of t) { r = r.exec(e); if (r) return n(r); } return [null, null]; } function xt(...s) { return (e, t) => { const r = {}; let n; for (n = 0; n < s.length; n++)r[s[n]] = f(e[t + n]); return [r, null, t + n]; }; } var t = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/; var s = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; const It = RegExp(`${s.source}(?:${t.source}?(?:\\[(${n.source})\\])?)?`); const Ct = RegExp(`(?:T${It.source})?`); const Zt = xt('weekYear', 'weekNumber', 'weekDay'); const Ft = xt('year', 'ordinal'); var t = RegExp(`${s.source} ?(?:${t.source}|(${n.source}))?`); var n = RegExp(`(?: ${t.source})?`); function k(e, t, r) { e = e[t]; return w(e) ? r : f(e); } function N(e, t) { 285 | return [{ 286 | hours: k(e, t, 0), minutes: k(e, t + 1, 0), seconds: k(e, t + 2, 0), milliseconds: Be(e[t + 3]), 287 | }, null, t + 4]; 288 | } function Lt(e, t) { const r = !e[t] && !e[t + 1]; var e = it(e[t + 1], e[t + 2]); return [{}, r ? null : d.instance(e), t + 3]; } function zt(e, t) { return [{}, e[t] ? u.create(e[t]) : null, t + 1]; } const At = RegExp(`^T?${s.source}$`); const qt = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; function jt(e) { 289 | var [e, t, r, n, s, i, a, o, u] = e; const l = e[0] === '-'; var e = o && o[0] === '-'; const c = (e, t = !1) => (void 0 !== e && (t || e && l) ? -e : e); return [{ 290 | years: c(p(t)), months: c(p(r)), weeks: c(p(n)), days: c(p(s)), hours: c(p(i)), minutes: c(p(a)), seconds: c(p(o), o === '-0'), milliseconds: c(Be(u), e), 291 | }]; 292 | } const _t = { 293 | GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480, 294 | }; function Ut(e, t, r, n, s, i, a) { 295 | t = { 296 | year: t.length === 2 ? nt(f(t)) : f(t), month: ht.indexOf(r) + 1, day: f(n), hour: f(s), minute: f(i), 297 | }; return a && (t.second = f(a)), e && (t.weekday = e.length > 3 ? ft.indexOf(e) + 1 : yt.indexOf(e) + 1), t; 298 | } const $t = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; function Ht(e) { var [, e, t, r, n, s, i, a, o, u, l, c] = e; var e = Ut(e, n, r, t, s, i, a); let h; return h = o ? _t[o] : u ? 0 : it(l, c), [e, new d(h)]; } const Wt = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; const Rt = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; const Jt = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; function Yt(e) { var [, e, t, r, n, s, i, a] = e; return [Ut(e, n, r, t, s, i, a), d.utcInstance]; } function Pt(e) { var [, e, t, r, n, s, i, a] = e; return [Ut(e, a, t, r, n, s, i), d.utcInstance]; } const Gt = a(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Ct); const Bt = a(/(\d{4})-?W(\d\d)(?:-?(\d))?/, Ct); const Qt = a(/(\d{4})-?(\d{3})/, Ct); const Kt = a(It); const Xt = O((e, t) => [{ year: k(e, t), month: k(e, t + 1, 1), day: k(e, t + 2, 1) }, null, t + 3], N, Lt, zt); const er = O(Zt, N, Lt, zt); const tr = O(Ft, N, Lt, zt); const rr = O(N, Lt, zt); function nr(e) { return b(e, [Gt, Xt], [Bt, er], [Qt, tr], [Kt, rr]); } function sr(e) { return b(e.replace(/\([^()]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(), [$t, Ht]); } function ir(e) { return b(e, [Wt, Yt], [Rt, Yt], [Jt, Pt]); } function ar(e) { return b(e, [qt, jt]); } const or = O(N); function ur(e) { return b(e, [At, or]); } const lr = a(/(\d{4})-(\d\d)-(\d\d)/, n); const cr = a(t); const hr = O(N, Lt, zt); function dr(e) { return b(e, [lr, Xt], [cr, hr]); } const mr = { 299 | weeks: { 300 | days: 7, hours: 168, minutes: 10080, seconds: 604800, milliseconds: 6048e5, 301 | }, 302 | days: { 303 | hours: 24, minutes: 1440, seconds: 86400, milliseconds: 864e5, 304 | }, 305 | hours: { minutes: 60, seconds: 3600, milliseconds: 36e5 }, 306 | minutes: { seconds: 60, milliseconds: 6e4 }, 307 | seconds: { milliseconds: 1e3 }, 308 | }; const fr = { 309 | years: { 310 | quarters: 4, months: 12, weeks: 52, days: 365, hours: 8760, minutes: 525600, seconds: 31536e3, milliseconds: 31536e6, 311 | }, 312 | quarters: { 313 | months: 3, weeks: 13, days: 91, hours: 2184, minutes: 131040, seconds: 7862400, milliseconds: 78624e5, 314 | }, 315 | months: { 316 | weeks: 4, days: 30, hours: 720, minutes: 43200, seconds: 2592e3, milliseconds: 2592e6, 317 | }, 318 | ...mr, 319 | }; const M = 365.2425; const yr = 30.436875; const gr = { 320 | years: { 321 | quarters: 4, months: 12, weeks: M / 7, days: M, hours: 24 * M, minutes: 525949.2, seconds: 525949.2 * 60, milliseconds: 525949.2 * 60 * 1e3, 322 | }, 323 | quarters: { 324 | months: 3, weeks: M / 28, days: M / 4, hours: 24 * M / 4, minutes: 131487.3, seconds: 525949.2 * 60 / 4, milliseconds: 7889237999.999999, 325 | }, 326 | months: { 327 | weeks: yr / 7, days: yr, hours: 24 * yr, minutes: 43829.1, seconds: 2629746, milliseconds: 2629746e3, 328 | }, 329 | ...mr, 330 | }; const D = ['years', 'quarters', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds']; const vr = D.slice(0).reverse(); function E(e, t, r = !1) { 331 | r = { 332 | values: r ? t.values : { ...e.values, ...t.values || {} }, loc: e.loc.clone(t.loc), conversionAccuracy: t.conversionAccuracy || e.conversionAccuracy, matrix: t.matrix || e.matrix, 333 | }; return new V(r); 334 | } function wr(e, t, r, n, s) { var e = e[s][r]; const i = t[r] / e; var a = !(Math.sign(i) === Math.sign(n[s])) && n[s] !== 0 && Math.abs(i) <= 1 ? (a = i) < 0 ? Math.floor(a) : Math.ceil(a) : Math.trunc(i); n[s] += a, t[r] -= a * e; } function pr(r, n) { vr.reduce((e, t) => (w(n[t]) ? e : (e && wr(r, n, e, n, t), t)), null); } function Tr(e) { let t; let r; const n = {}; for ([t, r] of Object.entries(e))r !== 0 && (n[t] = r); return n; } class V { 335 | constructor(e) { const t = e.conversionAccuracy === 'longterm' || !1; let r = t ? gr : fr; e.matrix && (r = e.matrix), this.values = e.values, this.loc = e.loc || y.create(), this.conversionAccuracy = t ? 'longterm' : 'casual', this.invalid = e.invalid || null, this.matrix = r, this.isLuxonDuration = !0; } 336 | 337 | static fromMillis(e, t) { return V.fromObject({ milliseconds: e }, t); } 338 | 339 | static fromObject(e, t = {}) { 340 | if (e == null || typeof e !== 'object') throw new o(`Duration.fromObject: argument expected to be an object, got ${e === null ? 'null' : typeof e}`); return new V({ 341 | values: ot(e, V.normalizeUnit), loc: y.fromObject(t), conversionAccuracy: t.conversionAccuracy, matrix: t.matrix, 342 | }); 343 | } 344 | 345 | static fromDurationLike(e) { if (c(e)) return V.fromMillis(e); if (V.isDuration(e)) return e; if (typeof e === 'object') return V.fromObject(e); throw new o(`Unknown duration argument ${e} of type ${typeof e}`); } 346 | 347 | static fromISO(e, t) { const [r] = ar(e); return r ? V.fromObject(r, t) : V.invalid('unparsable', `the input "${e}" can't be parsed as ISO 8601`); } 348 | 349 | static fromISOTime(e, t) { const [r] = ur(e); return r ? V.fromObject(r, t) : V.invalid('unparsable', `the input "${e}" can't be parsed as ISO 8601`); } 350 | 351 | static invalid(e, t = null) { if (!e) throw new o('need to specify a reason the Duration is invalid'); e = e instanceof S ? e : new S(e, t); if (v.throwOnInvalid) throw new q(e); return new V({ invalid: e }); } 352 | 353 | static normalizeUnit(e) { 354 | const t = { 355 | year: 'years', years: 'years', quarter: 'quarters', quarters: 'quarters', month: 'months', months: 'months', week: 'weeks', weeks: 'weeks', day: 'days', days: 'days', hour: 'hours', hours: 'hours', minute: 'minutes', minutes: 'minutes', second: 'seconds', seconds: 'seconds', millisecond: 'milliseconds', milliseconds: 'milliseconds', 356 | }[e && e.toLowerCase()]; if (t) return t; throw new _(e); 357 | } 358 | 359 | static isDuration(e) { return e && e.isLuxonDuration || !1; } 360 | 361 | get locale() { return this.isValid ? this.loc.locale : null; } 362 | 363 | get numberingSystem() { return this.isValid ? this.loc.numberingSystem : null; } 364 | 365 | toFormat(e, t = {}) { t = { ...t, floor: !1 !== t.round && !1 !== t.floor }; return this.isValid ? T.create(this.loc, t).formatDurationFromString(this, e) : 'Invalid Duration'; } 366 | 367 | toHuman(r = {}) { 368 | const e = D.map((e) => { 369 | const t = this.values[e]; return w(t) ? null : this.loc.numberFormatter({ 370 | style: 'unit', unitDisplay: 'long', ...r, unit: e.slice(0, -1), 371 | }).format(t); 372 | }).filter((e) => e); return this.loc.listFormatter({ type: 'conjunction', style: r.listStyle || 'narrow', ...r }).format(e); 373 | } 374 | 375 | toObject() { return this.isValid ? { ...this.values } : {}; } 376 | 377 | toISO() { if (!this.isValid) return null; let e = 'P'; return this.years !== 0 && (e += `${this.years}Y`), this.months === 0 && this.quarters === 0 || (e += `${this.months + 3 * this.quarters}M`), this.weeks !== 0 && (e += `${this.weeks}W`), this.days !== 0 && (e += `${this.days}D`), this.hours === 0 && this.minutes === 0 && this.seconds === 0 && this.milliseconds === 0 || (e += 'T'), this.hours !== 0 && (e += `${this.hours}H`), this.minutes !== 0 && (e += `${this.minutes}M`), this.seconds === 0 && this.milliseconds === 0 || (e += `${Qe(this.seconds + this.milliseconds / 1e3, 3)}S`), e === 'P' && (e += 'T0S'), e; } 378 | 379 | toISOTime(e = {}) { 380 | if (!this.isValid) return null; let t = this.toMillis(); if (t < 0 || t >= 864e5) return null; e = { 381 | suppressMilliseconds: !1, suppressSeconds: !1, includePrefix: !1, format: 'extended', ...e, 382 | }; t = this.shiftTo('hours', 'minutes', 'seconds', 'milliseconds'); let r = e.format === 'basic' ? 'hhmm' : 'hh:mm'; let n = (e.suppressSeconds && t.seconds === 0 && t.milliseconds === 0 || (r += e.format === 'basic' ? 'ss' : ':ss', e.suppressMilliseconds && t.milliseconds === 0) || (r += '.SSS'), t.toFormat(r)); return n = e.includePrefix ? `T${n}` : n; 383 | } 384 | 385 | toJSON() { return this.toISO(); } 386 | 387 | toString() { return this.toISO(); } 388 | 389 | toMillis() { return this.as('milliseconds'); } 390 | 391 | valueOf() { return this.toMillis(); } 392 | 393 | plus(e) { if (!this.isValid) return this; const t = V.fromDurationLike(e); const r = {}; for (const n of D)(l(t.values, n) || l(this.values, n)) && (r[n] = t.get(n) + this.get(n)); return E(this, { values: r }, !0); } 394 | 395 | minus(e) { return this.isValid ? (e = V.fromDurationLike(e), this.plus(e.negate())) : this; } 396 | 397 | mapUnits(e) { if (!this.isValid) return this; const t = {}; for (const r of Object.keys(this.values))t[r] = at(e(this.values[r], r)); return E(this, { values: t }, !0); } 398 | 399 | get(e) { return this[V.normalizeUnit(e)]; } 400 | 401 | set(e) { return this.isValid ? E(this, { values: { ...this.values, ...ot(e, V.normalizeUnit) } }) : this; } 402 | 403 | reconfigure({ 404 | locale: e, numberingSystem: t, conversionAccuracy: r, matrix: n, 405 | } = {}) { e = this.loc.clone({ locale: e, numberingSystem: t }); return E(this, { loc: e, matrix: n, conversionAccuracy: r }); } 406 | 407 | as(e) { return this.isValid ? this.shiftTo(e).get(e) : NaN; } 408 | 409 | normalize() { let e; return this.isValid ? (e = this.toObject(), pr(this.matrix, e), E(this, { values: e }, !0)) : this; } 410 | 411 | rescale() { let e; return this.isValid ? (e = Tr(this.normalize().shiftToAll().toObject()), E(this, { values: e }, !0)) : this; } 412 | 413 | shiftTo(...e) { if (!this.isValid) return this; if (e.length === 0) return this; e = e.map((e) => V.normalizeUnit(e)); const t = {}; const r = {}; const n = this.toObject(); let s; for (const a of D) if (e.indexOf(a) >= 0) { s = a; let e = 0; for (const o in r)e += this.matrix[o][a] * r[o], r[o] = 0; c(n[a]) && (e += n[a]); const i = Math.trunc(e); t[a] = i, r[a] = (1e3 * e - 1e3 * i) / 1e3; for (const u in n)D.indexOf(u) > D.indexOf(a) && wr(this.matrix, n, u, t, a); } else c(n[a]) && (r[a] = n[a]); for (const l in r)r[l] !== 0 && (t[s] += l === s ? r[l] : r[l] / this.matrix[s][l]); return E(this, { values: t }, !0).normalize(); } 414 | 415 | shiftToAll() { return this.isValid ? this.shiftTo('years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds') : this; } 416 | 417 | negate() { if (!this.isValid) return this; const e = {}; for (const t of Object.keys(this.values))e[t] = this.values[t] === 0 ? 0 : -this.values[t]; return E(this, { values: e }, !0); } 418 | 419 | get years() { return this.isValid ? this.values.years || 0 : NaN; } 420 | 421 | get quarters() { return this.isValid ? this.values.quarters || 0 : NaN; } 422 | 423 | get months() { return this.isValid ? this.values.months || 0 : NaN; } 424 | 425 | get weeks() { return this.isValid ? this.values.weeks || 0 : NaN; } 426 | 427 | get days() { return this.isValid ? this.values.days || 0 : NaN; } 428 | 429 | get hours() { return this.isValid ? this.values.hours || 0 : NaN; } 430 | 431 | get minutes() { return this.isValid ? this.values.minutes || 0 : NaN; } 432 | 433 | get seconds() { return this.isValid ? this.values.seconds || 0 : NaN; } 434 | 435 | get milliseconds() { return this.isValid ? this.values.milliseconds || 0 : NaN; } 436 | 437 | get isValid() { return this.invalid === null; } 438 | 439 | get invalidReason() { return this.invalid ? this.invalid.reason : null; } 440 | 441 | get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } 442 | 443 | equals(e) { if (!this.isValid || !e.isValid) return !1; if (!this.loc.equals(e.loc)) return !1; for (const n of D) if (t = this.values[n], r = e.values[n], !(void 0 === t || t === 0 ? void 0 === r || r === 0 : t === r)) return !1; let t; let r; return !0; } 444 | } const Sr = 'Invalid Interval'; function Or(e, t) { return e && e.isValid ? t && t.isValid ? t < e ? x.invalid('end before start', `The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`) : null : x.invalid('missing or invalid end') : x.invalid('missing or invalid start'); } class x { 445 | constructor(e) { this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0; } 446 | 447 | static invalid(e, t = null) { if (!e) throw new o('need to specify a reason the Interval is invalid'); e = e instanceof S ? e : new S(e, t); if (v.throwOnInvalid) throw new A(e); return new x({ invalid: e }); } 448 | 449 | static fromDateTimes(e, t) { var e = kn(e); var t = kn(t); const r = Or(e, t); return r == null ? new x({ start: e, end: t }) : r; } 450 | 451 | static after(e, t) { t = V.fromDurationLike(t), e = kn(e); return x.fromDateTimes(e, e.plus(t)); } 452 | 453 | static before(e, t) { t = V.fromDurationLike(t), e = kn(e); return x.fromDateTimes(e.minus(t), e); } 454 | 455 | static fromISO(e, s) { const [i, a] = (e || '').split('/', 2); if (i && a) { let e; let t; try { e = L.fromISO(i, s), t = e.isValid; } catch (a) { t = !1; }let r; let n; try { r = L.fromISO(a, s), n = r.isValid; } catch (a) { n = !1; } if (t && n) return x.fromDateTimes(e, r); if (t) { var o = V.fromISO(a, s); if (o.isValid) return x.after(e, o); } else if (n) { o = V.fromISO(i, s); if (o.isValid) return x.before(r, o); } } return x.invalid('unparsable', `the input "${e}" can't be parsed as ISO 8601`); } 456 | 457 | static isInterval(e) { return e && e.isLuxonInterval || !1; } 458 | 459 | get start() { return this.isValid ? this.s : null; } 460 | 461 | get end() { return this.isValid ? this.e : null; } 462 | 463 | get isValid() { return this.invalidReason === null; } 464 | 465 | get invalidReason() { return this.invalid ? this.invalid.reason : null; } 466 | 467 | get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } 468 | 469 | length(e = 'milliseconds') { return this.isValid ? this.toDuration(e).get(e) : NaN; } 470 | 471 | count(e = 'milliseconds') { let t; let r; return this.isValid ? (t = this.start.startOf(e), r = this.end.startOf(e), Math.floor(r.diff(t, e).get(e)) + (r.valueOf() !== this.end.valueOf())) : NaN; } 472 | 473 | hasSame(e) { return !!this.isValid && (this.isEmpty() || this.e.minus(1).hasSame(this.s, e)); } 474 | 475 | isEmpty() { return this.s.valueOf() === this.e.valueOf(); } 476 | 477 | isAfter(e) { return !!this.isValid && this.s > e; } 478 | 479 | isBefore(e) { return !!this.isValid && this.e <= e; } 480 | 481 | contains(e) { return !!this.isValid && this.s <= e && this.e > e; } 482 | 483 | set({ start: e, end: t } = {}) { return this.isValid ? x.fromDateTimes(e || this.s, t || this.e) : this; } 484 | 485 | splitAt(...e) { 486 | if (!this.isValid) return []; const t = e.map(kn).filter((e) => this.contains(e)).sort(); const r = []; let n = this.s; let 487 | s = 0; for (;n < this.e;) { var i = t[s] || this.e; var i = +i > +this.e ? this.e : i; r.push(x.fromDateTimes(n, i)), n = i, s += 1; } return r; 488 | } 489 | 490 | splitBy(e) { 491 | const t = V.fromDurationLike(e); if (!this.isValid || !t.isValid || t.as('milliseconds') === 0) return []; let r = this.s; let n = 1; let 492 | s; for (var i = []; r < this.e;) { const a = this.start.plus(t.mapUnits((e) => e * n)); s = +a > +this.e ? this.e : a, i.push(x.fromDateTimes(r, s)), r = s, n += 1; } return i; 493 | } 494 | 495 | divideEqually(e) { return this.isValid ? this.splitBy(this.length() / e).slice(0, e) : []; } 496 | 497 | overlaps(e) { return this.e > e.s && this.s < e.e; } 498 | 499 | abutsStart(e) { return !!this.isValid && +this.e == +e.s; } 500 | 501 | abutsEnd(e) { return !!this.isValid && +e.e == +this.s; } 502 | 503 | engulfs(e) { return !!this.isValid && this.s <= e.s && this.e >= e.e; } 504 | 505 | equals(e) { return !(!this.isValid || !e.isValid) && this.s.equals(e.s) && this.e.equals(e.e); } 506 | 507 | intersection(e) { let t; return this.isValid ? (t = (this.s > e.s ? this : e).s, (e = (this.e < e.e ? this : e).e) <= t ? null : x.fromDateTimes(t, e)) : this; } 508 | 509 | union(e) { let t; return this.isValid ? (t = (this.s < e.s ? this : e).s, e = (this.e > e.e ? this : e).e, x.fromDateTimes(t, e)) : this; } 510 | 511 | static merge(e) { var [e, t] = e.sort((e, t) => e.s - t.s).reduce(([e, t], r) => (t ? t.overlaps(r) || t.abutsStart(r) ? [e, t.union(r)] : [e.concat([t]), r] : [e, r]), [[], null]); return t && e.push(t), e; } 512 | 513 | static xor(e) { let t = null; let r = 0; const n = []; var e = e.map((e) => [{ time: e.s, type: 's' }, { time: e.e, type: 'e' }]); for (const s of Array.prototype.concat(...e).sort((e, t) => e.time - t.time))r += s.type === 's' ? 1 : -1, t = r === 1 ? s.time : (t && +t != +s.time && n.push(x.fromDateTimes(t, s.time)), null); return x.merge(n); } 514 | 515 | difference(...e) { return x.xor([this].concat(e)).map((e) => this.intersection(e)).filter((e) => e && !e.isEmpty()); } 516 | 517 | toString() { return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : Sr; } 518 | 519 | toLocaleString(e = U, t = {}) { return this.isValid ? T.create(this.s.loc.clone(t), e).formatInterval(this) : Sr; } 520 | 521 | toISO(e) { return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : Sr; } 522 | 523 | toISODate() { return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : Sr; } 524 | 525 | toISOTime(e) { return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : Sr; } 526 | 527 | toFormat(e, { separator: t = ' – ' } = {}) { return this.isValid ? `${this.s.toFormat(e)}${t}${this.e.toFormat(e)}` : Sr; } 528 | 529 | toDuration(e, t) { return this.isValid ? this.e.diff(this.s, e, t) : V.invalid(this.invalidReason); } 530 | 531 | mapEndpoints(e) { return x.fromDateTimes(e(this.s), e(this.e)); } 532 | } class br { 533 | static hasDST(e = v.defaultZone) { const t = L.now().setZone(e).set({ month: 12 }); return !e.isUniversal && t.offset !== t.set({ month: 6 }).offset; } 534 | 535 | static isValidIANAZone(e) { return u.isValidZone(e); } 536 | 537 | static normalizeZone(e) { return g(e, v.defaultZone); } 538 | 539 | static months(e = 'long', { 540 | locale: t = null, numberingSystem: r = null, locObj: n = null, outputCalendar: s = 'gregory', 541 | } = {}) { return (n || y.create(t, r, s)).months(e); } 542 | 543 | static monthsFormat(e = 'long', { 544 | locale: t = null, numberingSystem: r = null, locObj: n = null, outputCalendar: s = 'gregory', 545 | } = {}) { return (n || y.create(t, r, s)).months(e, !0); } 546 | 547 | static weekdays(e = 'long', { locale: t = null, numberingSystem: r = null, locObj: n = null } = {}) { return (n || y.create(t, r, null)).weekdays(e); } 548 | 549 | static weekdaysFormat(e = 'long', { locale: t = null, numberingSystem: r = null, locObj: n = null } = {}) { return (n || y.create(t, r, null)).weekdays(e, !0); } 550 | 551 | static meridiems({ locale: e = null } = {}) { return y.create(e).meridiems(); } 552 | 553 | static eras(e = 'short', { locale: t = null } = {}) { return y.create(t, null, 'gregory').eras(e); } 554 | 555 | static features() { return { relative: Ye() }; } 556 | } function kr(e, t) { const r = (e) => e.toUTC(0, { keepLocalTime: !0 }).startOf('day').valueOf(); var t = r(t) - r(e); return Math.floor(V.fromMillis(t).as('days')); } function Nr(e, t, r, n) { let[s, i, a, o] = (function (e, t, r) { let n; let s; const i = {}; const a = e; let o; let u; for ([n, s] of [['years', (e, t) => t.year - e.year], ['quarters', (e, t) => t.quarter - e.quarter + 4 * (t.year - e.year)], ['months', (e, t) => t.month - e.month + 12 * (t.year - e.year)], ['weeks', (e, t) => { e = kr(e, t); return (e - e % 7) / 7; }], ['days', kr]])r.indexOf(n) >= 0 && (i[o = n] = s(e, t), e = (u = a.plus(i)) > t ? (i[n]--, a.plus(i)) : u); return [e, i, u, o]; }(e, t, r)); e = t - s, r = r.filter((e) => ['hours', 'minutes', 'seconds', 'milliseconds'].indexOf(e) >= 0), r.length === 0 && (a = a < t ? s.plus({ [o]: 1 }) : a) !== s && (i[o] = (i[o] || 0) + e / (a - s)), t = V.fromObject(i, n); return r.length > 0 ? V.fromMillis(e, n).shiftTo(...r).plus(t) : t; } const Mr = { 557 | arab: '[٠-٩]', arabext: '[۰-۹]', bali: '[᭐-᭙]', beng: '[০-৯]', deva: '[०-९]', fullwide: '[0-9]', gujr: '[૦-૯]', hanidec: '[〇|一|二|三|四|五|六|七|八|九]', khmr: '[០-៩]', knda: '[೦-೯]', laoo: '[໐-໙]', limb: '[᥆-᥏]', mlym: '[൦-൯]', mong: '[᠐-᠙]', mymr: '[၀-၉]', orya: '[୦-୯]', tamldec: '[௦-௯]', telu: '[౦-౯]', thai: '[๐-๙]', tibt: '[༠-༩]', latn: '\\d', 558 | }; const Dr = { 559 | arab: [1632, 1641], arabext: [1776, 1785], bali: [6992, 7001], beng: [2534, 2543], deva: [2406, 2415], fullwide: [65296, 65303], gujr: [2790, 2799], khmr: [6112, 6121], knda: [3302, 3311], laoo: [3792, 3801], limb: [6470, 6479], mlym: [3430, 3439], mong: [6160, 6169], mymr: [4160, 4169], orya: [2918, 2927], tamldec: [3046, 3055], telu: [3174, 3183], thai: [3664, 3673], tibt: [3872, 3881], 560 | }; const Er = Mr.hanidec.replace(/[\[|\]]/g, '').split(''); function I({ numberingSystem: e }, t = '') { return new RegExp(`${Mr[e || 'latn']}${t}`); } const Vr = 'missing Intl.DateTimeFormat.formatToParts support'; function C(e, t = (e) => e) { return { regex: e, deser: ([e]) => t(function (t) { let r = parseInt(t, 10); if (isNaN(r)) { r = ''; for (let e = 0; e < t.length; e++) { const n = t.charCodeAt(e); if (t[e].search(Mr.hanidec) !== -1)r += Er.indexOf(t[e]); else for (const a in Dr) { const [s, i] = Dr[a]; s <= n && n <= i && (r += n - s); } } return parseInt(r, 10); } return r; }(e)) }; } const xr = `[ ${String.fromCharCode(160)}]`; const Ir = new RegExp(xr, 'g'); function Cr(e) { return e.replace(/\./g, '\\.?').replace(Ir, xr); } function Zr(e) { return e.replace(/\./g, '').replace(Ir, ' ').toLowerCase(); } function Z(e, r) { return e === null ? null : { regex: RegExp(e.map(Cr).join('|')), deser: ([t]) => e.findIndex((e) => Zr(t) === Zr(e)) + r }; } function Fr(e, t) { return { regex: e, deser: ([, e, t]) => it(e, t), groups: t }; } function Lr(e) { return { regex: e, deser: ([e]) => e }; } const zr = { 561 | year: { '2-digit': 'yy', numeric: 'yyyyy' }, 562 | month: { 563 | numeric: 'M', '2-digit': 'MM', short: 'MMM', long: 'MMMM', 564 | }, 565 | day: { numeric: 'd', '2-digit': 'dd' }, 566 | weekday: { short: 'EEE', long: 'EEEE' }, 567 | dayperiod: 'a', 568 | dayPeriod: 'a', 569 | hour: { numeric: 'h', '2-digit': 'hh' }, 570 | minute: { numeric: 'm', '2-digit': 'mm' }, 571 | second: { numeric: 's', '2-digit': 'ss' }, 572 | timeZoneName: { long: 'ZZZZZ', short: 'ZZZ' }, 573 | }; let Ar = null; function qr(e, r) { return Array.prototype.concat(...e.map((e) => { return t = r, (e = e).literal || (t = Ur(T.macroTokenToFormatOpts(e.val), t)) == null || t.includes(void 0) ? e : t; let t; })); } function jr(y, e, t) { 574 | var t = qr(T.parseFormat(t), y); var r = t.map((e) => { { const t = e; const r = y; const n = I(r); const s = I(r, '{2}'); const i = I(r, '{3}'); const a = I(r, '{4}'); const o = I(r, '{6}'); const u = I(r, '{1,2}'); const l = I(r, '{1,3}'); const c = I(r, '{1,6}'); const h = I(r, '{1,9}'); const d = I(r, '{2,4}'); const m = I(r, '{4,6}'); const f = (e) => ({ regex: RegExp(e.val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')), deser: ([e]) => e, literal: !0 }); return (e = ((e) => { if (t.literal) return f(e); switch (e.val) { case 'G': return Z(r.eras('short', !1), 0); case 'GG': return Z(r.eras('long', !1), 0); case 'y': return C(c); case 'yy': return C(d, nt); case 'yyyy': return C(a); case 'yyyyy': return C(m); case 'yyyyyy': return C(o); case 'M': return C(u); case 'MM': return C(s); case 'MMM': return Z(r.months('short', !0, !1), 1); case 'MMMM': return Z(r.months('long', !0, !1), 1); case 'L': return C(u); case 'LL': return C(s); case 'LLL': return Z(r.months('short', !1, !1), 1); case 'LLLL': return Z(r.months('long', !1, !1), 1); case 'd': return C(u); case 'dd': return C(s); case 'o': return C(l); case 'ooo': return C(i); case 'HH': return C(s); case 'H': return C(u); case 'hh': return C(s); case 'h': return C(u); case 'mm': return C(s); case 'm': case 'q': return C(u); case 'qq': return C(s); case 's': return C(u); case 'ss': return C(s); case 'S': return C(l); case 'SSS': return C(i); case 'u': return Lr(h); case 'uu': return Lr(u); case 'uuu': return C(n); case 'a': return Z(r.meridiems(), 0); case 'kkkk': return C(a); case 'kk': return C(d, nt); case 'W': return C(u); case 'WW': return C(s); case 'E': case 'c': return C(n); case 'EEE': return Z(r.weekdays('short', !1, !1), 1); case 'EEEE': return Z(r.weekdays('long', !1, !1), 1); case 'ccc': return Z(r.weekdays('short', !0, !1), 1); case 'cccc': return Z(r.weekdays('long', !0, !1), 1); case 'Z': case 'ZZ': return Fr(new RegExp(`([+-]${u.source})(?::(${s.source}))?`), 2); case 'ZZZ': return Fr(new RegExp(`([+-]${u.source})(${s.source})?`), 2); case 'z': return Lr(/[a-z_+-/]{1,256}?/i); case ' ': return Lr(/[^\S\n\r]/); default: return f(e); } })(t) || { invalidReason: Vr }).token = t, e; } }); var n = r.find((e) => e.invalidReason); if (n) return { input: e, tokens: t, invalidReason: n.invalidReason }; var [r, n] = [`^${(n = r).map((e) => e.regex).reduce((e, t) => `${e}(${t.source})`, '')}$`, n]; var r = RegExp(r, 'i'); var [n, s] = (function (e, t, r) { const n = e.match(t); if (n) { let s; let i; const a = {}; let e = 1; for (const o in r)l(r, o) && (i = (s = r[o]).groups ? s.groups + 1 : 1, !s.literal && s.token && (a[s.token.val[0]] = s.deser(n.slice(e, e + i))), e += i); return [n, a]; } return [n, {}]; }(e, r, n)); const [i, a, o] = s ? (function (n) { let e = null; let t; return w(n.z) || (e = u.create(n.z)), w(n.Z) || (e = e || new d(n.Z), t = n.Z), w(n.q) || (n.M = 3 * (n.q - 1) + 1), w(n.h) || (n.h < 12 && n.a === 1 ? n.h += 12 : n.h === 12 && n.a === 0 && (n.h = 0)), n.G === 0 && n.y && (n.y = -n.y), w(n.u) || (n.S = Be(n.u)), [Object.keys(n).reduce((e, t) => { const r = ((e) => { switch (e) { case 'S': return 'millisecond'; case 's': return 'second'; case 'm': return 'minute'; case 'h': case 'H': return 'hour'; case 'd': return 'day'; case 'o': return 'ordinal'; case 'L': case 'M': return 'month'; case 'y': return 'year'; case 'E': case 'c': return 'weekday'; case 'W': return 'weekNumber'; case 'k': return 'weekYear'; case 'q': return 'quarter'; default: return null; } })(t); return r && (e[r] = n[t]), e; }, {}), e, t]; }(s)) : [null, null, void 0]; if (l(s, 'a') && l(s, 'H')) throw new j("Can't include meridiem when specifying 24-hour format"); return { 575 | input: e, tokens: t, regex: r, rawMatches: n, matches: s, result: i, zone: a, specificOffset: o, 576 | }; 577 | } function _r(e, t, r) { 578 | var { 579 | result: e, zone: t, specificOffset: r, invalidReason: n, 580 | } = jr(e, t, r); return [e, t, r, n]; 581 | } function Ur(i, e) { return i ? T.create(e, i).formatDateTimeParts(Ar = Ar || L.fromMillis(1555555555555)).map((t) => { { const r = i; var { type: t, value: n } = t; if (t === 'literal') return { literal: !(s = /^\s+$/.test(n)), val: s ? ' ' : n }; var s = r[t]; let e = zr[t]; return (e = typeof e === 'object' ? e[s] : e) ? { literal: !1, val: e } : void 0; } }) : null; } const $r = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; const Hr = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; function F(e, t) { return new S('unit out of range', `you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`); } function Wr(e, t, r) { t = new Date(Date.UTC(e, t - 1, r)), e < 100 && e >= 0 && t.setUTCFullYear(t.getUTCFullYear() - 1900), r = t.getUTCDay(); return r === 0 ? 7 : r; } function Rr(e, t, r) { return r + (Ke(e) ? Hr : $r)[t - 1]; } function Jr(e, t) { var e = Ke(e) ? Hr : $r; const r = e.findIndex((e) => e < t); return { month: r + 1, day: t - e[r] }; } function Yr(e) { 582 | var { year: t, month: r, day: n } = e; const s = Rr(t, r, n); var r = Wr(t, r, n); let i = Math.floor((s - r + 10) / 7); let a; return i < 1 ? (a = t - 1, i = rt(a)) : i > rt(t) ? (a = t + 1, i = 1) : a = t, { 583 | weekYear: a, weekNumber: i, weekday: r, ...lt(e), 584 | }; 585 | } function Pr(e) { 586 | var { weekYear: t, weekNumber: r, weekday: n } = e; const s = Wr(t, 1, 4); const i = Xe(t); let a = 7 * r + n - s - 3; let o; a < 1 ? (o = t - 1, a += Xe(o)) : a > i ? (o = t + 1, a -= Xe(t)) : o = t; var { month: r, day: n } = Jr(o, a); return { 587 | year: o, month: r, day: n, ...lt(e), 588 | }; 589 | } function Gr(e) { const { year: t, month: r, day: n } = e; return { year: t, ordinal: Rr(t, r, n), ...lt(e) }; } function Br(e) { 590 | var { year: t, ordinal: r } = e; var { month: r, day: n } = Jr(t, r); return { 591 | year: t, month: r, day: n, ...lt(e), 592 | }; 593 | } function Qr(e) { const t = Re(e.weekYear); const r = h(e.weekNumber, 1, rt(e.weekYear)); const n = h(e.weekday, 1, 7); return t ? r ? !n && F('weekday', e.weekday) : F('week', e.week) : F('weekYear', e.weekYear); } function Kr(e) { const t = Re(e.year); const r = h(e.ordinal, 1, Xe(e.year)); return t ? !r && F('ordinal', e.ordinal) : F('year', e.year); } function Xr(e) { const t = Re(e.year); const r = h(e.month, 1, 12); const n = h(e.day, 1, et(e.year, e.month)); return t ? r ? !n && F('day', e.day) : F('month', e.month) : F('year', e.year); } function en(e) { 594 | var { 595 | hour: e, minute: t, second: r, millisecond: n, 596 | } = e; const s = h(e, 0, 23) || e === 24 && t === 0 && r === 0 && n === 0; const i = h(t, 0, 59); const a = h(r, 0, 59); const o = h(n, 0, 999); return s ? i ? a ? !o && F('millisecond', n) : F('second', r) : F('minute', t) : F('hour', e); 597 | } const tn = 'Invalid DateTime'; function rn(e) { return new S('unsupported zone', `the zone "${e.name}" is not supported`); } function nn(e) { return e.weekData === null && (e.weekData = Yr(e.c)), e.weekData; } function sn(e, t) { 598 | e = { 599 | ts: e.ts, zone: e.zone, c: e.c, o: e.o, loc: e.loc, invalid: e.invalid, 600 | }; return new L({ ...e, ...t, old: e }); 601 | } function an(e, t, r) { let n = e - 60 * t * 1e3; const s = r.offset(n); return t === s ? [n, t] : s === (r = r.offset(n -= 60 * (s - t) * 1e3)) ? [n, s] : [e - 60 * Math.min(s, r) * 1e3, Math.max(s, r)]; } function on(e, t) { 602 | e += 60 * t * 1e3; t = new Date(e); return { 603 | year: t.getUTCFullYear(), month: t.getUTCMonth() + 1, day: t.getUTCDate(), hour: t.getUTCHours(), minute: t.getUTCMinutes(), second: t.getUTCSeconds(), millisecond: t.getUTCMilliseconds(), 604 | }; 605 | } function un(e, t, r) { return an(tt(e), t, r); } function ln(e, t) { 606 | const r = e.o; var n = e.c.year + Math.trunc(t.years); var s = e.c.month + Math.trunc(t.months) + 3 * Math.trunc(t.quarters); var n = { 607 | ...e.c, year: n, month: s, day: Math.min(e.c.day, et(n, s)) + Math.trunc(t.days) + 7 * Math.trunc(t.weeks), 608 | }; var s = V.fromObject({ 609 | years: t.years - Math.trunc(t.years), quarters: t.quarters - Math.trunc(t.quarters), months: t.months - Math.trunc(t.months), weeks: t.weeks - Math.trunc(t.weeks), days: t.days - Math.trunc(t.days), hours: t.hours, minutes: t.minutes, seconds: t.seconds, milliseconds: t.milliseconds, 610 | }).as('milliseconds'); let[i, a] = an(tt(n), r, e.zone); return s !== 0 && (i += s, a = e.zone.offset(i)), { ts: i, o: a }; 611 | } function cn(e, t, r, n, s, i) { const { setZone: a, zone: o } = r; return e && Object.keys(e).length !== 0 || t ? (t = t || o, e = L.fromObject(e, { ...r, zone: t, specificOffset: i }), a ? e : e.setZone(o)) : L.invalid(new S('unparsable', `the input "${s}" can't be parsed as ${n}`)); } function hn(e, t, r = !0) { return e.isValid ? T.create(y.create('en-US'), { allowZ: r, forceSimple: !0 }).formatDateTimeFromString(e, t) : null; } function dn(e, t) { const r = e.c.year > 9999 || e.c.year < 0; let n = ''; return r && e.c.year >= 0 && (n += '+'), n += m(e.c.year, r ? 6 : 4), n = t ? (n = `${(n += '-') + m(e.c.month)}-`) + m(e.c.day) : (n += m(e.c.month)) + m(e.c.day); } function mn(e, t, r, n, s, i) { let a = m(e.c.hour); return t ? (a = (a += ':') + m(e.c.minute), e.c.second === 0 && r || (a += ':')) : a += m(e.c.minute), e.c.second === 0 && r || (a += m(e.c.second), e.c.millisecond === 0 && n) || (a = (a += '.') + m(e.c.millisecond, 3)), s && (e.isOffsetFixed && e.offset === 0 && !i ? a += 'Z' : a = e.o < 0 ? (a = `${(a += '-') + m(Math.trunc(-e.o / 60))}:`) + m(Math.trunc(-e.o % 60)) : (a = `${(a += '+') + m(Math.trunc(e.o / 60))}:`) + m(Math.trunc(e.o % 60))), i && (a += `[${e.zone.ianaName}]`), a; } const fn = { 612 | month: 1, day: 1, hour: 0, minute: 0, second: 0, millisecond: 0, 613 | }; const yn = { 614 | weekNumber: 1, weekday: 1, hour: 0, minute: 0, second: 0, millisecond: 0, 615 | }; const gn = { 616 | ordinal: 1, hour: 0, minute: 0, second: 0, millisecond: 0, 617 | }; const vn = ['year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond']; const wn = ['weekYear', 'weekNumber', 'weekday', 'hour', 'minute', 'second', 'millisecond']; const pn = ['year', 'ordinal', 'hour', 'minute', 'second', 'millisecond']; function Tn(e) { 618 | const t = { 619 | year: 'year', years: 'year', month: 'month', months: 'month', day: 'day', days: 'day', hour: 'hour', hours: 'hour', minute: 'minute', minutes: 'minute', quarter: 'quarter', quarters: 'quarter', second: 'second', seconds: 'second', millisecond: 'millisecond', milliseconds: 'millisecond', weekday: 'weekday', weekdays: 'weekday', weeknumber: 'weekNumber', weeksnumber: 'weekNumber', weeknumbers: 'weekNumber', weekyear: 'weekYear', weekyears: 'weekYear', ordinal: 'ordinal', 620 | }[e.toLowerCase()]; if (t) return t; throw new _(e); 621 | } function Sn(e, t) { 622 | const r = g(t.zone, v.defaultZone); var t = y.fromObject(t); const n = v.now(); let s; let i; if (w(e.year))s = n; else { for (const o of vn)w(e[o]) && (e[o] = fn[o]); let a = Xr(e) || en(e); if (a) return L.invalid(a); a = r.offset(n); [s, i] = un(e, a, r); } return new L({ 623 | ts: s, zone: r, loc: t, o: i, 624 | }); 625 | } function On(t, r, n) { const s = !!w(n.round) || n.round; const e = (e, t) => (e = Qe(e, s || n.calendary ? 0 : 2, !0), r.loc.clone(n).relFormatter(n).format(e, t)); const i = (e) => (n.calendary ? r.hasSame(t, e) ? 0 : r.startOf(e).diff(t.startOf(e), e).get(e) : r.diff(t, e).get(e)); if (n.unit) return e(i(n.unit), n.unit); for (const o of n.units) { const a = i(o); if (Math.abs(a) >= 1) return e(a, o); } return e(r < t ? -0 : 0, n.units[n.units.length - 1]); } function bn(e) { let t = {}; let r; return r = e.length > 0 && typeof e[e.length - 1] === 'object' ? (t = e[e.length - 1], Array.from(e).slice(0, e.length - 1)) : Array.from(e), [t, r]; } class L { 626 | constructor(e) { let t; const r = e.zone || v.defaultZone; let n = e.invalid || (Number.isNaN(e.ts) ? new S('invalid input') : null) || (r.isValid ? null : rn(r)); let s = (this.ts = w(e.ts) ? v.now() : e.ts, null); let i = null; n || (e.old && e.old.ts === this.ts && e.old.zone.equals(r) ? [s, i] = [e.old.c, e.old.o] : (t = r.offset(this.ts), s = on(this.ts, t), n = Number.isNaN(s.year) ? new S('invalid input') : null, s = n ? null : s, i = n ? null : t)), this._zone = r, this.loc = e.loc || y.create(), this.invalid = n, this.weekData = null, this.c = s, this.o = i, this.isLuxonDateTime = !0; } 627 | 628 | static now() { return new L({}); } 629 | 630 | static local() { 631 | var [e, t] = bn(arguments); var [t, r, n, s, i, a, o] = t; return Sn({ 632 | year: t, month: r, day: n, hour: s, minute: i, second: a, millisecond: o, 633 | }, e); 634 | } 635 | 636 | static utc() { 637 | var [e, t] = bn(arguments); var [t, r, n, s, i, a, o] = t; return e.zone = d.utcInstance, Sn({ 638 | year: t, month: r, day: n, hour: s, minute: i, second: a, millisecond: o, 639 | }, e); 640 | } 641 | 642 | static fromJSDate(e, t = {}) { let r; var e = Je(e) ? e.valueOf() : NaN; return Number.isNaN(e) ? L.invalid('invalid input') : (r = g(t.zone, v.defaultZone)).isValid ? new L({ ts: e, zone: r, loc: y.fromObject(t) }) : L.invalid(rn(r)); } 643 | 644 | static fromMillis(e, t = {}) { if (c(e)) return e < -864e13 || e > 864e13 ? L.invalid('Timestamp out of range') : new L({ ts: e, zone: g(t.zone, v.defaultZone), loc: y.fromObject(t) }); throw new o(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`); } 645 | 646 | static fromSeconds(e, t = {}) { if (c(e)) return new L({ ts: 1e3 * e, zone: g(t.zone, v.defaultZone), loc: y.fromObject(t) }); throw new o('fromSeconds requires a numerical input'); } 647 | 648 | static fromObject(e, t = {}) { 649 | e = e || {}; const r = g(t.zone, v.defaultZone); if (!r.isValid) return L.invalid(rn(r)); let n = v.now(); const s = w(t.specificOffset) ? r.offset(n) : t.specificOffset; const i = ot(e, Tn); const a = !w(i.ordinal); var o = !w(i.year); let u = !w(i.month) || !w(i.day); var o = o || u; var l = i.weekYear || i.weekNumber; var t = y.fromObject(t); if ((o || a) && l) throw new j("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); if (u && a) throw new j("Can't mix ordinal dates with month/day"); u = l || i.weekday && !o; let c; let h; let d = on(n, s); let m = (u ? (c = wn, h = yn, d = Yr(d)) : a ? (c = pn, h = gn, d = Gr(d)) : (c = vn, h = fn), !1); for (const f of c)w(i[f]) ? m ? i[f] = h[f] : i[f] = d[f] : m = !0; var l = (u ? Qr : a ? Kr : Xr)(i) || en(i); return l ? L.invalid(l) : ([n, l] = un(u ? Pr(i) : a ? Br(i) : i, s, r), u = new L({ 650 | ts: n, zone: r, o: l, loc: t, 651 | }), i.weekday && o && e.weekday !== u.weekday ? L.invalid('mismatched weekday', `you can't specify both a weekday of ${i.weekday} and a date of ${u.toISO()}`) : u); 652 | } 653 | 654 | static fromISO(e, t = {}) { const [r, n] = nr(e); return cn(r, n, t, 'ISO 8601', e); } 655 | 656 | static fromRFC2822(e, t = {}) { const [r, n] = sr(e); return cn(r, n, t, 'RFC 2822', e); } 657 | 658 | static fromHTTP(e, t = {}) { var [e, r] = ir(e); return cn(e, r, t, 'HTTP', t); } 659 | 660 | static fromFormat(e, t, r = {}) { if (w(e) || w(t)) throw new o('fromFormat requires an input string and a format'); var { locale: n = null, numberingSystem: s = null } = r; var [n, s, i, a] = _r(y.fromOpts({ locale: n, numberingSystem: s, defaultToEN: !0 }), e, t); return a ? L.invalid(a) : cn(n, s, r, `format ${t}`, e, i); } 661 | 662 | static fromString(e, t, r = {}) { return L.fromFormat(e, t, r); } 663 | 664 | static fromSQL(e, t = {}) { const [r, n] = dr(e); return cn(r, n, t, 'SQL', e); } 665 | 666 | static invalid(e, t = null) { if (!e) throw new o('need to specify a reason the DateTime is invalid'); e = e instanceof S ? e : new S(e, t); if (v.throwOnInvalid) throw new z(e); return new L({ invalid: e }); } 667 | 668 | static isDateTime(e) { return e && e.isLuxonDateTime || !1; } 669 | 670 | static parseFormatForOpts(e, t = {}) { e = Ur(e, y.fromObject(t)); return e ? e.map((e) => (e ? e.val : null)).join('') : null; } 671 | 672 | static expandFormat(e, t = {}) { return qr(T.parseFormat(e), y.fromObject(t)).map((e) => e.val).join(''); } 673 | 674 | get(e) { return this[e]; } 675 | 676 | get isValid() { return this.invalid === null; } 677 | 678 | get invalidReason() { return this.invalid ? this.invalid.reason : null; } 679 | 680 | get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } 681 | 682 | get locale() { return this.isValid ? this.loc.locale : null; } 683 | 684 | get numberingSystem() { return this.isValid ? this.loc.numberingSystem : null; } 685 | 686 | get outputCalendar() { return this.isValid ? this.loc.outputCalendar : null; } 687 | 688 | get zone() { return this._zone; } 689 | 690 | get zoneName() { return this.isValid ? this.zone.name : null; } 691 | 692 | get year() { return this.isValid ? this.c.year : NaN; } 693 | 694 | get quarter() { return this.isValid ? Math.ceil(this.c.month / 3) : NaN; } 695 | 696 | get month() { return this.isValid ? this.c.month : NaN; } 697 | 698 | get day() { return this.isValid ? this.c.day : NaN; } 699 | 700 | get hour() { return this.isValid ? this.c.hour : NaN; } 701 | 702 | get minute() { return this.isValid ? this.c.minute : NaN; } 703 | 704 | get second() { return this.isValid ? this.c.second : NaN; } 705 | 706 | get millisecond() { return this.isValid ? this.c.millisecond : NaN; } 707 | 708 | get weekYear() { return this.isValid ? nn(this).weekYear : NaN; } 709 | 710 | get weekNumber() { return this.isValid ? nn(this).weekNumber : NaN; } 711 | 712 | get weekday() { return this.isValid ? nn(this).weekday : NaN; } 713 | 714 | get ordinal() { return this.isValid ? Gr(this.c).ordinal : NaN; } 715 | 716 | get monthShort() { return this.isValid ? br.months('short', { locObj: this.loc })[this.month - 1] : null; } 717 | 718 | get monthLong() { return this.isValid ? br.months('long', { locObj: this.loc })[this.month - 1] : null; } 719 | 720 | get weekdayShort() { return this.isValid ? br.weekdays('short', { locObj: this.loc })[this.weekday - 1] : null; } 721 | 722 | get weekdayLong() { return this.isValid ? br.weekdays('long', { locObj: this.loc })[this.weekday - 1] : null; } 723 | 724 | get offset() { return this.isValid ? +this.o : NaN; } 725 | 726 | get offsetNameShort() { return this.isValid ? this.zone.offsetName(this.ts, { format: 'short', locale: this.locale }) : null; } 727 | 728 | get offsetNameLong() { return this.isValid ? this.zone.offsetName(this.ts, { format: 'long', locale: this.locale }) : null; } 729 | 730 | get isOffsetFixed() { return this.isValid ? this.zone.isUniversal : null; } 731 | 732 | get isInDST() { return !this.isOffsetFixed && (this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset); } 733 | 734 | get isInLeapYear() { return Ke(this.year); } 735 | 736 | get daysInMonth() { return et(this.year, this.month); } 737 | 738 | get daysInYear() { return this.isValid ? Xe(this.year) : NaN; } 739 | 740 | get weeksInWeekYear() { return this.isValid ? rt(this.weekYear) : NaN; } 741 | 742 | resolvedLocaleOptions(e = {}) { var { locale: e, numberingSystem: t, calendar: r } = T.create(this.loc.clone(e), e).resolvedOptions(this); return { locale: e, numberingSystem: t, outputCalendar: r }; } 743 | 744 | toUTC(e = 0, t = {}) { return this.setZone(d.instance(e), t); } 745 | 746 | toLocal() { return this.setZone(v.defaultZone); } 747 | 748 | setZone(t, { keepLocalTime: r = !1, keepCalendarTime: n = !1 } = {}) { if ((t = g(t, v.defaultZone)).equals(this.zone)) return this; if (t.isValid) { let e = this.ts; return (r || n) && (r = t.offset(this.ts), n = this.toObject(), [e] = un(n, r, t)), sn(this, { ts: e, zone: t }); } return L.invalid(rn(t)); } 749 | 750 | reconfigure({ locale: e, numberingSystem: t, outputCalendar: r } = {}) { e = this.loc.clone({ locale: e, numberingSystem: t, outputCalendar: r }); return sn(this, { loc: e }); } 751 | 752 | setLocale(e) { return this.reconfigure({ locale: e }); } 753 | 754 | set(e) { if (!this.isValid) return this; var e = ot(e, Tn); const t = !w(e.weekYear) || !w(e.weekNumber) || !w(e.weekday); const r = !w(e.ordinal); var n = !w(e.year); const s = !w(e.month) || !w(e.day); var i = e.weekYear || e.weekNumber; if ((n || s || r) && i) throw new j("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); if (s && r) throw new j("Can't mix ordinal dates with month/day"); let a; t ? a = Pr({ ...Yr(this.c), ...e }) : w(e.ordinal) ? (a = { ...this.toObject(), ...e }, w(e.day) && (a.day = Math.min(et(a.year, a.month), a.day))) : a = Br({ ...Gr(this.c), ...e }); var [n, i] = un(a, this.o, this.zone); return sn(this, { ts: n, o: i }); } 755 | 756 | plus(e) { return this.isValid ? sn(this, ln(this, V.fromDurationLike(e))) : this; } 757 | 758 | minus(e) { return this.isValid ? sn(this, ln(this, V.fromDurationLike(e).negate())) : this; } 759 | 760 | startOf(e) { if (!this.isValid) return this; const t = {}; var e = V.normalizeUnit(e); switch (e) { case 'years': t.month = 1; case 'quarters': case 'months': t.day = 1; case 'weeks': case 'days': t.hour = 0; case 'hours': t.minute = 0; case 'minutes': t.second = 0; case 'seconds': t.millisecond = 0; } return e === 'weeks' && (t.weekday = 1), e === 'quarters' && (e = Math.ceil(this.month / 3), t.month = 3 * (e - 1) + 1), this.set(t); } 761 | 762 | endOf(e) { return this.isValid ? this.plus({ [e]: 1 }).startOf(e).minus(1) : this; } 763 | 764 | toFormat(e, t = {}) { return this.isValid ? T.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this, e) : tn; } 765 | 766 | toLocaleString(e = U, t = {}) { return this.isValid ? T.create(this.loc.clone(t), e).formatDateTime(this) : tn; } 767 | 768 | toLocaleParts(e = {}) { return this.isValid ? T.create(this.loc.clone(e), e).formatDateTimeParts(this) : []; } 769 | 770 | toISO({ 771 | format: e = 'extended', suppressSeconds: t = !1, suppressMilliseconds: r = !1, includeOffset: n = !0, extendedZone: s = !1, 772 | } = {}) { let i; return this.isValid ? (i = dn(this, e = e === 'extended'), (i += 'T') + mn(this, e, t, r, n, s)) : null; } 773 | 774 | toISODate({ format: e = 'extended' } = {}) { return this.isValid ? dn(this, e === 'extended') : null; } 775 | 776 | toISOWeekDate() { return hn(this, "kkkk-'W'WW-c"); } 777 | 778 | toISOTime({ 779 | suppressMilliseconds: e = !1, suppressSeconds: t = !1, includeOffset: r = !0, includePrefix: n = !1, extendedZone: s = !1, format: i = 'extended', 780 | } = {}) { return this.isValid ? (n ? 'T' : '') + mn(this, i === 'extended', t, e, r, s) : null; } 781 | 782 | toRFC2822() { return hn(this, 'EEE, dd LLL yyyy HH:mm:ss ZZZ', !1); } 783 | 784 | toHTTP() { return hn(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); } 785 | 786 | toSQLDate() { return this.isValid ? dn(this, !0) : null; } 787 | 788 | toSQLTime({ includeOffset: e = !0, includeZone: t = !1, includeOffsetSpace: r = !0 } = {}) { let n = 'HH:mm:ss.SSS'; return (t || e) && (r && (n += ' '), t ? n += 'z' : e && (n += 'ZZ')), hn(this, n, !0); } 789 | 790 | toSQL(e = {}) { return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null; } 791 | 792 | toString() { return this.isValid ? this.toISO() : tn; } 793 | 794 | valueOf() { return this.toMillis(); } 795 | 796 | toMillis() { return this.isValid ? this.ts : NaN; } 797 | 798 | toSeconds() { return this.isValid ? this.ts / 1e3 : NaN; } 799 | 800 | toUnixInteger() { return this.isValid ? Math.floor(this.ts / 1e3) : NaN; } 801 | 802 | toJSON() { return this.toISO(); } 803 | 804 | toBSON() { return this.toJSDate(); } 805 | 806 | toObject(e = {}) { let t; return this.isValid ? (t = { ...this.c }, e.includeConfig && (t.outputCalendar = this.outputCalendar, t.numberingSystem = this.loc.numberingSystem, t.locale = this.loc.locale), t) : {}; } 807 | 808 | toJSDate() { return new Date(this.isValid ? this.ts : NaN); } 809 | 810 | diff(e, t = 'milliseconds', r = {}) { let n; return this.isValid && e.isValid ? (r = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, t = Pe(t).map(V.normalizeUnit), e = Nr((n = e.valueOf() > this.valueOf()) ? this : e, n ? e : this, t, r), n ? e.negate() : e) : V.invalid('created by diffing an invalid DateTime'); } 811 | 812 | diffNow(e = 'milliseconds', t = {}) { return this.diff(L.now(), e, t); } 813 | 814 | until(e) { return this.isValid ? x.fromDateTimes(this, e) : this; } 815 | 816 | hasSame(e, t) { let r; return !!this.isValid && (r = e.valueOf(), (e = this.setZone(e.zone, { keepLocalTime: !0 })).startOf(t) <= r) && r <= e.endOf(t); } 817 | 818 | equals(e) { return this.isValid && e.isValid && this.valueOf() === e.valueOf() && this.zone.equals(e.zone) && this.loc.equals(e.loc); } 819 | 820 | toRelative(e = {}) { 821 | if (!this.isValid) return null; const t = e.base || L.fromObject({}, { zone: this.zone }); const r = e.padding ? this < t ? -e.padding : e.padding : 0; let n = ['years', 'months', 'days', 'hours', 'minutes', 'seconds']; let s = e.unit; return Array.isArray(e.unit) && (n = e.unit, s = void 0), On(t, this.plus(r), { 822 | ...e, numeric: 'always', units: n, unit: s, 823 | }); 824 | } 825 | 826 | toRelativeCalendar(e = {}) { 827 | return this.isValid ? On(e.base || L.fromObject({}, { zone: this.zone }), this, { 828 | ...e, numeric: 'auto', units: ['years', 'months', 'days'], calendary: !0, 829 | }) : null; 830 | } 831 | 832 | static min(...e) { if (e.every(L.isDateTime)) return Ge(e, (e) => e.valueOf(), Math.min); throw new o('min requires all arguments be DateTimes'); } 833 | 834 | static max(...e) { if (e.every(L.isDateTime)) return Ge(e, (e) => e.valueOf(), Math.max); throw new o('max requires all arguments be DateTimes'); } 835 | 836 | static fromFormatExplain(e, t, r = {}) { var { locale: r = null, numberingSystem: n = null } = r; return jr(y.fromOpts({ locale: r, numberingSystem: n, defaultToEN: !0 }), e, t); } 837 | 838 | static fromStringExplain(e, t, r = {}) { return L.fromFormatExplain(e, t, r); } 839 | 840 | static get DATE_SHORT() { return U; } 841 | 842 | static get DATE_MED() { return $; } 843 | 844 | static get DATE_MED_WITH_WEEKDAY() { return H; } 845 | 846 | static get DATE_FULL() { return W; } 847 | 848 | static get DATE_HUGE() { return R; } 849 | 850 | static get TIME_SIMPLE() { return J; } 851 | 852 | static get TIME_WITH_SECONDS() { return Y; } 853 | 854 | static get TIME_WITH_SHORT_OFFSET() { return P; } 855 | 856 | static get TIME_WITH_LONG_OFFSET() { return G; } 857 | 858 | static get TIME_24_SIMPLE() { return B; } 859 | 860 | static get TIME_24_WITH_SECONDS() { return Q; } 861 | 862 | static get TIME_24_WITH_SHORT_OFFSET() { return K; } 863 | 864 | static get TIME_24_WITH_LONG_OFFSET() { return X; } 865 | 866 | static get DATETIME_SHORT() { return ee; } 867 | 868 | static get DATETIME_SHORT_WITH_SECONDS() { return te; } 869 | 870 | static get DATETIME_MED() { return re; } 871 | 872 | static get DATETIME_MED_WITH_SECONDS() { return ne; } 873 | 874 | static get DATETIME_MED_WITH_WEEKDAY() { return se; } 875 | 876 | static get DATETIME_FULL() { return ie; } 877 | 878 | static get DATETIME_FULL_WITH_SECONDS() { return ae; } 879 | 880 | static get DATETIME_HUGE() { return oe; } 881 | 882 | static get DATETIME_HUGE_WITH_SECONDS() { return ue; } 883 | } function kn(e) { if (L.isDateTime(e)) return e; if (e && e.valueOf && c(e.valueOf())) return L.fromJSDate(e); if (e && typeof e === 'object') return L.fromObject(e); throw new o(`Unknown datetime argument: ${e}, of type ${typeof e}`); }s = '3.3.0'; export { 884 | L as DateTime, V as Duration, d as FixedOffsetZone, u as IANAZone, br as Info, x as Interval, Ae as InvalidZone, v as Settings, ce as SystemZone, s as VERSION, i as Zone, 885 | }; --------------------------------------------------------------------------------