\ No newline at end of file
diff --git a/frontend/src/components/DesktopLayout.vue b/frontend/src/components/DesktopLayout.vue
new file mode 100644
index 00000000..8d4a91a1
--- /dev/null
+++ b/frontend/src/components/DesktopLayout.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/Icons/BatchIcon.vue b/frontend/src/components/Icons/BatchIcon.vue
new file mode 100644
index 00000000..05553459
--- /dev/null
+++ b/frontend/src/components/Icons/BatchIcon.vue
@@ -0,0 +1,12 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/Icons/CollapseSidebar.vue b/frontend/src/components/Icons/CollapseSidebar.vue
new file mode 100644
index 00000000..ae89972c
--- /dev/null
+++ b/frontend/src/components/Icons/CollapseSidebar.vue
@@ -0,0 +1,8 @@
+
+
+
diff --git a/frontend/src/components/Icons/LMSLogo.vue b/frontend/src/components/Icons/LMSLogo.vue
new file mode 100644
index 00000000..22154581
--- /dev/null
+++ b/frontend/src/components/Icons/LMSLogo.vue
@@ -0,0 +1,13 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/SidebarLink.vue b/frontend/src/components/SidebarLink.vue
new file mode 100644
index 00000000..2b688525
--- /dev/null
+++ b/frontend/src/components/SidebarLink.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
diff --git a/frontend/src/components/UserAvatar.vue b/frontend/src/components/UserAvatar.vue
new file mode 100644
index 00000000..ab372fdd
--- /dev/null
+++ b/frontend/src/components/UserAvatar.vue
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/frontend/src/components/UserDropdown.vue b/frontend/src/components/UserDropdown.vue
new file mode 100644
index 00000000..2adaf255
--- /dev/null
+++ b/frontend/src/components/UserDropdown.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/main.js b/frontend/src/main.js
index db2c50da..4f6dee2a 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -3,13 +3,25 @@ import './index.css'
import { createApp } from 'vue'
import router from './router'
import App from './App.vue'
+import { createPinia } from 'pinia'
-import { Button, setConfig, frappeRequest, resourcesPlugin } from 'frappe-ui'
+import {
+ FrappeUI,
+ Button,
+ setConfig,
+ frappeRequest,
+ resourcesPlugin,
+} from 'frappe-ui'
+
+// create a pinia instance
+let pinia = createPinia()
let app = createApp(App)
setConfig('resourceFetcher', frappeRequest)
+app.use(FrappeUI)
+app.use(pinia)
app.use(router)
app.use(resourcesPlugin)
diff --git a/frontend/src/pages/Courses.vue b/frontend/src/pages/Courses.vue
index 76d1ab23..9acd8b49 100644
--- a/frontend/src/pages/Courses.vue
+++ b/frontend/src/pages/Courses.vue
@@ -1,25 +1,96 @@
-
-
- All Courses
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
No {{ tab.label.toLowerCase() }} courses found
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/router.js b/frontend/src/router.js
index bdd7a456..fc5e18b2 100644
--- a/frontend/src/router.js
+++ b/frontend/src/router.js
@@ -1,4 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
+import { usersStore } from '@/stores/user'
+import { sessionStore } from '@/stores/session'
const routes = [
{
@@ -14,8 +16,13 @@ const routes = [
]
let router = createRouter({
- history: createWebHistory('/lms'),
+ history: createWebHistory('/'),
routes,
})
+router.beforeEach(async (to, from) => {
+ const { users } = usersStore()
+ await users.promise
+})
+
export default router
diff --git a/frontend/src/stores/session.js b/frontend/src/stores/session.js
new file mode 100644
index 00000000..bf9c60b6
--- /dev/null
+++ b/frontend/src/stores/session.js
@@ -0,0 +1,50 @@
+import { defineStore } from 'pinia'
+import { createResource } from 'frappe-ui'
+import { usersStore } from './user'
+import router from '@/router'
+import { ref, computed } from 'vue'
+
+export const sessionStore = defineStore('lms-session', () => {
+ const { users } = usersStore()
+
+ function sessionUser() {
+ let cookies = new URLSearchParams(document.cookie.split('; ').join('&'))
+ let _sessionUser = cookies.get('user_id')
+ if (_sessionUser === 'Guest') {
+ _sessionUser = null
+ }
+ return _sessionUser
+ }
+
+ let user = ref(sessionUser())
+
+ const isLoggedIn = computed(() => !!user.value)
+
+ const login = createResource({
+ url: 'login',
+ onError() {
+ throw new Error('Invalid email or password')
+ },
+ onSuccess() {
+ users.reload()
+ user.value = sessionUser()
+ login.reset()
+ router.replace({ path: '/' })
+ },
+ })
+
+ const logout = createResource({
+ url: 'logout',
+ onSuccess() {
+ users.reset()
+ user.value = null
+ },
+ })
+
+ return {
+ user,
+ isLoggedIn,
+ login,
+ logout,
+ }
+})
diff --git a/frontend/src/stores/user.js b/frontend/src/stores/user.js
new file mode 100644
index 00000000..fc388512
--- /dev/null
+++ b/frontend/src/stores/user.js
@@ -0,0 +1,50 @@
+import { defineStore } from 'pinia'
+import { createResource } from 'frappe-ui'
+import { sessionStore } from './session'
+import { reactive } from 'vue'
+
+export const usersStore = defineStore('lms-users', () => {
+ const session = sessionStore()
+
+ let usersByName = reactive({})
+
+ const users = createResource({
+ url: 'lms.lms.api.get_user_info',
+ cache: 'Users',
+ initialData: [],
+ transform(users) {
+ for (let user of users) {
+ usersByName[user.name] = user
+ }
+ return users
+ },
+ onError(error) {
+ if (error && error.exc_type === 'AuthenticationError') {
+ router.push('/login')
+ }
+ },
+ })
+
+ function getUser(email) {
+ if (!email || email === 'sessionUser') {
+ email = session.user
+ }
+ if (!email) {
+ return null
+ }
+ if (!usersByName[email]) {
+ usersByName[email] = {
+ name: email,
+ email: email,
+ full_name: email.split('@')[0],
+ user_image: null,
+ }
+ }
+ return usersByName[email]
+ }
+
+ return {
+ users,
+ getUser,
+ }
+})
diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js
index 55329bb4..bfff91bf 100644
--- a/frontend/tailwind.config.js
+++ b/frontend/tailwind.config.js
@@ -4,6 +4,7 @@ module.exports = {
'./index.html',
'./src/**/*.{vue,js,ts,jsx,tsx}',
'./node_modules/frappe-ui/src/components/**/*.{vue,js,ts,jsx,tsx}',
+ '../node_modules/frappe-ui/src/components/**/*.{vue,js,ts,jsx,tsx}',
],
theme: {
extend: {},
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
new file mode 100644
index 00000000..87764b84
--- /dev/null
+++ b/frontend/yarn.lock
@@ -0,0 +1,1724 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@alloc/quick-lru@^5.2.0":
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30"
+ integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==
+
+"@babel/parser@^7.23.3":
+ version "7.23.5"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563"
+ integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==
+
+"@esbuild/android-arm@0.15.18":
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz#266d40b8fdcf87962df8af05b76219bc786b4f80"
+ integrity sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==
+
+"@esbuild/linux-loong64@0.15.18":
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz#128b76ecb9be48b60cf5cfc1c63a4f00691a3239"
+ integrity sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==
+
+"@headlessui/vue@^1.7.14":
+ version "1.7.16"
+ resolved "https://registry.yarnpkg.com/@headlessui/vue/-/vue-1.7.16.tgz#bdc9d32d329248910325539b99e6abfce0c69f89"
+ integrity sha512-nKT+nf/q6x198SsyK54mSszaQl/z+QxtASmgMEJtpxSX2Q0OPJX0upS/9daDyiECpeAsvjkoOrm2O/6PyBQ+Qg==
+
+"@jridgewell/gen-mapping@^0.3.2":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
+ integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==
+ dependencies:
+ "@jridgewell/set-array" "^1.0.1"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@jridgewell/resolve-uri@^3.1.0":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721"
+ integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
+
+"@jridgewell/set-array@^1.0.1":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
+ integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
+
+"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
+ version "1.4.15"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+
+"@jridgewell/trace-mapping@^0.3.9":
+ version "0.3.20"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f"
+ integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.1.0"
+ "@jridgewell/sourcemap-codec" "^1.4.14"
+
+"@nodelib/fs.scandir@2.1.5":
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.5"
+ run-parallel "^1.1.9"
+
+"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
+
+"@nodelib/fs.walk@^1.2.3":
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
+ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
+ dependencies:
+ "@nodelib/fs.scandir" "2.1.5"
+ fastq "^1.6.0"
+
+"@popperjs/core@^2.11.2", "@popperjs/core@^2.9.0":
+ version "2.11.8"
+ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
+ integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
+
+"@remirror/core-constants@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@remirror/core-constants/-/core-constants-2.0.2.tgz#f05eccdc69e3a65e7d524b52548f567904a11a1a"
+ integrity sha512-dyHY+sMF0ihPus3O27ODd4+agdHMEmuRdyiZJ2CCWjPV5UFmn17ZbElvk6WOGVE4rdCJKZQCrPV2BcikOMLUGQ==
+
+"@remirror/core-helpers@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@remirror/core-helpers/-/core-helpers-3.0.0.tgz#3a35c2346bc23ebc3cee585b7840b5567755c5f1"
+ integrity sha512-tusEgQJIqg4qKj6HSBUFcyRnWnziw3neh4T9wOmsPGHFC3w9kl5KSrDb9UAgE8uX6y32FnS7vJ955mWOl3n50A==
+ dependencies:
+ "@remirror/core-constants" "^2.0.2"
+ "@remirror/types" "^1.0.1"
+ "@types/object.omit" "^3.0.0"
+ "@types/object.pick" "^1.3.2"
+ "@types/throttle-debounce" "^2.1.0"
+ case-anything "^2.1.13"
+ dash-get "^1.0.2"
+ deepmerge "^4.3.1"
+ fast-deep-equal "^3.1.3"
+ make-error "^1.3.6"
+ object.omit "^3.0.0"
+ object.pick "^1.3.0"
+ throttle-debounce "^3.0.1"
+
+"@remirror/types@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@remirror/types/-/types-1.0.1.tgz#768502497a0fbbc23338a1586b893f729310cf70"
+ integrity sha512-VlZQxwGnt1jtQ18D6JqdIF+uFZo525WEqrfp9BOc3COPpK4+AWCgdnAWL+ho6imWcoINlGjR/+3b6y5C1vBVEA==
+ dependencies:
+ type-fest "^2.19.0"
+
+"@socket.io/component-emitter@~3.1.0":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
+ integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==
+
+"@tailwindcss/forms@^0.5.3":
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.7.tgz#db5421f062a757b5f828bc9286ba626c6685e821"
+ integrity sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==
+ dependencies:
+ mini-svg-data-uri "^1.2.3"
+
+"@tailwindcss/typography@^0.5.0":
+ version "0.5.10"
+ resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.10.tgz#2abde4c6d5c797ab49cf47610830a301de4c1e0a"
+ integrity sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==
+ dependencies:
+ lodash.castarray "^4.4.0"
+ lodash.isplainobject "^4.0.6"
+ lodash.merge "^4.6.2"
+ postcss-selector-parser "6.0.10"
+
+"@tiptap/core@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.1.13.tgz#e21f566e81688c826c6f26d2940886734189e193"
+ integrity sha512-cMC8bgTN63dj1Mv82iDeeLl6sa9kY0Pug8LSalxVEptRmyFVsVxGgu2/6Y3T+9aCYScxfS06EkA8SdzFMAwYTQ==
+
+"@tiptap/extension-blockquote@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.1.13.tgz#abf01e3a00d72434b08be7f3d7e318c7320db486"
+ integrity sha512-oe6wSQACmODugoP9XH3Ouffjy4BsOBWfTC+dETHNCG6ZED6ShHN3CB9Vr7EwwRgmm2WLaKAjMO1sVumwH+Z1rg==
+
+"@tiptap/extension-bold@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.1.13.tgz#fb0c8916269be61269e4aef9d1da417daf52b7f1"
+ integrity sha512-6cHsQTh/rUiG4jkbJer3vk7g60I5tBwEBSGpdxmEHh83RsvevD8+n92PjA24hYYte5RNlATB011E1wu8PVhSvw==
+
+"@tiptap/extension-bubble-menu@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.1.13.tgz#884cd2e4e0c9586998baac3d0a14621b177f1859"
+ integrity sha512-Hm7e1GX3AI6lfaUmr6WqsS9MMyXIzCkhh+VQi6K8jj4Q4s8kY4KPoAyD/c3v9pZ/dieUtm2TfqrOCkbHzsJQBg==
+ dependencies:
+ tippy.js "^6.3.7"
+
+"@tiptap/extension-bullet-list@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.1.13.tgz#0a26731ebf98ddfd268884ff1712f7189be7b63c"
+ integrity sha512-NkWlQ5bLPUlcROj6G/d4oqAxMf3j3wfndGOPp0z8OoXJtVbVoXl/aMSlLbVgE6n8r6CS8MYxKhXNxrb7Ll2foA==
+
+"@tiptap/extension-code-block@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.1.13.tgz#3e441d171d3ed821e67291dbf4cbad7e2ea29809"
+ integrity sha512-E3tweNExPOV+t1ODKX0MDVsS0aeHGWc1ECt+uyp6XwzsN0bdF2A5+pttQqM7sTcMnQkVACGFbn9wDeLRRcfyQg==
+
+"@tiptap/extension-code@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.1.13.tgz#27a5ca5705e59ca97390fad4d6631bf431690480"
+ integrity sha512-f5fLYlSgliVVa44vd7lQGvo49+peC+Z2H0Fn84TKNCH7tkNZzouoJsHYn0/enLaQ9Sq+24YPfqulfiwlxyiT8w==
+
+"@tiptap/extension-color@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-color/-/extension-color-2.1.13.tgz#f1ea3805db93f308aaf99d8ac80b18fcf13de050"
+ integrity sha512-T3tJXCIfFxzIlGOhvbPVIZa3y36YZRPYIo2TKsgkTz8LiMob6hRXXNFjsrFDp2Fnu3DrBzyvrorsW7767s4eYg==
+
+"@tiptap/extension-document@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-document/-/extension-document-2.1.13.tgz#5b68fa08e8a79eebd41f1360982db2ddd28ad010"
+ integrity sha512-wLwiTWsVmZTGIE5duTcHRmW4ulVxNW4nmgfpk95+mPn1iKyNGtrVhGWleLhBlTj+DWXDtcfNWZgqZkZNzhkqYQ==
+
+"@tiptap/extension-dropcursor@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-dropcursor/-/extension-dropcursor-2.1.13.tgz#2e8908f2dec9e8e997a2f216a11d3b915fe062df"
+ integrity sha512-NAyJi4BJxH7vl/2LNS1X0ndwFKjEtX+cRgshXCnMyh7qNpIRW6Plczapc/W1OiMncOEhZJfpZfkRSfwG01FWFg==
+
+"@tiptap/extension-floating-menu@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.1.13.tgz#e12e6e73ee095319d4a723a9b46b8f7b1a9f4b1a"
+ integrity sha512-9Oz7pk1Nts2+EyY+rYfnREGbLzQ5UFazAvRhF6zAJdvyuDmAYm0Jp6s0GoTrpV0/dJEISoFaNpPdMJOb9EBNRw==
+ dependencies:
+ tippy.js "^6.3.7"
+
+"@tiptap/extension-gapcursor@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.1.13.tgz#994a54e1d4106dfaede0acce184c48457ab34450"
+ integrity sha512-Cl5apsoTcyPPCgE3ThufxQxZ1wyqqh+9uxUN9VF9AbeTkid6oPZvKXwaILf6AFnkSy+SuKrb9kZD2iaezxpzXw==
+
+"@tiptap/extension-hard-break@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.1.13.tgz#fc84d0ff7e2fe861bf421bc8000194ecc26979b0"
+ integrity sha512-TGkMzMQayuKg+vN4du0x1ahEItBLcCT1jdWeRsjdM8gHfzbPLdo4PQhVsvm1I0xaZmbJZelhnVsUwRZcIu1WNA==
+
+"@tiptap/extension-heading@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.1.13.tgz#94a6219448d97ffed0915fa1bf411074c39f4103"
+ integrity sha512-PEmc19QLmlVUTiHWoF0hpgNTNPNU0nlaFmMKskzO+cx5Df4xvHmv/UqoIwp7/UFbPMkfVJT1ozQU7oD1IWn9Hg==
+
+"@tiptap/extension-highlight@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-highlight/-/extension-highlight-2.1.13.tgz#d30221c178569264ab76327f87a0d81605493fcc"
+ integrity sha512-ZivjJma5WwPYcG0rpnynVDGis32OGdtpTwETEb+2OOjZBCBlyYQ4tcRk5gS3nzBAjLl/Qu84VVbawLhHXB6few==
+
+"@tiptap/extension-history@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-history/-/extension-history-2.1.13.tgz#50478c602143fa77bb3b45c9c9cae4ddb743e0ed"
+ integrity sha512-1ouitThGTBUObqw250aDwGLMNESBH5PRXIGybsCFO1bktdmWtEw7m72WY41EuX2BH8iKJpcYPerl3HfY1vmCNw==
+
+"@tiptap/extension-horizontal-rule@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.1.13.tgz#4884dbf912c8dabbbc69e041ff5529d6337e638e"
+ integrity sha512-7OgjgNqZXvBejgULNdMSma2M1nzv4bbZG+FT5XMFZmEOxR9IB1x/RzChjPdeicff2ZK2sfhMBc4Y9femF5XkUg==
+
+"@tiptap/extension-image@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-image/-/extension-image-2.1.13.tgz#835fc6759b2c1184fb54d3704c538029d523dbf6"
+ integrity sha512-7oVAos+BU4KR/zQsfltrd8hgIxKxyxZ19dhwb1BJI2Nt3Mnx+yFPRlRSehID6RT9dYqgW4UW5d6vh/3HQcYYYw==
+
+"@tiptap/extension-italic@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.1.13.tgz#1e9521dea002c8d6de833d9fd928d4617623eab8"
+ integrity sha512-HyDJfuDn5hzwGKZiANcvgz6wcum6bEgb4wmJnfej8XanTMJatNVv63TVxCJ10dSc9KGpPVcIkg6W8/joNXIEbw==
+
+"@tiptap/extension-link@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.1.13.tgz#ae4abd7c43292e3a1841488bfc7a687b2f014249"
+ integrity sha512-wuGMf3zRtMHhMrKm9l6Tft5M2N21Z0UP1dZ5t1IlOAvOeYV2QZ5UynwFryxGKLO0NslCBLF/4b/HAdNXbfXWUA==
+ dependencies:
+ linkifyjs "^4.1.0"
+
+"@tiptap/extension-list-item@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.1.13.tgz#3c62127df97974f3196866ec00ee397f4c9acdc4"
+ integrity sha512-6e8iiCWXOiJTl1XOwVW2tc0YG18h70HUtEHFCx2m5HspOGFKsFEaSS3qYxOheM9HxlmQeDt8mTtqftRjEFRxPQ==
+
+"@tiptap/extension-mention@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-mention/-/extension-mention-2.1.13.tgz#6359c563268c46539660958847fe76c22131f2c8"
+ integrity sha512-OYqaucyBiCN/CmDYjpOVX74RJcIEKmAqiZxUi8Gfaq7ryEO5a8Gk93nK+8uZ0onaqHE+mHpoLFFbcAFbOPgkUQ==
+
+"@tiptap/extension-ordered-list@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.1.13.tgz#31f4b3a21fbcc2f605c48662e08b5253a304c8c7"
+ integrity sha512-UO4ZAL5Vrr1WwER5VjgmeNIWHpqy9cnIRo1En07gZ0OWTjs1eITPcu+4TCn1ZG6DhoFvAQzE5DTxxdhIotg+qw==
+
+"@tiptap/extension-paragraph@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.1.13.tgz#30f8ae3f8833c606b339f3554b9ffdbe1e604463"
+ integrity sha512-cEoZBJrsQn69FPpUMePXG/ltGXtqKISgypj70PEHXt5meKDjpmMVSY4/8cXvFYEYsI9GvIwyAK0OrfAHiSoROA==
+
+"@tiptap/extension-placeholder@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-placeholder/-/extension-placeholder-2.1.13.tgz#b735591f719b9fe89c90dcc6327d2ef2851be510"
+ integrity sha512-vIY7y7UbqsrAW/y8bDE9eRenbQEU16kNHB5Wri8RU1YiUZpkPgdXP/pLqyjIIq95SwP/vdTIHjHoQ77VLRl1hA==
+
+"@tiptap/extension-strike@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.1.13.tgz#6605792fa98f0e36861be4c7ed4d4125de8c77aa"
+ integrity sha512-VN6zlaCNCbyJUCDyBFxavw19XmQ4LkCh8n20M8huNqW77lDGXA2A7UcWLHaNBpqAijBRu9mWI8l4Bftyf2fcAw==
+
+"@tiptap/extension-table-cell@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-table-cell/-/extension-table-cell-2.1.13.tgz#28efbc99480d53346200dcbf50cfb32bade180d1"
+ integrity sha512-30pyVt2PxGAk8jmsXKxDheql8K/xIRA9FiDo++kS2Kr6Y7I42/kNPQttJ2W+Q1JdRJvedNfQtziQfKWDRLLCNA==
+
+"@tiptap/extension-table-header@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-table-header/-/extension-table-header-2.1.13.tgz#8d64a0e5a6a5ea128708b866e56a0e04e34d7a5b"
+ integrity sha512-FwIV5iso5kmpu01QyvrPCjJqZfqxRTjtjMsDyut2uIgx9v5TXk0V5XvMWobx435ANIDJoGTYCMRlIqcgtyqwAQ==
+
+"@tiptap/extension-table-row@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-table-row/-/extension-table-row-2.1.13.tgz#ef75d6de9c7695bbb90f745aabd72d327f161ac3"
+ integrity sha512-27Mb9/oYbiLd+/BUFMhQzRIqMd2Z5j1BZMYsktwtDG8vGdYVlaW257UVaoNR9TmiXyIzd3Dh1mOil8G35+HRHg==
+
+"@tiptap/extension-table@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-table/-/extension-table-2.1.13.tgz#cfe3fc2665d12d2c946fc83b2cce9d1485ff29a0"
+ integrity sha512-yMWt2LqotOsWJhLwFNo8fyTwJNLPtnk+eCUxKLlMXP23mJ/lpF+jvTihhHVVic5GqV9vLYZFU2Tn+5k/Vd5P1w==
+
+"@tiptap/extension-text-align@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-text-align/-/extension-text-align-2.1.13.tgz#1249f8969e4d1ad23ec3794e767aeea5c1e01944"
+ integrity sha512-ZmbGpi5FHGsWyzt+8DceXERr/Vwxhjpm2VKWZyFTVz8uNJVj+/ou196JQJZqxbp5VtKkS7UYujaO++G5eflb0Q==
+
+"@tiptap/extension-text-style@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-text-style/-/extension-text-style-2.1.13.tgz#4ee7c8cc50272f0977a8d2edae22f063f63d1fe5"
+ integrity sha512-K9/pNHxpZKQoc++crxrsppVUSeHv8YevfY2FkJ4YMaekGcX+q4BRrHR0tOfii4izAUPJF2L0/PexLQaWXtAY1w==
+
+"@tiptap/extension-text@^2.1.13":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-text/-/extension-text-2.1.13.tgz#ac17a0220aef1bae1bbd646a91491353e57bb5d1"
+ integrity sha512-zzsTTvu5U67a8WjImi6DrmpX2Q/onLSaj+LRWPh36A1Pz2WaxW5asZgaS+xWCnR+UrozlCALWa01r7uv69jq0w==
+
+"@tiptap/extension-typography@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/extension-typography/-/extension-typography-2.1.13.tgz#eadf8c7423290f717547e21342470cc2333a5dd8"
+ integrity sha512-//90Gzkci4/77CCmdWYyRGTcMUvsQ64jv3mqlL+JqWgLCffMHvWPGKhPMgSzoyHRlAIIACMhxniRtB7HixhTHQ==
+
+"@tiptap/pm@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/pm/-/pm-2.1.13.tgz#857753691580be760da13629fab2712c52750741"
+ integrity sha512-zNbA7muWsHuVg12GrTgN/j119rLePPq5M8dZgkKxUwdw8VmU3eUyBp1SihPEXJ2U0MGdZhNhFX7Y74g11u66sg==
+ dependencies:
+ prosemirror-changeset "^2.2.0"
+ prosemirror-collab "^1.3.0"
+ prosemirror-commands "^1.3.1"
+ prosemirror-dropcursor "^1.5.0"
+ prosemirror-gapcursor "^1.3.1"
+ prosemirror-history "^1.3.0"
+ prosemirror-inputrules "^1.2.0"
+ prosemirror-keymap "^1.2.0"
+ prosemirror-markdown "^1.10.1"
+ prosemirror-menu "^1.2.1"
+ prosemirror-model "^1.18.1"
+ prosemirror-schema-basic "^1.2.0"
+ prosemirror-schema-list "^1.2.2"
+ prosemirror-state "^1.4.1"
+ prosemirror-tables "^1.3.0"
+ prosemirror-trailing-node "^2.0.2"
+ prosemirror-transform "^1.7.0"
+ prosemirror-view "^1.28.2"
+
+"@tiptap/starter-kit@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/starter-kit/-/starter-kit-2.1.13.tgz#ac33a8b4767b83e4daff8819f4a5f0239df1654c"
+ integrity sha512-ph/mUR/OwPtPkZ5rNHINxubpABn8fHnvJSdhXFrY/q6SKoaO11NZXgegRaiG4aL7O6Sz4LsZVw6Sm0Ae+GJmrg==
+ dependencies:
+ "@tiptap/core" "^2.1.13"
+ "@tiptap/extension-blockquote" "^2.1.13"
+ "@tiptap/extension-bold" "^2.1.13"
+ "@tiptap/extension-bullet-list" "^2.1.13"
+ "@tiptap/extension-code" "^2.1.13"
+ "@tiptap/extension-code-block" "^2.1.13"
+ "@tiptap/extension-document" "^2.1.13"
+ "@tiptap/extension-dropcursor" "^2.1.13"
+ "@tiptap/extension-gapcursor" "^2.1.13"
+ "@tiptap/extension-hard-break" "^2.1.13"
+ "@tiptap/extension-heading" "^2.1.13"
+ "@tiptap/extension-history" "^2.1.13"
+ "@tiptap/extension-horizontal-rule" "^2.1.13"
+ "@tiptap/extension-italic" "^2.1.13"
+ "@tiptap/extension-list-item" "^2.1.13"
+ "@tiptap/extension-ordered-list" "^2.1.13"
+ "@tiptap/extension-paragraph" "^2.1.13"
+ "@tiptap/extension-strike" "^2.1.13"
+ "@tiptap/extension-text" "^2.1.13"
+
+"@tiptap/suggestion@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/suggestion/-/suggestion-2.1.13.tgz#0a8317260baed764a523a09099c0889a0e5b507e"
+ integrity sha512-Y05TsiXTFAJ5SrfoV+21MAxig5UNbY0AVa03lQlh/yicTRPpIc6hgZzblB0uxDSYoj6+kaHE4MIZvPvhUD8BJQ==
+
+"@tiptap/vue-3@^2.0.3":
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/@tiptap/vue-3/-/vue-3-2.1.13.tgz#836aef02a5df9fc7dc953a0ad3a12e5556dc8680"
+ integrity sha512-sPMT+uXtPfYLQioXtxxMLij234++PEf5Z43/auOLu737pKdgBr7w0sC8oYiZMgFt9dNCZWBrvT0fupF8yQN8AQ==
+ dependencies:
+ "@tiptap/extension-bubble-menu" "^2.1.13"
+ "@tiptap/extension-floating-menu" "^2.1.13"
+
+"@types/object.omit@^3.0.0":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/object.omit/-/object.omit-3.0.3.tgz#cc52b1d9774c1619b5c6fc50229d087f01eabd68"
+ integrity sha512-xrq4bQTBGYY2cw+gV4PzoG2Lv3L0pjZ1uXStRRDQoATOYW1lCsFQHhQ+OkPhIcQoqLjAq7gYif7D14Qaa6Zbew==
+
+"@types/object.pick@^1.3.2":
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/@types/object.pick/-/object.pick-1.3.4.tgz#1a38b6e69a35f36ec2dcc8b9f5ffd555c1c4d7fc"
+ integrity sha512-5PjwB0uP2XDp3nt5u5NJAG2DORHIRClPzWT/TTZhJ2Ekwe8M5bA9tvPdi9NO/n2uvu2/ictat8kgqvLfcIE1SA==
+
+"@types/throttle-debounce@^2.1.0":
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776"
+ integrity sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==
+
+"@types/web-bluetooth@^0.0.20":
+ version "0.0.20"
+ resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz#f066abfcd1cbe66267cdbbf0de010d8a41b41597"
+ integrity sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==
+
+"@vitejs/plugin-vue@^2.0.0":
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-2.3.4.tgz#966a6279060eb2d9d1a02ea1a331af071afdcf9e"
+ integrity sha512-IfFNbtkbIm36O9KB8QodlwwYvTEsJb4Lll4c2IwB3VHc2gie2mSPtSzL0eYay7X2jd/2WX02FjSGTWR6OPr/zg==
+
+"@vue/compiler-core@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.3.9.tgz#df1fc7947dcef5c2e12d257eae540057707f47d1"
+ integrity sha512-+/Lf68Vr/nFBA6ol4xOtJrW+BQWv3QWKfRwGSm70jtXwfhZNF4R/eRgyVJYoxFRhdCTk/F6g99BP0ffPgZihfQ==
+ dependencies:
+ "@babel/parser" "^7.23.3"
+ "@vue/shared" "3.3.9"
+ estree-walker "^2.0.2"
+ source-map-js "^1.0.2"
+
+"@vue/compiler-dom@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.3.9.tgz#67315ea4193d9d18c7a710889b8f90f7aa3914d2"
+ integrity sha512-nfWubTtLXuT4iBeDSZ5J3m218MjOy42Vp2pmKVuBKo2/BLcrFUX8nCSr/bKRFiJ32R8qbdnnnBgRn9AdU5v0Sg==
+ dependencies:
+ "@vue/compiler-core" "3.3.9"
+ "@vue/shared" "3.3.9"
+
+"@vue/compiler-sfc@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.3.9.tgz#5900906baba1a90389200d81753ad0f7ceb98a83"
+ integrity sha512-wy0CNc8z4ihoDzjASCOCsQuzW0A/HP27+0MDSSICMjVIFzk/rFViezkR3dzH+miS2NDEz8ywMdbjO5ylhOLI2A==
+ dependencies:
+ "@babel/parser" "^7.23.3"
+ "@vue/compiler-core" "3.3.9"
+ "@vue/compiler-dom" "3.3.9"
+ "@vue/compiler-ssr" "3.3.9"
+ "@vue/reactivity-transform" "3.3.9"
+ "@vue/shared" "3.3.9"
+ estree-walker "^2.0.2"
+ magic-string "^0.30.5"
+ postcss "^8.4.31"
+ source-map-js "^1.0.2"
+
+"@vue/compiler-ssr@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.9.tgz#3b3dbfa5368165fa4ff74c060503b4087ec1beed"
+ integrity sha512-NO5oobAw78R0G4SODY5A502MGnDNiDjf6qvhn7zD7TJGc8XDeIEw4fg6JU705jZ/YhuokBKz0A5a/FL/XZU73g==
+ dependencies:
+ "@vue/compiler-dom" "3.3.9"
+ "@vue/shared" "3.3.9"
+
+"@vue/devtools-api@^6.5.0":
+ version "6.5.1"
+ resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz#7f71f31e40973eeee65b9a64382b13593fdbd697"
+ integrity sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==
+
+"@vue/reactivity-transform@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.9.tgz#5d894dd9a42a422a2db309babb385f9a2529b52f"
+ integrity sha512-HnUFm7Ry6dFa4Lp63DAxTixUp8opMtQr6RxQCpDI1vlh12rkGIeYqMvJtK+IKyEfEOa2I9oCkD1mmsPdaGpdVg==
+ dependencies:
+ "@babel/parser" "^7.23.3"
+ "@vue/compiler-core" "3.3.9"
+ "@vue/shared" "3.3.9"
+ estree-walker "^2.0.2"
+ magic-string "^0.30.5"
+
+"@vue/reactivity@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.3.9.tgz#e28e8071bd74edcdd9c87b667ad00e8fbd8d6920"
+ integrity sha512-VmpIqlNp+aYDg2X0xQhJqHx9YguOmz2UxuUJDckBdQCNkipJvfk9yA75woLWElCa0Jtyec3lAAt49GO0izsphw==
+ dependencies:
+ "@vue/shared" "3.3.9"
+
+"@vue/runtime-core@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.3.9.tgz#c835b77f7dc7ae5f251e93f277b54963ea1b5c31"
+ integrity sha512-xxaG9KvPm3GTRuM4ZyU8Tc+pMVzcu6eeoSRQJ9IE7NmCcClW6z4B3Ij6L4EDl80sxe/arTtQ6YmgiO4UZqRc+w==
+ dependencies:
+ "@vue/reactivity" "3.3.9"
+ "@vue/shared" "3.3.9"
+
+"@vue/runtime-dom@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.3.9.tgz#68081d981695a229d72f431fed0b0cdd9161ce53"
+ integrity sha512-e7LIfcxYSWbV6BK1wQv9qJyxprC75EvSqF/kQKe6bdZEDNValzeRXEVgiX7AHI6hZ59HA4h7WT5CGvm69vzJTQ==
+ dependencies:
+ "@vue/runtime-core" "3.3.9"
+ "@vue/shared" "3.3.9"
+ csstype "^3.1.2"
+
+"@vue/server-renderer@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.3.9.tgz#ffb41bc9c7afafcc608d0c500e9d6b0af7d68fad"
+ integrity sha512-w0zT/s5l3Oa3ZjtLW88eO4uV6AQFqU8X5GOgzq7SkQQu6vVr+8tfm+OI2kDBplS/W/XgCBuFXiPw6T5EdwXP0A==
+ dependencies:
+ "@vue/compiler-ssr" "3.3.9"
+ "@vue/shared" "3.3.9"
+
+"@vue/shared@3.3.9":
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.9.tgz#df740d26d338faf03e09ca662a8031acf66051db"
+ integrity sha512-ZE0VTIR0LmYgeyhurPTpy4KzKsuDyQbMSdM49eKkMnT5X4VfFBLysMzjIZhLEFQYjjOVVfbvUDHckwjDFiO2eA==
+
+"@vueuse/core@^10.4.1":
+ version "10.6.1"
+ resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.6.1.tgz#5b16d8238054c6983b6cb7cd77a78035f098dd89"
+ integrity sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==
+ dependencies:
+ "@types/web-bluetooth" "^0.0.20"
+ "@vueuse/metadata" "10.6.1"
+ "@vueuse/shared" "10.6.1"
+ vue-demi ">=0.14.6"
+
+"@vueuse/metadata@10.6.1":
+ version "10.6.1"
+ resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-10.6.1.tgz#100faa0ced3c0ab4c014fb8e66e781e85e4eb88d"
+ integrity sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==
+
+"@vueuse/shared@10.6.1":
+ version "10.6.1"
+ resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-10.6.1.tgz#1d9fc1e3f9083e45b59a693fc372bc50ad62a9e4"
+ integrity sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==
+ dependencies:
+ vue-demi ">=0.14.6"
+
+any-promise@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
+ integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==
+
+anymatch@~3.1.2:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+arg@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c"
+ integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==
+
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
+autoprefixer@^10.4.2:
+ version "10.4.16"
+ resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.16.tgz#fad1411024d8670880bdece3970aa72e3572feb8"
+ integrity sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==
+ dependencies:
+ browserslist "^4.21.10"
+ caniuse-lite "^1.0.30001538"
+ fraction.js "^4.3.6"
+ normalize-range "^0.1.2"
+ picocolors "^1.0.0"
+ postcss-value-parser "^4.2.0"
+
+balanced-match@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+
+binary-extensions@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
+ integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^3.0.2, braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+browserslist@^4.21.10:
+ version "4.22.2"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b"
+ integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==
+ dependencies:
+ caniuse-lite "^1.0.30001565"
+ electron-to-chromium "^1.4.601"
+ node-releases "^2.0.14"
+ update-browserslist-db "^1.0.13"
+
+camelcase-css@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"
+ integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
+
+caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001565:
+ version "1.0.30001566"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz#61a8e17caf3752e3e426d4239c549ebbb37fef0d"
+ integrity sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==
+
+case-anything@^2.1.13:
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.13.tgz#0cdc16278cb29a7fcdeb072400da3f342ba329e9"
+ integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==
+
+chokidar@^3.5.3:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
+ integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
+ dependencies:
+ anymatch "~3.1.2"
+ braces "~3.0.2"
+ glob-parent "~5.1.2"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.6.0"
+ optionalDependencies:
+ fsevents "~2.3.2"
+
+classnames@^2.2.5:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
+ integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
+
+commander@^4.0.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
+ integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
+
+commander@^9.0.0:
+ version "9.5.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
+ integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
+
+core-js@^3.1.3:
+ version "3.33.3"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.33.3.tgz#3c644a323f0f533a0d360e9191e37f7fc059088d"
+ integrity sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==
+
+crelt@^1.0.0:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.6.tgz#7cc898ea74e190fb6ef9dae57f8f81cf7302df72"
+ integrity sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==
+
+cssesc@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
+ integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
+
+csstype@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
+ integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
+
+dash-get@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/dash-get/-/dash-get-1.0.2.tgz#4c9e9ad5ef04c4bf9d3c9a451f6f7997298dcc7c"
+ integrity sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ==
+
+debug@~4.3.1, debug@~4.3.2:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
+ integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
+ dependencies:
+ ms "2.1.2"
+
+deepmerge@^4.3.1:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
+ integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
+
+didyoumean@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"
+ integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==
+
+dlv@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
+ integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
+
+electron-to-chromium@^1.4.601:
+ version "1.4.601"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.601.tgz#cac69868548aee89961ffe63ff5a7716f0685b75"
+ integrity sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==
+
+engine.io-client@~6.5.2:
+ version "6.5.3"
+ resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.3.tgz#4cf6fa24845029b238f83c628916d9149c399bc5"
+ integrity sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==
+ dependencies:
+ "@socket.io/component-emitter" "~3.1.0"
+ debug "~4.3.1"
+ engine.io-parser "~5.2.1"
+ ws "~8.11.0"
+ xmlhttprequest-ssl "~2.0.0"
+
+engine.io-parser@~5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.1.tgz#9f213c77512ff1a6cc0c7a86108a7ffceb16fcfb"
+ integrity sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==
+
+entities@~3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4"
+ integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==
+
+esbuild-android-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz#20a7ae1416c8eaade917fb2453c1259302c637a5"
+ integrity sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==
+
+esbuild-android-arm64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz#9cc0ec60581d6ad267568f29cf4895ffdd9f2f04"
+ integrity sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==
+
+esbuild-darwin-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz#428e1730ea819d500808f220fbc5207aea6d4410"
+ integrity sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==
+
+esbuild-darwin-arm64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz#b6dfc7799115a2917f35970bfbc93ae50256b337"
+ integrity sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==
+
+esbuild-freebsd-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz#4e190d9c2d1e67164619ae30a438be87d5eedaf2"
+ integrity sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==
+
+esbuild-freebsd-arm64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz#18a4c0344ee23bd5a6d06d18c76e2fd6d3f91635"
+ integrity sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==
+
+esbuild-linux-32@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz#9a329731ee079b12262b793fb84eea762e82e0ce"
+ integrity sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==
+
+esbuild-linux-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz#532738075397b994467b514e524aeb520c191b6c"
+ integrity sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==
+
+esbuild-linux-arm64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz#5372e7993ac2da8f06b2ba313710d722b7a86e5d"
+ integrity sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==
+
+esbuild-linux-arm@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz#e734aaf259a2e3d109d4886c9e81ec0f2fd9a9cc"
+ integrity sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==
+
+esbuild-linux-mips64le@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz#c0487c14a9371a84eb08fab0e1d7b045a77105eb"
+ integrity sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==
+
+esbuild-linux-ppc64le@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz#af048ad94eed0ce32f6d5a873f7abe9115012507"
+ integrity sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==
+
+esbuild-linux-riscv64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz#423ed4e5927bd77f842bd566972178f424d455e6"
+ integrity sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==
+
+esbuild-linux-s390x@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz#21d21eaa962a183bfb76312e5a01cc5ae48ce8eb"
+ integrity sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==
+
+esbuild-netbsd-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz#ae75682f60d08560b1fe9482bfe0173e5110b998"
+ integrity sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==
+
+esbuild-openbsd-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz#79591a90aa3b03e4863f93beec0d2bab2853d0a8"
+ integrity sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==
+
+esbuild-sunos-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz#fd528aa5da5374b7e1e93d36ef9b07c3dfed2971"
+ integrity sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==
+
+esbuild-windows-32@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz#0e92b66ecdf5435a76813c4bc5ccda0696f4efc3"
+ integrity sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==
+
+esbuild-windows-64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz#0fc761d785414284fc408e7914226d33f82420d0"
+ integrity sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==
+
+esbuild-windows-arm64@0.15.18:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz#5b5bdc56d341d0922ee94965c89ee120a6a86eb7"
+ integrity sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==
+
+esbuild@^0.15.9:
+ version "0.15.18"
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.18.tgz#ea894adaf3fbc036d32320a00d4d6e4978a2f36d"
+ integrity sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==
+ optionalDependencies:
+ "@esbuild/android-arm" "0.15.18"
+ "@esbuild/linux-loong64" "0.15.18"
+ esbuild-android-64 "0.15.18"
+ esbuild-android-arm64 "0.15.18"
+ esbuild-darwin-64 "0.15.18"
+ esbuild-darwin-arm64 "0.15.18"
+ esbuild-freebsd-64 "0.15.18"
+ esbuild-freebsd-arm64 "0.15.18"
+ esbuild-linux-32 "0.15.18"
+ esbuild-linux-64 "0.15.18"
+ esbuild-linux-arm "0.15.18"
+ esbuild-linux-arm64 "0.15.18"
+ esbuild-linux-mips64le "0.15.18"
+ esbuild-linux-ppc64le "0.15.18"
+ esbuild-linux-riscv64 "0.15.18"
+ esbuild-linux-s390x "0.15.18"
+ esbuild-netbsd-64 "0.15.18"
+ esbuild-openbsd-64 "0.15.18"
+ esbuild-sunos-64 "0.15.18"
+ esbuild-windows-32 "0.15.18"
+ esbuild-windows-64 "0.15.18"
+ esbuild-windows-arm64 "0.15.18"
+
+escalade@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
+
+escape-string-regexp@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
+ integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
+
+estree-walker@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
+ integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
+
+fast-deep-equal@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+
+fast-glob@^3.3.0:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
+ integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.2"
+ merge2 "^1.3.0"
+ micromatch "^4.0.4"
+
+fastq@^1.6.0:
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
+ integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==
+ dependencies:
+ reusify "^1.0.4"
+
+feather-icons@^4.28.0:
+ version "4.29.1"
+ resolved "https://registry.yarnpkg.com/feather-icons/-/feather-icons-4.29.1.tgz#f222aaa4cc6fca499356660c9de6c009ee2cb117"
+ integrity sha512-P1we61haGTds6lKWe6CCVPsNULb8tHr1y6S9gXEpU+lNR1Ja7GdV0A1l2hTNmzXv+0Stix/3YMWMAn7n1Qtd6A==
+ dependencies:
+ classnames "^2.2.5"
+ core-js "^3.1.3"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+fraction.js@^4.3.6:
+ version "4.3.7"
+ resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
+ integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==
+
+frappe-ui@^0.1.16:
+ version "0.1.18"
+ resolved "https://registry.yarnpkg.com/frappe-ui/-/frappe-ui-0.1.18.tgz#470214d97d11dd3bd5f2c21515c68ad10491b80c"
+ integrity sha512-wsoqigEdcv09/VdvUC0uU4wxz4mG8bo0IPZNZMg0BUlu/dEcDgl0464cDuoS0fSWqZc4127o2kdqFTEjjClkXQ==
+ dependencies:
+ "@headlessui/vue" "^1.7.14"
+ "@popperjs/core" "^2.11.2"
+ "@tailwindcss/forms" "^0.5.3"
+ "@tailwindcss/typography" "^0.5.0"
+ "@tiptap/extension-color" "^2.0.3"
+ "@tiptap/extension-highlight" "^2.0.3"
+ "@tiptap/extension-image" "^2.0.3"
+ "@tiptap/extension-link" "^2.0.3"
+ "@tiptap/extension-mention" "^2.0.3"
+ "@tiptap/extension-placeholder" "^2.0.3"
+ "@tiptap/extension-table" "^2.0.3"
+ "@tiptap/extension-table-cell" "^2.0.3"
+ "@tiptap/extension-table-header" "^2.0.3"
+ "@tiptap/extension-table-row" "^2.0.3"
+ "@tiptap/extension-text-align" "^2.0.3"
+ "@tiptap/extension-text-style" "^2.0.3"
+ "@tiptap/extension-typography" "^2.0.3"
+ "@tiptap/pm" "^2.0.3"
+ "@tiptap/starter-kit" "^2.0.3"
+ "@tiptap/suggestion" "^2.0.3"
+ "@tiptap/vue-3" "^2.0.3"
+ "@vueuse/core" "^10.4.1"
+ feather-icons "^4.28.0"
+ idb-keyval "^6.2.0"
+ showdown "^2.1.0"
+ socket.io-client "^4.5.1"
+ tippy.js "^6.3.7"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
+
+fsevents@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
+
+function-bind@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
+
+glob-parent@^5.1.2, glob-parent@~5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob-parent@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
+
+glob@7.1.6:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+hasown@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c"
+ integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==
+ dependencies:
+ function-bind "^1.1.2"
+
+idb-keyval@^6.2.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33"
+ integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
+
+is-core-module@^2.13.0:
+ version "2.13.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
+ integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
+ dependencies:
+ hasown "^2.0.0"
+
+is-extendable@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
+
+is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
+
+jiti@^1.19.1:
+ version "1.21.0"
+ resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d"
+ integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==
+
+lilconfig@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
+ integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==
+
+lilconfig@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.0.0.tgz#f8067feb033b5b74dab4602a5f5029420be749bc"
+ integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==
+
+lines-and-columns@^1.1.6:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
+ integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
+
+linkify-it@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec"
+ integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
+ dependencies:
+ uc.micro "^1.0.1"
+
+linkifyjs@^4.1.0:
+ version "4.1.3"
+ resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-4.1.3.tgz#0edbc346428a7390a23ea2e5939f76112c9ae07f"
+ integrity sha512-auMesunaJ8yfkHvK4gfg1K0SaKX/6Wn9g2Aac/NwX+l5VdmFZzo/hdPGxEOETj+ryRa4/fiOPjeeKURSAJx1sg==
+
+lodash.castarray@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115"
+ integrity sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==
+
+lodash.isplainobject@^4.0.6:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
+ integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==
+
+lodash.merge@^4.6.2:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
+lucide-vue-next@^0.259.0:
+ version "0.259.0"
+ resolved "https://registry.yarnpkg.com/lucide-vue-next/-/lucide-vue-next-0.259.0.tgz#3e1bbe57ccbb0704dc854efd5e2221c65099d0f6"
+ integrity sha512-LOUmg73Sw7v1si8y/JpYv6KJFc8Rp3d8OwCO0jE/qixiOcJpg5PvKs7xvvtRSO3E4sWwJAQQaL1re5zGJirONg==
+
+magic-string@^0.30.5:
+ version "0.30.5"
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
+ integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
+ dependencies:
+ "@jridgewell/sourcemap-codec" "^1.4.15"
+
+make-error@^1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
+ integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
+
+markdown-it@^13.0.1:
+ version "13.0.2"
+ resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.2.tgz#1bc22e23379a6952e5d56217fbed881e0c94d536"
+ integrity sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==
+ dependencies:
+ argparse "^2.0.1"
+ entities "~3.0.1"
+ linkify-it "^4.0.1"
+ mdurl "^1.0.1"
+ uc.micro "^1.0.5"
+
+mdurl@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
+ integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
+
+merge2@^1.3.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
+ integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+
+micromatch@^4.0.4, micromatch@^4.0.5:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
+ integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
+ dependencies:
+ braces "^3.0.2"
+ picomatch "^2.3.1"
+
+mini-svg-data-uri@^1.2.3:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939"
+ integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==
+
+minimatch@^3.0.4:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+ms@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+mz@^2.7.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
+ integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
+ dependencies:
+ any-promise "^1.0.0"
+ object-assign "^4.0.1"
+ thenify-all "^1.0.0"
+
+nanoid@^3.3.7:
+ version "3.3.7"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
+ integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
+
+node-releases@^2.0.14:
+ version "2.0.14"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
+ integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
+
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+normalize-range@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+ integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==
+
+object-assign@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
+
+object-hash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
+ integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
+
+object.omit@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-3.0.0.tgz#0e3edc2fce2ba54df5577ff529f6d97bd8a522af"
+ integrity sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==
+ dependencies:
+ is-extendable "^1.0.0"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==
+ dependencies:
+ isobject "^3.0.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
+ dependencies:
+ wrappy "1"
+
+orderedmap@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-2.1.1.tgz#61481269c44031c449915497bf5a4ad273c512d2"
+ integrity sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
+
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
+
+picocolors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
+ integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
+
+picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+
+pify@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+ integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==
+
+pinia@^2.0.33:
+ version "2.1.7"
+ resolved "https://registry.yarnpkg.com/pinia/-/pinia-2.1.7.tgz#4cf5420d9324ca00b7b4984d3fbf693222115bbc"
+ integrity sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==
+ dependencies:
+ "@vue/devtools-api" "^6.5.0"
+ vue-demi ">=0.14.5"
+
+pirates@^4.0.1:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9"
+ integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==
+
+postcss-import@^15.1.0:
+ version "15.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70"
+ integrity sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==
+ dependencies:
+ postcss-value-parser "^4.0.0"
+ read-cache "^1.0.0"
+ resolve "^1.1.7"
+
+postcss-js@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2"
+ integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==
+ dependencies:
+ camelcase-css "^2.0.1"
+
+postcss-load-config@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz#7159dcf626118d33e299f485d6afe4aff7c4a3e3"
+ integrity sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==
+ dependencies:
+ lilconfig "^3.0.0"
+ yaml "^2.3.4"
+
+postcss-nested@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.1.tgz#f83dc9846ca16d2f4fa864f16e9d9f7d0961662c"
+ integrity sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==
+ dependencies:
+ postcss-selector-parser "^6.0.11"
+
+postcss-selector-parser@6.0.10:
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d"
+ integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
+ dependencies:
+ cssesc "^3.0.0"
+ util-deprecate "^1.0.2"
+
+postcss-selector-parser@^6.0.11:
+ version "6.0.13"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b"
+ integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==
+ dependencies:
+ cssesc "^3.0.0"
+ util-deprecate "^1.0.2"
+
+postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
+ integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
+
+postcss@^8.4.18, postcss@^8.4.23, postcss@^8.4.31, postcss@^8.4.5:
+ version "8.4.32"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9"
+ integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==
+ dependencies:
+ nanoid "^3.3.7"
+ picocolors "^1.0.0"
+ source-map-js "^1.0.2"
+
+prosemirror-changeset@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/prosemirror-changeset/-/prosemirror-changeset-2.2.1.tgz#dae94b63aec618fac7bb9061648e6e2a79988383"
+ integrity sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==
+ dependencies:
+ prosemirror-transform "^1.0.0"
+
+prosemirror-collab@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz#0e8c91e76e009b53457eb3b3051fb68dad029a33"
+ integrity sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==
+ dependencies:
+ prosemirror-state "^1.0.0"
+
+prosemirror-commands@^1.0.0, prosemirror-commands@^1.3.1:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.5.2.tgz#e94aeea52286f658cd984270de9b4c3fff580852"
+ integrity sha512-hgLcPaakxH8tu6YvVAaILV2tXYsW3rAdDR8WNkeKGcgeMVQg3/TMhPdVoh7iAmfgVjZGtcOSjKiQaoeKjzd2mQ==
+ dependencies:
+ prosemirror-model "^1.0.0"
+ prosemirror-state "^1.0.0"
+ prosemirror-transform "^1.0.0"
+
+prosemirror-dropcursor@^1.5.0:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.1.tgz#49b9fb2f583e0d0f4021ff87db825faa2be2832d"
+ integrity sha512-M30WJdJZLyXHi3N8vxN6Zh5O8ZBbQCz0gURTfPmTIBNQ5pxrdU7A58QkNqfa98YEjSAL1HUyyU34f6Pm5xBSGw==
+ dependencies:
+ prosemirror-state "^1.0.0"
+ prosemirror-transform "^1.1.0"
+ prosemirror-view "^1.1.0"
+
+prosemirror-gapcursor@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.2.tgz#5fa336b83789c6199a7341c9493587e249215cb4"
+ integrity sha512-wtjswVBd2vaQRrnYZaBCbyDqr232Ed4p2QPtRIUK5FuqHYKGWkEwl08oQM4Tw7DOR0FsasARV5uJFvMZWxdNxQ==
+ dependencies:
+ prosemirror-keymap "^1.0.0"
+ prosemirror-model "^1.0.0"
+ prosemirror-state "^1.0.0"
+ prosemirror-view "^1.0.0"
+
+prosemirror-history@^1.0.0, prosemirror-history@^1.3.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-history/-/prosemirror-history-1.3.2.tgz#ce6ad7ab9db83e761aee716f3040d74738311b15"
+ integrity sha512-/zm0XoU/N/+u7i5zepjmZAEnpvjDtzoPWW6VmKptcAnPadN/SStsBjMImdCEbb3seiNTpveziPTIrXQbHLtU1g==
+ dependencies:
+ prosemirror-state "^1.2.2"
+ prosemirror-transform "^1.0.0"
+ prosemirror-view "^1.31.0"
+ rope-sequence "^1.3.0"
+
+prosemirror-inputrules@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.3.0.tgz#d43ce469ffe09a1b4cbac3f0ad367b0e4b504875"
+ integrity sha512-z1GRP2vhh5CihYMQYsJSa1cOwXb3SYxALXOIfAkX8nZserARtl9LiL+CEl+T+OFIsXc3mJIHKhbsmRzC0HDAXA==
+ dependencies:
+ prosemirror-state "^1.0.0"
+ prosemirror-transform "^1.0.0"
+
+prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2, prosemirror-keymap@^1.2.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.2.2.tgz#14a54763a29c7b2704f561088ccf3384d14eb77e"
+ integrity sha512-EAlXoksqC6Vbocqc0GtzCruZEzYgrn+iiGnNjsJsH4mrnIGex4qbLdWWNza3AW5W36ZRrlBID0eM6bdKH4OStQ==
+ dependencies:
+ prosemirror-state "^1.0.0"
+ w3c-keyname "^2.2.0"
+
+prosemirror-markdown@^1.10.1:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-markdown/-/prosemirror-markdown-1.11.2.tgz#f6e529e669d11fa3eec859e93c0d2c91788d6c80"
+ integrity sha512-Eu5g4WPiCdqDTGhdSsG9N6ZjACQRYrsAkrF9KYfdMaCmjIApH75aVncsWYOJvEk2i1B3i8jZppv3J/tnuHGiUQ==
+ dependencies:
+ markdown-it "^13.0.1"
+ prosemirror-model "^1.0.0"
+
+prosemirror-menu@^1.2.1:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/prosemirror-menu/-/prosemirror-menu-1.2.4.tgz#3cfdc7c06d10f9fbd1bce29082c498bd11a0a79a"
+ integrity sha512-S/bXlc0ODQup6aiBbWVsX/eM+xJgCTAfMq/nLqaO5ID/am4wS0tTCIkzwytmao7ypEtjj39i7YbJjAgO20mIqA==
+ dependencies:
+ crelt "^1.0.0"
+ prosemirror-commands "^1.0.0"
+ prosemirror-history "^1.0.0"
+ prosemirror-state "^1.0.0"
+
+prosemirror-model@^1.0.0, prosemirror-model@^1.16.0, prosemirror-model@^1.18.1, prosemirror-model@^1.19.0, prosemirror-model@^1.8.1:
+ version "1.19.3"
+ resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.19.3.tgz#f0d55285487fefd962d0ac695f716f4ec6705006"
+ integrity sha512-tgSnwN7BS7/UM0sSARcW+IQryx2vODKX4MI7xpqY2X+iaepJdKBPc7I4aACIsDV/LTaTjt12Z56MhDr9LsyuZQ==
+ dependencies:
+ orderedmap "^2.0.0"
+
+prosemirror-schema-basic@^1.2.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.2.tgz#6695f5175e4628aab179bf62e5568628b9cfe6c7"
+ integrity sha512-/dT4JFEGyO7QnNTe9UaKUhjDXbTNkiWTq/N4VpKaF79bBjSExVV2NXmJpcM7z/gD7mbqNjxbmWW5nf1iNSSGnw==
+ dependencies:
+ prosemirror-model "^1.19.0"
+
+prosemirror-schema-list@^1.2.2:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/prosemirror-schema-list/-/prosemirror-schema-list-1.3.0.tgz#05374702cf35a3ba5e7ec31079e355a488d52519"
+ integrity sha512-Hz/7gM4skaaYfRPNgr421CU4GSwotmEwBVvJh5ltGiffUJwm7C8GfN/Bc6DR1EKEp5pDKhODmdXXyi9uIsZl5A==
+ dependencies:
+ prosemirror-model "^1.0.0"
+ prosemirror-state "^1.0.0"
+ prosemirror-transform "^1.7.3"
+
+prosemirror-state@^1.0.0, prosemirror-state@^1.2.2, prosemirror-state@^1.3.1, prosemirror-state@^1.4.1:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/prosemirror-state/-/prosemirror-state-1.4.3.tgz#94aecf3ffd54ec37e87aa7179d13508da181a080"
+ integrity sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==
+ dependencies:
+ prosemirror-model "^1.0.0"
+ prosemirror-transform "^1.0.0"
+ prosemirror-view "^1.27.0"
+
+prosemirror-tables@^1.3.0:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/prosemirror-tables/-/prosemirror-tables-1.3.5.tgz#80f03394f5b9991f9693bcb3a90b6dba6b16254d"
+ integrity sha512-JSZ2cCNlApu/ObAhdPyotrjBe2cimniniTpz60YXzbL0kZ+47nEYk2LWbfKU2lKpBkUNquta2PjteoNi4YCluQ==
+ dependencies:
+ prosemirror-keymap "^1.1.2"
+ prosemirror-model "^1.8.1"
+ prosemirror-state "^1.3.1"
+ prosemirror-transform "^1.2.1"
+ prosemirror-view "^1.13.3"
+
+prosemirror-trailing-node@^2.0.2:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/prosemirror-trailing-node/-/prosemirror-trailing-node-2.0.7.tgz#ba782a7929f18bcae650b1c7082a2d10443eab19"
+ integrity sha512-8zcZORYj/8WEwsGo6yVCRXFMOfBo0Ub3hCUvmoWIZYfMP26WqENU0mpEP27w7mt8buZWuGrydBewr0tOArPb1Q==
+ dependencies:
+ "@remirror/core-constants" "^2.0.2"
+ "@remirror/core-helpers" "^3.0.0"
+ escape-string-regexp "^4.0.0"
+
+prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1, prosemirror-transform@^1.7.0, prosemirror-transform@^1.7.3:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.8.0.tgz#a47c64a3c373c1bd0ff46e95be3210c8dda0cd11"
+ integrity sha512-BaSBsIMv52F1BVVMvOmp1yzD3u65uC3HTzCBQV1WDPqJRQ2LuHKcyfn0jwqodo8sR9vVzMzZyI+Dal5W9E6a9A==
+ dependencies:
+ prosemirror-model "^1.0.0"
+
+prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.27.0, prosemirror-view@^1.28.2, prosemirror-view@^1.31.0:
+ version "1.32.4"
+ resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.32.4.tgz#c8f24bab3bcc8b57bcfb62490fc468180559f51b"
+ integrity sha512-WoT+ZYePp0WQvp5coABAysheZg9WttW3TSEUNgsfDQXmVOJlnjkbFbXicKPvWFLiC0ZjKt1ykbyoVKqhVnCiSQ==
+ dependencies:
+ prosemirror-model "^1.16.0"
+ prosemirror-state "^1.0.0"
+ prosemirror-transform "^1.1.0"
+
+queue-microtask@^1.2.2:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
+ integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
+
+read-cache@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
+ integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==
+ dependencies:
+ pify "^2.3.0"
+
+readdirp@~3.6.0:
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
+ integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
+ dependencies:
+ picomatch "^2.2.1"
+
+resolve@^1.1.7, resolve@^1.22.1, resolve@^1.22.2:
+ version "1.22.8"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
+ integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
+ dependencies:
+ is-core-module "^2.13.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
+
+reusify@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+
+rollup@^2.79.1:
+ version "2.79.1"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
+ integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
+ optionalDependencies:
+ fsevents "~2.3.2"
+
+rope-sequence@^1.3.0:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/rope-sequence/-/rope-sequence-1.3.4.tgz#df85711aaecd32f1e756f76e43a415171235d425"
+ integrity sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==
+
+run-parallel@^1.1.9:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
+ integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
+ dependencies:
+ queue-microtask "^1.2.2"
+
+showdown@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/showdown/-/showdown-2.1.0.tgz#1251f5ed8f773f0c0c7bfc8e6fd23581f9e545c5"
+ integrity sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==
+ dependencies:
+ commander "^9.0.0"
+
+socket.io-client@^4.5.1:
+ version "4.7.2"
+ resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.2.tgz#f2f13f68058bd4e40f94f2a1541f275157ff2c08"
+ integrity sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==
+ dependencies:
+ "@socket.io/component-emitter" "~3.1.0"
+ debug "~4.3.2"
+ engine.io-client "~6.5.2"
+ socket.io-parser "~4.2.4"
+
+socket.io-parser@~4.2.4:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83"
+ integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==
+ dependencies:
+ "@socket.io/component-emitter" "~3.1.0"
+ debug "~4.3.1"
+
+source-map-js@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
+ integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
+
+sucrase@^3.32.0:
+ version "3.34.0"
+ resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"
+ integrity sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.3.2"
+ commander "^4.0.0"
+ glob "7.1.6"
+ lines-and-columns "^1.1.6"
+ mz "^2.7.0"
+ pirates "^4.0.1"
+ ts-interface-checker "^0.1.9"
+
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+
+tailwindcss@^3.2.7:
+ version "3.3.5"
+ resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.5.tgz#22a59e2fbe0ecb6660809d9cc5f3976b077be3b8"
+ integrity sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==
+ dependencies:
+ "@alloc/quick-lru" "^5.2.0"
+ arg "^5.0.2"
+ chokidar "^3.5.3"
+ didyoumean "^1.2.2"
+ dlv "^1.1.3"
+ fast-glob "^3.3.0"
+ glob-parent "^6.0.2"
+ is-glob "^4.0.3"
+ jiti "^1.19.1"
+ lilconfig "^2.1.0"
+ micromatch "^4.0.5"
+ normalize-path "^3.0.0"
+ object-hash "^3.0.0"
+ picocolors "^1.0.0"
+ postcss "^8.4.23"
+ postcss-import "^15.1.0"
+ postcss-js "^4.0.1"
+ postcss-load-config "^4.0.1"
+ postcss-nested "^6.0.1"
+ postcss-selector-parser "^6.0.11"
+ resolve "^1.22.2"
+ sucrase "^3.32.0"
+
+thenify-all@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
+ integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==
+ dependencies:
+ thenify ">= 3.1.0 < 4"
+
+"thenify@>= 3.1.0 < 4":
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
+ integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
+ dependencies:
+ any-promise "^1.0.0"
+
+throttle-debounce@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb"
+ integrity sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==
+
+tippy.js@^6.3.7:
+ version "6.3.7"
+ resolved "https://registry.yarnpkg.com/tippy.js/-/tippy.js-6.3.7.tgz#8ccfb651d642010ed9a32ff29b0e9e19c5b8c61c"
+ integrity sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==
+ dependencies:
+ "@popperjs/core" "^2.9.0"
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+ts-interface-checker@^0.1.9:
+ version "0.1.13"
+ resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
+ integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==
+
+type-fest@^2.19.0:
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b"
+ integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==
+
+uc.micro@^1.0.1, uc.micro@^1.0.5:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
+ integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
+
+update-browserslist-db@^1.0.13:
+ version "1.0.13"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
+ integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==
+ dependencies:
+ escalade "^3.1.1"
+ picocolors "^1.0.0"
+
+util-deprecate@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
+
+vite@^3.0.0:
+ version "3.2.7"
+ resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.7.tgz#35a62826bd4d6b778ae5db8766d023bcd4e7bef3"
+ integrity sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==
+ dependencies:
+ esbuild "^0.15.9"
+ postcss "^8.4.18"
+ resolve "^1.22.1"
+ rollup "^2.79.1"
+ optionalDependencies:
+ fsevents "~2.3.2"
+
+vue-demi@>=0.14.5, vue-demi@>=0.14.6:
+ version "0.14.6"
+ resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.6.tgz#dc706582851dc1cdc17a0054f4fec2eb6df74c92"
+ integrity sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==
+
+vue-router@^4.0.12:
+ version "4.2.5"
+ resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.5.tgz#b9e3e08f1bd9ea363fdd173032620bc50cf0e98a"
+ integrity sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==
+ dependencies:
+ "@vue/devtools-api" "^6.5.0"
+
+vue@^3.2.25:
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.9.tgz#219a2ec68e8d4d0b0180460af0f5b9299b3f3f1f"
+ integrity sha512-sy5sLCTR8m6tvUk1/ijri3Yqzgpdsmxgj6n6yl7GXXCXqVbmW2RCXe9atE4cEI6Iv7L89v5f35fZRRr5dChP9w==
+ dependencies:
+ "@vue/compiler-dom" "3.3.9"
+ "@vue/compiler-sfc" "3.3.9"
+ "@vue/runtime-dom" "3.3.9"
+ "@vue/server-renderer" "3.3.9"
+ "@vue/shared" "3.3.9"
+
+w3c-keyname@^2.2.0:
+ version "2.2.8"
+ resolved "https://registry.yarnpkg.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz#7b17c8c6883d4e8b86ac8aba79d39e880f8869c5"
+ integrity sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
+
+ws@~8.11.0:
+ version "8.11.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143"
+ integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==
+
+xmlhttprequest-ssl@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67"
+ integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==
+
+yaml@^2.3.4:
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2"
+ integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==
diff --git a/lms/lms/api.py b/lms/lms/api.py
index 38051ade..baa2f597 100644
--- a/lms/lms/api.py
+++ b/lms/lms/api.py
@@ -142,10 +142,20 @@ def add_mentor_to_subgroup(subgroup, email):
@frappe.whitelist(allow_guest=True)
-def get_courses():
- """Returns the list of courses."""
- return frappe.get_all(
- "LMS Course",
- fields=["name", "title", "short_introduction", "image"],
- filters={"published": True},
- )
+def get_user_info(user=None):
+ print(user)
+ if frappe.session.user == "Guest":
+ frappe.throw("Authentication failed", exc=frappe.AuthenticationError)
+ filters = {}
+ if user:
+ filters["name"] = user
+
+ users = frappe.qb.get_query(
+ "User",
+ filters=filters,
+ fields=["name", "email", "enabled", "user_image", "full_name", "user_type"],
+ order_by="full_name asc",
+ distinct=True,
+ ).run(as_dict=1)
+ print(users)
+ return users
diff --git a/lms/lms/utils.py b/lms/lms/utils.py
index 6ec99bab..b4fd73a5 100644
--- a/lms/lms/utils.py
+++ b/lms/lms/utils.py
@@ -196,7 +196,7 @@ def get_instructors(course):
frappe.db.get_value(
"User",
instructor,
- ["name", "username", "full_name", "user_image"],
+ ["name", "username", "full_name", "user_image", "first_name"],
as_dict=True,
)
)
@@ -1147,3 +1147,86 @@ def change_currency(amount, currency, country=None):
amount = cint(amount)
amount, currency = check_multicurrency(amount, currency, country)
return fmt_money(amount, 0, currency)
+
+
+@frappe.whitelist(allow_guest=True)
+def get_courses():
+ """Returns the list of courses."""
+ courses = frappe.get_all(
+ "LMS Course",
+ fields=[
+ "name",
+ "title",
+ "short_introduction",
+ "image",
+ "published",
+ "upcoming",
+ "status",
+ "paid_course",
+ "course_price",
+ "currency",
+ ],
+ filters={"published": True},
+ )
+
+ courses = get_course_details(courses)
+ courses = get_categorized_courses(courses)
+ return courses
+
+
+def get_course_details(courses):
+ for course in courses:
+ course.tags = get_tags(course.name)
+ course.lesson_count = get_lesson_count(course.name)
+
+ course.enrollment_count = frappe.db.count(
+ "LMS Enrollment", {"course": course.name, "member_type": "Student"}
+ )
+
+ avg_rating = get_average_rating(course.name) or 0
+ course.avg_rating = frappe.utils.flt(
+ avg_rating, frappe.get_system_settings("float_precision") or 3
+ )
+
+ course.instructors = get_instructors(course.name)
+ if course.paid_course:
+ course.price = frappe.utils.fmt_money(course.course_price, 0, course.currency)
+ else:
+ course.price = _("Free")
+
+ if frappe.session.user == "Guest":
+ course.membership = None
+ course.is_instructor = False
+ else:
+ course.membership = frappe.db.get_value(
+ "LMS Enrollment",
+ {"member": frappe.session.user, "course": course.name},
+ ["name", "course", "current_lesson", "progress"],
+ as_dict=1,
+ )
+ course.is_instructor = is_instructor(course.name)
+ return courses
+
+
+def get_categorized_courses(courses):
+ live, upcoming, enrolled, created, under_review = [], [], [], [], []
+
+ for course in courses:
+ if course.upcoming:
+ upcoming.append(course)
+ elif course.published:
+ live.append(course)
+ elif course.membership:
+ enrolled.append(course)
+ elif course.is_instructor:
+ created.append(course)
+ elif course.status == "Under Review":
+ under_review.append(course)
+
+ return {
+ "live": live,
+ "upcoming": upcoming,
+ "enrolled": enrolled,
+ "created": created,
+ "under_review": under_review,
+ }
diff --git a/lms/public/frontend/assets/Courses.10129947.js b/lms/public/frontend/assets/Courses.10129947.js
new file mode 100644
index 00000000..cffd1fe3
--- /dev/null
+++ b/lms/public/frontend/assets/Courses.10129947.js
@@ -0,0 +1,286 @@
+var N = Object.defineProperty,
+ S = Object.defineProperties;
+var j = Object.getOwnPropertyDescriptors;
+var h = Object.getOwnPropertySymbols;
+var b = Object.prototype.hasOwnProperty,
+ w = Object.prototype.propertyIsEnumerable;
+var p = (e, s, t) =>
+ s in e
+ ? N(e, s, {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: t,
+ })
+ : (e[s] = t),
+ m = (e, s) => {
+ for (var t in s || (s = {})) b.call(s, t) && p(e, t, s[t]);
+ if (h) for (var t of h(s)) w.call(s, t) && p(e, t, s[t]);
+ return e;
+ },
+ g = (e, s) => S(e, j(s));
+var C = (e, s) => {
+ var t = {};
+ for (var a in e) b.call(e, a) && s.indexOf(a) < 0 && (t[a] = e[a]);
+ if (e != null && h)
+ for (var a of h(e)) s.indexOf(a) < 0 && w.call(e, a) && (t[a] = e[a]);
+ return t;
+};
+import {
+ l as $,
+ o,
+ d as c,
+ k as r,
+ F as v,
+ m as y,
+ t as l,
+ n as B,
+ p as z,
+ q as A,
+ e as n,
+ u,
+ v as O,
+ x as q,
+ y as U,
+ z as V,
+} from "./frappe-ui.8966d601.js";
+var _ = {
+ xmlns: "http://www.w3.org/2000/svg",
+ width: 24,
+ height: 24,
+ viewBox: "0 0 24 24",
+ fill: "none",
+ stroke: "currentColor",
+ "stroke-width": 2,
+ "stroke-linecap": "round",
+ "stroke-linejoin": "round",
+};
+const F = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(),
+ f =
+ (e, s) =>
+ (oe, { attrs: d, slots: x }) => {
+ var k = oe,
+ {
+ size: t,
+ strokeWidth: a = 2,
+ absoluteStrokeWidth: i,
+ color: M,
+ } = k,
+ I = C(k, [
+ "size",
+ "strokeWidth",
+ "absoluteStrokeWidth",
+ "color",
+ ]);
+ return $(
+ "svg",
+ m(
+ g(
+ m(
+ g(m({}, _), {
+ width: t || _.width,
+ height: t || _.height,
+ stroke: M || _.stroke,
+ "stroke-width": i
+ ? (Number(a) * 24) / Number(t)
+ : a,
+ }),
+ d
+ ),
+ {
+ class: [
+ "lucide",
+ `lucide-${F(e)}`,
+ (d == null ? void 0 : d.class) || "",
+ ],
+ }
+ ),
+ I
+ ),
+ [...s.map((L) => $(...L)), ...(x.default ? [x.default()] : [])]
+ );
+ },
+ H = f("BookOpenIcon", [
+ [
+ "path",
+ { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z", key: "vv98re" },
+ ],
+ [
+ "path",
+ { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z", key: "1cyq3y" },
+ ],
+ ]),
+ D = f("StarIcon", [
+ [
+ "polygon",
+ {
+ points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",
+ key: "8f66p6",
+ },
+ ],
+ ]),
+ E = f("UsersIcon", [
+ [
+ "path",
+ { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" },
+ ],
+ ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
+ ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
+ ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }],
+ ]);
+const K = {
+ class: "flex flex-col h-full border border-gray-200 rounded-md shadow-sm mt-5",
+ },
+ P = { class: "flex relative top-4 left-4" },
+ R = { class: "course-card-pills rounded-md border border-gray-200" },
+ Z = { key: 0, class: "flex flex-1 text-4xl font-bold" },
+ G = { class: "p-4" },
+ J = { class: "flex text-base items-center justify-between" },
+ Q = { class: "flex items-center space-x-1 py-1" },
+ T = { class: "flex items-center space-x-1 py-1" },
+ X = { class: "flex items-center space-x-1 py-1" },
+ Y = { class: "text-2xl font-semibold" },
+ W = { class: "text-ellipsis truncate text-base" },
+ ee = {
+ __name: "CourseCard",
+ props: { course: { type: Object, default: null } },
+ setup(e) {
+ return (s, t) => (
+ o(),
+ c("div", K, [
+ r(
+ "div",
+ {
+ class: z([
+ "course-image",
+ { "default-image": !e.course.image },
+ ]),
+ style: A({
+ backgroundImage: "url(" + e.course.image + ")",
+ }),
+ },
+ [
+ r("div", P, [
+ (o(!0),
+ c(
+ v,
+ null,
+ y(
+ e.course.tags,
+ (a) => (o(), c("div", R, l(a), 1))
+ ),
+ 256
+ )),
+ ]),
+ e.course.image
+ ? B("", !0)
+ : (o(), c("div", Z, l(e.course.title[0]), 1)),
+ ],
+ 6
+ ),
+ r("div", G, [
+ r("div", J, [
+ r("div", Q, [
+ n(u(H), { class: "h-4 w-4 text-gray-700" }),
+ r("span", null, l(e.course.lesson_count), 1),
+ ]),
+ r("div", T, [
+ n(u(E), { class: "h-4 w-4 text-gray-700" }),
+ r(
+ "span",
+ null,
+ l(e.course.enrollment_count),
+ 1
+ ),
+ ]),
+ r("div", X, [
+ n(u(D), { class: "h-4 w-4 text-gray-700" }),
+ r("span", null, l(e.course.avg_rating), 1),
+ ]),
+ ]),
+ r("div", Y, l(e.course.title), 1),
+ r("div", W, l(e.course.short_introduction), 1),
+ (o(!0),
+ c(
+ v,
+ null,
+ y(e.course.instructors, (a) => (o(), c("div"))),
+ 256
+ )),
+ ]),
+ ])
+ );
+ },
+ },
+ se = {
+ __name: "UserAvatar",
+ props: { user: { type: Object, default: null } },
+ setup(e) {
+ return (s, t) =>
+ e.user
+ ? (o(),
+ O(
+ u(U),
+ q(
+ {
+ key: 0,
+ class: "",
+ label: e.user.full_name,
+ image: e.user.user_image,
+ },
+ s.$attrs
+ ),
+ null,
+ 16,
+ ["label", "image"]
+ ))
+ : B("", !0);
+ },
+ },
+ te = { class: "container" },
+ ae = r("div", { class: "text-2xl font-semibold" }, " All Courses ", -1),
+ re = { class: "grid grid-cols-3 gap-8" },
+ ne = {
+ __name: "Courses",
+ setup(e) {
+ const s = V({
+ type: "list",
+ doctype: "LMS Course",
+ url: "lms.lms.utils.get_courses",
+ auto: !0,
+ });
+ return (t, a) => (
+ o(),
+ c("div", te, [
+ ae,
+ r("div", re, [
+ (o(!0),
+ c(
+ v,
+ null,
+ y(
+ u(s).data,
+ (i) => (
+ o(),
+ c("div", null, [
+ n(ee, { course: i }, null, 8, [
+ "course",
+ ]),
+ n(
+ se,
+ { user: i.instructors[0] },
+ null,
+ 8,
+ ["user"]
+ ),
+ ])
+ )
+ ),
+ 256
+ )),
+ ]),
+ ])
+ );
+ },
+ };
+export { ne as default };
diff --git a/lms/public/frontend/assets/Courses.4fd15046.css b/lms/public/frontend/assets/Courses.4fd15046.css
new file mode 100644
index 00000000..7e0c137e
--- /dev/null
+++ b/lms/public/frontend/assets/Courses.4fd15046.css
@@ -0,0 +1 @@
+.course-image{height:168px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.course-card-pills{background:#ffffff;margin-left:0;margin-right:.5rem;padding:3.5px 8px;font-size:11px;text-align:center;letter-spacing:.011em;text-transform:uppercase;font-weight:600;width:-moz-fit-content;width:fit-content}.default-image{display:flex;flex-direction:column;align-items:center;background-color:#ededed;color:#525252}
diff --git a/lms/public/frontend/assets/FontColor.41d2871a.js b/lms/public/frontend/assets/FontColor.41d2871a.js
new file mode 100644
index 00000000..75cf294f
--- /dev/null
+++ b/lms/public/frontend/assets/FontColor.41d2871a.js
@@ -0,0 +1,206 @@
+import {
+ b as f,
+ P as g,
+ T as _,
+ r as d,
+ o,
+ v as l,
+ w as r,
+ A as p,
+ B as C,
+ C as k,
+ k as a,
+ d as c,
+ F as u,
+ m,
+ q as h,
+ p as b,
+} from "./frappe-ui.8966d601.js";
+const v = {
+ name: "FontColor",
+ props: ["editor"],
+ components: { Popover: g, Tooltip: _ },
+ methods: {
+ setBackgroundColor(t) {
+ t.name != "Default"
+ ? this.editor
+ .chain()
+ .focus()
+ .toggleHighlight({ color: t.hex })
+ .run()
+ : this.editor.chain().focus().unsetHighlight().run();
+ },
+ setForegroundColor(t) {
+ t.name != "Default"
+ ? this.editor.chain().focus().setColor(t.hex).run()
+ : this.editor.chain().focus().unsetColor().run();
+ },
+ },
+ computed: {
+ foregroundColors() {
+ return [
+ { name: "Default", hex: "#1F272E" },
+ { name: "Yellow", hex: "#ca8a04" },
+ { name: "Orange", hex: "#ea580c" },
+ { name: "Red", hex: "#dc2626" },
+ { name: "Green", hex: "#16a34a" },
+ { name: "Blue", hex: "#1579D0" },
+ { name: "Purple", hex: "#9333ea" },
+ { name: "Pink", hex: "#db2777" },
+ ];
+ },
+ backgroundColors() {
+ return [
+ { name: "Default", hex: null },
+ { name: "Yellow", hex: "#fef9c3" },
+ { name: "Orange", hex: "#ffedd5" },
+ { name: "Red", hex: "#fee2e2" },
+ { name: "Green", hex: "#dcfce7" },
+ { name: "Blue", hex: "#D3E9FC" },
+ { name: "Purple", hex: "#f3e8ff" },
+ { name: "Pink", hex: "#fce7f3" },
+ ];
+ },
+ },
+ },
+ y = { class: "p-2" },
+ B = a("div", { class: "text-sm text-gray-700" }, "Text Color", -1),
+ P = { class: "mt-1 grid grid-cols-8 gap-1" },
+ F = ["aria-label", "onClick"],
+ w = a(
+ "div",
+ { class: "mt-2 text-sm text-gray-700" },
+ "Background Color",
+ -1
+ ),
+ D = { class: "mt-1 grid grid-cols-8 gap-1" },
+ T = ["aria-label", "onClick"];
+function A(t, z, E, R, $, n) {
+ const i = d("Tooltip"),
+ x = d("Popover");
+ return (
+ o(),
+ l(
+ x,
+ { transition: "default" },
+ {
+ target: r(({ togglePopover: e, isOpen: s }) => [
+ p(
+ t.$slots,
+ "default",
+ C(k({ onClick: () => e(), isActive: s }))
+ ),
+ ]),
+ "body-main": r(() => [
+ a("div", y, [
+ B,
+ a("div", P, [
+ (o(!0),
+ c(
+ u,
+ null,
+ m(
+ n.foregroundColors,
+ (e) => (
+ o(),
+ l(
+ i,
+ {
+ class: "flex",
+ key: e.name,
+ text: e.name,
+ },
+ {
+ default: r(() => [
+ a(
+ "button",
+ {
+ "aria-label":
+ e.name,
+ class: "flex h-5 w-5 items-center justify-center rounded border text-base",
+ style: h({
+ color: e.hex,
+ }),
+ onClick: (s) =>
+ n.setForegroundColor(
+ e
+ ),
+ },
+ " A ",
+ 12,
+ F
+ ),
+ ]),
+ _: 2,
+ },
+ 1032,
+ ["text"]
+ )
+ )
+ ),
+ 128
+ )),
+ ]),
+ w,
+ a("div", D, [
+ (o(!0),
+ c(
+ u,
+ null,
+ m(
+ n.backgroundColors,
+ (e) => (
+ o(),
+ l(
+ i,
+ {
+ class: "flex",
+ key: e.name,
+ text: e.name,
+ },
+ {
+ default: r(() => [
+ a(
+ "button",
+ {
+ "aria-label":
+ e.name,
+ class: b([
+ "flex h-5 w-5 items-center justify-center rounded border text-base text-gray-900",
+ e.hex
+ ? "border-transparent"
+ : "border-gray-200",
+ ]),
+ style: h({
+ backgroundColor:
+ e.hex,
+ }),
+ onClick: (s) =>
+ n.setBackgroundColor(
+ e
+ ),
+ },
+ " A ",
+ 14,
+ T
+ ),
+ ]),
+ _: 2,
+ },
+ 1032,
+ ["text"]
+ )
+ )
+ ),
+ 128
+ )),
+ ]),
+ ]),
+ ]),
+ _: 3,
+ }
+ )
+ );
+}
+const G = f(v, [["render", A]]);
+export { G as default };
diff --git a/lms/public/frontend/assets/Home.24891fef.js b/lms/public/frontend/assets/Home.24891fef.js
new file mode 100644
index 00000000..0a2f6189
--- /dev/null
+++ b/lms/public/frontend/assets/Home.24891fef.js
@@ -0,0 +1,65 @@
+import {
+ b as d,
+ D as g,
+ r,
+ o as m,
+ d as f,
+ e as t,
+ w as s,
+ j as l,
+ k as p,
+ t as u,
+} from "./frappe-ui.8966d601.js";
+const D = {
+ name: "Home",
+ data() {
+ return { showDialog: !1 };
+ },
+ resources: { ping: { url: "ping" } },
+ components: { Dialog: g },
+ },
+ _ = { class: "max-w-3xl py-12 mx-auto" };
+function k(e, o, w, C, n, V) {
+ const a = r("Button"),
+ c = r("Dialog");
+ return (
+ m(),
+ f("div", _, [
+ t(
+ a,
+ {
+ "icon-left": "code",
+ onClick: e.$resources.ping.fetch,
+ loading: e.$resources.ping.loading,
+ },
+ {
+ default: s(() => [l(" Click to send 'ping' request ")]),
+ _: 1,
+ },
+ 8,
+ ["onClick", "loading"]
+ ),
+ p("div", null, u(e.$resources.ping.data), 1),
+ p("pre", null, u(e.$resources.ping), 1),
+ t(
+ a,
+ { onClick: o[0] || (o[0] = (i) => (n.showDialog = !0)) },
+ { default: s(() => [l("Open Dialog")]), _: 1 }
+ ),
+ t(
+ c,
+ {
+ title: "Title",
+ modelValue: n.showDialog,
+ "onUpdate:modelValue":
+ o[1] || (o[1] = (i) => (n.showDialog = i)),
+ },
+ { default: s(() => [l(" Dialog content ")]), _: 1 },
+ 8,
+ ["modelValue"]
+ ),
+ ])
+ );
+}
+const B = d(D, [["render", k]]);
+export { B as default };
diff --git a/lms/public/frontend/assets/InsertImage.3828880c.js b/lms/public/frontend/assets/InsertImage.3828880c.js
new file mode 100644
index 00000000..d9ec216a
--- /dev/null
+++ b/lms/public/frontend/assets/InsertImage.3828880c.js
@@ -0,0 +1,151 @@
+import {
+ b as f,
+ h as I,
+ D,
+ G as h,
+ r as d,
+ o as m,
+ d as c,
+ A as _,
+ B as y,
+ C,
+ e as n,
+ w as s,
+ k as r,
+ t as w,
+ n as b,
+ j as u,
+ F as k,
+} from "./frappe-ui.8966d601.js";
+const v = {
+ name: "InsertImage",
+ props: ["editor"],
+ expose: ["openDialog"],
+ data() {
+ return { addImageDialog: { url: "", file: null, show: !1 } };
+ },
+ components: { Button: I, Dialog: D },
+ methods: {
+ openDialog() {
+ this.addImageDialog.show = !0;
+ },
+ onImageSelect(t) {
+ let e = t.target.files[0];
+ !e ||
+ ((this.addImageDialog.file = e),
+ h(e).then((i) => {
+ this.addImageDialog.url = i;
+ }));
+ },
+ addImage(t) {
+ this.editor.chain().focus().setImage({ src: t }).run(),
+ this.reset();
+ },
+ reset() {
+ this.addImageDialog = this.$options.data().addImageDialog;
+ },
+ },
+ },
+ B = {
+ class: "relative cursor-pointer rounded-lg bg-gray-100 py-1 focus-within:bg-gray-200 hover:bg-gray-200",
+ },
+ x = { class: "absolute inset-0 select-none px-2 py-1 text-base" },
+ S = ["src"];
+function V(t, e, i, A, a, o) {
+ const g = d("Button"),
+ p = d("Dialog");
+ return (
+ m(),
+ c(
+ k,
+ null,
+ [
+ _(t.$slots, "default", y(C({ onClick: o.openDialog }))),
+ n(
+ p,
+ {
+ options: { title: "Add Image" },
+ modelValue: a.addImageDialog.show,
+ "onUpdate:modelValue":
+ e[2] || (e[2] = (l) => (a.addImageDialog.show = l)),
+ onAfterLeave: o.reset,
+ },
+ {
+ "body-content": s(() => [
+ r("label", B, [
+ r(
+ "input",
+ {
+ type: "file",
+ class: "w-full opacity-0",
+ onChange:
+ e[0] ||
+ (e[0] = (...l) =>
+ o.onImageSelect &&
+ o.onImageSelect(...l)),
+ accept: "image/*",
+ },
+ null,
+ 32
+ ),
+ r(
+ "span",
+ x,
+ w(
+ a.addImageDialog.file
+ ? "Select another image"
+ : "Select an image"
+ ),
+ 1
+ ),
+ ]),
+ a.addImageDialog.url
+ ? (m(),
+ c(
+ "img",
+ {
+ key: 0,
+ src: a.addImageDialog.url,
+ class: "mt-2 w-full rounded-lg",
+ },
+ null,
+ 8,
+ S
+ ))
+ : b("", !0),
+ ]),
+ actions: s(() => [
+ n(
+ g,
+ {
+ variant: "solid",
+ onClick:
+ e[1] ||
+ (e[1] = (l) =>
+ o.addImage(a.addImageDialog.url)),
+ },
+ {
+ default: s(() => [u(" Insert Image ")]),
+ _: 1,
+ }
+ ),
+ n(
+ g,
+ { onClick: o.reset },
+ { default: s(() => [u(" Cancel ")]), _: 1 },
+ 8,
+ ["onClick"]
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["modelValue", "onAfterLeave"]
+ ),
+ ],
+ 64
+ )
+ );
+}
+const F = f(v, [["render", V]]);
+export { F as default };
diff --git a/lms/public/frontend/assets/InsertLink.20429a64.js b/lms/public/frontend/assets/InsertLink.20429a64.js
new file mode 100644
index 00000000..c17878c3
--- /dev/null
+++ b/lms/public/frontend/assets/InsertLink.20429a64.js
@@ -0,0 +1,120 @@
+import {
+ b as d,
+ h as g,
+ I as L,
+ D as m,
+ r as i,
+ o as p,
+ d as f,
+ A as D,
+ B as h,
+ C as c,
+ e as l,
+ w as a,
+ E as w,
+ j as _,
+ F as v,
+} from "./frappe-ui.8966d601.js";
+const x = {
+ name: "InsertLink",
+ props: ["editor"],
+ components: { Button: g, Input: L, Dialog: m },
+ data() {
+ return { setLinkDialog: { url: "", show: !1 } };
+ },
+ methods: {
+ openDialog() {
+ let t = this.editor.getAttributes("link").href;
+ t && (this.setLinkDialog.url = t), (this.setLinkDialog.show = !0);
+ },
+ setLink(t) {
+ t === ""
+ ? this.editor
+ .chain()
+ .focus()
+ .extendMarkRange("link")
+ .unsetLink()
+ .run()
+ : this.editor
+ .chain()
+ .focus()
+ .extendMarkRange("link")
+ .setLink({ href: t })
+ .run(),
+ (this.setLinkDialog.show = !1),
+ (this.setLinkDialog.url = "");
+ },
+ reset() {
+ this.setLinkDialog = this.$options.data().setLinkDialog;
+ },
+ },
+};
+function V(t, e, C, B, n, s) {
+ const r = i("FormControl"),
+ u = i("Button"),
+ k = i("Dialog");
+ return (
+ p(),
+ f(
+ v,
+ null,
+ [
+ D(t.$slots, "default", h(c({ onClick: s.openDialog }))),
+ l(
+ k,
+ {
+ options: { title: "Set Link" },
+ modelValue: n.setLinkDialog.show,
+ "onUpdate:modelValue":
+ e[3] || (e[3] = (o) => (n.setLinkDialog.show = o)),
+ onAfterLeave: s.reset,
+ },
+ {
+ "body-content": a(() => [
+ l(
+ r,
+ {
+ type: "text",
+ label: "URL",
+ modelValue: n.setLinkDialog.url,
+ "onUpdate:modelValue":
+ e[0] ||
+ (e[0] = (o) =>
+ (n.setLinkDialog.url = o)),
+ onKeydown:
+ e[1] ||
+ (e[1] = w(
+ (o) => s.setLink(o.target.value),
+ ["enter"]
+ )),
+ },
+ null,
+ 8,
+ ["modelValue"]
+ ),
+ ]),
+ actions: a(() => [
+ l(
+ u,
+ {
+ variant: "solid",
+ onClick:
+ e[2] ||
+ (e[2] = (o) =>
+ s.setLink(n.setLinkDialog.url)),
+ },
+ { default: a(() => [_(" Save ")]), _: 1 }
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["modelValue", "onAfterLeave"]
+ ),
+ ],
+ 64
+ )
+ );
+}
+const b = d(x, [["render", V]]);
+export { b as default };
diff --git a/lms/public/frontend/assets/InsertVideo.d725d1a5.js b/lms/public/frontend/assets/InsertVideo.d725d1a5.js
new file mode 100644
index 00000000..8a07f794
--- /dev/null
+++ b/lms/public/frontend/assets/InsertVideo.d725d1a5.js
@@ -0,0 +1,200 @@
+import {
+ b as _,
+ h as C,
+ D as k,
+ H as v,
+ r,
+ o as u,
+ d as c,
+ A as h,
+ B,
+ C as w,
+ e as t,
+ w as l,
+ k as x,
+ j as n,
+ t as y,
+ v as U,
+ n as p,
+ F,
+} from "./frappe-ui.8966d601.js";
+const A = {
+ name: "InsertImage",
+ props: ["editor"],
+ expose: ["openDialog"],
+ data() {
+ return { addVideoDialog: { url: "", file: null, show: !1 } };
+ },
+ components: { Button: C, Dialog: k, FileUploader: v },
+ methods: {
+ openDialog() {
+ this.addVideoDialog.show = !0;
+ },
+ onVideoSelect(i) {
+ let o = i.target.files[0];
+ !o || (this.addVideoDialog.file = o);
+ },
+ addVideo(i) {
+ this.editor
+ .chain()
+ .focus()
+ .insertContent(``)
+ .run(),
+ this.reset();
+ },
+ reset() {
+ this.addVideoDialog = this.$options.data().addVideoDialog;
+ },
+ },
+ },
+ I = { class: "flex items-center space-x-2" },
+ N = ["src"];
+function S(i, o, b, L, e, a) {
+ const s = r("Button"),
+ V = r("FileUploader"),
+ g = r("Dialog");
+ return (
+ u(),
+ c(
+ F,
+ null,
+ [
+ h(i.$slots, "default", B(w({ onClick: a.openDialog }))),
+ t(
+ g,
+ {
+ options: { title: "Add Video" },
+ modelValue: e.addVideoDialog.show,
+ "onUpdate:modelValue":
+ o[2] || (o[2] = (d) => (e.addVideoDialog.show = d)),
+ onAfterLeave: a.reset,
+ },
+ {
+ "body-content": l(() => [
+ t(
+ V,
+ {
+ "file-types": "video/*",
+ onSuccess:
+ o[0] ||
+ (o[0] = (d) =>
+ (e.addVideoDialog.url =
+ d.file_url)),
+ },
+ {
+ default: l(
+ ({
+ file: d,
+ progress: f,
+ uploading: m,
+ openFileSelector: D,
+ }) => [
+ x("div", I, [
+ t(
+ s,
+ { onClick: D },
+ {
+ default: l(() => [
+ n(
+ y(
+ m
+ ? `Uploading ${f}%`
+ : e
+ .addVideoDialog
+ .url
+ ? "Change Video"
+ : "Upload Video"
+ ),
+ 1
+ ),
+ ]),
+ _: 2,
+ },
+ 1032,
+ ["onClick"]
+ ),
+ e.addVideoDialog.url
+ ? (u(),
+ U(
+ s,
+ {
+ key: 0,
+ onClick: () => {
+ (e.addVideoDialog.url =
+ null),
+ (e.addVideoDialog.file =
+ null);
+ },
+ },
+ {
+ default: l(
+ () => [
+ n(
+ " Remove "
+ ),
+ ]
+ ),
+ _: 2,
+ },
+ 1032,
+ ["onClick"]
+ ))
+ : p("", !0),
+ ]),
+ ]
+ ),
+ _: 1,
+ }
+ ),
+ e.addVideoDialog.url
+ ? (u(),
+ c(
+ "video",
+ {
+ key: 0,
+ src: e.addVideoDialog.url,
+ class: "mt-2 w-full rounded-lg",
+ type: "video/mp4",
+ controls: "",
+ },
+ null,
+ 8,
+ N
+ ))
+ : p("", !0),
+ ]),
+ actions: l(() => [
+ t(
+ s,
+ {
+ variant: "solid",
+ onClick:
+ o[1] ||
+ (o[1] = (d) =>
+ a.addVideo(e.addVideoDialog.url)),
+ },
+ {
+ default: l(() => [n(" Insert Video ")]),
+ _: 1,
+ }
+ ),
+ t(
+ s,
+ { onClick: a.reset },
+ { default: l(() => [n("Cancel")]), _: 1 },
+ 8,
+ ["onClick"]
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["modelValue", "onAfterLeave"]
+ ),
+ ],
+ 64
+ )
+ );
+}
+const R = _(A, [["render", S]]);
+export { R as default };
diff --git a/lms/public/frontend/assets/Inter-Black.05e55dd7.woff2 b/lms/public/frontend/assets/Inter-Black.05e55dd7.woff2
new file mode 100644
index 00000000..ea45598a
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Black.05e55dd7.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Black.9c79713b.woff b/lms/public/frontend/assets/Inter-Black.9c79713b.woff
new file mode 100644
index 00000000..c7737ed3
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Black.9c79713b.woff differ
diff --git a/lms/public/frontend/assets/Inter-Black.bc2198e0.woff2 b/lms/public/frontend/assets/Inter-Black.bc2198e0.woff2
new file mode 100644
index 00000000..b16b995b
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Black.bc2198e0.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-BlackItalic.1cb529a7.woff2 b/lms/public/frontend/assets/Inter-BlackItalic.1cb529a7.woff2
new file mode 100644
index 00000000..a3f1b70c
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BlackItalic.1cb529a7.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-BlackItalic.4ff7db4a.woff2 b/lms/public/frontend/assets/Inter-BlackItalic.4ff7db4a.woff2
new file mode 100644
index 00000000..10a1764b
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BlackItalic.4ff7db4a.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-BlackItalic.7ecbf9fa.woff b/lms/public/frontend/assets/Inter-BlackItalic.7ecbf9fa.woff
new file mode 100644
index 00000000..b5f14476
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BlackItalic.7ecbf9fa.woff differ
diff --git a/lms/public/frontend/assets/Inter-Bold.1dc41a58.woff2 b/lms/public/frontend/assets/Inter-Bold.1dc41a58.woff2
new file mode 100644
index 00000000..a4fe8349
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Bold.1dc41a58.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Bold.2b828bef.woff b/lms/public/frontend/assets/Inter-Bold.2b828bef.woff
new file mode 100644
index 00000000..e3845558
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Bold.2b828bef.woff differ
diff --git a/lms/public/frontend/assets/Inter-Bold.2efd8e3c.woff2 b/lms/public/frontend/assets/Inter-Bold.2efd8e3c.woff2
new file mode 100644
index 00000000..835dd497
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Bold.2efd8e3c.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-BoldItalic.8bc8e0ff.woff b/lms/public/frontend/assets/Inter-BoldItalic.8bc8e0ff.woff
new file mode 100644
index 00000000..ffac3f59
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BoldItalic.8bc8e0ff.woff differ
diff --git a/lms/public/frontend/assets/Inter-BoldItalic.dc0d4194.woff2 b/lms/public/frontend/assets/Inter-BoldItalic.dc0d4194.woff2
new file mode 100644
index 00000000..f2b44703
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BoldItalic.dc0d4194.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-BoldItalic.f528d863.woff2 b/lms/public/frontend/assets/Inter-BoldItalic.f528d863.woff2
new file mode 100644
index 00000000..1a41a14f
Binary files /dev/null and b/lms/public/frontend/assets/Inter-BoldItalic.f528d863.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayBlack.b1d4e33d.woff2 b/lms/public/frontend/assets/Inter-DisplayBlack.b1d4e33d.woff2
new file mode 100644
index 00000000..3e781f4e
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayBlack.b1d4e33d.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayBlackItalic.d561e8dd.woff2 b/lms/public/frontend/assets/Inter-DisplayBlackItalic.d561e8dd.woff2
new file mode 100644
index 00000000..d6208aa0
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayBlackItalic.d561e8dd.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayBold.d9bf35ac.woff2 b/lms/public/frontend/assets/Inter-DisplayBold.d9bf35ac.woff2
new file mode 100644
index 00000000..5bf04f80
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayBold.d9bf35ac.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayBoldItalic.fef00c57.woff2 b/lms/public/frontend/assets/Inter-DisplayBoldItalic.fef00c57.woff2
new file mode 100644
index 00000000..bd24332a
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayBoldItalic.fef00c57.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayExtraBold.b7cc680a.woff2 b/lms/public/frontend/assets/Inter-DisplayExtraBold.b7cc680a.woff2
new file mode 100644
index 00000000..bd549735
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayExtraBold.b7cc680a.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayExtraBoldItalic.e5a5984a.woff2 b/lms/public/frontend/assets/Inter-DisplayExtraBoldItalic.e5a5984a.woff2
new file mode 100644
index 00000000..e301939f
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayExtraBoldItalic.e5a5984a.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayExtraLight.32095132.woff2 b/lms/public/frontend/assets/Inter-DisplayExtraLight.32095132.woff2
new file mode 100644
index 00000000..782c3bb9
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayExtraLight.32095132.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayExtraLightItalic.8eeb78f4.woff2 b/lms/public/frontend/assets/Inter-DisplayExtraLightItalic.8eeb78f4.woff2
new file mode 100644
index 00000000..e59762ff
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayExtraLightItalic.8eeb78f4.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayItalic.938db435.woff2 b/lms/public/frontend/assets/Inter-DisplayItalic.938db435.woff2
new file mode 100644
index 00000000..eb46848e
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayItalic.938db435.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayLight.e40a858d.woff2 b/lms/public/frontend/assets/Inter-DisplayLight.e40a858d.woff2
new file mode 100644
index 00000000..9a359e52
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayLight.e40a858d.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayLightItalic.151e9a11.woff2 b/lms/public/frontend/assets/Inter-DisplayLightItalic.151e9a11.woff2
new file mode 100644
index 00000000..f4a2ea87
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayLightItalic.151e9a11.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayMedium.12a4a358.woff2 b/lms/public/frontend/assets/Inter-DisplayMedium.12a4a358.woff2
new file mode 100644
index 00000000..260958d2
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayMedium.12a4a358.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayMediumItalic.8968b5ab.woff2 b/lms/public/frontend/assets/Inter-DisplayMediumItalic.8968b5ab.woff2
new file mode 100644
index 00000000..6ba01776
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayMediumItalic.8968b5ab.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplaySemiBold.856fcb49.woff2 b/lms/public/frontend/assets/Inter-DisplaySemiBold.856fcb49.woff2
new file mode 100644
index 00000000..0f027bc0
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplaySemiBold.856fcb49.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplaySemiBoldItalic.5e57e1d2.woff2 b/lms/public/frontend/assets/Inter-DisplaySemiBoldItalic.5e57e1d2.woff2
new file mode 100644
index 00000000..7173db91
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplaySemiBoldItalic.5e57e1d2.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayThin.b64c173b.woff2 b/lms/public/frontend/assets/Inter-DisplayThin.b64c173b.woff2
new file mode 100644
index 00000000..8817510b
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayThin.b64c173b.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-DisplayThinItalic.b70f1c61.woff2 b/lms/public/frontend/assets/Inter-DisplayThinItalic.b70f1c61.woff2
new file mode 100644
index 00000000..d6d258ec
Binary files /dev/null and b/lms/public/frontend/assets/Inter-DisplayThinItalic.b70f1c61.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBold.585b4ce1.woff b/lms/public/frontend/assets/Inter-ExtraBold.585b4ce1.woff
new file mode 100644
index 00000000..885ac94f
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBold.585b4ce1.woff differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBold.74e72c6b.woff2 b/lms/public/frontend/assets/Inter-ExtraBold.74e72c6b.woff2
new file mode 100644
index 00000000..ae956b15
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBold.74e72c6b.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBold.8a72efb6.woff2 b/lms/public/frontend/assets/Inter-ExtraBold.8a72efb6.woff2
new file mode 100644
index 00000000..e68ed150
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBold.8a72efb6.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBoldItalic.2abc7ab1.woff2 b/lms/public/frontend/assets/Inter-ExtraBoldItalic.2abc7ab1.woff2
new file mode 100644
index 00000000..86578995
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBoldItalic.2abc7ab1.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBoldItalic.38e71f7c.woff2 b/lms/public/frontend/assets/Inter-ExtraBoldItalic.38e71f7c.woff2
new file mode 100644
index 00000000..7aee5162
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBoldItalic.38e71f7c.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraBoldItalic.b87f7d97.woff b/lms/public/frontend/assets/Inter-ExtraBoldItalic.b87f7d97.woff
new file mode 100644
index 00000000..d6cf8623
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraBoldItalic.b87f7d97.woff differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLight.1c06ef44.woff b/lms/public/frontend/assets/Inter-ExtraLight.1c06ef44.woff
new file mode 100644
index 00000000..ff769193
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLight.1c06ef44.woff differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLight.25a4db7c.woff2 b/lms/public/frontend/assets/Inter-ExtraLight.25a4db7c.woff2
new file mode 100644
index 00000000..c0f8667c
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLight.25a4db7c.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLight.4c337585.woff2 b/lms/public/frontend/assets/Inter-ExtraLight.4c337585.woff2
new file mode 100644
index 00000000..694b2df9
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLight.4c337585.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLightItalic.0e5667b1.woff b/lms/public/frontend/assets/Inter-ExtraLightItalic.0e5667b1.woff
new file mode 100644
index 00000000..c6ed13a4
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLightItalic.0e5667b1.woff differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLightItalic.7b39e865.woff2 b/lms/public/frontend/assets/Inter-ExtraLightItalic.7b39e865.woff2
new file mode 100644
index 00000000..9a7bd110
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLightItalic.7b39e865.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ExtraLightItalic.f0df46d0.woff2 b/lms/public/frontend/assets/Inter-ExtraLightItalic.f0df46d0.woff2
new file mode 100644
index 00000000..8cc15d32
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ExtraLightItalic.f0df46d0.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Italic.950174d1.woff2 b/lms/public/frontend/assets/Inter-Italic.950174d1.woff2
new file mode 100644
index 00000000..deca637d
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Italic.950174d1.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Italic.b0b21adf.woff b/lms/public/frontend/assets/Inter-Italic.b0b21adf.woff
new file mode 100644
index 00000000..4fdb59dc
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Italic.b0b21adf.woff differ
diff --git a/lms/public/frontend/assets/Inter-Italic.dd31ea31.woff2 b/lms/public/frontend/assets/Inter-Italic.dd31ea31.woff2
new file mode 100644
index 00000000..ff8c500a
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Italic.dd31ea31.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Italic.var.d9f448e3.woff2 b/lms/public/frontend/assets/Inter-Italic.var.d9f448e3.woff2
new file mode 100644
index 00000000..13778e77
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Italic.var.d9f448e3.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Light.211445a8.woff2 b/lms/public/frontend/assets/Inter-Light.211445a8.woff2
new file mode 100644
index 00000000..e96343e9
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Light.211445a8.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Light.319f53ba.woff b/lms/public/frontend/assets/Inter-Light.319f53ba.woff
new file mode 100644
index 00000000..42850acc
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Light.319f53ba.woff differ
diff --git a/lms/public/frontend/assets/Inter-Light.87ed65f8.woff2 b/lms/public/frontend/assets/Inter-Light.87ed65f8.woff2
new file mode 100644
index 00000000..65a7dadd
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Light.87ed65f8.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-LightItalic.289a60bc.woff b/lms/public/frontend/assets/Inter-LightItalic.289a60bc.woff
new file mode 100644
index 00000000..c4ed9a94
Binary files /dev/null and b/lms/public/frontend/assets/Inter-LightItalic.289a60bc.woff differ
diff --git a/lms/public/frontend/assets/Inter-LightItalic.5b94e337.woff2 b/lms/public/frontend/assets/Inter-LightItalic.5b94e337.woff2
new file mode 100644
index 00000000..555fc559
Binary files /dev/null and b/lms/public/frontend/assets/Inter-LightItalic.5b94e337.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-LightItalic.9ea2db78.woff2 b/lms/public/frontend/assets/Inter-LightItalic.9ea2db78.woff2
new file mode 100644
index 00000000..94c16e96
Binary files /dev/null and b/lms/public/frontend/assets/Inter-LightItalic.9ea2db78.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Medium.24fb6e39.woff2 b/lms/public/frontend/assets/Inter-Medium.24fb6e39.woff2
new file mode 100644
index 00000000..5b47c657
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Medium.24fb6e39.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Medium.a4e1e7e6.woff2 b/lms/public/frontend/assets/Inter-Medium.a4e1e7e6.woff2
new file mode 100644
index 00000000..871ce4ce
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Medium.a4e1e7e6.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Medium.f500bbb9.woff b/lms/public/frontend/assets/Inter-Medium.f500bbb9.woff
new file mode 100644
index 00000000..495faef7
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Medium.f500bbb9.woff differ
diff --git a/lms/public/frontend/assets/Inter-MediumItalic.a2db9bea.woff2 b/lms/public/frontend/assets/Inter-MediumItalic.a2db9bea.woff2
new file mode 100644
index 00000000..6eb3d1bf
Binary files /dev/null and b/lms/public/frontend/assets/Inter-MediumItalic.a2db9bea.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-MediumItalic.d06751dd.woff b/lms/public/frontend/assets/Inter-MediumItalic.d06751dd.woff
new file mode 100644
index 00000000..389c7a2b
Binary files /dev/null and b/lms/public/frontend/assets/Inter-MediumItalic.d06751dd.woff differ
diff --git a/lms/public/frontend/assets/Inter-MediumItalic.d4a7f5d9.woff2 b/lms/public/frontend/assets/Inter-MediumItalic.d4a7f5d9.woff2
new file mode 100644
index 00000000..aa805799
Binary files /dev/null and b/lms/public/frontend/assets/Inter-MediumItalic.d4a7f5d9.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Regular.b825f1bc.woff b/lms/public/frontend/assets/Inter-Regular.b825f1bc.woff
new file mode 100644
index 00000000..fa7715d1
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Regular.b825f1bc.woff differ
diff --git a/lms/public/frontend/assets/Inter-Regular.c342b1b7.woff2 b/lms/public/frontend/assets/Inter-Regular.c342b1b7.woff2
new file mode 100644
index 00000000..b52dd0a0
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Regular.c342b1b7.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Regular.edd1deaf.woff2 b/lms/public/frontend/assets/Inter-Regular.edd1deaf.woff2
new file mode 100644
index 00000000..8cc4edd5
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Regular.edd1deaf.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-SemiBold.3041a990.woff b/lms/public/frontend/assets/Inter-SemiBold.3041a990.woff
new file mode 100644
index 00000000..18d7749f
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBold.3041a990.woff differ
diff --git a/lms/public/frontend/assets/Inter-SemiBold.51419407.woff2 b/lms/public/frontend/assets/Inter-SemiBold.51419407.woff2
new file mode 100644
index 00000000..ead345ef
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBold.51419407.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-SemiBold.af44b8a2.woff2 b/lms/public/frontend/assets/Inter-SemiBold.af44b8a2.woff2
new file mode 100644
index 00000000..ece5204a
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBold.af44b8a2.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-SemiBoldItalic.5ce565c8.woff b/lms/public/frontend/assets/Inter-SemiBoldItalic.5ce565c8.woff
new file mode 100644
index 00000000..8ee64396
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBoldItalic.5ce565c8.woff differ
diff --git a/lms/public/frontend/assets/Inter-SemiBoldItalic.a4f92da5.woff2 b/lms/public/frontend/assets/Inter-SemiBoldItalic.a4f92da5.woff2
new file mode 100644
index 00000000..b32c0ba3
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBoldItalic.a4f92da5.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-SemiBoldItalic.daa7095c.woff2 b/lms/public/frontend/assets/Inter-SemiBoldItalic.daa7095c.woff2
new file mode 100644
index 00000000..30eebe46
Binary files /dev/null and b/lms/public/frontend/assets/Inter-SemiBoldItalic.daa7095c.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Thin.2198e9fb.woff b/lms/public/frontend/assets/Inter-Thin.2198e9fb.woff
new file mode 100644
index 00000000..1a22286f
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Thin.2198e9fb.woff differ
diff --git a/lms/public/frontend/assets/Inter-Thin.914c3fab.woff2 b/lms/public/frontend/assets/Inter-Thin.914c3fab.woff2
new file mode 100644
index 00000000..38422ace
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Thin.914c3fab.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-Thin.918c5cbe.woff2 b/lms/public/frontend/assets/Inter-Thin.918c5cbe.woff2
new file mode 100644
index 00000000..c56bc7ca
Binary files /dev/null and b/lms/public/frontend/assets/Inter-Thin.918c5cbe.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ThinItalic.382fab25.woff2 b/lms/public/frontend/assets/Inter-ThinItalic.382fab25.woff2
new file mode 100644
index 00000000..863057c2
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ThinItalic.382fab25.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ThinItalic.a3279f0a.woff2 b/lms/public/frontend/assets/Inter-ThinItalic.a3279f0a.woff2
new file mode 100644
index 00000000..eca5608c
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ThinItalic.a3279f0a.woff2 differ
diff --git a/lms/public/frontend/assets/Inter-ThinItalic.f53f21de.woff b/lms/public/frontend/assets/Inter-ThinItalic.f53f21de.woff
new file mode 100644
index 00000000..d8ec8373
Binary files /dev/null and b/lms/public/frontend/assets/Inter-ThinItalic.f53f21de.woff differ
diff --git a/lms/public/frontend/assets/Inter.var.d30c3bd0.woff2 b/lms/public/frontend/assets/Inter.var.d30c3bd0.woff2
new file mode 100644
index 00000000..039bfbab
Binary files /dev/null and b/lms/public/frontend/assets/Inter.var.d30c3bd0.woff2 differ
diff --git a/lms/public/frontend/assets/frappe-ui.8966d601.js b/lms/public/frontend/assets/frappe-ui.8966d601.js
new file mode 100644
index 00000000..c4dcadde
--- /dev/null
+++ b/lms/public/frontend/assets/frappe-ui.8966d601.js
@@ -0,0 +1,43901 @@
+var $y = Object.defineProperty,
+ zy = Object.defineProperties;
+var Hy = Object.getOwnPropertyDescriptors;
+var Ms = Object.getOwnPropertySymbols;
+var Hf = Object.prototype.hasOwnProperty,
+ Ff = Object.prototype.propertyIsEnumerable;
+var Xa = (t, e, n) =>
+ e in t
+ ? $y(t, e, {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: n,
+ })
+ : (t[e] = n),
+ W = (t, e) => {
+ for (var n in e || (e = {})) Hf.call(e, n) && Xa(t, n, e[n]);
+ if (Ms) for (var n of Ms(e)) Ff.call(e, n) && Xa(t, n, e[n]);
+ return t;
+ },
+ be = (t, e) => zy(t, Hy(e));
+var Qe = (t, e) => {
+ var n = {};
+ for (var r in t) Hf.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
+ if (t != null && Ms)
+ for (var r of Ms(t)) e.indexOf(r) < 0 && Ff.call(t, r) && (n[r] = t[r]);
+ return n;
+};
+var Za = (t, e, n) => (Xa(t, typeof e != "symbol" ? e + "" : e, n), n);
+var cr = (t, e, n) =>
+ new Promise((r, i) => {
+ var o = (a) => {
+ try {
+ l(n.next(a));
+ } catch (u) {
+ i(u);
+ }
+ },
+ s = (a) => {
+ try {
+ l(n.throw(a));
+ } catch (u) {
+ i(u);
+ }
+ },
+ l = (a) =>
+ a.done ? r(a.value) : Promise.resolve(a.value).then(o, s);
+ l((n = n.apply(t, e)).next());
+ });
+function id(t, e) {
+ const n = Object.create(null),
+ r = t.split(",");
+ for (let i = 0; i < r.length; i++) n[r[i]] = !0;
+ return e ? (i) => !!n[i.toLowerCase()] : (i) => !!n[i];
+}
+const rt = {},
+ Li = [],
+ On = () => {},
+ Fy = () => !1,
+ Vy = /^on[^a-z]/,
+ va = (t) => Vy.test(t),
+ od = (t) => t.startsWith("onUpdate:"),
+ _t = Object.assign,
+ sd = (t, e) => {
+ const n = t.indexOf(e);
+ n > -1 && t.splice(n, 1);
+ },
+ Wy = Object.prototype.hasOwnProperty,
+ We = (t, e) => Wy.call(t, e),
+ we = Array.isArray,
+ Di = (t) => wa(t) === "[object Map]",
+ jm = (t) => wa(t) === "[object Set]",
+ Ee = (t) => typeof t == "function",
+ at = (t) => typeof t == "string",
+ ba = (t) => typeof t == "symbol",
+ it = (t) => t !== null && typeof t == "object",
+ Lm = (t) => (it(t) || Ee(t)) && Ee(t.then) && Ee(t.catch),
+ Dm = Object.prototype.toString,
+ wa = (t) => Dm.call(t),
+ Uy = (t) => wa(t).slice(8, -1),
+ Im = (t) => wa(t) === "[object Object]",
+ ld = (t) =>
+ at(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t,
+ il = id(
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
+ ),
+ xa = (t) => {
+ const e = Object.create(null);
+ return (n) => e[n] || (e[n] = t(n));
+ },
+ Ky = /-(\w)/g,
+ Jn = xa((t) => t.replace(Ky, (e, n) => (n ? n.toUpperCase() : ""))),
+ qy = /\B([A-Z])/g,
+ xi = xa((t) => t.replace(qy, "-$1").toLowerCase()),
+ ka = xa((t) => t.charAt(0).toUpperCase() + t.slice(1)),
+ eu = xa((t) => (t ? `on${ka(t)}` : "")),
+ pi = (t, e) => !Object.is(t, e),
+ tu = (t, e) => {
+ for (let n = 0; n < t.length; n++) t[n](e);
+ },
+ yl = (t, e, n) => {
+ Object.defineProperty(t, e, {
+ configurable: !0,
+ enumerable: !1,
+ value: n,
+ });
+ },
+ Jy = (t) => {
+ const e = parseFloat(t);
+ return isNaN(e) ? t : e;
+ },
+ Gy = (t) => {
+ const e = at(t) ? Number(t) : NaN;
+ return isNaN(e) ? t : e;
+ };
+let Vf;
+const Ju = () =>
+ Vf ||
+ (Vf =
+ typeof globalThis != "undefined"
+ ? globalThis
+ : typeof self != "undefined"
+ ? self
+ : typeof window != "undefined"
+ ? window
+ : typeof global != "undefined"
+ ? global
+ : {});
+function Ir(t) {
+ if (we(t)) {
+ const e = {};
+ for (let n = 0; n < t.length; n++) {
+ const r = t[n],
+ i = at(r) ? Zy(r) : Ir(r);
+ if (i) for (const o in i) e[o] = i[o];
+ }
+ return e;
+ } else if (at(t) || it(t)) return t;
+}
+const Yy = /;(?![^(]*\))/g,
+ Qy = /:([^]+)/,
+ Xy = /\/\*[^]*?\*\//g;
+function Zy(t) {
+ const e = {};
+ return (
+ t
+ .replace(Xy, "")
+ .split(Yy)
+ .forEach((n) => {
+ if (n) {
+ const r = n.split(Qy);
+ r.length > 1 && (e[r[0].trim()] = r[1].trim());
+ }
+ }),
+ e
+ );
+}
+function ye(t) {
+ let e = "";
+ if (at(t)) e = t;
+ else if (we(t))
+ for (let n = 0; n < t.length; n++) {
+ const r = ye(t[n]);
+ r && (e += r + " ");
+ }
+ else if (it(t)) for (const n in t) t[n] && (e += n + " ");
+ return e.trim();
+}
+function Dt(t) {
+ if (!t) return null;
+ let { class: e, style: n } = t;
+ return e && !at(e) && (t.class = ye(e)), n && (t.style = Ir(n)), t;
+}
+const e2 =
+ "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",
+ t2 = id(e2);
+function Bm(t) {
+ return !!t || t === "";
+}
+const Ge = (t) =>
+ at(t)
+ ? t
+ : t == null
+ ? ""
+ : we(t) || (it(t) && (t.toString === Dm || !Ee(t.toString)))
+ ? JSON.stringify(t, $m, 2)
+ : String(t),
+ $m = (t, e) =>
+ e && e.__v_isRef
+ ? $m(t, e.value)
+ : Di(e)
+ ? {
+ [`Map(${e.size})`]: [...e.entries()].reduce(
+ (n, [r, i]) => ((n[`${r} =>`] = i), n),
+ {}
+ ),
+ }
+ : jm(e)
+ ? { [`Set(${e.size})`]: [...e.values()] }
+ : it(e) && !we(e) && !Im(e)
+ ? String(e)
+ : e;
+let rn;
+class n2 {
+ constructor(e = !1) {
+ (this.detached = e),
+ (this._active = !0),
+ (this.effects = []),
+ (this.cleanups = []),
+ (this.parent = rn),
+ !e &&
+ rn &&
+ (this.index = (rn.scopes || (rn.scopes = [])).push(this) - 1);
+ }
+ get active() {
+ return this._active;
+ }
+ run(e) {
+ if (this._active) {
+ const n = rn;
+ try {
+ return (rn = this), e();
+ } finally {
+ rn = n;
+ }
+ }
+ }
+ on() {
+ rn = this;
+ }
+ off() {
+ rn = this.parent;
+ }
+ stop(e) {
+ if (this._active) {
+ let n, r;
+ for (n = 0, r = this.effects.length; n < r; n++)
+ this.effects[n].stop();
+ for (n = 0, r = this.cleanups.length; n < r; n++)
+ this.cleanups[n]();
+ if (this.scopes)
+ for (n = 0, r = this.scopes.length; n < r; n++)
+ this.scopes[n].stop(!0);
+ if (!this.detached && this.parent && !e) {
+ const i = this.parent.scopes.pop();
+ i &&
+ i !== this &&
+ ((this.parent.scopes[this.index] = i),
+ (i.index = this.index));
+ }
+ (this.parent = void 0), (this._active = !1);
+ }
+ }
+}
+function r2(t, e = rn) {
+ e && e.active && e.effects.push(t);
+}
+function zm() {
+ return rn;
+}
+function i2(t) {
+ rn && rn.cleanups.push(t);
+}
+const ad = (t) => {
+ const e = new Set(t);
+ return (e.w = 0), (e.n = 0), e;
+ },
+ Hm = (t) => (t.w & jr) > 0,
+ Fm = (t) => (t.n & jr) > 0,
+ o2 = ({ deps: t }) => {
+ if (t.length) for (let e = 0; e < t.length; e++) t[e].w |= jr;
+ },
+ s2 = (t) => {
+ const { deps: e } = t;
+ if (e.length) {
+ let n = 0;
+ for (let r = 0; r < e.length; r++) {
+ const i = e[r];
+ Hm(i) && !Fm(i) ? i.delete(t) : (e[n++] = i),
+ (i.w &= ~jr),
+ (i.n &= ~jr);
+ }
+ e.length = n;
+ }
+ },
+ Gu = new WeakMap();
+let Co = 0,
+ jr = 1;
+const Yu = 30;
+let Mn;
+const oi = Symbol(""),
+ Qu = Symbol("");
+class ud {
+ constructor(e, n = null, r) {
+ (this.fn = e),
+ (this.scheduler = n),
+ (this.active = !0),
+ (this.deps = []),
+ (this.parent = void 0),
+ r2(this, r);
+ }
+ run() {
+ if (!this.active) return this.fn();
+ let e = Mn,
+ n = Tr;
+ for (; e; ) {
+ if (e === this) return;
+ e = e.parent;
+ }
+ try {
+ return (
+ (this.parent = Mn),
+ (Mn = this),
+ (Tr = !0),
+ (jr = 1 << ++Co),
+ Co <= Yu ? o2(this) : Wf(this),
+ this.fn()
+ );
+ } finally {
+ Co <= Yu && s2(this),
+ (jr = 1 << --Co),
+ (Mn = this.parent),
+ (Tr = n),
+ (this.parent = void 0),
+ this.deferStop && this.stop();
+ }
+ }
+ stop() {
+ Mn === this
+ ? (this.deferStop = !0)
+ : this.active &&
+ (Wf(this), this.onStop && this.onStop(), (this.active = !1));
+ }
+}
+function Wf(t) {
+ const { deps: e } = t;
+ if (e.length) {
+ for (let n = 0; n < e.length; n++) e[n].delete(t);
+ e.length = 0;
+ }
+}
+let Tr = !0;
+const Vm = [];
+function io() {
+ Vm.push(Tr), (Tr = !1);
+}
+function oo() {
+ const t = Vm.pop();
+ Tr = t === void 0 ? !0 : t;
+}
+function tn(t, e, n) {
+ if (Tr && Mn) {
+ let r = Gu.get(t);
+ r || Gu.set(t, (r = new Map()));
+ let i = r.get(n);
+ i || r.set(n, (i = ad())), Wm(i);
+ }
+}
+function Wm(t, e) {
+ let n = !1;
+ Co <= Yu ? Fm(t) || ((t.n |= jr), (n = !Hm(t))) : (n = !t.has(Mn)),
+ n && (t.add(Mn), Mn.deps.push(t));
+}
+function or(t, e, n, r, i, o) {
+ const s = Gu.get(t);
+ if (!s) return;
+ let l = [];
+ if (e === "clear") l = [...s.values()];
+ else if (n === "length" && we(t)) {
+ const a = Number(r);
+ s.forEach((u, c) => {
+ (c === "length" || (!ba(c) && c >= a)) && l.push(u);
+ });
+ } else
+ switch ((n !== void 0 && l.push(s.get(n)), e)) {
+ case "add":
+ we(t)
+ ? ld(n) && l.push(s.get("length"))
+ : (l.push(s.get(oi)), Di(t) && l.push(s.get(Qu)));
+ break;
+ case "delete":
+ we(t) || (l.push(s.get(oi)), Di(t) && l.push(s.get(Qu)));
+ break;
+ case "set":
+ Di(t) && l.push(s.get(oi));
+ break;
+ }
+ if (l.length === 1) l[0] && Xu(l[0]);
+ else {
+ const a = [];
+ for (const u of l) u && a.push(...u);
+ Xu(ad(a));
+ }
+}
+function Xu(t, e) {
+ const n = we(t) ? t : [...t];
+ for (const r of n) r.computed && Uf(r);
+ for (const r of n) r.computed || Uf(r);
+}
+function Uf(t, e) {
+ (t !== Mn || t.allowRecurse) && (t.scheduler ? t.scheduler() : t.run());
+}
+const l2 = id("__proto__,__v_isRef,__isVue"),
+ Um = new Set(
+ Object.getOwnPropertyNames(Symbol)
+ .filter((t) => t !== "arguments" && t !== "caller")
+ .map((t) => Symbol[t])
+ .filter(ba)
+ ),
+ Kf = a2();
+function a2() {
+ const t = {};
+ return (
+ ["includes", "indexOf", "lastIndexOf"].forEach((e) => {
+ t[e] = function (...n) {
+ const r = de(this);
+ for (let o = 0, s = this.length; o < s; o++)
+ tn(r, "get", o + "");
+ const i = r[e](...n);
+ return i === -1 || i === !1 ? r[e](...n.map(de)) : i;
+ };
+ }),
+ ["push", "pop", "shift", "unshift", "splice"].forEach((e) => {
+ t[e] = function (...n) {
+ io();
+ const r = de(this)[e].apply(this, n);
+ return oo(), r;
+ };
+ }),
+ t
+ );
+}
+function u2(t) {
+ const e = de(this);
+ return tn(e, "has", t), e.hasOwnProperty(t);
+}
+class Km {
+ constructor(e = !1, n = !1) {
+ (this._isReadonly = e), (this._shallow = n);
+ }
+ get(e, n, r) {
+ const i = this._isReadonly,
+ o = this._shallow;
+ if (n === "__v_isReactive") return !i;
+ if (n === "__v_isReadonly") return i;
+ if (n === "__v_isShallow") return o;
+ if (n === "__v_raw" && r === (i ? (o ? k2 : Ym) : o ? Gm : Jm).get(e))
+ return e;
+ const s = we(e);
+ if (!i) {
+ if (s && We(Kf, n)) return Reflect.get(Kf, n, r);
+ if (n === "hasOwnProperty") return u2;
+ }
+ const l = Reflect.get(e, n, r);
+ return (ba(n) ? Um.has(n) : l2(n)) || (i || tn(e, "get", n), o)
+ ? l
+ : Ht(l)
+ ? s && ld(n)
+ ? l
+ : l.value
+ : it(l)
+ ? i
+ ? Xm(l)
+ : Sn(l)
+ : l;
+ }
+}
+class qm extends Km {
+ constructor(e = !1) {
+ super(!1, e);
+ }
+ set(e, n, r, i) {
+ let o = e[n];
+ if (Wi(o) && Ht(o) && !Ht(r)) return !1;
+ if (
+ !this._shallow &&
+ (!vl(r) && !Wi(r) && ((o = de(o)), (r = de(r))),
+ !we(e) && Ht(o) && !Ht(r))
+ )
+ return (o.value = r), !0;
+ const s = we(e) && ld(n) ? Number(n) < e.length : We(e, n),
+ l = Reflect.set(e, n, r, i);
+ return (
+ e === de(i) &&
+ (s ? pi(r, o) && or(e, "set", n, r) : or(e, "add", n, r)),
+ l
+ );
+ }
+ deleteProperty(e, n) {
+ const r = We(e, n);
+ e[n];
+ const i = Reflect.deleteProperty(e, n);
+ return i && r && or(e, "delete", n, void 0), i;
+ }
+ has(e, n) {
+ const r = Reflect.has(e, n);
+ return (!ba(n) || !Um.has(n)) && tn(e, "has", n), r;
+ }
+ ownKeys(e) {
+ return tn(e, "iterate", we(e) ? "length" : oi), Reflect.ownKeys(e);
+ }
+}
+class c2 extends Km {
+ constructor(e = !1) {
+ super(!0, e);
+ }
+ set(e, n) {
+ return !0;
+ }
+ deleteProperty(e, n) {
+ return !0;
+ }
+}
+const d2 = new qm(),
+ f2 = new c2(),
+ h2 = new qm(!0),
+ cd = (t) => t,
+ Ca = (t) => Reflect.getPrototypeOf(t);
+function Es(t, e, n = !1, r = !1) {
+ t = t.__v_raw;
+ const i = de(t),
+ o = de(e);
+ n || (pi(e, o) && tn(i, "get", e), tn(i, "get", o));
+ const { has: s } = Ca(i),
+ l = r ? cd : n ? hd : Uo;
+ if (s.call(i, e)) return l(t.get(e));
+ if (s.call(i, o)) return l(t.get(o));
+ t !== i && t.get(e);
+}
+function As(t, e = !1) {
+ const n = this.__v_raw,
+ r = de(n),
+ i = de(t);
+ return (
+ e || (pi(t, i) && tn(r, "has", t), tn(r, "has", i)),
+ t === i ? n.has(t) : n.has(t) || n.has(i)
+ );
+}
+function Ts(t, e = !1) {
+ return (
+ (t = t.__v_raw),
+ !e && tn(de(t), "iterate", oi),
+ Reflect.get(t, "size", t)
+ );
+}
+function qf(t) {
+ t = de(t);
+ const e = de(this);
+ return Ca(e).has.call(e, t) || (e.add(t), or(e, "add", t, t)), this;
+}
+function Jf(t, e) {
+ e = de(e);
+ const n = de(this),
+ { has: r, get: i } = Ca(n);
+ let o = r.call(n, t);
+ o || ((t = de(t)), (o = r.call(n, t)));
+ const s = i.call(n, t);
+ return (
+ n.set(t, e),
+ o ? pi(e, s) && or(n, "set", t, e) : or(n, "add", t, e),
+ this
+ );
+}
+function Gf(t) {
+ const e = de(this),
+ { has: n, get: r } = Ca(e);
+ let i = n.call(e, t);
+ i || ((t = de(t)), (i = n.call(e, t))), r && r.call(e, t);
+ const o = e.delete(t);
+ return i && or(e, "delete", t, void 0), o;
+}
+function Yf() {
+ const t = de(this),
+ e = t.size !== 0,
+ n = t.clear();
+ return e && or(t, "clear", void 0, void 0), n;
+}
+function Os(t, e) {
+ return function (r, i) {
+ const o = this,
+ s = o.__v_raw,
+ l = de(s),
+ a = e ? cd : t ? hd : Uo;
+ return (
+ !t && tn(l, "iterate", oi),
+ s.forEach((u, c) => r.call(i, a(u), a(c), o))
+ );
+ };
+}
+function Rs(t, e, n) {
+ return function (...r) {
+ const i = this.__v_raw,
+ o = de(i),
+ s = Di(o),
+ l = t === "entries" || (t === Symbol.iterator && s),
+ a = t === "keys" && s,
+ u = i[t](...r),
+ c = n ? cd : e ? hd : Uo;
+ return (
+ !e && tn(o, "iterate", a ? Qu : oi),
+ {
+ next() {
+ const { value: f, done: h } = u.next();
+ return h
+ ? { value: f, done: h }
+ : { value: l ? [c(f[0]), c(f[1])] : c(f), done: h };
+ },
+ [Symbol.iterator]() {
+ return this;
+ },
+ }
+ );
+ };
+}
+function dr(t) {
+ return function (...e) {
+ return t === "delete" ? !1 : t === "clear" ? void 0 : this;
+ };
+}
+function p2() {
+ const t = {
+ get(o) {
+ return Es(this, o);
+ },
+ get size() {
+ return Ts(this);
+ },
+ has: As,
+ add: qf,
+ set: Jf,
+ delete: Gf,
+ clear: Yf,
+ forEach: Os(!1, !1),
+ },
+ e = {
+ get(o) {
+ return Es(this, o, !1, !0);
+ },
+ get size() {
+ return Ts(this);
+ },
+ has: As,
+ add: qf,
+ set: Jf,
+ delete: Gf,
+ clear: Yf,
+ forEach: Os(!1, !0),
+ },
+ n = {
+ get(o) {
+ return Es(this, o, !0);
+ },
+ get size() {
+ return Ts(this, !0);
+ },
+ has(o) {
+ return As.call(this, o, !0);
+ },
+ add: dr("add"),
+ set: dr("set"),
+ delete: dr("delete"),
+ clear: dr("clear"),
+ forEach: Os(!0, !1),
+ },
+ r = {
+ get(o) {
+ return Es(this, o, !0, !0);
+ },
+ get size() {
+ return Ts(this, !0);
+ },
+ has(o) {
+ return As.call(this, o, !0);
+ },
+ add: dr("add"),
+ set: dr("set"),
+ delete: dr("delete"),
+ clear: dr("clear"),
+ forEach: Os(!0, !0),
+ };
+ return (
+ ["keys", "values", "entries", Symbol.iterator].forEach((o) => {
+ (t[o] = Rs(o, !1, !1)),
+ (n[o] = Rs(o, !0, !1)),
+ (e[o] = Rs(o, !1, !0)),
+ (r[o] = Rs(o, !0, !0));
+ }),
+ [t, n, e, r]
+ );
+}
+const [m2, g2, y2, v2] = p2();
+function dd(t, e) {
+ const n = e ? (t ? v2 : y2) : t ? g2 : m2;
+ return (r, i, o) =>
+ i === "__v_isReactive"
+ ? !t
+ : i === "__v_isReadonly"
+ ? t
+ : i === "__v_raw"
+ ? r
+ : Reflect.get(We(n, i) && i in r ? n : r, i, o);
+}
+const b2 = { get: dd(!1, !1) },
+ w2 = { get: dd(!1, !0) },
+ x2 = { get: dd(!0, !1) },
+ Jm = new WeakMap(),
+ Gm = new WeakMap(),
+ Ym = new WeakMap(),
+ k2 = new WeakMap();
+function C2(t) {
+ switch (t) {
+ case "Object":
+ case "Array":
+ return 1;
+ case "Map":
+ case "Set":
+ case "WeakMap":
+ case "WeakSet":
+ return 2;
+ default:
+ return 0;
+ }
+}
+function S2(t) {
+ return t.__v_skip || !Object.isExtensible(t) ? 0 : C2(Uy(t));
+}
+function Sn(t) {
+ return Wi(t) ? t : fd(t, !1, d2, b2, Jm);
+}
+function Qm(t) {
+ return fd(t, !1, h2, w2, Gm);
+}
+function Xm(t) {
+ return fd(t, !0, f2, x2, Ym);
+}
+function fd(t, e, n, r, i) {
+ if (!it(t) || (t.__v_raw && !(e && t.__v_isReactive))) return t;
+ const o = i.get(t);
+ if (o) return o;
+ const s = S2(t);
+ if (s === 0) return t;
+ const l = new Proxy(t, s === 2 ? r : n);
+ return i.set(t, l), l;
+}
+function Ii(t) {
+ return Wi(t) ? Ii(t.__v_raw) : !!(t && t.__v_isReactive);
+}
+function Wi(t) {
+ return !!(t && t.__v_isReadonly);
+}
+function vl(t) {
+ return !!(t && t.__v_isShallow);
+}
+function Zm(t) {
+ return Ii(t) || Wi(t);
+}
+function de(t) {
+ const e = t && t.__v_raw;
+ return e ? de(e) : t;
+}
+function eg(t) {
+ return yl(t, "__v_skip", !0), t;
+}
+const Uo = (t) => (it(t) ? Sn(t) : t),
+ hd = (t) => (it(t) ? Xm(t) : t);
+function tg(t) {
+ Tr && Mn && ((t = de(t)), Wm(t.dep || (t.dep = ad())));
+}
+function ng(t, e) {
+ t = de(t);
+ const n = t.dep;
+ n && Xu(n);
+}
+function Ht(t) {
+ return !!(t && t.__v_isRef === !0);
+}
+function oe(t) {
+ return ig(t, !1);
+}
+function rg(t) {
+ return ig(t, !0);
+}
+function ig(t, e) {
+ return Ht(t) ? t : new _2(t, e);
+}
+class _2 {
+ constructor(e, n) {
+ (this.__v_isShallow = n),
+ (this.dep = void 0),
+ (this.__v_isRef = !0),
+ (this._rawValue = n ? e : de(e)),
+ (this._value = n ? e : Uo(e));
+ }
+ get value() {
+ return tg(this), this._value;
+ }
+ set value(e) {
+ const n = this.__v_isShallow || vl(e) || Wi(e);
+ (e = n ? e : de(e)),
+ pi(e, this._rawValue) &&
+ ((this._rawValue = e), (this._value = n ? e : Uo(e)), ng(this));
+ }
+}
+function ne(t) {
+ return Ht(t) ? t.value : t;
+}
+const M2 = {
+ get: (t, e, n) => ne(Reflect.get(t, e, n)),
+ set: (t, e, n, r) => {
+ const i = t[e];
+ return Ht(i) && !Ht(n) ? ((i.value = n), !0) : Reflect.set(t, e, n, r);
+ },
+};
+function og(t) {
+ return Ii(t) ? t : new Proxy(t, M2);
+}
+class E2 {
+ constructor(e, n, r, i) {
+ (this._setter = n),
+ (this.dep = void 0),
+ (this.__v_isRef = !0),
+ (this.__v_isReadonly = !1),
+ (this._dirty = !0),
+ (this.effect = new ud(e, () => {
+ this._dirty || ((this._dirty = !0), ng(this));
+ })),
+ (this.effect.computed = this),
+ (this.effect.active = this._cacheable = !i),
+ (this.__v_isReadonly = r);
+ }
+ get value() {
+ const e = de(this);
+ return (
+ tg(e),
+ (e._dirty || !e._cacheable) &&
+ ((e._dirty = !1), (e._value = e.effect.run())),
+ e._value
+ );
+ }
+ set value(e) {
+ this._setter(e);
+ }
+}
+function Zu(t, e, n = !1) {
+ let r, i;
+ const o = Ee(t);
+ return (
+ o ? ((r = t), (i = On)) : ((r = t.get), (i = t.set)),
+ new E2(r, i, o || !i, n)
+ );
+}
+function Or(t, e, n, r) {
+ let i;
+ try {
+ i = r ? t(...r) : t();
+ } catch (o) {
+ cs(o, e, n);
+ }
+ return i;
+}
+function gn(t, e, n, r) {
+ if (Ee(t)) {
+ const o = Or(t, e, n, r);
+ return (
+ o &&
+ Lm(o) &&
+ o.catch((s) => {
+ cs(s, e, n);
+ }),
+ o
+ );
+ }
+ const i = [];
+ for (let o = 0; o < t.length; o++) i.push(gn(t[o], e, n, r));
+ return i;
+}
+function cs(t, e, n, r = !0) {
+ const i = e ? e.vnode : null;
+ if (e) {
+ let o = e.parent;
+ const s = e.proxy,
+ l = n;
+ for (; o; ) {
+ const u = o.ec;
+ if (u) {
+ for (let c = 0; c < u.length; c++)
+ if (u[c](t, s, l) === !1) return;
+ }
+ o = o.parent;
+ }
+ const a = e.appContext.config.errorHandler;
+ if (a) {
+ Or(a, null, 10, [t, s, l]);
+ return;
+ }
+ }
+ A2(t, n, i, r);
+}
+function A2(t, e, n, r = !0) {
+ console.error(t);
+}
+let Ko = !1,
+ ec = !1;
+const zt = [];
+let Vn = 0;
+const Bi = [];
+let rr = null,
+ Yr = 0;
+const sg = Promise.resolve();
+let pd = null;
+function Ct(t) {
+ const e = pd || sg;
+ return t ? e.then(this ? t.bind(this) : t) : e;
+}
+function T2(t) {
+ let e = Vn + 1,
+ n = zt.length;
+ for (; e < n; ) {
+ const r = (e + n) >>> 1,
+ i = zt[r],
+ o = qo(i);
+ o < t || (o === t && i.pre) ? (e = r + 1) : (n = r);
+ }
+ return e;
+}
+function Sa(t) {
+ (!zt.length || !zt.includes(t, Ko && t.allowRecurse ? Vn + 1 : Vn)) &&
+ (t.id == null ? zt.push(t) : zt.splice(T2(t.id), 0, t), lg());
+}
+function lg() {
+ !Ko && !ec && ((ec = !0), (pd = sg.then(ug)));
+}
+function O2(t) {
+ const e = zt.indexOf(t);
+ e > Vn && zt.splice(e, 1);
+}
+function R2(t) {
+ we(t)
+ ? Bi.push(...t)
+ : (!rr || !rr.includes(t, t.allowRecurse ? Yr + 1 : Yr)) && Bi.push(t),
+ lg();
+}
+function Qf(t, e = Ko ? Vn + 1 : 0) {
+ for (; e < zt.length; e++) {
+ const n = zt[e];
+ n && n.pre && (zt.splice(e, 1), e--, n());
+ }
+}
+function ag(t) {
+ if (Bi.length) {
+ const e = [...new Set(Bi)];
+ if (((Bi.length = 0), rr)) {
+ rr.push(...e);
+ return;
+ }
+ for (
+ rr = e, rr.sort((n, r) => qo(n) - qo(r)), Yr = 0;
+ Yr < rr.length;
+ Yr++
+ )
+ rr[Yr]();
+ (rr = null), (Yr = 0);
+ }
+}
+const qo = (t) => (t.id == null ? 1 / 0 : t.id),
+ P2 = (t, e) => {
+ const n = qo(t) - qo(e);
+ if (n === 0) {
+ if (t.pre && !e.pre) return -1;
+ if (e.pre && !t.pre) return 1;
+ }
+ return n;
+ };
+function ug(t) {
+ (ec = !1), (Ko = !0), zt.sort(P2);
+ const e = On;
+ try {
+ for (Vn = 0; Vn < zt.length; Vn++) {
+ const n = zt[Vn];
+ n && n.active !== !1 && Or(n, null, 14);
+ }
+ } finally {
+ (Vn = 0),
+ (zt.length = 0),
+ ag(),
+ (Ko = !1),
+ (pd = null),
+ (zt.length || Bi.length) && ug();
+ }
+}
+function N2(t, e, ...n) {
+ if (t.isUnmounted) return;
+ const r = t.vnode.props || rt;
+ let i = n;
+ const o = e.startsWith("update:"),
+ s = o && e.slice(7);
+ if (s && s in r) {
+ const c = `${s === "modelValue" ? "model" : s}Modifiers`,
+ { number: f, trim: h } = r[c] || rt;
+ h && (i = n.map((p) => (at(p) ? p.trim() : p))), f && (i = n.map(Jy));
+ }
+ let l,
+ a = r[(l = eu(e))] || r[(l = eu(Jn(e)))];
+ !a && o && (a = r[(l = eu(xi(e)))]), a && gn(a, t, 6, i);
+ const u = r[l + "Once"];
+ if (u) {
+ if (!t.emitted) t.emitted = {};
+ else if (t.emitted[l]) return;
+ (t.emitted[l] = !0), gn(u, t, 6, i);
+ }
+}
+function cg(t, e, n = !1) {
+ const r = e.emitsCache,
+ i = r.get(t);
+ if (i !== void 0) return i;
+ const o = t.emits;
+ let s = {},
+ l = !1;
+ if (!Ee(t)) {
+ const a = (u) => {
+ const c = cg(u, e, !0);
+ c && ((l = !0), _t(s, c));
+ };
+ !n && e.mixins.length && e.mixins.forEach(a),
+ t.extends && a(t.extends),
+ t.mixins && t.mixins.forEach(a);
+ }
+ return !o && !l
+ ? (it(t) && r.set(t, null), null)
+ : (we(o) ? o.forEach((a) => (s[a] = null)) : _t(s, o),
+ it(t) && r.set(t, s),
+ s);
+}
+function _a(t, e) {
+ return !t || !va(e)
+ ? !1
+ : ((e = e.slice(2).replace(/Once$/, "")),
+ We(t, e[0].toLowerCase() + e.slice(1)) || We(t, xi(e)) || We(t, e));
+}
+let It = null,
+ dg = null;
+function bl(t) {
+ const e = It;
+ return (It = t), (dg = (t && t.type.__scopeId) || null), e;
+}
+function Te(t, e = It, n) {
+ if (!e || t._n) return t;
+ const r = (...i) => {
+ r._d && ch(-1);
+ const o = bl(e);
+ let s;
+ try {
+ s = t(...i);
+ } finally {
+ bl(o), r._d && ch(1);
+ }
+ return s;
+ };
+ return (r._n = !0), (r._c = !0), (r._d = !0), r;
+}
+function nu(t) {
+ const {
+ type: e,
+ vnode: n,
+ proxy: r,
+ withProxy: i,
+ props: o,
+ propsOptions: [s],
+ slots: l,
+ attrs: a,
+ emit: u,
+ render: c,
+ renderCache: f,
+ data: h,
+ setupState: p,
+ ctx: g,
+ inheritAttrs: v,
+ } = t;
+ let b, x;
+ const S = bl(t);
+ try {
+ if (n.shapeFlag & 4) {
+ const d = i || r,
+ y = d;
+ (b = Hn(c.call(y, d, f, o, p, h, g))), (x = a);
+ } else {
+ const d = e;
+ (b = Hn(
+ d.length > 1
+ ? d(o, { attrs: a, slots: l, emit: u })
+ : d(o, null)
+ )),
+ (x = e.props ? a : j2(a));
+ }
+ } catch (d) {
+ (Po.length = 0), cs(d, t, 1), (b = Me(yn));
+ }
+ let T = b;
+ if (x && v !== !1) {
+ const d = Object.keys(x),
+ { shapeFlag: y } = T;
+ d.length &&
+ y & 7 &&
+ (s && d.some(od) && (x = L2(x, s)), (T = sr(T, x)));
+ }
+ return (
+ n.dirs &&
+ ((T = sr(T)), (T.dirs = T.dirs ? T.dirs.concat(n.dirs) : n.dirs)),
+ n.transition && (T.transition = n.transition),
+ (b = T),
+ bl(S),
+ b
+ );
+}
+const j2 = (t) => {
+ let e;
+ for (const n in t)
+ (n === "class" || n === "style" || va(n)) &&
+ ((e || (e = {}))[n] = t[n]);
+ return e;
+ },
+ L2 = (t, e) => {
+ const n = {};
+ for (const r in t) (!od(r) || !(r.slice(9) in e)) && (n[r] = t[r]);
+ return n;
+ };
+function D2(t, e, n) {
+ const { props: r, children: i, component: o } = t,
+ { props: s, children: l, patchFlag: a } = e,
+ u = o.emitsOptions;
+ if (e.dirs || e.transition) return !0;
+ if (n && a >= 0) {
+ if (a & 1024) return !0;
+ if (a & 16) return r ? Xf(r, s, u) : !!s;
+ if (a & 8) {
+ const c = e.dynamicProps;
+ for (let f = 0; f < c.length; f++) {
+ const h = c[f];
+ if (s[h] !== r[h] && !_a(u, h)) return !0;
+ }
+ }
+ } else
+ return (i || l) && (!l || !l.$stable)
+ ? !0
+ : r === s
+ ? !1
+ : r
+ ? s
+ ? Xf(r, s, u)
+ : !0
+ : !!s;
+ return !1;
+}
+function Xf(t, e, n) {
+ const r = Object.keys(e);
+ if (r.length !== Object.keys(t).length) return !0;
+ for (let i = 0; i < r.length; i++) {
+ const o = r[i];
+ if (e[o] !== t[o] && !_a(n, o)) return !0;
+ }
+ return !1;
+}
+function I2({ vnode: t, parent: e }, n) {
+ for (; e && e.subTree === t; ) ((t = e.vnode).el = n), (e = e.parent);
+}
+const md = "components";
+function ft(t, e) {
+ return hg(md, t, !0, e) || t;
+}
+const fg = Symbol.for("v-ndc");
+function mi(t) {
+ return at(t) ? hg(md, t, !1) || t : t || fg;
+}
+function hg(t, e, n = !0, r = !1) {
+ const i = It || St;
+ if (i) {
+ const o = i.type;
+ if (t === md) {
+ const l = Av(o, !1);
+ if (l && (l === e || l === Jn(e) || l === ka(Jn(e)))) return o;
+ }
+ const s = Zf(i[t] || o[t], e) || Zf(i.appContext[t], e);
+ return !s && r ? o : s;
+ }
+}
+function Zf(t, e) {
+ return t && (t[e] || t[Jn(e)] || t[ka(Jn(e))]);
+}
+const B2 = (t) => t.__isSuspense;
+function $2(t, e) {
+ e && e.pendingBranch
+ ? we(t)
+ ? e.effects.push(...t)
+ : e.effects.push(t)
+ : R2(t);
+}
+function Mt(t, e) {
+ return gd(t, null, e);
+}
+const Ps = {};
+function Rt(t, e, n) {
+ return gd(t, e, n);
+}
+function gd(
+ t,
+ e,
+ { immediate: n, deep: r, flush: i, onTrack: o, onTrigger: s } = rt
+) {
+ var l;
+ const a = zm() === ((l = St) == null ? void 0 : l.scope) ? St : null;
+ let u,
+ c = !1,
+ f = !1;
+ if (
+ (Ht(t)
+ ? ((u = () => t.value), (c = vl(t)))
+ : Ii(t)
+ ? ((u = () => t), (r = !0))
+ : we(t)
+ ? ((f = !0),
+ (c = t.some((d) => Ii(d) || vl(d))),
+ (u = () =>
+ t.map((d) => {
+ if (Ht(d)) return d.value;
+ if (Ii(d)) return ti(d);
+ if (Ee(d)) return Or(d, a, 2);
+ })))
+ : Ee(t)
+ ? e
+ ? (u = () => Or(t, a, 2))
+ : (u = () => {
+ if (!(a && a.isUnmounted))
+ return h && h(), gn(t, a, 3, [p]);
+ })
+ : (u = On),
+ e && r)
+ ) {
+ const d = u;
+ u = () => ti(d());
+ }
+ let h,
+ p = (d) => {
+ h = S.onStop = () => {
+ Or(d, a, 4), (h = S.onStop = void 0);
+ };
+ },
+ g;
+ if (Ki)
+ if (
+ ((p = On),
+ e ? n && gn(e, a, 3, [u(), f ? [] : void 0, p]) : u(),
+ i === "sync")
+ ) {
+ const d = Rv();
+ g = d.__watcherHandles || (d.__watcherHandles = []);
+ } else return On;
+ let v = f ? new Array(t.length).fill(Ps) : Ps;
+ const b = () => {
+ if (!!S.active)
+ if (e) {
+ const d = S.run();
+ (r || c || (f ? d.some((y, m) => pi(y, v[m])) : pi(d, v))) &&
+ (h && h(),
+ gn(e, a, 3, [
+ d,
+ v === Ps ? void 0 : f && v[0] === Ps ? [] : v,
+ p,
+ ]),
+ (v = d));
+ } else S.run();
+ };
+ b.allowRecurse = !!e;
+ let x;
+ i === "sync"
+ ? (x = b)
+ : i === "post"
+ ? (x = () => Gt(b, a && a.suspense))
+ : ((b.pre = !0), a && (b.id = a.uid), (x = () => Sa(b)));
+ const S = new ud(u, x);
+ e
+ ? n
+ ? b()
+ : (v = S.run())
+ : i === "post"
+ ? Gt(S.run.bind(S), a && a.suspense)
+ : S.run();
+ const T = () => {
+ S.stop(), a && a.scope && sd(a.scope.effects, S);
+ };
+ return g && g.push(T), T;
+}
+function z2(t, e, n) {
+ const r = this.proxy,
+ i = at(t) ? (t.includes(".") ? pg(r, t) : () => r[t]) : t.bind(r, r);
+ let o;
+ Ee(e) ? (o = e) : ((o = e.handler), (n = e));
+ const s = St;
+ Ui(this);
+ const l = gd(i, o.bind(r), n);
+ return s ? Ui(s) : si(), l;
+}
+function pg(t, e) {
+ const n = e.split(".");
+ return () => {
+ let r = t;
+ for (let i = 0; i < n.length && r; i++) r = r[n[i]];
+ return r;
+ };
+}
+function ti(t, e) {
+ if (!it(t) || t.__v_skip || ((e = e || new Set()), e.has(t))) return t;
+ if ((e.add(t), Ht(t))) ti(t.value, e);
+ else if (we(t)) for (let n = 0; n < t.length; n++) ti(t[n], e);
+ else if (jm(t) || Di(t))
+ t.forEach((n) => {
+ ti(n, e);
+ });
+ else if (Im(t)) for (const n in t) ti(t[n], e);
+ return t;
+}
+function tc(t, e) {
+ const n = It;
+ if (n === null) return t;
+ const r = Ta(n) || n.proxy,
+ i = t.dirs || (t.dirs = []);
+ for (let o = 0; o < e.length; o++) {
+ let [s, l, a, u = rt] = e[o];
+ s &&
+ (Ee(s) && (s = { mounted: s, updated: s }),
+ s.deep && ti(l),
+ i.push({
+ dir: s,
+ instance: r,
+ value: l,
+ oldValue: void 0,
+ arg: a,
+ modifiers: u,
+ }));
+ }
+ return t;
+}
+function Wr(t, e, n, r) {
+ const i = t.dirs,
+ o = e && e.dirs;
+ for (let s = 0; s < i.length; s++) {
+ const l = i[s];
+ o && (l.oldValue = o[s].value);
+ let a = l.dir[r];
+ a && (io(), gn(a, n, 8, [t.el, l, t, e]), oo());
+ }
+}
+const gr = Symbol("_leaveCb"),
+ Ns = Symbol("_enterCb");
+function H2() {
+ const t = {
+ isMounted: !1,
+ isLeaving: !1,
+ isUnmounting: !1,
+ leavingVNodes: new Map(),
+ };
+ return (
+ Ye(() => {
+ t.isMounted = !0;
+ }),
+ fs(() => {
+ t.isUnmounting = !0;
+ }),
+ t
+ );
+}
+const cn = [Function, Array],
+ mg = {
+ mode: String,
+ appear: Boolean,
+ persisted: Boolean,
+ onBeforeEnter: cn,
+ onEnter: cn,
+ onAfterEnter: cn,
+ onEnterCancelled: cn,
+ onBeforeLeave: cn,
+ onLeave: cn,
+ onAfterLeave: cn,
+ onLeaveCancelled: cn,
+ onBeforeAppear: cn,
+ onAppear: cn,
+ onAfterAppear: cn,
+ onAppearCancelled: cn,
+ },
+ F2 = {
+ name: "BaseTransition",
+ props: mg,
+ setup(t, { slots: e }) {
+ const n = ps(),
+ r = H2();
+ let i;
+ return () => {
+ const o = e.default && yg(e.default(), !0);
+ if (!o || !o.length) return;
+ let s = o[0];
+ if (o.length > 1) {
+ for (const v of o)
+ if (v.type !== yn) {
+ s = v;
+ break;
+ }
+ }
+ const l = de(t),
+ { mode: a } = l;
+ if (r.isLeaving) return ru(s);
+ const u = eh(s);
+ if (!u) return ru(s);
+ const c = nc(u, l, r, n);
+ rc(u, c);
+ const f = n.subTree,
+ h = f && eh(f);
+ let p = !1;
+ const { getTransitionKey: g } = u.type;
+ if (g) {
+ const v = g();
+ i === void 0 ? (i = v) : v !== i && ((i = v), (p = !0));
+ }
+ if (h && h.type !== yn && (!Qr(u, h) || p)) {
+ const v = nc(h, l, r, n);
+ if ((rc(h, v), a === "out-in"))
+ return (
+ (r.isLeaving = !0),
+ (v.afterLeave = () => {
+ (r.isLeaving = !1),
+ n.update.active !== !1 && n.update();
+ }),
+ ru(s)
+ );
+ a === "in-out" &&
+ u.type !== yn &&
+ (v.delayLeave = (b, x, S) => {
+ const T = gg(r, h);
+ (T[String(h.key)] = h),
+ (b[gr] = () => {
+ x(),
+ (b[gr] = void 0),
+ delete c.delayedLeave;
+ }),
+ (c.delayedLeave = S);
+ });
+ }
+ return s;
+ };
+ },
+ },
+ V2 = F2;
+function gg(t, e) {
+ const { leavingVNodes: n } = t;
+ let r = n.get(e.type);
+ return r || ((r = Object.create(null)), n.set(e.type, r)), r;
+}
+function nc(t, e, n, r) {
+ const {
+ appear: i,
+ mode: o,
+ persisted: s = !1,
+ onBeforeEnter: l,
+ onEnter: a,
+ onAfterEnter: u,
+ onEnterCancelled: c,
+ onBeforeLeave: f,
+ onLeave: h,
+ onAfterLeave: p,
+ onLeaveCancelled: g,
+ onBeforeAppear: v,
+ onAppear: b,
+ onAfterAppear: x,
+ onAppearCancelled: S,
+ } = e,
+ T = String(t.key),
+ d = gg(n, t),
+ y = (k, _) => {
+ k && gn(k, r, 9, _);
+ },
+ m = (k, _) => {
+ const C = _[1];
+ y(k, _),
+ we(k)
+ ? k.every((E) => E.length <= 1) && C()
+ : k.length <= 1 && C();
+ },
+ w = {
+ mode: o,
+ persisted: s,
+ beforeEnter(k) {
+ let _ = l;
+ if (!n.isMounted)
+ if (i) _ = v || l;
+ else return;
+ k[gr] && k[gr](!0);
+ const C = d[T];
+ C && Qr(t, C) && C.el[gr] && C.el[gr](), y(_, [k]);
+ },
+ enter(k) {
+ let _ = a,
+ C = u,
+ E = c;
+ if (!n.isMounted)
+ if (i) (_ = b || a), (C = x || u), (E = S || c);
+ else return;
+ let R = !1;
+ const P = (k[Ns] = (L) => {
+ R ||
+ ((R = !0),
+ L ? y(E, [k]) : y(C, [k]),
+ w.delayedLeave && w.delayedLeave(),
+ (k[Ns] = void 0));
+ });
+ _ ? m(_, [k, P]) : P();
+ },
+ leave(k, _) {
+ const C = String(t.key);
+ if ((k[Ns] && k[Ns](!0), n.isUnmounting)) return _();
+ y(f, [k]);
+ let E = !1;
+ const R = (k[gr] = (P) => {
+ E ||
+ ((E = !0),
+ _(),
+ P ? y(g, [k]) : y(p, [k]),
+ (k[gr] = void 0),
+ d[C] === t && delete d[C]);
+ });
+ (d[C] = t), h ? m(h, [k, R]) : R();
+ },
+ clone(k) {
+ return nc(k, e, n, r);
+ },
+ };
+ return w;
+}
+function ru(t) {
+ if (ds(t)) return (t = sr(t)), (t.children = null), t;
+}
+function eh(t) {
+ return ds(t) ? (t.children ? t.children[0] : void 0) : t;
+}
+function rc(t, e) {
+ t.shapeFlag & 6 && t.component
+ ? rc(t.component.subTree, e)
+ : t.shapeFlag & 128
+ ? ((t.ssContent.transition = e.clone(t.ssContent)),
+ (t.ssFallback.transition = e.clone(t.ssFallback)))
+ : (t.transition = e);
+}
+function yg(t, e = !1, n) {
+ let r = [],
+ i = 0;
+ for (let o = 0; o < t.length; o++) {
+ let s = t[o];
+ const l =
+ n == null ? s.key : String(n) + String(s.key != null ? s.key : o);
+ s.type === He
+ ? (s.patchFlag & 128 && i++, (r = r.concat(yg(s.children, e, l))))
+ : (e || s.type !== yn) && r.push(l != null ? sr(s, { key: l }) : s);
+ }
+ if (i > 1) for (let o = 0; o < r.length; o++) r[o].patchFlag = -2;
+ return r;
+}
+/*! #__NO_SIDE_EFFECTS__ */ function xe(t, e) {
+ return Ee(t) ? (() => _t({ name: t.name }, e, { setup: t }))() : t;
+}
+const To = (t) => !!t.type.__asyncLoader;
+/*! #__NO_SIDE_EFFECTS__ */ function js(t) {
+ Ee(t) && (t = { loader: t });
+ const {
+ loader: e,
+ loadingComponent: n,
+ errorComponent: r,
+ delay: i = 200,
+ timeout: o,
+ suspensible: s = !0,
+ onError: l,
+ } = t;
+ let a = null,
+ u,
+ c = 0;
+ const f = () => (c++, (a = null), h()),
+ h = () => {
+ let p;
+ return (
+ a ||
+ (p = a =
+ e()
+ .catch((g) => {
+ if (
+ ((g =
+ g instanceof Error
+ ? g
+ : new Error(String(g))),
+ l)
+ )
+ return new Promise((v, b) => {
+ l(
+ g,
+ () => v(f()),
+ () => b(g),
+ c + 1
+ );
+ });
+ throw g;
+ })
+ .then((g) =>
+ p !== a && a
+ ? a
+ : (g &&
+ (g.__esModule ||
+ g[Symbol.toStringTag] ===
+ "Module") &&
+ (g = g.default),
+ (u = g),
+ g)
+ ))
+ );
+ };
+ return xe({
+ name: "AsyncComponentWrapper",
+ __asyncLoader: h,
+ get __asyncResolved() {
+ return u;
+ },
+ setup() {
+ const p = St;
+ if (u) return () => iu(u, p);
+ const g = (S) => {
+ (a = null), cs(S, p, 13, !r);
+ };
+ if ((s && p.suspense) || Ki)
+ return h()
+ .then((S) => () => iu(S, p))
+ .catch(
+ (S) => (g(S), () => (r ? Me(r, { error: S }) : null))
+ );
+ const v = oe(!1),
+ b = oe(),
+ x = oe(!!i);
+ return (
+ i &&
+ setTimeout(() => {
+ x.value = !1;
+ }, i),
+ o != null &&
+ setTimeout(() => {
+ if (!v.value && !b.value) {
+ const S = new Error(
+ `Async component timed out after ${o}ms.`
+ );
+ g(S), (b.value = S);
+ }
+ }, o),
+ h()
+ .then(() => {
+ (v.value = !0),
+ p.parent &&
+ ds(p.parent.vnode) &&
+ Sa(p.parent.update);
+ })
+ .catch((S) => {
+ g(S), (b.value = S);
+ }),
+ () => {
+ if (v.value && u) return iu(u, p);
+ if (b.value && r) return Me(r, { error: b.value });
+ if (n && !x.value) return Me(n);
+ }
+ );
+ },
+ });
+}
+function iu(t, e) {
+ const { ref: n, props: r, children: i, ce: o } = e.vnode,
+ s = Me(t, r, i);
+ return (s.ref = n), (s.ce = o), delete e.vnode.ce, s;
+}
+const ds = (t) => t.type.__isKeepAlive;
+function W2(t, e) {
+ vg(t, "a", e);
+}
+function U2(t, e) {
+ vg(t, "da", e);
+}
+function vg(t, e, n = St) {
+ const r =
+ t.__wdc ||
+ (t.__wdc = () => {
+ let i = n;
+ for (; i; ) {
+ if (i.isDeactivated) return;
+ i = i.parent;
+ }
+ return t();
+ });
+ if ((Ma(e, r, n), n)) {
+ let i = n.parent;
+ for (; i && i.parent; )
+ ds(i.parent.vnode) && K2(r, e, n, i), (i = i.parent);
+ }
+}
+function K2(t, e, n, r) {
+ const i = Ma(e, t, r, !0);
+ Bt(() => {
+ sd(r[e], i);
+ }, n);
+}
+function Ma(t, e, n = St, r = !1) {
+ if (n) {
+ const i = n[t] || (n[t] = []),
+ o =
+ e.__weh ||
+ (e.__weh = (...s) => {
+ if (n.isUnmounted) return;
+ io(), Ui(n);
+ const l = gn(e, n, t, s);
+ return si(), oo(), l;
+ });
+ return r ? i.unshift(o) : i.push(o), o;
+ }
+}
+const ar =
+ (t) =>
+ (e, n = St) =>
+ (!Ki || t === "sp") && Ma(t, (...r) => e(...r), n),
+ q2 = ar("bm"),
+ Ye = ar("m"),
+ J2 = ar("bu"),
+ G2 = ar("u"),
+ fs = ar("bum"),
+ Bt = ar("um"),
+ Y2 = ar("sp"),
+ Q2 = ar("rtg"),
+ X2 = ar("rtc");
+function Z2(t, e = St) {
+ Ma("ec", t, e);
+}
+function wn(t, e, n, r) {
+ let i;
+ const o = n && n[r];
+ if (we(t) || at(t)) {
+ i = new Array(t.length);
+ for (let s = 0, l = t.length; s < l; s++)
+ i[s] = e(t[s], s, void 0, o && o[s]);
+ } else if (typeof t == "number") {
+ i = new Array(t);
+ for (let s = 0; s < t; s++) i[s] = e(s + 1, s, void 0, o && o[s]);
+ } else if (it(t))
+ if (t[Symbol.iterator])
+ i = Array.from(t, (s, l) => e(s, l, void 0, o && o[l]));
+ else {
+ const s = Object.keys(t);
+ i = new Array(s.length);
+ for (let l = 0, a = s.length; l < a; l++) {
+ const u = s[l];
+ i[l] = e(t[u], u, l, o && o[l]);
+ }
+ }
+ else i = [];
+ return n && (n[r] = i), i;
+}
+function ou(t, e) {
+ for (let n = 0; n < e.length; n++) {
+ const r = e[n];
+ if (we(r)) for (let i = 0; i < r.length; i++) t[r[i].name] = r[i].fn;
+ else
+ r &&
+ (t[r.name] = r.key
+ ? (...i) => {
+ const o = r.fn(...i);
+ return o && (o.key = r.key), o;
+ }
+ : r.fn);
+ }
+ return t;
+}
+function _e(t, e, n = {}, r, i) {
+ if (It.isCE || (It.parent && To(It.parent) && It.parent.isCE))
+ return e !== "default" && (n.name = e), Me("slot", n, r && r());
+ let o = t[e];
+ o && o._c && (o._d = !1), B();
+ const s = o && bg(o(n)),
+ l = Be(
+ He,
+ { key: n.key || (s && s.key) || `_${e}` },
+ s || (r ? r() : []),
+ s && t._ === 1 ? 64 : -2
+ );
+ return (
+ !i && l.scopeId && (l.slotScopeIds = [l.scopeId + "-s"]),
+ o && o._c && (o._d = !0),
+ l
+ );
+}
+function bg(t) {
+ return t.some((e) =>
+ kl(e) ? !(e.type === yn || (e.type === He && !bg(e.children))) : !0
+ )
+ ? t
+ : null;
+}
+const ic = (t) => (t ? (Rg(t) ? Ta(t) || t.proxy : ic(t.parent)) : null),
+ Oo = _t(Object.create(null), {
+ $: (t) => t,
+ $el: (t) => t.vnode.el,
+ $data: (t) => t.data,
+ $props: (t) => t.props,
+ $attrs: (t) => t.attrs,
+ $slots: (t) => t.slots,
+ $refs: (t) => t.refs,
+ $parent: (t) => ic(t.parent),
+ $root: (t) => ic(t.root),
+ $emit: (t) => t.emit,
+ $options: (t) => vd(t),
+ $forceUpdate: (t) => t.f || (t.f = () => Sa(t.update)),
+ $nextTick: (t) => t.n || (t.n = Ct.bind(t.proxy)),
+ $watch: (t) => z2.bind(t),
+ }),
+ su = (t, e) => t !== rt && !t.__isScriptSetup && We(t, e),
+ ev = {
+ get({ _: t }, e) {
+ const {
+ ctx: n,
+ setupState: r,
+ data: i,
+ props: o,
+ accessCache: s,
+ type: l,
+ appContext: a,
+ } = t;
+ let u;
+ if (e[0] !== "$") {
+ const p = s[e];
+ if (p !== void 0)
+ switch (p) {
+ case 1:
+ return r[e];
+ case 2:
+ return i[e];
+ case 4:
+ return n[e];
+ case 3:
+ return o[e];
+ }
+ else {
+ if (su(r, e)) return (s[e] = 1), r[e];
+ if (i !== rt && We(i, e)) return (s[e] = 2), i[e];
+ if ((u = t.propsOptions[0]) && We(u, e))
+ return (s[e] = 3), o[e];
+ if (n !== rt && We(n, e)) return (s[e] = 4), n[e];
+ oc && (s[e] = 0);
+ }
+ }
+ const c = Oo[e];
+ let f, h;
+ if (c) return e === "$attrs" && tn(t, "get", e), c(t);
+ if ((f = l.__cssModules) && (f = f[e])) return f;
+ if (n !== rt && We(n, e)) return (s[e] = 4), n[e];
+ if (((h = a.config.globalProperties), We(h, e))) return h[e];
+ },
+ set({ _: t }, e, n) {
+ const { data: r, setupState: i, ctx: o } = t;
+ return su(i, e)
+ ? ((i[e] = n), !0)
+ : r !== rt && We(r, e)
+ ? ((r[e] = n), !0)
+ : We(t.props, e) || (e[0] === "$" && e.slice(1) in t)
+ ? !1
+ : ((o[e] = n), !0);
+ },
+ has(
+ {
+ _: {
+ data: t,
+ setupState: e,
+ accessCache: n,
+ ctx: r,
+ appContext: i,
+ propsOptions: o,
+ },
+ },
+ s
+ ) {
+ let l;
+ return (
+ !!n[s] ||
+ (t !== rt && We(t, s)) ||
+ su(e, s) ||
+ ((l = o[0]) && We(l, s)) ||
+ We(r, s) ||
+ We(Oo, s) ||
+ We(i.config.globalProperties, s)
+ );
+ },
+ defineProperty(t, e, n) {
+ return (
+ n.get != null
+ ? (t._.accessCache[e] = 0)
+ : We(n, "value") && this.set(t, e, n.value, null),
+ Reflect.defineProperty(t, e, n)
+ );
+ },
+ };
+function yd() {
+ return wg().slots;
+}
+function hs() {
+ return wg().attrs;
+}
+function wg() {
+ const t = ps();
+ return t.setupContext || (t.setupContext = Ng(t));
+}
+function th(t) {
+ return we(t) ? t.reduce((e, n) => ((e[n] = null), e), {}) : t;
+}
+let oc = !0;
+function tv(t) {
+ const e = vd(t),
+ n = t.proxy,
+ r = t.ctx;
+ (oc = !1), e.beforeCreate && nh(e.beforeCreate, t, "bc");
+ const {
+ data: i,
+ computed: o,
+ methods: s,
+ watch: l,
+ provide: a,
+ inject: u,
+ created: c,
+ beforeMount: f,
+ mounted: h,
+ beforeUpdate: p,
+ updated: g,
+ activated: v,
+ deactivated: b,
+ beforeDestroy: x,
+ beforeUnmount: S,
+ destroyed: T,
+ unmounted: d,
+ render: y,
+ renderTracked: m,
+ renderTriggered: w,
+ errorCaptured: k,
+ serverPrefetch: _,
+ expose: C,
+ inheritAttrs: E,
+ components: R,
+ directives: P,
+ filters: L,
+ } = e;
+ if ((u && nv(u, r, null), s))
+ for (const N in s) {
+ const D = s[N];
+ Ee(D) && (r[N] = D.bind(n));
+ }
+ if (i) {
+ const N = i.call(n, n);
+ it(N) && (t.data = Sn(N));
+ }
+ if (((oc = !0), o))
+ for (const N in o) {
+ const D = o[N],
+ K = Ee(D) ? D.bind(n, n) : Ee(D.get) ? D.get.bind(n, n) : On,
+ ae = !Ee(D) && Ee(D.set) ? D.set.bind(n) : On,
+ Q = $({ get: K, set: ae });
+ Object.defineProperty(r, N, {
+ enumerable: !0,
+ configurable: !0,
+ get: () => Q.value,
+ set: (me) => (Q.value = me),
+ });
+ }
+ if (l) for (const N in l) xg(l[N], r, n, N);
+ if (a) {
+ const N = Ee(a) ? a.call(n) : a;
+ Reflect.ownKeys(N).forEach((D) => {
+ kt(D, N[D]);
+ });
+ }
+ c && nh(c, t, "c");
+ function M(N, D) {
+ we(D) ? D.forEach((K) => N(K.bind(n))) : D && N(D.bind(n));
+ }
+ if (
+ (M(q2, f),
+ M(Ye, h),
+ M(J2, p),
+ M(G2, g),
+ M(W2, v),
+ M(U2, b),
+ M(Z2, k),
+ M(X2, m),
+ M(Q2, w),
+ M(fs, S),
+ M(Bt, d),
+ M(Y2, _),
+ we(C))
+ )
+ if (C.length) {
+ const N = t.exposed || (t.exposed = {});
+ C.forEach((D) => {
+ Object.defineProperty(N, D, {
+ get: () => n[D],
+ set: (K) => (n[D] = K),
+ });
+ });
+ } else t.exposed || (t.exposed = {});
+ y && t.render === On && (t.render = y),
+ E != null && (t.inheritAttrs = E),
+ R && (t.components = R),
+ P && (t.directives = P);
+}
+function nv(t, e, n = On) {
+ we(t) && (t = sc(t));
+ for (const r in t) {
+ const i = t[r];
+ let o;
+ it(i)
+ ? "default" in i
+ ? (o = qe(i.from || r, i.default, !0))
+ : (o = qe(i.from || r))
+ : (o = qe(i)),
+ Ht(o)
+ ? Object.defineProperty(e, r, {
+ enumerable: !0,
+ configurable: !0,
+ get: () => o.value,
+ set: (s) => (o.value = s),
+ })
+ : (e[r] = o);
+ }
+}
+function nh(t, e, n) {
+ gn(we(t) ? t.map((r) => r.bind(e.proxy)) : t.bind(e.proxy), e, n);
+}
+function xg(t, e, n, r) {
+ const i = r.includes(".") ? pg(n, r) : () => n[r];
+ if (at(t)) {
+ const o = e[t];
+ Ee(o) && Rt(i, o);
+ } else if (Ee(t)) Rt(i, t.bind(n));
+ else if (it(t))
+ if (we(t)) t.forEach((o) => xg(o, e, n, r));
+ else {
+ const o = Ee(t.handler) ? t.handler.bind(n) : e[t.handler];
+ Ee(o) && Rt(i, o, t);
+ }
+}
+function vd(t) {
+ const e = t.type,
+ { mixins: n, extends: r } = e,
+ {
+ mixins: i,
+ optionsCache: o,
+ config: { optionMergeStrategies: s },
+ } = t.appContext,
+ l = o.get(e);
+ let a;
+ return (
+ l
+ ? (a = l)
+ : !i.length && !n && !r
+ ? (a = e)
+ : ((a = {}),
+ i.length && i.forEach((u) => wl(a, u, s, !0)),
+ wl(a, e, s)),
+ it(e) && o.set(e, a),
+ a
+ );
+}
+function wl(t, e, n, r = !1) {
+ const { mixins: i, extends: o } = e;
+ o && wl(t, o, n, !0), i && i.forEach((s) => wl(t, s, n, !0));
+ for (const s in e)
+ if (!(r && s === "expose")) {
+ const l = rv[s] || (n && n[s]);
+ t[s] = l ? l(t[s], e[s]) : e[s];
+ }
+ return t;
+}
+const rv = {
+ data: rh,
+ props: ih,
+ emits: ih,
+ methods: So,
+ computed: So,
+ beforeCreate: Kt,
+ created: Kt,
+ beforeMount: Kt,
+ mounted: Kt,
+ beforeUpdate: Kt,
+ updated: Kt,
+ beforeDestroy: Kt,
+ beforeUnmount: Kt,
+ destroyed: Kt,
+ unmounted: Kt,
+ activated: Kt,
+ deactivated: Kt,
+ errorCaptured: Kt,
+ serverPrefetch: Kt,
+ components: So,
+ directives: So,
+ watch: ov,
+ provide: rh,
+ inject: iv,
+};
+function rh(t, e) {
+ return e
+ ? t
+ ? function () {
+ return _t(
+ Ee(t) ? t.call(this, this) : t,
+ Ee(e) ? e.call(this, this) : e
+ );
+ }
+ : e
+ : t;
+}
+function iv(t, e) {
+ return So(sc(t), sc(e));
+}
+function sc(t) {
+ if (we(t)) {
+ const e = {};
+ for (let n = 0; n < t.length; n++) e[t[n]] = t[n];
+ return e;
+ }
+ return t;
+}
+function Kt(t, e) {
+ return t ? [...new Set([].concat(t, e))] : e;
+}
+function So(t, e) {
+ return t ? _t(Object.create(null), t, e) : e;
+}
+function ih(t, e) {
+ return t
+ ? we(t) && we(e)
+ ? [...new Set([...t, ...e])]
+ : _t(Object.create(null), th(t), th(e != null ? e : {}))
+ : e;
+}
+function ov(t, e) {
+ if (!t) return e;
+ if (!e) return t;
+ const n = _t(Object.create(null), t);
+ for (const r in e) n[r] = Kt(t[r], e[r]);
+ return n;
+}
+function kg() {
+ return {
+ app: null,
+ config: {
+ isNativeTag: Fy,
+ performance: !1,
+ globalProperties: {},
+ optionMergeStrategies: {},
+ errorHandler: void 0,
+ warnHandler: void 0,
+ compilerOptions: {},
+ },
+ mixins: [],
+ components: {},
+ directives: {},
+ provides: Object.create(null),
+ optionsCache: new WeakMap(),
+ propsCache: new WeakMap(),
+ emitsCache: new WeakMap(),
+ };
+}
+let sv = 0;
+function lv(t, e) {
+ return function (r, i = null) {
+ Ee(r) || (r = _t({}, r)), i != null && !it(i) && (i = null);
+ const o = kg(),
+ s = new WeakSet();
+ let l = !1;
+ const a = (o.app = {
+ _uid: sv++,
+ _component: r,
+ _props: i,
+ _container: null,
+ _context: o,
+ _instance: null,
+ version: Pv,
+ get config() {
+ return o.config;
+ },
+ set config(u) {},
+ use(u, ...c) {
+ return (
+ s.has(u) ||
+ (u && Ee(u.install)
+ ? (s.add(u), u.install(a, ...c))
+ : Ee(u) && (s.add(u), u(a, ...c))),
+ a
+ );
+ },
+ mixin(u) {
+ return o.mixins.includes(u) || o.mixins.push(u), a;
+ },
+ component(u, c) {
+ return c ? ((o.components[u] = c), a) : o.components[u];
+ },
+ directive(u, c) {
+ return c ? ((o.directives[u] = c), a) : o.directives[u];
+ },
+ mount(u, c, f) {
+ if (!l) {
+ const h = Me(r, i);
+ return (
+ (h.appContext = o),
+ c && e ? e(h, u) : t(h, u, f),
+ (l = !0),
+ (a._container = u),
+ (u.__vue_app__ = a),
+ Ta(h.component) || h.component.proxy
+ );
+ }
+ },
+ unmount() {
+ l && (t(null, a._container), delete a._container.__vue_app__);
+ },
+ provide(u, c) {
+ return (o.provides[u] = c), a;
+ },
+ runWithContext(u) {
+ xl = a;
+ try {
+ return u();
+ } finally {
+ xl = null;
+ }
+ },
+ });
+ return a;
+ };
+}
+let xl = null;
+function kt(t, e) {
+ if (St) {
+ let n = St.provides;
+ const r = St.parent && St.parent.provides;
+ r === n && (n = St.provides = Object.create(r)), (n[t] = e);
+ }
+}
+function qe(t, e, n = !1) {
+ const r = St || It;
+ if (r || xl) {
+ const i = r
+ ? r.parent == null
+ ? r.vnode.appContext && r.vnode.appContext.provides
+ : r.parent.provides
+ : xl._context.provides;
+ if (i && t in i) return i[t];
+ if (arguments.length > 1) return n && Ee(e) ? e.call(r && r.proxy) : e;
+ }
+}
+function av(t, e, n, r = !1) {
+ const i = {},
+ o = {};
+ yl(o, Aa, 1), (t.propsDefaults = Object.create(null)), Cg(t, e, i, o);
+ for (const s in t.propsOptions[0]) s in i || (i[s] = void 0);
+ n
+ ? (t.props = r ? i : Qm(i))
+ : t.type.props
+ ? (t.props = i)
+ : (t.props = o),
+ (t.attrs = o);
+}
+function uv(t, e, n, r) {
+ const {
+ props: i,
+ attrs: o,
+ vnode: { patchFlag: s },
+ } = t,
+ l = de(i),
+ [a] = t.propsOptions;
+ let u = !1;
+ if ((r || s > 0) && !(s & 16)) {
+ if (s & 8) {
+ const c = t.vnode.dynamicProps;
+ for (let f = 0; f < c.length; f++) {
+ let h = c[f];
+ if (_a(t.emitsOptions, h)) continue;
+ const p = e[h];
+ if (a)
+ if (We(o, h)) p !== o[h] && ((o[h] = p), (u = !0));
+ else {
+ const g = Jn(h);
+ i[g] = lc(a, l, g, p, t, !1);
+ }
+ else p !== o[h] && ((o[h] = p), (u = !0));
+ }
+ }
+ } else {
+ Cg(t, e, i, o) && (u = !0);
+ let c;
+ for (const f in l)
+ (!e || (!We(e, f) && ((c = xi(f)) === f || !We(e, c)))) &&
+ (a
+ ? n &&
+ (n[f] !== void 0 || n[c] !== void 0) &&
+ (i[f] = lc(a, l, f, void 0, t, !0))
+ : delete i[f]);
+ if (o !== l)
+ for (const f in o)
+ (!e || (!We(e, f) && !0)) && (delete o[f], (u = !0));
+ }
+ u && or(t, "set", "$attrs");
+}
+function Cg(t, e, n, r) {
+ const [i, o] = t.propsOptions;
+ let s = !1,
+ l;
+ if (e)
+ for (let a in e) {
+ if (il(a)) continue;
+ const u = e[a];
+ let c;
+ i && We(i, (c = Jn(a)))
+ ? !o || !o.includes(c)
+ ? (n[c] = u)
+ : ((l || (l = {}))[c] = u)
+ : _a(t.emitsOptions, a) ||
+ ((!(a in r) || u !== r[a]) && ((r[a] = u), (s = !0)));
+ }
+ if (o) {
+ const a = de(n),
+ u = l || rt;
+ for (let c = 0; c < o.length; c++) {
+ const f = o[c];
+ n[f] = lc(i, a, f, u[f], t, !We(u, f));
+ }
+ }
+ return s;
+}
+function lc(t, e, n, r, i, o) {
+ const s = t[n];
+ if (s != null) {
+ const l = We(s, "default");
+ if (l && r === void 0) {
+ const a = s.default;
+ if (s.type !== Function && !s.skipFactory && Ee(a)) {
+ const { propsDefaults: u } = i;
+ n in u
+ ? (r = u[n])
+ : (Ui(i), (r = u[n] = a.call(null, e)), si());
+ } else r = a;
+ }
+ s[0] &&
+ (o && !l
+ ? (r = !1)
+ : s[1] && (r === "" || r === xi(n)) && (r = !0));
+ }
+ return r;
+}
+function Sg(t, e, n = !1) {
+ const r = e.propsCache,
+ i = r.get(t);
+ if (i) return i;
+ const o = t.props,
+ s = {},
+ l = [];
+ let a = !1;
+ if (!Ee(t)) {
+ const c = (f) => {
+ a = !0;
+ const [h, p] = Sg(f, e, !0);
+ _t(s, h), p && l.push(...p);
+ };
+ !n && e.mixins.length && e.mixins.forEach(c),
+ t.extends && c(t.extends),
+ t.mixins && t.mixins.forEach(c);
+ }
+ if (!o && !a) return it(t) && r.set(t, Li), Li;
+ if (we(o))
+ for (let c = 0; c < o.length; c++) {
+ const f = Jn(o[c]);
+ oh(f) && (s[f] = rt);
+ }
+ else if (o)
+ for (const c in o) {
+ const f = Jn(c);
+ if (oh(f)) {
+ const h = o[c],
+ p = (s[f] = we(h) || Ee(h) ? { type: h } : _t({}, h));
+ if (p) {
+ const g = ah(Boolean, p.type),
+ v = ah(String, p.type);
+ (p[0] = g > -1),
+ (p[1] = v < 0 || g < v),
+ (g > -1 || We(p, "default")) && l.push(f);
+ }
+ }
+ }
+ const u = [s, l];
+ return it(t) && r.set(t, u), u;
+}
+function oh(t) {
+ return t[0] !== "$";
+}
+function sh(t) {
+ const e = t && t.toString().match(/^\s*(function|class) (\w+)/);
+ return e ? e[2] : t === null ? "null" : "";
+}
+function lh(t, e) {
+ return sh(t) === sh(e);
+}
+function ah(t, e) {
+ return we(e) ? e.findIndex((n) => lh(n, t)) : Ee(e) && lh(e, t) ? 0 : -1;
+}
+const _g = (t) => t[0] === "_" || t === "$stable",
+ bd = (t) => (we(t) ? t.map(Hn) : [Hn(t)]),
+ cv = (t, e, n) => {
+ if (e._n) return e;
+ const r = Te((...i) => bd(e(...i)), n);
+ return (r._c = !1), r;
+ },
+ Mg = (t, e, n) => {
+ const r = t._ctx;
+ for (const i in t) {
+ if (_g(i)) continue;
+ const o = t[i];
+ if (Ee(o)) e[i] = cv(i, o, r);
+ else if (o != null) {
+ const s = bd(o);
+ e[i] = () => s;
+ }
+ }
+ },
+ Eg = (t, e) => {
+ const n = bd(e);
+ t.slots.default = () => n;
+ },
+ dv = (t, e) => {
+ if (t.vnode.shapeFlag & 32) {
+ const n = e._;
+ n ? ((t.slots = de(e)), yl(e, "_", n)) : Mg(e, (t.slots = {}));
+ } else (t.slots = {}), e && Eg(t, e);
+ yl(t.slots, Aa, 1);
+ },
+ fv = (t, e, n) => {
+ const { vnode: r, slots: i } = t;
+ let o = !0,
+ s = rt;
+ if (r.shapeFlag & 32) {
+ const l = e._;
+ l
+ ? n && l === 1
+ ? (o = !1)
+ : (_t(i, e), !n && l === 1 && delete i._)
+ : ((o = !e.$stable), Mg(e, i)),
+ (s = e);
+ } else e && (Eg(t, e), (s = { default: 1 }));
+ if (o) for (const l in i) !_g(l) && s[l] == null && delete i[l];
+ };
+function ac(t, e, n, r, i = !1) {
+ if (we(t)) {
+ t.forEach((h, p) => ac(h, e && (we(e) ? e[p] : e), n, r, i));
+ return;
+ }
+ if (To(r) && !i) return;
+ const o = r.shapeFlag & 4 ? Ta(r.component) || r.component.proxy : r.el,
+ s = i ? null : o,
+ { i: l, r: a } = t,
+ u = e && e.r,
+ c = l.refs === rt ? (l.refs = {}) : l.refs,
+ f = l.setupState;
+ if (
+ (u != null &&
+ u !== a &&
+ (at(u)
+ ? ((c[u] = null), We(f, u) && (f[u] = null))
+ : Ht(u) && (u.value = null)),
+ Ee(a))
+ )
+ Or(a, l, 12, [s, c]);
+ else {
+ const h = at(a),
+ p = Ht(a);
+ if (h || p) {
+ const g = () => {
+ if (t.f) {
+ const v = h ? (We(f, a) ? f[a] : c[a]) : a.value;
+ i
+ ? we(v) && sd(v, o)
+ : we(v)
+ ? v.includes(o) || v.push(o)
+ : h
+ ? ((c[a] = [o]), We(f, a) && (f[a] = c[a]))
+ : ((a.value = [o]), t.k && (c[t.k] = a.value));
+ } else
+ h
+ ? ((c[a] = s), We(f, a) && (f[a] = s))
+ : p && ((a.value = s), t.k && (c[t.k] = s));
+ };
+ s ? ((g.id = -1), Gt(g, n)) : g();
+ }
+ }
+}
+const Gt = $2;
+function hv(t) {
+ return pv(t);
+}
+function pv(t, e) {
+ const n = Ju();
+ n.__VUE__ = !0;
+ const {
+ insert: r,
+ remove: i,
+ patchProp: o,
+ createElement: s,
+ createText: l,
+ createComment: a,
+ setText: u,
+ setElementText: c,
+ parentNode: f,
+ nextSibling: h,
+ setScopeId: p = On,
+ insertStaticContent: g,
+ } = t,
+ v = (
+ A,
+ O,
+ j,
+ H = null,
+ V = null,
+ q = null,
+ se = !1,
+ Z = null,
+ te = !!O.dynamicChildren
+ ) => {
+ if (A === O) return;
+ A && !Qr(A, O) && ((H = z(A)), me(A, V, q, !0), (A = null)),
+ O.patchFlag === -2 && ((te = !1), (O.dynamicChildren = null));
+ const { type: J, ref: he, shapeFlag: ce } = O;
+ switch (J) {
+ case Ea:
+ b(A, O, j, H);
+ break;
+ case yn:
+ x(A, O, j, H);
+ break;
+ case lu:
+ A == null && S(O, j, H, se);
+ break;
+ case He:
+ R(A, O, j, H, V, q, se, Z, te);
+ break;
+ default:
+ ce & 1
+ ? y(A, O, j, H, V, q, se, Z, te)
+ : ce & 6
+ ? P(A, O, j, H, V, q, se, Z, te)
+ : (ce & 64 || ce & 128) &&
+ J.process(A, O, j, H, V, q, se, Z, te, ee);
+ }
+ he != null && V && ac(he, A && A.ref, q, O || A, !O);
+ },
+ b = (A, O, j, H) => {
+ if (A == null) r((O.el = l(O.children)), j, H);
+ else {
+ const V = (O.el = A.el);
+ O.children !== A.children && u(V, O.children);
+ }
+ },
+ x = (A, O, j, H) => {
+ A == null ? r((O.el = a(O.children || "")), j, H) : (O.el = A.el);
+ },
+ S = (A, O, j, H) => {
+ [A.el, A.anchor] = g(A.children, O, j, H, A.el, A.anchor);
+ },
+ T = ({ el: A, anchor: O }, j, H) => {
+ let V;
+ for (; A && A !== O; ) (V = h(A)), r(A, j, H), (A = V);
+ r(O, j, H);
+ },
+ d = ({ el: A, anchor: O }) => {
+ let j;
+ for (; A && A !== O; ) (j = h(A)), i(A), (A = j);
+ i(O);
+ },
+ y = (A, O, j, H, V, q, se, Z, te) => {
+ (se = se || O.type === "svg"),
+ A == null
+ ? m(O, j, H, V, q, se, Z, te)
+ : _(A, O, V, q, se, Z, te);
+ },
+ m = (A, O, j, H, V, q, se, Z) => {
+ let te, J;
+ const {
+ type: he,
+ props: ce,
+ shapeFlag: pe,
+ transition: ke,
+ dirs: Oe,
+ } = A;
+ if (
+ ((te = A.el = s(A.type, q, ce && ce.is, ce)),
+ pe & 8
+ ? c(te, A.children)
+ : pe & 16 &&
+ k(
+ A.children,
+ te,
+ null,
+ H,
+ V,
+ q && he !== "foreignObject",
+ se,
+ Z
+ ),
+ Oe && Wr(A, null, H, "created"),
+ w(te, A, A.scopeId, se, H),
+ ce)
+ ) {
+ for (const Fe in ce)
+ Fe !== "value" &&
+ !il(Fe) &&
+ o(te, Fe, null, ce[Fe], q, A.children, H, V, Ae);
+ "value" in ce && o(te, "value", null, ce.value),
+ (J = ce.onVnodeBeforeMount) && Dn(J, H, A);
+ }
+ Oe && Wr(A, null, H, "beforeMount");
+ const Je = mv(V, ke);
+ Je && ke.beforeEnter(te),
+ r(te, O, j),
+ ((J = ce && ce.onVnodeMounted) || Je || Oe) &&
+ Gt(() => {
+ J && Dn(J, H, A),
+ Je && ke.enter(te),
+ Oe && Wr(A, null, H, "mounted");
+ }, V);
+ },
+ w = (A, O, j, H, V) => {
+ if ((j && p(A, j), H))
+ for (let q = 0; q < H.length; q++) p(A, H[q]);
+ if (V) {
+ let q = V.subTree;
+ if (O === q) {
+ const se = V.vnode;
+ w(A, se, se.scopeId, se.slotScopeIds, V.parent);
+ }
+ }
+ },
+ k = (A, O, j, H, V, q, se, Z, te = 0) => {
+ for (let J = te; J < A.length; J++) {
+ const he = (A[J] = Z ? yr(A[J]) : Hn(A[J]));
+ v(null, he, O, j, H, V, q, se, Z);
+ }
+ },
+ _ = (A, O, j, H, V, q, se) => {
+ const Z = (O.el = A.el);
+ let { patchFlag: te, dynamicChildren: J, dirs: he } = O;
+ te |= A.patchFlag & 16;
+ const ce = A.props || rt,
+ pe = O.props || rt;
+ let ke;
+ j && Ur(j, !1),
+ (ke = pe.onVnodeBeforeUpdate) && Dn(ke, j, O, A),
+ he && Wr(O, A, j, "beforeUpdate"),
+ j && Ur(j, !0);
+ const Oe = V && O.type !== "foreignObject";
+ if (
+ (J
+ ? C(A.dynamicChildren, J, Z, j, H, Oe, q)
+ : se || D(A, O, Z, null, j, H, Oe, q, !1),
+ te > 0)
+ ) {
+ if (te & 16) E(Z, O, ce, pe, j, H, V);
+ else if (
+ (te & 2 &&
+ ce.class !== pe.class &&
+ o(Z, "class", null, pe.class, V),
+ te & 4 && o(Z, "style", ce.style, pe.style, V),
+ te & 8)
+ ) {
+ const Je = O.dynamicProps;
+ for (let Fe = 0; Fe < Je.length; Fe++) {
+ const ct = Je[Fe],
+ nn = ce[ct],
+ ur = pe[ct];
+ (ur !== nn || ct === "value") &&
+ o(Z, ct, nn, ur, V, A.children, j, H, Ae);
+ }
+ }
+ te & 1 && A.children !== O.children && c(Z, O.children);
+ } else !se && J == null && E(Z, O, ce, pe, j, H, V);
+ ((ke = pe.onVnodeUpdated) || he) &&
+ Gt(() => {
+ ke && Dn(ke, j, O, A), he && Wr(O, A, j, "updated");
+ }, H);
+ },
+ C = (A, O, j, H, V, q, se) => {
+ for (let Z = 0; Z < O.length; Z++) {
+ const te = A[Z],
+ J = O[Z],
+ he =
+ te.el &&
+ (te.type === He || !Qr(te, J) || te.shapeFlag & 70)
+ ? f(te.el)
+ : j;
+ v(te, J, he, null, H, V, q, se, !0);
+ }
+ },
+ E = (A, O, j, H, V, q, se) => {
+ if (j !== H) {
+ if (j !== rt)
+ for (const Z in j)
+ !il(Z) &&
+ !(Z in H) &&
+ o(A, Z, j[Z], null, se, O.children, V, q, Ae);
+ for (const Z in H) {
+ if (il(Z)) continue;
+ const te = H[Z],
+ J = j[Z];
+ te !== J &&
+ Z !== "value" &&
+ o(A, Z, J, te, se, O.children, V, q, Ae);
+ }
+ "value" in H && o(A, "value", j.value, H.value);
+ }
+ },
+ R = (A, O, j, H, V, q, se, Z, te) => {
+ const J = (O.el = A ? A.el : l("")),
+ he = (O.anchor = A ? A.anchor : l(""));
+ let { patchFlag: ce, dynamicChildren: pe, slotScopeIds: ke } = O;
+ ke && (Z = Z ? Z.concat(ke) : ke),
+ A == null
+ ? (r(J, j, H),
+ r(he, j, H),
+ k(O.children, j, he, V, q, se, Z, te))
+ : ce > 0 && ce & 64 && pe && A.dynamicChildren
+ ? (C(A.dynamicChildren, pe, j, V, q, se, Z),
+ (O.key != null || (V && O === V.subTree)) && wd(A, O, !0))
+ : D(A, O, j, he, V, q, se, Z, te);
+ },
+ P = (A, O, j, H, V, q, se, Z, te) => {
+ (O.slotScopeIds = Z),
+ A == null
+ ? O.shapeFlag & 512
+ ? V.ctx.activate(O, j, H, se, te)
+ : L(O, j, H, V, q, se, te)
+ : I(A, O, te);
+ },
+ L = (A, O, j, H, V, q, se) => {
+ const Z = (A.component = Sv(A, H, V));
+ if ((ds(A) && (Z.ctx.renderer = ee), _v(Z), Z.asyncDep)) {
+ if ((V && V.registerDep(Z, M), !A.el)) {
+ const te = (Z.subTree = Me(yn));
+ x(null, te, O, j);
+ }
+ return;
+ }
+ M(Z, A, O, j, V, q, se);
+ },
+ I = (A, O, j) => {
+ const H = (O.component = A.component);
+ if (D2(A, O, j))
+ if (H.asyncDep && !H.asyncResolved) {
+ N(H, O, j);
+ return;
+ } else (H.next = O), O2(H.update), H.update();
+ else (O.el = A.el), (H.vnode = O);
+ },
+ M = (A, O, j, H, V, q, se) => {
+ const Z = () => {
+ if (A.isMounted) {
+ let {
+ next: he,
+ bu: ce,
+ u: pe,
+ parent: ke,
+ vnode: Oe,
+ } = A,
+ Je = he,
+ Fe;
+ Ur(A, !1),
+ he ? ((he.el = Oe.el), N(A, he, se)) : (he = Oe),
+ ce && tu(ce),
+ (Fe = he.props && he.props.onVnodeBeforeUpdate) &&
+ Dn(Fe, ke, he, Oe),
+ Ur(A, !0);
+ const ct = nu(A),
+ nn = A.subTree;
+ (A.subTree = ct),
+ v(nn, ct, f(nn.el), z(nn), A, V, q),
+ (he.el = ct.el),
+ Je === null && I2(A, ct.el),
+ pe && Gt(pe, V),
+ (Fe = he.props && he.props.onVnodeUpdated) &&
+ Gt(() => Dn(Fe, ke, he, Oe), V);
+ } else {
+ let he;
+ const { el: ce, props: pe } = O,
+ { bm: ke, m: Oe, parent: Je } = A,
+ Fe = To(O);
+ if (
+ (Ur(A, !1),
+ ke && tu(ke),
+ !Fe &&
+ (he = pe && pe.onVnodeBeforeMount) &&
+ Dn(he, Je, O),
+ Ur(A, !0),
+ ce && Pe)
+ ) {
+ const ct = () => {
+ (A.subTree = nu(A)),
+ Pe(ce, A.subTree, A, V, null);
+ };
+ Fe
+ ? O.type
+ .__asyncLoader()
+ .then(() => !A.isUnmounted && ct())
+ : ct();
+ } else {
+ const ct = (A.subTree = nu(A));
+ v(null, ct, j, H, A, V, q), (O.el = ct.el);
+ }
+ if (
+ (Oe && Gt(Oe, V),
+ !Fe && (he = pe && pe.onVnodeMounted))
+ ) {
+ const ct = O;
+ Gt(() => Dn(he, Je, ct), V);
+ }
+ (O.shapeFlag & 256 ||
+ (Je && To(Je.vnode) && Je.vnode.shapeFlag & 256)) &&
+ A.a &&
+ Gt(A.a, V),
+ (A.isMounted = !0),
+ (O = j = H = null);
+ }
+ },
+ te = (A.effect = new ud(Z, () => Sa(J), A.scope)),
+ J = (A.update = () => te.run());
+ (J.id = A.uid), Ur(A, !0), J();
+ },
+ N = (A, O, j) => {
+ O.component = A;
+ const H = A.vnode.props;
+ (A.vnode = O),
+ (A.next = null),
+ uv(A, O.props, H, j),
+ fv(A, O.children, j),
+ io(),
+ Qf(),
+ oo();
+ },
+ D = (A, O, j, H, V, q, se, Z, te = !1) => {
+ const J = A && A.children,
+ he = A ? A.shapeFlag : 0,
+ ce = O.children,
+ { patchFlag: pe, shapeFlag: ke } = O;
+ if (pe > 0) {
+ if (pe & 128) {
+ ae(J, ce, j, H, V, q, se, Z, te);
+ return;
+ } else if (pe & 256) {
+ K(J, ce, j, H, V, q, se, Z, te);
+ return;
+ }
+ }
+ ke & 8
+ ? (he & 16 && Ae(J, V, q), ce !== J && c(j, ce))
+ : he & 16
+ ? ke & 16
+ ? ae(J, ce, j, H, V, q, se, Z, te)
+ : Ae(J, V, q, !0)
+ : (he & 8 && c(j, ""), ke & 16 && k(ce, j, H, V, q, se, Z, te));
+ },
+ K = (A, O, j, H, V, q, se, Z, te) => {
+ (A = A || Li), (O = O || Li);
+ const J = A.length,
+ he = O.length,
+ ce = Math.min(J, he);
+ let pe;
+ for (pe = 0; pe < ce; pe++) {
+ const ke = (O[pe] = te ? yr(O[pe]) : Hn(O[pe]));
+ v(A[pe], ke, j, null, V, q, se, Z, te);
+ }
+ J > he ? Ae(A, V, q, !0, !1, ce) : k(O, j, H, V, q, se, Z, te, ce);
+ },
+ ae = (A, O, j, H, V, q, se, Z, te) => {
+ let J = 0;
+ const he = O.length;
+ let ce = A.length - 1,
+ pe = he - 1;
+ for (; J <= ce && J <= pe; ) {
+ const ke = A[J],
+ Oe = (O[J] = te ? yr(O[J]) : Hn(O[J]));
+ if (Qr(ke, Oe)) v(ke, Oe, j, null, V, q, se, Z, te);
+ else break;
+ J++;
+ }
+ for (; J <= ce && J <= pe; ) {
+ const ke = A[ce],
+ Oe = (O[pe] = te ? yr(O[pe]) : Hn(O[pe]));
+ if (Qr(ke, Oe)) v(ke, Oe, j, null, V, q, se, Z, te);
+ else break;
+ ce--, pe--;
+ }
+ if (J > ce) {
+ if (J <= pe) {
+ const ke = pe + 1,
+ Oe = ke < he ? O[ke].el : H;
+ for (; J <= pe; )
+ v(
+ null,
+ (O[J] = te ? yr(O[J]) : Hn(O[J])),
+ j,
+ Oe,
+ V,
+ q,
+ se,
+ Z,
+ te
+ ),
+ J++;
+ }
+ } else if (J > pe) for (; J <= ce; ) me(A[J], V, q, !0), J++;
+ else {
+ const ke = J,
+ Oe = J,
+ Je = new Map();
+ for (J = Oe; J <= pe; J++) {
+ const le = (O[J] = te ? yr(O[J]) : Hn(O[J]));
+ le.key != null && Je.set(le.key, J);
+ }
+ let Fe,
+ ct = 0;
+ const nn = pe - Oe + 1;
+ let ur = !1,
+ Cs = 0;
+ const Fr = new Array(nn);
+ for (J = 0; J < nn; J++) Fr[J] = 0;
+ for (J = ke; J <= ce; J++) {
+ const le = A[J];
+ if (ct >= nn) {
+ me(le, V, q, !0);
+ continue;
+ }
+ let ge;
+ if (le.key != null) ge = Je.get(le.key);
+ else
+ for (Fe = Oe; Fe <= pe; Fe++)
+ if (Fr[Fe - Oe] === 0 && Qr(le, O[Fe])) {
+ ge = Fe;
+ break;
+ }
+ ge === void 0
+ ? me(le, V, q, !0)
+ : ((Fr[ge - Oe] = J + 1),
+ ge >= Cs ? (Cs = ge) : (ur = !0),
+ v(le, O[ge], j, null, V, q, se, Z, te),
+ ct++);
+ }
+ const F = ur ? gv(Fr) : Li;
+ for (Fe = F.length - 1, J = nn - 1; J >= 0; J--) {
+ const le = Oe + J,
+ ge = O[le],
+ Ke = le + 1 < he ? O[le + 1].el : H;
+ Fr[J] === 0
+ ? v(null, ge, j, Ke, V, q, se, Z, te)
+ : ur &&
+ (Fe < 0 || J !== F[Fe] ? Q(ge, j, Ke, 2) : Fe--);
+ }
+ }
+ },
+ Q = (A, O, j, H, V = null) => {
+ const {
+ el: q,
+ type: se,
+ transition: Z,
+ children: te,
+ shapeFlag: J,
+ } = A;
+ if (J & 6) {
+ Q(A.component.subTree, O, j, H);
+ return;
+ }
+ if (J & 128) {
+ A.suspense.move(O, j, H);
+ return;
+ }
+ if (J & 64) {
+ se.move(A, O, j, ee);
+ return;
+ }
+ if (se === He) {
+ r(q, O, j);
+ for (let ce = 0; ce < te.length; ce++) Q(te[ce], O, j, H);
+ r(A.anchor, O, j);
+ return;
+ }
+ if (se === lu) {
+ T(A, O, j);
+ return;
+ }
+ if (H !== 2 && J & 1 && Z)
+ if (H === 0)
+ Z.beforeEnter(q), r(q, O, j), Gt(() => Z.enter(q), V);
+ else {
+ const { leave: ce, delayLeave: pe, afterLeave: ke } = Z,
+ Oe = () => r(q, O, j),
+ Je = () => {
+ ce(q, () => {
+ Oe(), ke && ke();
+ });
+ };
+ pe ? pe(q, Oe, Je) : Je();
+ }
+ else r(q, O, j);
+ },
+ me = (A, O, j, H = !1, V = !1) => {
+ const {
+ type: q,
+ props: se,
+ ref: Z,
+ children: te,
+ dynamicChildren: J,
+ shapeFlag: he,
+ patchFlag: ce,
+ dirs: pe,
+ } = A;
+ if ((Z != null && ac(Z, null, j, A, !0), he & 256)) {
+ O.ctx.deactivate(A);
+ return;
+ }
+ const ke = he & 1 && pe,
+ Oe = !To(A);
+ let Je;
+ if (
+ (Oe && (Je = se && se.onVnodeBeforeUnmount) && Dn(Je, O, A),
+ he & 6)
+ )
+ Re(A.component, j, H);
+ else {
+ if (he & 128) {
+ A.suspense.unmount(j, H);
+ return;
+ }
+ ke && Wr(A, null, O, "beforeUnmount"),
+ he & 64
+ ? A.type.remove(A, O, j, V, ee, H)
+ : J && (q !== He || (ce > 0 && ce & 64))
+ ? Ae(J, O, j, !1, !0)
+ : ((q === He && ce & 384) || (!V && he & 16)) &&
+ Ae(te, O, j),
+ H && je(A);
+ }
+ ((Oe && (Je = se && se.onVnodeUnmounted)) || ke) &&
+ Gt(() => {
+ Je && Dn(Je, O, A), ke && Wr(A, null, O, "unmounted");
+ }, j);
+ },
+ je = (A) => {
+ const { type: O, el: j, anchor: H, transition: V } = A;
+ if (O === He) {
+ Le(j, H);
+ return;
+ }
+ if (O === lu) {
+ d(A);
+ return;
+ }
+ const q = () => {
+ i(j), V && !V.persisted && V.afterLeave && V.afterLeave();
+ };
+ if (A.shapeFlag & 1 && V && !V.persisted) {
+ const { leave: se, delayLeave: Z } = V,
+ te = () => se(j, q);
+ Z ? Z(A.el, q, te) : te();
+ } else q();
+ },
+ Le = (A, O) => {
+ let j;
+ for (; A !== O; ) (j = h(A)), i(A), (A = j);
+ i(O);
+ },
+ Re = (A, O, j) => {
+ const { bum: H, scope: V, update: q, subTree: se, um: Z } = A;
+ H && tu(H),
+ V.stop(),
+ q && ((q.active = !1), me(se, A, O, j)),
+ Z && Gt(Z, O),
+ Gt(() => {
+ A.isUnmounted = !0;
+ }, O),
+ O &&
+ O.pendingBranch &&
+ !O.isUnmounted &&
+ A.asyncDep &&
+ !A.asyncResolved &&
+ A.suspenseId === O.pendingId &&
+ (O.deps--, O.deps === 0 && O.resolve());
+ },
+ Ae = (A, O, j, H = !1, V = !1, q = 0) => {
+ for (let se = q; se < A.length; se++) me(A[se], O, j, H, V);
+ },
+ z = (A) =>
+ A.shapeFlag & 6
+ ? z(A.component.subTree)
+ : A.shapeFlag & 128
+ ? A.suspense.next()
+ : h(A.anchor || A.el),
+ X = (A, O, j) => {
+ A == null
+ ? O._vnode && me(O._vnode, null, null, !0)
+ : v(O._vnode || null, A, O, null, null, null, j),
+ Qf(),
+ ag(),
+ (O._vnode = A);
+ },
+ ee = {
+ p: v,
+ um: me,
+ m: Q,
+ r: je,
+ mt: L,
+ mc: k,
+ pc: D,
+ pbc: C,
+ n: z,
+ o: t,
+ };
+ let ue, Pe;
+ return (
+ e && ([ue, Pe] = e(ee)),
+ { render: X, hydrate: ue, createApp: lv(X, ue) }
+ );
+}
+function Ur({ effect: t, update: e }, n) {
+ t.allowRecurse = e.allowRecurse = n;
+}
+function mv(t, e) {
+ return (!t || (t && !t.pendingBranch)) && e && !e.persisted;
+}
+function wd(t, e, n = !1) {
+ const r = t.children,
+ i = e.children;
+ if (we(r) && we(i))
+ for (let o = 0; o < r.length; o++) {
+ const s = r[o];
+ let l = i[o];
+ l.shapeFlag & 1 &&
+ !l.dynamicChildren &&
+ ((l.patchFlag <= 0 || l.patchFlag === 32) &&
+ ((l = i[o] = yr(i[o])), (l.el = s.el)),
+ n || wd(s, l)),
+ l.type === Ea && (l.el = s.el);
+ }
+}
+function gv(t) {
+ const e = t.slice(),
+ n = [0];
+ let r, i, o, s, l;
+ const a = t.length;
+ for (r = 0; r < a; r++) {
+ const u = t[r];
+ if (u !== 0) {
+ if (((i = n[n.length - 1]), t[i] < u)) {
+ (e[r] = i), n.push(r);
+ continue;
+ }
+ for (o = 0, s = n.length - 1; o < s; )
+ (l = (o + s) >> 1), t[n[l]] < u ? (o = l + 1) : (s = l);
+ u < t[n[o]] && (o > 0 && (e[r] = n[o - 1]), (n[o] = r));
+ }
+ }
+ for (o = n.length, s = n[o - 1]; o-- > 0; ) (n[o] = s), (s = e[s]);
+ return n;
+}
+const yv = (t) => t.__isTeleport,
+ Ro = (t) => t && (t.disabled || t.disabled === ""),
+ uh = (t) => typeof SVGElement != "undefined" && t instanceof SVGElement,
+ uc = (t, e) => {
+ const n = t && t.to;
+ return at(n) ? (e ? e(n) : null) : n;
+ },
+ vv = {
+ name: "Teleport",
+ __isTeleport: !0,
+ process(t, e, n, r, i, o, s, l, a, u) {
+ const {
+ mc: c,
+ pc: f,
+ pbc: h,
+ o: {
+ insert: p,
+ querySelector: g,
+ createText: v,
+ createComment: b,
+ },
+ } = u,
+ x = Ro(e.props);
+ let { shapeFlag: S, children: T, dynamicChildren: d } = e;
+ if (t == null) {
+ const y = (e.el = v("")),
+ m = (e.anchor = v(""));
+ p(y, n, r), p(m, n, r);
+ const w = (e.target = uc(e.props, g)),
+ k = (e.targetAnchor = v(""));
+ w && (p(k, w), (s = s || uh(w)));
+ const _ = (C, E) => {
+ S & 16 && c(T, C, E, i, o, s, l, a);
+ };
+ x ? _(n, m) : w && _(w, k);
+ } else {
+ e.el = t.el;
+ const y = (e.anchor = t.anchor),
+ m = (e.target = t.target),
+ w = (e.targetAnchor = t.targetAnchor),
+ k = Ro(t.props),
+ _ = k ? n : m,
+ C = k ? y : w;
+ if (
+ ((s = s || uh(m)),
+ d
+ ? (h(t.dynamicChildren, d, _, i, o, s, l), wd(t, e, !0))
+ : a || f(t, e, _, C, i, o, s, l, !1),
+ x)
+ )
+ k
+ ? e.props &&
+ t.props &&
+ e.props.to !== t.props.to &&
+ (e.props.to = t.props.to)
+ : Ls(e, n, y, u, 1);
+ else if ((e.props && e.props.to) !== (t.props && t.props.to)) {
+ const E = (e.target = uc(e.props, g));
+ E && Ls(e, E, null, u, 0);
+ } else k && Ls(e, m, w, u, 1);
+ }
+ Ag(e);
+ },
+ remove(t, e, n, r, { um: i, o: { remove: o } }, s) {
+ const {
+ shapeFlag: l,
+ children: a,
+ anchor: u,
+ targetAnchor: c,
+ target: f,
+ props: h,
+ } = t;
+ if ((f && o(c), s && o(u), l & 16)) {
+ const p = s || !Ro(h);
+ for (let g = 0; g < a.length; g++) {
+ const v = a[g];
+ i(v, e, n, p, !!v.dynamicChildren);
+ }
+ }
+ },
+ move: Ls,
+ hydrate: bv,
+ };
+function Ls(t, e, n, { o: { insert: r }, m: i }, o = 2) {
+ o === 0 && r(t.targetAnchor, e, n);
+ const { el: s, anchor: l, shapeFlag: a, children: u, props: c } = t,
+ f = o === 2;
+ if ((f && r(s, e, n), (!f || Ro(c)) && a & 16))
+ for (let h = 0; h < u.length; h++) i(u[h], e, n, 2);
+ f && r(l, e, n);
+}
+function bv(
+ t,
+ e,
+ n,
+ r,
+ i,
+ o,
+ { o: { nextSibling: s, parentNode: l, querySelector: a } },
+ u
+) {
+ const c = (e.target = uc(e.props, a));
+ if (c) {
+ const f = c._lpa || c.firstChild;
+ if (e.shapeFlag & 16)
+ if (Ro(e.props))
+ (e.anchor = u(s(t), e, l(t), n, r, i, o)), (e.targetAnchor = f);
+ else {
+ e.anchor = s(t);
+ let h = f;
+ for (; h; )
+ if (
+ ((h = s(h)),
+ h && h.nodeType === 8 && h.data === "teleport anchor")
+ ) {
+ (e.targetAnchor = h),
+ (c._lpa = e.targetAnchor && s(e.targetAnchor));
+ break;
+ }
+ u(f, e, c, n, r, i, o);
+ }
+ Ag(e);
+ }
+ return e.anchor && s(e.anchor);
+}
+const xd = vv;
+function Ag(t) {
+ const e = t.ctx;
+ if (e && e.ut) {
+ let n = t.children[0].el;
+ for (; n && n !== t.targetAnchor; )
+ n.nodeType === 1 && n.setAttribute("data-v-owner", e.uid),
+ (n = n.nextSibling);
+ e.ut();
+ }
+}
+const He = Symbol.for("v-fgt"),
+ Ea = Symbol.for("v-txt"),
+ yn = Symbol.for("v-cmt"),
+ lu = Symbol.for("v-stc"),
+ Po = [];
+let An = null;
+function B(t = !1) {
+ Po.push((An = t ? null : []));
+}
+function wv() {
+ Po.pop(), (An = Po[Po.length - 1] || null);
+}
+let Jo = 1;
+function ch(t) {
+ Jo += t;
+}
+function Tg(t) {
+ return (
+ (t.dynamicChildren = Jo > 0 ? An || Li : null),
+ wv(),
+ Jo > 0 && An && An.push(t),
+ t
+ );
+}
+function G(t, e, n, r, i, o) {
+ return Tg(U(t, e, n, r, i, o, !0));
+}
+function Be(t, e, n, r, i) {
+ return Tg(Me(t, e, n, r, i, !0));
+}
+function kl(t) {
+ return t ? t.__v_isVNode === !0 : !1;
+}
+function Qr(t, e) {
+ return t.type === e.type && t.key === e.key;
+}
+const Aa = "__vInternal",
+ Og = ({ key: t }) => (t != null ? t : null),
+ ol = ({ ref: t, ref_key: e, ref_for: n }) => (
+ typeof t == "number" && (t = "" + t),
+ t != null
+ ? at(t) || Ht(t) || Ee(t)
+ ? { i: It, r: t, k: e, f: !!n }
+ : t
+ : null
+ );
+function U(
+ t,
+ e = null,
+ n = null,
+ r = 0,
+ i = null,
+ o = t === He ? 0 : 1,
+ s = !1,
+ l = !1
+) {
+ const a = {
+ __v_isVNode: !0,
+ __v_skip: !0,
+ type: t,
+ props: e,
+ key: e && Og(e),
+ ref: e && ol(e),
+ scopeId: dg,
+ slotScopeIds: null,
+ children: n,
+ component: null,
+ suspense: null,
+ ssContent: null,
+ ssFallback: null,
+ dirs: null,
+ transition: null,
+ el: null,
+ anchor: null,
+ target: null,
+ targetAnchor: null,
+ staticCount: 0,
+ shapeFlag: o,
+ patchFlag: r,
+ dynamicProps: i,
+ dynamicChildren: null,
+ appContext: null,
+ ctx: It,
+ };
+ return (
+ l
+ ? (kd(a, n), o & 128 && t.normalize(a))
+ : n && (a.shapeFlag |= at(n) ? 8 : 16),
+ Jo > 0 &&
+ !s &&
+ An &&
+ (a.patchFlag > 0 || o & 6) &&
+ a.patchFlag !== 32 &&
+ An.push(a),
+ a
+ );
+}
+const Me = xv;
+function xv(t, e = null, n = null, r = 0, i = null, o = !1) {
+ if (((!t || t === fg) && (t = yn), kl(t))) {
+ const l = sr(t, e, !0);
+ return (
+ n && kd(l, n),
+ Jo > 0 &&
+ !o &&
+ An &&
+ (l.shapeFlag & 6 ? (An[An.indexOf(t)] = l) : An.push(l)),
+ (l.patchFlag |= -2),
+ l
+ );
+ }
+ if ((Tv(t) && (t = t.__vccOpts), e)) {
+ e = Ft(e);
+ let { class: l, style: a } = e;
+ l && !at(l) && (e.class = ye(l)),
+ it(a) && (Zm(a) && !we(a) && (a = _t({}, a)), (e.style = Ir(a)));
+ }
+ const s = at(t) ? 1 : B2(t) ? 128 : yv(t) ? 64 : it(t) ? 4 : Ee(t) ? 2 : 0;
+ return U(t, e, n, r, i, s, o, !0);
+}
+function Ft(t) {
+ return t ? (Zm(t) || Aa in t ? _t({}, t) : t) : null;
+}
+function sr(t, e, n = !1) {
+ const { props: r, ref: i, patchFlag: o, children: s } = t,
+ l = e ? yt(r || {}, e) : r;
+ return {
+ __v_isVNode: !0,
+ __v_skip: !0,
+ type: t.type,
+ props: l,
+ key: l && Og(l),
+ ref:
+ e && e.ref
+ ? n && i
+ ? we(i)
+ ? i.concat(ol(e))
+ : [i, ol(e)]
+ : ol(e)
+ : i,
+ scopeId: t.scopeId,
+ slotScopeIds: t.slotScopeIds,
+ children: s,
+ target: t.target,
+ targetAnchor: t.targetAnchor,
+ staticCount: t.staticCount,
+ shapeFlag: t.shapeFlag,
+ patchFlag: e && t.type !== He ? (o === -1 ? 16 : o | 16) : o,
+ dynamicProps: t.dynamicProps,
+ dynamicChildren: t.dynamicChildren,
+ appContext: t.appContext,
+ dirs: t.dirs,
+ transition: t.transition,
+ component: t.component,
+ suspense: t.suspense,
+ ssContent: t.ssContent && sr(t.ssContent),
+ ssFallback: t.ssFallback && sr(t.ssFallback),
+ el: t.el,
+ anchor: t.anchor,
+ ctx: t.ctx,
+ ce: t.ce,
+ };
+}
+function Pn(t = " ", e = 0) {
+ return Me(Ea, null, t, e);
+}
+function De(t = "", e = !1) {
+ return e ? (B(), Be(yn, null, t)) : Me(yn, null, t);
+}
+function Hn(t) {
+ return t == null || typeof t == "boolean"
+ ? Me(yn)
+ : we(t)
+ ? Me(He, null, t.slice())
+ : typeof t == "object"
+ ? yr(t)
+ : Me(Ea, null, String(t));
+}
+function yr(t) {
+ return (t.el === null && t.patchFlag !== -1) || t.memo ? t : sr(t);
+}
+function kd(t, e) {
+ let n = 0;
+ const { shapeFlag: r } = t;
+ if (e == null) e = null;
+ else if (we(e)) n = 16;
+ else if (typeof e == "object")
+ if (r & 65) {
+ const i = e.default;
+ i && (i._c && (i._d = !1), kd(t, i()), i._c && (i._d = !0));
+ return;
+ } else {
+ n = 32;
+ const i = e._;
+ !i && !(Aa in e)
+ ? (e._ctx = It)
+ : i === 3 &&
+ It &&
+ (It.slots._ === 1
+ ? (e._ = 1)
+ : ((e._ = 2), (t.patchFlag |= 1024)));
+ }
+ else
+ Ee(e)
+ ? ((e = { default: e, _ctx: It }), (n = 32))
+ : ((e = String(e)), r & 64 ? ((n = 16), (e = [Pn(e)])) : (n = 8));
+ (t.children = e), (t.shapeFlag |= n);
+}
+function yt(...t) {
+ const e = {};
+ for (let n = 0; n < t.length; n++) {
+ const r = t[n];
+ for (const i in r)
+ if (i === "class")
+ e.class !== r.class && (e.class = ye([e.class, r.class]));
+ else if (i === "style") e.style = Ir([e.style, r.style]);
+ else if (va(i)) {
+ const o = e[i],
+ s = r[i];
+ s &&
+ o !== s &&
+ !(we(o) && o.includes(s)) &&
+ (e[i] = o ? [].concat(o, s) : s);
+ } else i !== "" && (e[i] = r[i]);
+ }
+ return e;
+}
+function Dn(t, e, n, r = null) {
+ gn(t, e, 7, [n, r]);
+}
+const kv = kg();
+let Cv = 0;
+function Sv(t, e, n) {
+ const r = t.type,
+ i = (e ? e.appContext : t.appContext) || kv,
+ o = {
+ uid: Cv++,
+ vnode: t,
+ type: r,
+ parent: e,
+ appContext: i,
+ root: null,
+ next: null,
+ subTree: null,
+ effect: null,
+ update: null,
+ scope: new n2(!0),
+ render: null,
+ proxy: null,
+ exposed: null,
+ exposeProxy: null,
+ withProxy: null,
+ provides: e ? e.provides : Object.create(i.provides),
+ accessCache: null,
+ renderCache: [],
+ components: null,
+ directives: null,
+ propsOptions: Sg(r, i),
+ emitsOptions: cg(r, i),
+ emit: null,
+ emitted: null,
+ propsDefaults: rt,
+ inheritAttrs: r.inheritAttrs,
+ ctx: rt,
+ data: rt,
+ props: rt,
+ attrs: rt,
+ slots: rt,
+ refs: rt,
+ setupState: rt,
+ setupContext: null,
+ attrsProxy: null,
+ slotsProxy: null,
+ suspense: n,
+ suspenseId: n ? n.pendingId : 0,
+ asyncDep: null,
+ asyncResolved: !1,
+ isMounted: !1,
+ isUnmounted: !1,
+ isDeactivated: !1,
+ bc: null,
+ c: null,
+ bm: null,
+ m: null,
+ bu: null,
+ u: null,
+ um: null,
+ bum: null,
+ da: null,
+ a: null,
+ rtg: null,
+ rtc: null,
+ ec: null,
+ sp: null,
+ };
+ return (
+ (o.ctx = { _: o }),
+ (o.root = e ? e.root : o),
+ (o.emit = N2.bind(null, o)),
+ t.ce && t.ce(o),
+ o
+ );
+}
+let St = null;
+const ps = () => St || It;
+let Cd,
+ Ei,
+ dh = "__VUE_INSTANCE_SETTERS__";
+(Ei = Ju()[dh]) || (Ei = Ju()[dh] = []),
+ Ei.push((t) => (St = t)),
+ (Cd = (t) => {
+ Ei.length > 1 ? Ei.forEach((e) => e(t)) : Ei[0](t);
+ });
+const Ui = (t) => {
+ Cd(t), t.scope.on();
+ },
+ si = () => {
+ St && St.scope.off(), Cd(null);
+ };
+function Rg(t) {
+ return t.vnode.shapeFlag & 4;
+}
+let Ki = !1;
+function _v(t, e = !1) {
+ Ki = e;
+ const { props: n, children: r } = t.vnode,
+ i = Rg(t);
+ av(t, n, i, e), dv(t, r);
+ const o = i ? Mv(t, e) : void 0;
+ return (Ki = !1), o;
+}
+function Mv(t, e) {
+ const n = t.type;
+ (t.accessCache = Object.create(null)), (t.proxy = eg(new Proxy(t.ctx, ev)));
+ const { setup: r } = n;
+ if (r) {
+ const i = (t.setupContext = r.length > 1 ? Ng(t) : null);
+ Ui(t), io();
+ const o = Or(r, t, 0, [t.props, i]);
+ if ((oo(), si(), Lm(o))) {
+ if ((o.then(si, si), e))
+ return o
+ .then((s) => {
+ fh(t, s, e);
+ })
+ .catch((s) => {
+ cs(s, t, 0);
+ });
+ t.asyncDep = o;
+ } else fh(t, o, e);
+ } else Pg(t, e);
+}
+function fh(t, e, n) {
+ Ee(e)
+ ? t.type.__ssrInlineRender
+ ? (t.ssrRender = e)
+ : (t.render = e)
+ : it(e) && (t.setupState = og(e)),
+ Pg(t, n);
+}
+let hh;
+function Pg(t, e, n) {
+ const r = t.type;
+ if (!t.render) {
+ if (!e && hh && !r.render) {
+ const i = r.template || vd(t).template;
+ if (i) {
+ const { isCustomElement: o, compilerOptions: s } =
+ t.appContext.config,
+ { delimiters: l, compilerOptions: a } = r,
+ u = _t(_t({ isCustomElement: o, delimiters: l }, s), a);
+ r.render = hh(i, u);
+ }
+ }
+ t.render = r.render || On;
+ }
+ {
+ Ui(t), io();
+ try {
+ tv(t);
+ } finally {
+ oo(), si();
+ }
+ }
+}
+function Ev(t) {
+ return (
+ t.attrsProxy ||
+ (t.attrsProxy = new Proxy(t.attrs, {
+ get(e, n) {
+ return tn(t, "get", "$attrs"), e[n];
+ },
+ }))
+ );
+}
+function Ng(t) {
+ const e = (n) => {
+ t.exposed = n || {};
+ };
+ return {
+ get attrs() {
+ return Ev(t);
+ },
+ slots: t.slots,
+ emit: t.emit,
+ expose: e,
+ };
+}
+function Ta(t) {
+ if (t.exposed)
+ return (
+ t.exposeProxy ||
+ (t.exposeProxy = new Proxy(og(eg(t.exposed)), {
+ get(e, n) {
+ if (n in e) return e[n];
+ if (n in Oo) return Oo[n](t);
+ },
+ has(e, n) {
+ return n in e || n in Oo;
+ },
+ }))
+ );
+}
+function Av(t, e = !0) {
+ return Ee(t) ? t.displayName || t.name : t.name || (e && t.__name);
+}
+function Tv(t) {
+ return Ee(t) && "__vccOpts" in t;
+}
+const $ = (t, e) => Zu(t, e, Ki);
+function ze(t, e, n) {
+ const r = arguments.length;
+ return r === 2
+ ? it(e) && !we(e)
+ ? kl(e)
+ ? Me(t, null, [e])
+ : Me(t, e)
+ : Me(t, null, e)
+ : (r > 3
+ ? (n = Array.prototype.slice.call(arguments, 2))
+ : r === 3 && kl(n) && (n = [n]),
+ Me(t, e, n));
+}
+const Ov = Symbol.for("v-scx"),
+ Rv = () => qe(Ov),
+ Pv = "3.3.9",
+ Nv = "http://www.w3.org/2000/svg",
+ Xr = typeof document != "undefined" ? document : null,
+ ph = Xr && Xr.createElement("template"),
+ jv = {
+ insert: (t, e, n) => {
+ e.insertBefore(t, n || null);
+ },
+ remove: (t) => {
+ const e = t.parentNode;
+ e && e.removeChild(t);
+ },
+ createElement: (t, e, n, r) => {
+ const i = e
+ ? Xr.createElementNS(Nv, t)
+ : Xr.createElement(t, n ? { is: n } : void 0);
+ return (
+ t === "select" &&
+ r &&
+ r.multiple != null &&
+ i.setAttribute("multiple", r.multiple),
+ i
+ );
+ },
+ createText: (t) => Xr.createTextNode(t),
+ createComment: (t) => Xr.createComment(t),
+ setText: (t, e) => {
+ t.nodeValue = e;
+ },
+ setElementText: (t, e) => {
+ t.textContent = e;
+ },
+ parentNode: (t) => t.parentNode,
+ nextSibling: (t) => t.nextSibling,
+ querySelector: (t) => Xr.querySelector(t),
+ setScopeId(t, e) {
+ t.setAttribute(e, "");
+ },
+ insertStaticContent(t, e, n, r, i, o) {
+ const s = n ? n.previousSibling : e.lastChild;
+ if (i && (i === o || i.nextSibling))
+ for (
+ ;
+ e.insertBefore(i.cloneNode(!0), n),
+ !(i === o || !(i = i.nextSibling));
+
+ );
+ else {
+ ph.innerHTML = r ? `` : t;
+ const l = ph.content;
+ if (r) {
+ const a = l.firstChild;
+ for (; a.firstChild; ) l.appendChild(a.firstChild);
+ l.removeChild(a);
+ }
+ e.insertBefore(l, n);
+ }
+ return [
+ s ? s.nextSibling : e.firstChild,
+ n ? n.previousSibling : e.lastChild,
+ ];
+ },
+ },
+ fr = "transition",
+ go = "animation",
+ Go = Symbol("_vtc"),
+ Oa = (t, { slots: e }) => ze(V2, Lv(t), e);
+Oa.displayName = "Transition";
+const jg = {
+ name: String,
+ type: String,
+ css: { type: Boolean, default: !0 },
+ duration: [String, Number, Object],
+ enterFromClass: String,
+ enterActiveClass: String,
+ enterToClass: String,
+ appearFromClass: String,
+ appearActiveClass: String,
+ appearToClass: String,
+ leaveFromClass: String,
+ leaveActiveClass: String,
+ leaveToClass: String,
+};
+Oa.props = _t({}, mg, jg);
+const Kr = (t, e = []) => {
+ we(t) ? t.forEach((n) => n(...e)) : t && t(...e);
+ },
+ mh = (t) => (t ? (we(t) ? t.some((e) => e.length > 1) : t.length > 1) : !1);
+function Lv(t) {
+ const e = {};
+ for (const R in t) R in jg || (e[R] = t[R]);
+ if (t.css === !1) return e;
+ const {
+ name: n = "v",
+ type: r,
+ duration: i,
+ enterFromClass: o = `${n}-enter-from`,
+ enterActiveClass: s = `${n}-enter-active`,
+ enterToClass: l = `${n}-enter-to`,
+ appearFromClass: a = o,
+ appearActiveClass: u = s,
+ appearToClass: c = l,
+ leaveFromClass: f = `${n}-leave-from`,
+ leaveActiveClass: h = `${n}-leave-active`,
+ leaveToClass: p = `${n}-leave-to`,
+ } = t,
+ g = Dv(i),
+ v = g && g[0],
+ b = g && g[1],
+ {
+ onBeforeEnter: x,
+ onEnter: S,
+ onEnterCancelled: T,
+ onLeave: d,
+ onLeaveCancelled: y,
+ onBeforeAppear: m = x,
+ onAppear: w = S,
+ onAppearCancelled: k = T,
+ } = e,
+ _ = (R, P, L) => {
+ qr(R, P ? c : l), qr(R, P ? u : s), L && L();
+ },
+ C = (R, P) => {
+ (R._isLeaving = !1), qr(R, f), qr(R, p), qr(R, h), P && P();
+ },
+ E = (R) => (P, L) => {
+ const I = R ? w : S,
+ M = () => _(P, R, L);
+ Kr(I, [P, M]),
+ gh(() => {
+ qr(P, R ? a : o), hr(P, R ? c : l), mh(I) || yh(P, r, v, M);
+ });
+ };
+ return _t(e, {
+ onBeforeEnter(R) {
+ Kr(x, [R]), hr(R, o), hr(R, s);
+ },
+ onBeforeAppear(R) {
+ Kr(m, [R]), hr(R, a), hr(R, u);
+ },
+ onEnter: E(!1),
+ onAppear: E(!0),
+ onLeave(R, P) {
+ R._isLeaving = !0;
+ const L = () => C(R, P);
+ hr(R, f),
+ $v(),
+ hr(R, h),
+ gh(() => {
+ !R._isLeaving ||
+ (qr(R, f), hr(R, p), mh(d) || yh(R, r, b, L));
+ }),
+ Kr(d, [R, L]);
+ },
+ onEnterCancelled(R) {
+ _(R, !1), Kr(T, [R]);
+ },
+ onAppearCancelled(R) {
+ _(R, !0), Kr(k, [R]);
+ },
+ onLeaveCancelled(R) {
+ C(R), Kr(y, [R]);
+ },
+ });
+}
+function Dv(t) {
+ if (t == null) return null;
+ if (it(t)) return [au(t.enter), au(t.leave)];
+ {
+ const e = au(t);
+ return [e, e];
+ }
+}
+function au(t) {
+ return Gy(t);
+}
+function hr(t, e) {
+ e.split(/\s+/).forEach((n) => n && t.classList.add(n)),
+ (t[Go] || (t[Go] = new Set())).add(e);
+}
+function qr(t, e) {
+ e.split(/\s+/).forEach((r) => r && t.classList.remove(r));
+ const n = t[Go];
+ n && (n.delete(e), n.size || (t[Go] = void 0));
+}
+function gh(t) {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(t);
+ });
+}
+let Iv = 0;
+function yh(t, e, n, r) {
+ const i = (t._endId = ++Iv),
+ o = () => {
+ i === t._endId && r();
+ };
+ if (n) return setTimeout(o, n);
+ const { type: s, timeout: l, propCount: a } = Bv(t, e);
+ if (!s) return r();
+ const u = s + "end";
+ let c = 0;
+ const f = () => {
+ t.removeEventListener(u, h), o();
+ },
+ h = (p) => {
+ p.target === t && ++c >= a && f();
+ };
+ setTimeout(() => {
+ c < a && f();
+ }, l + 1),
+ t.addEventListener(u, h);
+}
+function Bv(t, e) {
+ const n = window.getComputedStyle(t),
+ r = (g) => (n[g] || "").split(", "),
+ i = r(`${fr}Delay`),
+ o = r(`${fr}Duration`),
+ s = vh(i, o),
+ l = r(`${go}Delay`),
+ a = r(`${go}Duration`),
+ u = vh(l, a);
+ let c = null,
+ f = 0,
+ h = 0;
+ e === fr
+ ? s > 0 && ((c = fr), (f = s), (h = o.length))
+ : e === go
+ ? u > 0 && ((c = go), (f = u), (h = a.length))
+ : ((f = Math.max(s, u)),
+ (c = f > 0 ? (s > u ? fr : go) : null),
+ (h = c ? (c === fr ? o.length : a.length) : 0));
+ const p =
+ c === fr &&
+ /\b(transform|all)(,|$)/.test(r(`${fr}Property`).toString());
+ return { type: c, timeout: f, propCount: h, hasTransform: p };
+}
+function vh(t, e) {
+ for (; t.length < e.length; ) t = t.concat(t);
+ return Math.max(...e.map((n, r) => bh(n) + bh(t[r])));
+}
+function bh(t) {
+ return t === "auto" ? 0 : Number(t.slice(0, -1).replace(",", ".")) * 1e3;
+}
+function $v() {
+ return document.body.offsetHeight;
+}
+function zv(t, e, n) {
+ const r = t[Go];
+ r && (e = (e ? [e, ...r] : [...r]).join(" ")),
+ e == null
+ ? t.removeAttribute("class")
+ : n
+ ? t.setAttribute("class", e)
+ : (t.className = e);
+}
+const Sd = Symbol("_vod"),
+ cc = {
+ beforeMount(t, { value: e }, { transition: n }) {
+ (t[Sd] = t.style.display === "none" ? "" : t.style.display),
+ n && e ? n.beforeEnter(t) : yo(t, e);
+ },
+ mounted(t, { value: e }, { transition: n }) {
+ n && e && n.enter(t);
+ },
+ updated(t, { value: e, oldValue: n }, { transition: r }) {
+ !e != !n &&
+ (r
+ ? e
+ ? (r.beforeEnter(t), yo(t, !0), r.enter(t))
+ : r.leave(t, () => {
+ yo(t, !1);
+ })
+ : yo(t, e));
+ },
+ beforeUnmount(t, { value: e }) {
+ yo(t, e);
+ },
+ };
+function yo(t, e) {
+ t.style.display = e ? t[Sd] : "none";
+}
+function Hv(t, e, n) {
+ const r = t.style,
+ i = at(n);
+ if (n && !i) {
+ if (e && !at(e)) for (const o in e) n[o] == null && dc(r, o, "");
+ for (const o in n) dc(r, o, n[o]);
+ } else {
+ const o = r.display;
+ i ? e !== n && (r.cssText = n) : e && t.removeAttribute("style"),
+ Sd in t && (r.display = o);
+ }
+}
+const wh = /\s*!important$/;
+function dc(t, e, n) {
+ if (we(n)) n.forEach((r) => dc(t, e, r));
+ else if ((n == null && (n = ""), e.startsWith("--"))) t.setProperty(e, n);
+ else {
+ const r = Fv(t, e);
+ wh.test(n)
+ ? t.setProperty(xi(r), n.replace(wh, ""), "important")
+ : (t[r] = n);
+ }
+}
+const xh = ["Webkit", "Moz", "ms"],
+ uu = {};
+function Fv(t, e) {
+ const n = uu[e];
+ if (n) return n;
+ let r = Jn(e);
+ if (r !== "filter" && r in t) return (uu[e] = r);
+ r = ka(r);
+ for (let i = 0; i < xh.length; i++) {
+ const o = xh[i] + r;
+ if (o in t) return (uu[e] = o);
+ }
+ return e;
+}
+const kh = "http://www.w3.org/1999/xlink";
+function Vv(t, e, n, r, i) {
+ if (r && e.startsWith("xlink:"))
+ n == null
+ ? t.removeAttributeNS(kh, e.slice(6, e.length))
+ : t.setAttributeNS(kh, e, n);
+ else {
+ const o = t2(e);
+ n == null || (o && !Bm(n))
+ ? t.removeAttribute(e)
+ : t.setAttribute(e, o ? "" : n);
+ }
+}
+function Wv(t, e, n, r, i, o, s) {
+ if (e === "innerHTML" || e === "textContent") {
+ r && s(r, i, o), (t[e] = n == null ? "" : n);
+ return;
+ }
+ const l = t.tagName;
+ if (e === "value" && l !== "PROGRESS" && !l.includes("-")) {
+ t._value = n;
+ const u = l === "OPTION" ? t.getAttribute("value") : t.value,
+ c = n == null ? "" : n;
+ u !== c && (t.value = c), n == null && t.removeAttribute(e);
+ return;
+ }
+ let a = !1;
+ if (n === "" || n == null) {
+ const u = typeof t[e];
+ u === "boolean"
+ ? (n = Bm(n))
+ : n == null && u === "string"
+ ? ((n = ""), (a = !0))
+ : u === "number" && ((n = 0), (a = !0));
+ }
+ try {
+ t[e] = n;
+ } catch (u) {}
+ a && t.removeAttribute(e);
+}
+function Uv(t, e, n, r) {
+ t.addEventListener(e, n, r);
+}
+function Kv(t, e, n, r) {
+ t.removeEventListener(e, n, r);
+}
+const Ch = Symbol("_vei");
+function qv(t, e, n, r, i = null) {
+ const o = t[Ch] || (t[Ch] = {}),
+ s = o[e];
+ if (r && s) s.value = r;
+ else {
+ const [l, a] = Jv(e);
+ if (r) {
+ const u = (o[e] = Qv(r, i));
+ Uv(t, l, u, a);
+ } else s && (Kv(t, l, s, a), (o[e] = void 0));
+ }
+}
+const Sh = /(?:Once|Passive|Capture)$/;
+function Jv(t) {
+ let e;
+ if (Sh.test(t)) {
+ e = {};
+ let r;
+ for (; (r = t.match(Sh)); )
+ (t = t.slice(0, t.length - r[0].length)),
+ (e[r[0].toLowerCase()] = !0);
+ }
+ return [t[2] === ":" ? t.slice(3) : xi(t.slice(2)), e];
+}
+let cu = 0;
+const Gv = Promise.resolve(),
+ Yv = () => cu || (Gv.then(() => (cu = 0)), (cu = Date.now()));
+function Qv(t, e) {
+ const n = (r) => {
+ if (!r._vts) r._vts = Date.now();
+ else if (r._vts <= n.attached) return;
+ gn(Xv(r, n.value), e, 5, [r]);
+ };
+ return (n.value = t), (n.attached = Yv()), n;
+}
+function Xv(t, e) {
+ if (we(e)) {
+ const n = t.stopImmediatePropagation;
+ return (
+ (t.stopImmediatePropagation = () => {
+ n.call(t), (t._stopped = !0);
+ }),
+ e.map((r) => (i) => !i._stopped && r && r(i))
+ );
+ } else return e;
+}
+const _h = /^on[a-z]/,
+ Zv = (t, e, n, r, i = !1, o, s, l, a) => {
+ e === "class"
+ ? zv(t, r, i)
+ : e === "style"
+ ? Hv(t, n, r)
+ : va(e)
+ ? od(e) || qv(t, e, n, r, s)
+ : (
+ e[0] === "."
+ ? ((e = e.slice(1)), !0)
+ : e[0] === "^"
+ ? ((e = e.slice(1)), !1)
+ : eb(t, e, r, i)
+ )
+ ? Wv(t, e, r, o, s, l, a)
+ : (e === "true-value"
+ ? (t._trueValue = r)
+ : e === "false-value" && (t._falseValue = r),
+ Vv(t, e, r, i));
+ };
+function eb(t, e, n, r) {
+ return r
+ ? !!(
+ e === "innerHTML" ||
+ e === "textContent" ||
+ (e in t && _h.test(e) && Ee(n))
+ )
+ : e === "spellcheck" ||
+ e === "draggable" ||
+ e === "translate" ||
+ e === "form" ||
+ (e === "list" && t.tagName === "INPUT") ||
+ (e === "type" && t.tagName === "TEXTAREA") ||
+ (_h.test(e) && at(n))
+ ? !1
+ : e in t;
+}
+const tb = ["ctrl", "shift", "alt", "meta"],
+ nb = {
+ stop: (t) => t.stopPropagation(),
+ prevent: (t) => t.preventDefault(),
+ self: (t) => t.target !== t.currentTarget,
+ ctrl: (t) => !t.ctrlKey,
+ shift: (t) => !t.shiftKey,
+ alt: (t) => !t.altKey,
+ meta: (t) => !t.metaKey,
+ left: (t) => "button" in t && t.button !== 0,
+ middle: (t) => "button" in t && t.button !== 1,
+ right: (t) => "button" in t && t.button !== 2,
+ exact: (t, e) => tb.some((n) => t[`${n}Key`] && !e.includes(n)),
+ },
+ _d =
+ (t, e) =>
+ (n, ...r) => {
+ for (let i = 0; i < e.length; i++) {
+ const o = nb[e[i]];
+ if (o && o(n, e)) return;
+ }
+ return t(n, ...r);
+ },
+ rb = {
+ esc: "escape",
+ space: " ",
+ up: "arrow-up",
+ left: "arrow-left",
+ right: "arrow-right",
+ down: "arrow-down",
+ delete: "backspace",
+ },
+ ib = (t, e) => (n) => {
+ if (!("key" in n)) return;
+ const r = xi(n.key);
+ if (e.some((i) => i === r || rb[i] === r)) return t(n);
+ },
+ ob = _t({ patchProp: Zv }, jv);
+let Mh;
+function sb() {
+ return Mh || (Mh = hv(ob));
+}
+const cR = (...t) => {
+ const e = sb().createApp(...t),
+ { mount: n } = e;
+ return (
+ (e.mount = (r) => {
+ const i = lb(r);
+ if (!i) return;
+ const o = e._component;
+ !Ee(o) && !o.render && !o.template && (o.template = i.innerHTML),
+ (i.innerHTML = "");
+ const s = n(i, !1, i instanceof SVGElement);
+ return (
+ i instanceof Element &&
+ (i.removeAttribute("v-cloak"),
+ i.setAttribute("data-v-app", "")),
+ s
+ );
+ }),
+ e
+ );
+};
+function lb(t) {
+ return at(t) ? document.querySelector(t) : t;
+}
+const ab = "modulepreload",
+ ub = function (t) {
+ return "/" + t;
+ },
+ Eh = {},
+ Ds = function (e, n, r) {
+ if (!n || n.length === 0) return e();
+ const i = document.getElementsByTagName("link");
+ return Promise.all(
+ n.map((o) => {
+ if (((o = ub(o)), o in Eh)) return;
+ Eh[o] = !0;
+ const s = o.endsWith(".css"),
+ l = s ? '[rel="stylesheet"]' : "";
+ if (!!r)
+ for (let c = i.length - 1; c >= 0; c--) {
+ const f = i[c];
+ if (f.href === o && (!s || f.rel === "stylesheet"))
+ return;
+ }
+ else if (document.querySelector(`link[href="${o}"]${l}`))
+ return;
+ const u = document.createElement("link");
+ if (
+ ((u.rel = s ? "stylesheet" : ab),
+ s || ((u.as = "script"), (u.crossOrigin = "")),
+ (u.href = o),
+ document.head.appendChild(u),
+ s)
+ )
+ return new Promise((c, f) => {
+ u.addEventListener("load", c),
+ u.addEventListener("error", () =>
+ f(new Error(`Unable to preload CSS for ${o}`))
+ );
+ });
+ })
+ ).then(() => e());
+ };
+/*!
+ * vue-router v4.2.5
+ * (c) 2023 Eduardo San Martin Morote
+ * @license MIT
+ */ const Oi = typeof window != "undefined";
+function cb(t) {
+ return t.__esModule || t[Symbol.toStringTag] === "Module";
+}
+const Xe = Object.assign;
+function du(t, e) {
+ const n = {};
+ for (const r in e) {
+ const i = e[r];
+ n[r] = Nn(i) ? i.map(t) : t(i);
+ }
+ return n;
+}
+const No = () => {},
+ Nn = Array.isArray,
+ db = /\/$/,
+ fb = (t) => t.replace(db, "");
+function fu(t, e, n = "/") {
+ let r,
+ i = {},
+ o = "",
+ s = "";
+ const l = e.indexOf("#");
+ let a = e.indexOf("?");
+ return (
+ l < a && l >= 0 && (a = -1),
+ a > -1 &&
+ ((r = e.slice(0, a)),
+ (o = e.slice(a + 1, l > -1 ? l : e.length)),
+ (i = t(o))),
+ l > -1 && ((r = r || e.slice(0, l)), (s = e.slice(l, e.length))),
+ (r = gb(r != null ? r : e, n)),
+ { fullPath: r + (o && "?") + o + s, path: r, query: i, hash: s }
+ );
+}
+function hb(t, e) {
+ const n = e.query ? t(e.query) : "";
+ return e.path + (n && "?") + n + (e.hash || "");
+}
+function Ah(t, e) {
+ return !e || !t.toLowerCase().startsWith(e.toLowerCase())
+ ? t
+ : t.slice(e.length) || "/";
+}
+function pb(t, e, n) {
+ const r = e.matched.length - 1,
+ i = n.matched.length - 1;
+ return (
+ r > -1 &&
+ r === i &&
+ qi(e.matched[r], n.matched[i]) &&
+ Lg(e.params, n.params) &&
+ t(e.query) === t(n.query) &&
+ e.hash === n.hash
+ );
+}
+function qi(t, e) {
+ return (t.aliasOf || t) === (e.aliasOf || e);
+}
+function Lg(t, e) {
+ if (Object.keys(t).length !== Object.keys(e).length) return !1;
+ for (const n in t) if (!mb(t[n], e[n])) return !1;
+ return !0;
+}
+function mb(t, e) {
+ return Nn(t) ? Th(t, e) : Nn(e) ? Th(e, t) : t === e;
+}
+function Th(t, e) {
+ return Nn(e)
+ ? t.length === e.length && t.every((n, r) => n === e[r])
+ : t.length === 1 && t[0] === e;
+}
+function gb(t, e) {
+ if (t.startsWith("/")) return t;
+ if (!t) return e;
+ const n = e.split("/"),
+ r = t.split("/"),
+ i = r[r.length - 1];
+ (i === ".." || i === ".") && r.push("");
+ let o = n.length - 1,
+ s,
+ l;
+ for (s = 0; s < r.length; s++)
+ if (((l = r[s]), l !== "."))
+ if (l === "..") o > 1 && o--;
+ else break;
+ return (
+ n.slice(0, o).join("/") +
+ "/" +
+ r.slice(s - (s === r.length ? 1 : 0)).join("/")
+ );
+}
+var Yo;
+(function (t) {
+ (t.pop = "pop"), (t.push = "push");
+})(Yo || (Yo = {}));
+var jo;
+(function (t) {
+ (t.back = "back"), (t.forward = "forward"), (t.unknown = "");
+})(jo || (jo = {}));
+function yb(t) {
+ if (!t)
+ if (Oi) {
+ const e = document.querySelector("base");
+ (t = (e && e.getAttribute("href")) || "/"),
+ (t = t.replace(/^\w+:\/\/[^\/]+/, ""));
+ } else t = "/";
+ return t[0] !== "/" && t[0] !== "#" && (t = "/" + t), fb(t);
+}
+const vb = /^[^#]+#/;
+function bb(t, e) {
+ return t.replace(vb, "#") + e;
+}
+function wb(t, e) {
+ const n = document.documentElement.getBoundingClientRect(),
+ r = t.getBoundingClientRect();
+ return {
+ behavior: e.behavior,
+ left: r.left - n.left - (e.left || 0),
+ top: r.top - n.top - (e.top || 0),
+ };
+}
+const Ra = () => ({ left: window.pageXOffset, top: window.pageYOffset });
+function xb(t) {
+ let e;
+ if ("el" in t) {
+ const n = t.el,
+ r = typeof n == "string" && n.startsWith("#"),
+ i =
+ typeof n == "string"
+ ? r
+ ? document.getElementById(n.slice(1))
+ : document.querySelector(n)
+ : n;
+ if (!i) return;
+ e = wb(i, t);
+ } else e = t;
+ "scrollBehavior" in document.documentElement.style
+ ? window.scrollTo(e)
+ : window.scrollTo(
+ e.left != null ? e.left : window.pageXOffset,
+ e.top != null ? e.top : window.pageYOffset
+ );
+}
+function Oh(t, e) {
+ return (history.state ? history.state.position - e : -1) + t;
+}
+const fc = new Map();
+function kb(t, e) {
+ fc.set(t, e);
+}
+function Cb(t) {
+ const e = fc.get(t);
+ return fc.delete(t), e;
+}
+let Sb = () => location.protocol + "//" + location.host;
+function Dg(t, e) {
+ const { pathname: n, search: r, hash: i } = e,
+ o = t.indexOf("#");
+ if (o > -1) {
+ let l = i.includes(t.slice(o)) ? t.slice(o).length : 1,
+ a = i.slice(l);
+ return a[0] !== "/" && (a = "/" + a), Ah(a, "");
+ }
+ return Ah(n, t) + r + i;
+}
+function _b(t, e, n, r) {
+ let i = [],
+ o = [],
+ s = null;
+ const l = ({ state: h }) => {
+ const p = Dg(t, location),
+ g = n.value,
+ v = e.value;
+ let b = 0;
+ if (h) {
+ if (((n.value = p), (e.value = h), s && s === g)) {
+ s = null;
+ return;
+ }
+ b = v ? h.position - v.position : 0;
+ } else r(p);
+ i.forEach((x) => {
+ x(n.value, g, {
+ delta: b,
+ type: Yo.pop,
+ direction: b ? (b > 0 ? jo.forward : jo.back) : jo.unknown,
+ });
+ });
+ };
+ function a() {
+ s = n.value;
+ }
+ function u(h) {
+ i.push(h);
+ const p = () => {
+ const g = i.indexOf(h);
+ g > -1 && i.splice(g, 1);
+ };
+ return o.push(p), p;
+ }
+ function c() {
+ const { history: h } = window;
+ !h.state || h.replaceState(Xe({}, h.state, { scroll: Ra() }), "");
+ }
+ function f() {
+ for (const h of o) h();
+ (o = []),
+ window.removeEventListener("popstate", l),
+ window.removeEventListener("beforeunload", c);
+ }
+ return (
+ window.addEventListener("popstate", l),
+ window.addEventListener("beforeunload", c, { passive: !0 }),
+ { pauseListeners: a, listen: u, destroy: f }
+ );
+}
+function Rh(t, e, n, r = !1, i = !1) {
+ return {
+ back: t,
+ current: e,
+ forward: n,
+ replaced: r,
+ position: window.history.length,
+ scroll: i ? Ra() : null,
+ };
+}
+function Mb(t) {
+ const { history: e, location: n } = window,
+ r = { value: Dg(t, n) },
+ i = { value: e.state };
+ i.value ||
+ o(
+ r.value,
+ {
+ back: null,
+ current: r.value,
+ forward: null,
+ position: e.length - 1,
+ replaced: !0,
+ scroll: null,
+ },
+ !0
+ );
+ function o(a, u, c) {
+ const f = t.indexOf("#"),
+ h =
+ f > -1
+ ? (n.host && document.querySelector("base")
+ ? t
+ : t.slice(f)) + a
+ : Sb() + t + a;
+ try {
+ e[c ? "replaceState" : "pushState"](u, "", h), (i.value = u);
+ } catch (p) {
+ console.error(p), n[c ? "replace" : "assign"](h);
+ }
+ }
+ function s(a, u) {
+ const c = Xe({}, e.state, Rh(i.value.back, a, i.value.forward, !0), u, {
+ position: i.value.position,
+ });
+ o(a, c, !0), (r.value = a);
+ }
+ function l(a, u) {
+ const c = Xe({}, i.value, e.state, { forward: a, scroll: Ra() });
+ o(c.current, c, !0);
+ const f = Xe({}, Rh(r.value, a, null), { position: c.position + 1 }, u);
+ o(a, f, !1), (r.value = a);
+ }
+ return { location: r, state: i, push: l, replace: s };
+}
+function dR(t) {
+ t = yb(t);
+ const e = Mb(t),
+ n = _b(t, e.state, e.location, e.replace);
+ function r(o, s = !0) {
+ s || n.pauseListeners(), history.go(o);
+ }
+ const i = Xe(
+ { location: "", base: t, go: r, createHref: bb.bind(null, t) },
+ e,
+ n
+ );
+ return (
+ Object.defineProperty(i, "location", {
+ enumerable: !0,
+ get: () => e.location.value,
+ }),
+ Object.defineProperty(i, "state", {
+ enumerable: !0,
+ get: () => e.state.value,
+ }),
+ i
+ );
+}
+function Eb(t) {
+ return typeof t == "string" || (t && typeof t == "object");
+}
+function Ig(t) {
+ return typeof t == "string" || typeof t == "symbol";
+}
+const pr = {
+ path: "/",
+ name: void 0,
+ params: {},
+ query: {},
+ hash: "",
+ fullPath: "/",
+ matched: [],
+ meta: {},
+ redirectedFrom: void 0,
+ },
+ Bg = Symbol("");
+var Ph;
+(function (t) {
+ (t[(t.aborted = 4)] = "aborted"),
+ (t[(t.cancelled = 8)] = "cancelled"),
+ (t[(t.duplicated = 16)] = "duplicated");
+})(Ph || (Ph = {}));
+function Ji(t, e) {
+ return Xe(new Error(), { type: t, [Bg]: !0 }, e);
+}
+function er(t, e) {
+ return t instanceof Error && Bg in t && (e == null || !!(t.type & e));
+}
+const Nh = "[^/]+?",
+ Ab = { sensitive: !1, strict: !1, start: !0, end: !0 },
+ Tb = /[.+*?^${}()[\]/\\]/g;
+function Ob(t, e) {
+ const n = Xe({}, Ab, e),
+ r = [];
+ let i = n.start ? "^" : "";
+ const o = [];
+ for (const u of t) {
+ const c = u.length ? [] : [90];
+ n.strict && !u.length && (i += "/");
+ for (let f = 0; f < u.length; f++) {
+ const h = u[f];
+ let p = 40 + (n.sensitive ? 0.25 : 0);
+ if (h.type === 0)
+ f || (i += "/"), (i += h.value.replace(Tb, "\\$&")), (p += 40);
+ else if (h.type === 1) {
+ const { value: g, repeatable: v, optional: b, regexp: x } = h;
+ o.push({ name: g, repeatable: v, optional: b });
+ const S = x || Nh;
+ if (S !== Nh) {
+ p += 10;
+ try {
+ new RegExp(`(${S})`);
+ } catch (d) {
+ throw new Error(
+ `Invalid custom RegExp for param "${g}" (${S}): ` +
+ d.message
+ );
+ }
+ }
+ let T = v ? `((?:${S})(?:/(?:${S}))*)` : `(${S})`;
+ f || (T = b && u.length < 2 ? `(?:/${T})` : "/" + T),
+ b && (T += "?"),
+ (i += T),
+ (p += 20),
+ b && (p += -8),
+ v && (p += -20),
+ S === ".*" && (p += -50);
+ }
+ c.push(p);
+ }
+ r.push(c);
+ }
+ if (n.strict && n.end) {
+ const u = r.length - 1;
+ r[u][r[u].length - 1] += 0.7000000000000001;
+ }
+ n.strict || (i += "/?"), n.end ? (i += "$") : n.strict && (i += "(?:/|$)");
+ const s = new RegExp(i, n.sensitive ? "" : "i");
+ function l(u) {
+ const c = u.match(s),
+ f = {};
+ if (!c) return null;
+ for (let h = 1; h < c.length; h++) {
+ const p = c[h] || "",
+ g = o[h - 1];
+ f[g.name] = p && g.repeatable ? p.split("/") : p;
+ }
+ return f;
+ }
+ function a(u) {
+ let c = "",
+ f = !1;
+ for (const h of t) {
+ (!f || !c.endsWith("/")) && (c += "/"), (f = !1);
+ for (const p of h)
+ if (p.type === 0) c += p.value;
+ else if (p.type === 1) {
+ const { value: g, repeatable: v, optional: b } = p,
+ x = g in u ? u[g] : "";
+ if (Nn(x) && !v)
+ throw new Error(
+ `Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`
+ );
+ const S = Nn(x) ? x.join("/") : x;
+ if (!S)
+ if (b)
+ h.length < 2 &&
+ (c.endsWith("/")
+ ? (c = c.slice(0, -1))
+ : (f = !0));
+ else throw new Error(`Missing required param "${g}"`);
+ c += S;
+ }
+ }
+ return c || "/";
+ }
+ return { re: s, score: r, keys: o, parse: l, stringify: a };
+}
+function Rb(t, e) {
+ let n = 0;
+ for (; n < t.length && n < e.length; ) {
+ const r = e[n] - t[n];
+ if (r) return r;
+ n++;
+ }
+ return t.length < e.length
+ ? t.length === 1 && t[0] === 40 + 40
+ ? -1
+ : 1
+ : t.length > e.length
+ ? e.length === 1 && e[0] === 40 + 40
+ ? 1
+ : -1
+ : 0;
+}
+function Pb(t, e) {
+ let n = 0;
+ const r = t.score,
+ i = e.score;
+ for (; n < r.length && n < i.length; ) {
+ const o = Rb(r[n], i[n]);
+ if (o) return o;
+ n++;
+ }
+ if (Math.abs(i.length - r.length) === 1) {
+ if (jh(r)) return 1;
+ if (jh(i)) return -1;
+ }
+ return i.length - r.length;
+}
+function jh(t) {
+ const e = t[t.length - 1];
+ return t.length > 0 && e[e.length - 1] < 0;
+}
+const Nb = { type: 0, value: "" },
+ jb = /[a-zA-Z0-9_]/;
+function Lb(t) {
+ if (!t) return [[]];
+ if (t === "/") return [[Nb]];
+ if (!t.startsWith("/")) throw new Error(`Invalid path "${t}"`);
+ function e(p) {
+ throw new Error(`ERR (${n})/"${u}": ${p}`);
+ }
+ let n = 0,
+ r = n;
+ const i = [];
+ let o;
+ function s() {
+ o && i.push(o), (o = []);
+ }
+ let l = 0,
+ a,
+ u = "",
+ c = "";
+ function f() {
+ !u ||
+ (n === 0
+ ? o.push({ type: 0, value: u })
+ : n === 1 || n === 2 || n === 3
+ ? (o.length > 1 &&
+ (a === "*" || a === "+") &&
+ e(
+ `A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`
+ ),
+ o.push({
+ type: 1,
+ value: u,
+ regexp: c,
+ repeatable: a === "*" || a === "+",
+ optional: a === "*" || a === "?",
+ }))
+ : e("Invalid state to consume buffer"),
+ (u = ""));
+ }
+ function h() {
+ u += a;
+ }
+ for (; l < t.length; ) {
+ if (((a = t[l++]), a === "\\" && n !== 2)) {
+ (r = n), (n = 4);
+ continue;
+ }
+ switch (n) {
+ case 0:
+ a === "/" ? (u && f(), s()) : a === ":" ? (f(), (n = 1)) : h();
+ break;
+ case 4:
+ h(), (n = r);
+ break;
+ case 1:
+ a === "("
+ ? (n = 2)
+ : jb.test(a)
+ ? h()
+ : (f(),
+ (n = 0),
+ a !== "*" && a !== "?" && a !== "+" && l--);
+ break;
+ case 2:
+ a === ")"
+ ? c[c.length - 1] == "\\"
+ ? (c = c.slice(0, -1) + a)
+ : (n = 3)
+ : (c += a);
+ break;
+ case 3:
+ f(),
+ (n = 0),
+ a !== "*" && a !== "?" && a !== "+" && l--,
+ (c = "");
+ break;
+ default:
+ e("Unknown state");
+ break;
+ }
+ }
+ return (
+ n === 2 && e(`Unfinished custom RegExp for param "${u}"`), f(), s(), i
+ );
+}
+function Db(t, e, n) {
+ const r = Ob(Lb(t.path), n),
+ i = Xe(r, { record: t, parent: e, children: [], alias: [] });
+ return e && !i.record.aliasOf == !e.record.aliasOf && e.children.push(i), i;
+}
+function Ib(t, e) {
+ const n = [],
+ r = new Map();
+ e = Ih({ strict: !1, end: !0, sensitive: !1 }, e);
+ function i(c) {
+ return r.get(c);
+ }
+ function o(c, f, h) {
+ const p = !h,
+ g = Bb(c);
+ g.aliasOf = h && h.record;
+ const v = Ih(e, c),
+ b = [g];
+ if ("alias" in c) {
+ const T = typeof c.alias == "string" ? [c.alias] : c.alias;
+ for (const d of T)
+ b.push(
+ Xe({}, g, {
+ components: h ? h.record.components : g.components,
+ path: d,
+ aliasOf: h ? h.record : g,
+ })
+ );
+ }
+ let x, S;
+ for (const T of b) {
+ const { path: d } = T;
+ if (f && d[0] !== "/") {
+ const y = f.record.path,
+ m = y[y.length - 1] === "/" ? "" : "/";
+ T.path = f.record.path + (d && m + d);
+ }
+ if (
+ ((x = Db(T, f, v)),
+ h
+ ? h.alias.push(x)
+ : ((S = S || x),
+ S !== x && S.alias.push(x),
+ p && c.name && !Dh(x) && s(c.name)),
+ g.children)
+ ) {
+ const y = g.children;
+ for (let m = 0; m < y.length; m++)
+ o(y[m], x, h && h.children[m]);
+ }
+ (h = h || x),
+ ((x.record.components &&
+ Object.keys(x.record.components).length) ||
+ x.record.name ||
+ x.record.redirect) &&
+ a(x);
+ }
+ return S
+ ? () => {
+ s(S);
+ }
+ : No;
+ }
+ function s(c) {
+ if (Ig(c)) {
+ const f = r.get(c);
+ f &&
+ (r.delete(c),
+ n.splice(n.indexOf(f), 1),
+ f.children.forEach(s),
+ f.alias.forEach(s));
+ } else {
+ const f = n.indexOf(c);
+ f > -1 &&
+ (n.splice(f, 1),
+ c.record.name && r.delete(c.record.name),
+ c.children.forEach(s),
+ c.alias.forEach(s));
+ }
+ }
+ function l() {
+ return n;
+ }
+ function a(c) {
+ let f = 0;
+ for (
+ ;
+ f < n.length &&
+ Pb(c, n[f]) >= 0 &&
+ (c.record.path !== n[f].record.path || !$g(c, n[f]));
+
+ )
+ f++;
+ n.splice(f, 0, c), c.record.name && !Dh(c) && r.set(c.record.name, c);
+ }
+ function u(c, f) {
+ let h,
+ p = {},
+ g,
+ v;
+ if ("name" in c && c.name) {
+ if (((h = r.get(c.name)), !h)) throw Ji(1, { location: c });
+ (v = h.record.name),
+ (p = Xe(
+ Lh(
+ f.params,
+ h.keys.filter((S) => !S.optional).map((S) => S.name)
+ ),
+ c.params &&
+ Lh(
+ c.params,
+ h.keys.map((S) => S.name)
+ )
+ )),
+ (g = h.stringify(p));
+ } else if ("path" in c)
+ (g = c.path),
+ (h = n.find((S) => S.re.test(g))),
+ h && ((p = h.parse(g)), (v = h.record.name));
+ else {
+ if (
+ ((h = f.name
+ ? r.get(f.name)
+ : n.find((S) => S.re.test(f.path))),
+ !h)
+ )
+ throw Ji(1, { location: c, currentLocation: f });
+ (v = h.record.name),
+ (p = Xe({}, f.params, c.params)),
+ (g = h.stringify(p));
+ }
+ const b = [];
+ let x = h;
+ for (; x; ) b.unshift(x.record), (x = x.parent);
+ return { name: v, path: g, params: p, matched: b, meta: zb(b) };
+ }
+ return (
+ t.forEach((c) => o(c)),
+ {
+ addRoute: o,
+ resolve: u,
+ removeRoute: s,
+ getRoutes: l,
+ getRecordMatcher: i,
+ }
+ );
+}
+function Lh(t, e) {
+ const n = {};
+ for (const r of e) r in t && (n[r] = t[r]);
+ return n;
+}
+function Bb(t) {
+ return {
+ path: t.path,
+ redirect: t.redirect,
+ name: t.name,
+ meta: t.meta || {},
+ aliasOf: void 0,
+ beforeEnter: t.beforeEnter,
+ props: $b(t),
+ children: t.children || [],
+ instances: {},
+ leaveGuards: new Set(),
+ updateGuards: new Set(),
+ enterCallbacks: {},
+ components:
+ "components" in t
+ ? t.components || null
+ : t.component && { default: t.component },
+ };
+}
+function $b(t) {
+ const e = {},
+ n = t.props || !1;
+ if ("component" in t) e.default = n;
+ else for (const r in t.components) e[r] = typeof n == "object" ? n[r] : n;
+ return e;
+}
+function Dh(t) {
+ for (; t; ) {
+ if (t.record.aliasOf) return !0;
+ t = t.parent;
+ }
+ return !1;
+}
+function zb(t) {
+ return t.reduce((e, n) => Xe(e, n.meta), {});
+}
+function Ih(t, e) {
+ const n = {};
+ for (const r in t) n[r] = r in e ? e[r] : t[r];
+ return n;
+}
+function $g(t, e) {
+ return e.children.some((n) => n === t || $g(t, n));
+}
+const zg = /#/g,
+ Hb = /&/g,
+ Fb = /\//g,
+ Vb = /=/g,
+ Wb = /\?/g,
+ Hg = /\+/g,
+ Ub = /%5B/g,
+ Kb = /%5D/g,
+ Fg = /%5E/g,
+ qb = /%60/g,
+ Vg = /%7B/g,
+ Jb = /%7C/g,
+ Wg = /%7D/g,
+ Gb = /%20/g;
+function Md(t) {
+ return encodeURI("" + t)
+ .replace(Jb, "|")
+ .replace(Ub, "[")
+ .replace(Kb, "]");
+}
+function Yb(t) {
+ return Md(t).replace(Vg, "{").replace(Wg, "}").replace(Fg, "^");
+}
+function hc(t) {
+ return Md(t)
+ .replace(Hg, "%2B")
+ .replace(Gb, "+")
+ .replace(zg, "%23")
+ .replace(Hb, "%26")
+ .replace(qb, "`")
+ .replace(Vg, "{")
+ .replace(Wg, "}")
+ .replace(Fg, "^");
+}
+function Qb(t) {
+ return hc(t).replace(Vb, "%3D");
+}
+function Xb(t) {
+ return Md(t).replace(zg, "%23").replace(Wb, "%3F");
+}
+function Zb(t) {
+ return t == null ? "" : Xb(t).replace(Fb, "%2F");
+}
+function Cl(t) {
+ try {
+ return decodeURIComponent("" + t);
+ } catch (e) {}
+ return "" + t;
+}
+function ew(t) {
+ const e = {};
+ if (t === "" || t === "?") return e;
+ const r = (t[0] === "?" ? t.slice(1) : t).split("&");
+ for (let i = 0; i < r.length; ++i) {
+ const o = r[i].replace(Hg, " "),
+ s = o.indexOf("="),
+ l = Cl(s < 0 ? o : o.slice(0, s)),
+ a = s < 0 ? null : Cl(o.slice(s + 1));
+ if (l in e) {
+ let u = e[l];
+ Nn(u) || (u = e[l] = [u]), u.push(a);
+ } else e[l] = a;
+ }
+ return e;
+}
+function Bh(t) {
+ let e = "";
+ for (let n in t) {
+ const r = t[n];
+ if (((n = Qb(n)), r == null)) {
+ r !== void 0 && (e += (e.length ? "&" : "") + n);
+ continue;
+ }
+ (Nn(r) ? r.map((o) => o && hc(o)) : [r && hc(r)]).forEach((o) => {
+ o !== void 0 &&
+ ((e += (e.length ? "&" : "") + n), o != null && (e += "=" + o));
+ });
+ }
+ return e;
+}
+function tw(t) {
+ const e = {};
+ for (const n in t) {
+ const r = t[n];
+ r !== void 0 &&
+ (e[n] = Nn(r)
+ ? r.map((i) => (i == null ? null : "" + i))
+ : r == null
+ ? r
+ : "" + r);
+ }
+ return e;
+}
+const nw = Symbol(""),
+ $h = Symbol(""),
+ Pa = Symbol(""),
+ Ug = Symbol(""),
+ pc = Symbol("");
+function vo() {
+ let t = [];
+ function e(r) {
+ return (
+ t.push(r),
+ () => {
+ const i = t.indexOf(r);
+ i > -1 && t.splice(i, 1);
+ }
+ );
+ }
+ function n() {
+ t = [];
+ }
+ return { add: e, list: () => t.slice(), reset: n };
+}
+function vr(t, e, n, r, i) {
+ const o = r && (r.enterCallbacks[i] = r.enterCallbacks[i] || []);
+ return () =>
+ new Promise((s, l) => {
+ const a = (f) => {
+ f === !1
+ ? l(Ji(4, { from: n, to: e }))
+ : f instanceof Error
+ ? l(f)
+ : Eb(f)
+ ? l(Ji(2, { from: e, to: f }))
+ : (o &&
+ r.enterCallbacks[i] === o &&
+ typeof f == "function" &&
+ o.push(f),
+ s());
+ },
+ u = t.call(r && r.instances[i], e, n, a);
+ let c = Promise.resolve(u);
+ t.length < 3 && (c = c.then(a)), c.catch((f) => l(f));
+ });
+}
+function hu(t, e, n, r) {
+ const i = [];
+ for (const o of t)
+ for (const s in o.components) {
+ let l = o.components[s];
+ if (!(e !== "beforeRouteEnter" && !o.instances[s]))
+ if (rw(l)) {
+ const u = (l.__vccOpts || l)[e];
+ u && i.push(vr(u, n, r, o, s));
+ } else {
+ let a = l();
+ i.push(() =>
+ a.then((u) => {
+ if (!u)
+ return Promise.reject(
+ new Error(
+ `Couldn't resolve component "${s}" at "${o.path}"`
+ )
+ );
+ const c = cb(u) ? u.default : u;
+ o.components[s] = c;
+ const h = (c.__vccOpts || c)[e];
+ return h && vr(h, n, r, o, s)();
+ })
+ );
+ }
+ }
+ return i;
+}
+function rw(t) {
+ return (
+ typeof t == "object" ||
+ "displayName" in t ||
+ "props" in t ||
+ "__vccOpts" in t
+ );
+}
+function zh(t) {
+ const e = qe(Pa),
+ n = qe(Ug),
+ r = $(() => e.resolve(ne(t.to))),
+ i = $(() => {
+ const { matched: a } = r.value,
+ { length: u } = a,
+ c = a[u - 1],
+ f = n.matched;
+ if (!c || !f.length) return -1;
+ const h = f.findIndex(qi.bind(null, c));
+ if (h > -1) return h;
+ const p = Hh(a[u - 2]);
+ return u > 1 && Hh(c) === p && f[f.length - 1].path !== p
+ ? f.findIndex(qi.bind(null, a[u - 2]))
+ : h;
+ }),
+ o = $(() => i.value > -1 && lw(n.params, r.value.params)),
+ s = $(
+ () =>
+ i.value > -1 &&
+ i.value === n.matched.length - 1 &&
+ Lg(n.params, r.value.params)
+ );
+ function l(a = {}) {
+ return sw(a)
+ ? e[ne(t.replace) ? "replace" : "push"](ne(t.to)).catch(No)
+ : Promise.resolve();
+ }
+ return {
+ route: r,
+ href: $(() => r.value.href),
+ isActive: o,
+ isExactActive: s,
+ navigate: l,
+ };
+}
+const iw = xe({
+ name: "RouterLink",
+ compatConfig: { MODE: 3 },
+ props: {
+ to: { type: [String, Object], required: !0 },
+ replace: Boolean,
+ activeClass: String,
+ exactActiveClass: String,
+ custom: Boolean,
+ ariaCurrentValue: { type: String, default: "page" },
+ },
+ useLink: zh,
+ setup(t, { slots: e }) {
+ const n = Sn(zh(t)),
+ { options: r } = qe(Pa),
+ i = $(() => ({
+ [Fh(
+ t.activeClass,
+ r.linkActiveClass,
+ "router-link-active"
+ )]: n.isActive,
+ [Fh(
+ t.exactActiveClass,
+ r.linkExactActiveClass,
+ "router-link-exact-active"
+ )]: n.isExactActive,
+ }));
+ return () => {
+ const o = e.default && e.default(n);
+ return t.custom
+ ? o
+ : ze(
+ "a",
+ {
+ "aria-current": n.isExactActive
+ ? t.ariaCurrentValue
+ : null,
+ href: n.href,
+ onClick: n.navigate,
+ class: i.value,
+ },
+ o
+ );
+ };
+ },
+ }),
+ ow = iw;
+function sw(t) {
+ if (
+ !(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey) &&
+ !t.defaultPrevented &&
+ !(t.button !== void 0 && t.button !== 0)
+ ) {
+ if (t.currentTarget && t.currentTarget.getAttribute) {
+ const e = t.currentTarget.getAttribute("target");
+ if (/\b_blank\b/i.test(e)) return;
+ }
+ return t.preventDefault && t.preventDefault(), !0;
+ }
+}
+function lw(t, e) {
+ for (const n in e) {
+ const r = e[n],
+ i = t[n];
+ if (typeof r == "string") {
+ if (r !== i) return !1;
+ } else if (
+ !Nn(i) ||
+ i.length !== r.length ||
+ r.some((o, s) => o !== i[s])
+ )
+ return !1;
+ }
+ return !0;
+}
+function Hh(t) {
+ return t ? (t.aliasOf ? t.aliasOf.path : t.path) : "";
+}
+const Fh = (t, e, n) => (t != null ? t : e != null ? e : n),
+ aw = xe({
+ name: "RouterView",
+ inheritAttrs: !1,
+ props: { name: { type: String, default: "default" }, route: Object },
+ compatConfig: { MODE: 3 },
+ setup(t, { attrs: e, slots: n }) {
+ const r = qe(pc),
+ i = $(() => t.route || r.value),
+ o = qe($h, 0),
+ s = $(() => {
+ let u = ne(o);
+ const { matched: c } = i.value;
+ let f;
+ for (; (f = c[u]) && !f.components; ) u++;
+ return u;
+ }),
+ l = $(() => i.value.matched[s.value]);
+ kt(
+ $h,
+ $(() => s.value + 1)
+ ),
+ kt(nw, l),
+ kt(pc, i);
+ const a = oe();
+ return (
+ Rt(
+ () => [a.value, l.value, t.name],
+ ([u, c, f], [h, p, g]) => {
+ c &&
+ ((c.instances[f] = u),
+ p &&
+ p !== c &&
+ u &&
+ u === h &&
+ (c.leaveGuards.size ||
+ (c.leaveGuards = p.leaveGuards),
+ c.updateGuards.size ||
+ (c.updateGuards = p.updateGuards))),
+ u &&
+ c &&
+ (!p || !qi(c, p) || !h) &&
+ (c.enterCallbacks[f] || []).forEach((v) =>
+ v(u)
+ );
+ },
+ { flush: "post" }
+ ),
+ () => {
+ const u = i.value,
+ c = t.name,
+ f = l.value,
+ h = f && f.components[c];
+ if (!h) return Vh(n.default, { Component: h, route: u });
+ const p = f.props[c],
+ g = p
+ ? p === !0
+ ? u.params
+ : typeof p == "function"
+ ? p(u)
+ : p
+ : null,
+ b = ze(
+ h,
+ Xe({}, g, e, {
+ onVnodeUnmounted: (x) => {
+ x.component.isUnmounted &&
+ (f.instances[c] = null);
+ },
+ ref: a,
+ })
+ );
+ return Vh(n.default, { Component: b, route: u }) || b;
+ }
+ );
+ },
+ });
+function Vh(t, e) {
+ if (!t) return null;
+ const n = t(e);
+ return n.length === 1 ? n[0] : n;
+}
+const uw = aw;
+function fR(t) {
+ const e = Ib(t.routes, t),
+ n = t.parseQuery || ew,
+ r = t.stringifyQuery || Bh,
+ i = t.history,
+ o = vo(),
+ s = vo(),
+ l = vo(),
+ a = rg(pr);
+ let u = pr;
+ Oi &&
+ t.scrollBehavior &&
+ "scrollRestoration" in history &&
+ (history.scrollRestoration = "manual");
+ const c = du.bind(null, (z) => "" + z),
+ f = du.bind(null, Zb),
+ h = du.bind(null, Cl);
+ function p(z, X) {
+ let ee, ue;
+ return (
+ Ig(z) ? ((ee = e.getRecordMatcher(z)), (ue = X)) : (ue = z),
+ e.addRoute(ue, ee)
+ );
+ }
+ function g(z) {
+ const X = e.getRecordMatcher(z);
+ X && e.removeRoute(X);
+ }
+ function v() {
+ return e.getRoutes().map((z) => z.record);
+ }
+ function b(z) {
+ return !!e.getRecordMatcher(z);
+ }
+ function x(z, X) {
+ if (((X = Xe({}, X || a.value)), typeof z == "string")) {
+ const j = fu(n, z, X.path),
+ H = e.resolve({ path: j.path }, X),
+ V = i.createHref(j.fullPath);
+ return Xe(j, H, {
+ params: h(H.params),
+ hash: Cl(j.hash),
+ redirectedFrom: void 0,
+ href: V,
+ });
+ }
+ let ee;
+ if ("path" in z) ee = Xe({}, z, { path: fu(n, z.path, X.path).path });
+ else {
+ const j = Xe({}, z.params);
+ for (const H in j) j[H] == null && delete j[H];
+ (ee = Xe({}, z, { params: f(j) })), (X.params = f(X.params));
+ }
+ const ue = e.resolve(ee, X),
+ Pe = z.hash || "";
+ ue.params = c(h(ue.params));
+ const A = hb(r, Xe({}, z, { hash: Yb(Pe), path: ue.path })),
+ O = i.createHref(A);
+ return Xe(
+ {
+ fullPath: A,
+ hash: Pe,
+ query: r === Bh ? tw(z.query) : z.query || {},
+ },
+ ue,
+ { redirectedFrom: void 0, href: O }
+ );
+ }
+ function S(z) {
+ return typeof z == "string" ? fu(n, z, a.value.path) : Xe({}, z);
+ }
+ function T(z, X) {
+ if (u !== z) return Ji(8, { from: X, to: z });
+ }
+ function d(z) {
+ return w(z);
+ }
+ function y(z) {
+ return d(Xe(S(z), { replace: !0 }));
+ }
+ function m(z) {
+ const X = z.matched[z.matched.length - 1];
+ if (X && X.redirect) {
+ const { redirect: ee } = X;
+ let ue = typeof ee == "function" ? ee(z) : ee;
+ return (
+ typeof ue == "string" &&
+ ((ue =
+ ue.includes("?") || ue.includes("#")
+ ? (ue = S(ue))
+ : { path: ue }),
+ (ue.params = {})),
+ Xe(
+ {
+ query: z.query,
+ hash: z.hash,
+ params: "path" in ue ? {} : z.params,
+ },
+ ue
+ )
+ );
+ }
+ }
+ function w(z, X) {
+ const ee = (u = x(z)),
+ ue = a.value,
+ Pe = z.state,
+ A = z.force,
+ O = z.replace === !0,
+ j = m(ee);
+ if (j)
+ return w(
+ Xe(S(j), {
+ state: typeof j == "object" ? Xe({}, Pe, j.state) : Pe,
+ force: A,
+ replace: O,
+ }),
+ X || ee
+ );
+ const H = ee;
+ H.redirectedFrom = X;
+ let V;
+ return (
+ !A &&
+ pb(r, ue, ee) &&
+ ((V = Ji(16, { to: H, from: ue })), Q(ue, ue, !0, !1)),
+ (V ? Promise.resolve(V) : C(H, ue))
+ .catch((q) => (er(q) ? (er(q, 2) ? q : ae(q)) : D(q, H, ue)))
+ .then((q) => {
+ if (q) {
+ if (er(q, 2))
+ return w(
+ Xe({ replace: O }, S(q.to), {
+ state:
+ typeof q.to == "object"
+ ? Xe({}, Pe, q.to.state)
+ : Pe,
+ force: A,
+ }),
+ X || H
+ );
+ } else q = R(H, ue, !0, O, Pe);
+ return E(H, ue, q), q;
+ })
+ );
+ }
+ function k(z, X) {
+ const ee = T(z, X);
+ return ee ? Promise.reject(ee) : Promise.resolve();
+ }
+ function _(z) {
+ const X = Le.values().next().value;
+ return X && typeof X.runWithContext == "function"
+ ? X.runWithContext(z)
+ : z();
+ }
+ function C(z, X) {
+ let ee;
+ const [ue, Pe, A] = cw(z, X);
+ ee = hu(ue.reverse(), "beforeRouteLeave", z, X);
+ for (const j of ue)
+ j.leaveGuards.forEach((H) => {
+ ee.push(vr(H, z, X));
+ });
+ const O = k.bind(null, z, X);
+ return (
+ ee.push(O),
+ Ae(ee)
+ .then(() => {
+ ee = [];
+ for (const j of o.list()) ee.push(vr(j, z, X));
+ return ee.push(O), Ae(ee);
+ })
+ .then(() => {
+ ee = hu(Pe, "beforeRouteUpdate", z, X);
+ for (const j of Pe)
+ j.updateGuards.forEach((H) => {
+ ee.push(vr(H, z, X));
+ });
+ return ee.push(O), Ae(ee);
+ })
+ .then(() => {
+ ee = [];
+ for (const j of A)
+ if (j.beforeEnter)
+ if (Nn(j.beforeEnter))
+ for (const H of j.beforeEnter)
+ ee.push(vr(H, z, X));
+ else ee.push(vr(j.beforeEnter, z, X));
+ return ee.push(O), Ae(ee);
+ })
+ .then(
+ () => (
+ z.matched.forEach((j) => (j.enterCallbacks = {})),
+ (ee = hu(A, "beforeRouteEnter", z, X)),
+ ee.push(O),
+ Ae(ee)
+ )
+ )
+ .then(() => {
+ ee = [];
+ for (const j of s.list()) ee.push(vr(j, z, X));
+ return ee.push(O), Ae(ee);
+ })
+ .catch((j) => (er(j, 8) ? j : Promise.reject(j)))
+ );
+ }
+ function E(z, X, ee) {
+ l.list().forEach((ue) => _(() => ue(z, X, ee)));
+ }
+ function R(z, X, ee, ue, Pe) {
+ const A = T(z, X);
+ if (A) return A;
+ const O = X === pr,
+ j = Oi ? history.state : {};
+ ee &&
+ (ue || O
+ ? i.replace(z.fullPath, Xe({ scroll: O && j && j.scroll }, Pe))
+ : i.push(z.fullPath, Pe)),
+ (a.value = z),
+ Q(z, X, ee, O),
+ ae();
+ }
+ let P;
+ function L() {
+ P ||
+ (P = i.listen((z, X, ee) => {
+ if (!Re.listening) return;
+ const ue = x(z),
+ Pe = m(ue);
+ if (Pe) {
+ w(Xe(Pe, { replace: !0 }), ue).catch(No);
+ return;
+ }
+ u = ue;
+ const A = a.value;
+ Oi && kb(Oh(A.fullPath, ee.delta), Ra()),
+ C(ue, A)
+ .catch((O) =>
+ er(O, 12)
+ ? O
+ : er(O, 2)
+ ? (w(O.to, ue)
+ .then((j) => {
+ er(j, 20) &&
+ !ee.delta &&
+ ee.type === Yo.pop &&
+ i.go(-1, !1);
+ })
+ .catch(No),
+ Promise.reject())
+ : (ee.delta && i.go(-ee.delta, !1), D(O, ue, A))
+ )
+ .then((O) => {
+ (O = O || R(ue, A, !1)),
+ O &&
+ (ee.delta && !er(O, 8)
+ ? i.go(-ee.delta, !1)
+ : ee.type === Yo.pop &&
+ er(O, 20) &&
+ i.go(-1, !1)),
+ E(ue, A, O);
+ })
+ .catch(No);
+ }));
+ }
+ let I = vo(),
+ M = vo(),
+ N;
+ function D(z, X, ee) {
+ ae(z);
+ const ue = M.list();
+ return (
+ ue.length ? ue.forEach((Pe) => Pe(z, X, ee)) : console.error(z),
+ Promise.reject(z)
+ );
+ }
+ function K() {
+ return N && a.value !== pr
+ ? Promise.resolve()
+ : new Promise((z, X) => {
+ I.add([z, X]);
+ });
+ }
+ function ae(z) {
+ return (
+ N ||
+ ((N = !z),
+ L(),
+ I.list().forEach(([X, ee]) => (z ? ee(z) : X())),
+ I.reset()),
+ z
+ );
+ }
+ function Q(z, X, ee, ue) {
+ const { scrollBehavior: Pe } = t;
+ if (!Oi || !Pe) return Promise.resolve();
+ const A =
+ (!ee && Cb(Oh(z.fullPath, 0))) ||
+ ((ue || !ee) && history.state && history.state.scroll) ||
+ null;
+ return Ct()
+ .then(() => Pe(z, X, A))
+ .then((O) => O && xb(O))
+ .catch((O) => D(O, z, X));
+ }
+ const me = (z) => i.go(z);
+ let je;
+ const Le = new Set(),
+ Re = {
+ currentRoute: a,
+ listening: !0,
+ addRoute: p,
+ removeRoute: g,
+ hasRoute: b,
+ getRoutes: v,
+ resolve: x,
+ options: t,
+ push: d,
+ replace: y,
+ go: me,
+ back: () => me(-1),
+ forward: () => me(1),
+ beforeEach: o.add,
+ beforeResolve: s.add,
+ afterEach: l.add,
+ onError: M.add,
+ isReady: K,
+ install(z) {
+ const X = this;
+ z.component("RouterLink", ow),
+ z.component("RouterView", uw),
+ (z.config.globalProperties.$router = X),
+ Object.defineProperty(z.config.globalProperties, "$route", {
+ enumerable: !0,
+ get: () => ne(a),
+ }),
+ Oi &&
+ !je &&
+ a.value === pr &&
+ ((je = !0), d(i.location).catch((Pe) => {}));
+ const ee = {};
+ for (const Pe in pr)
+ Object.defineProperty(ee, Pe, {
+ get: () => a.value[Pe],
+ enumerable: !0,
+ });
+ z.provide(Pa, X), z.provide(Ug, Qm(ee)), z.provide(pc, a);
+ const ue = z.unmount;
+ Le.add(z),
+ (z.unmount = function () {
+ Le.delete(z),
+ Le.size < 1 &&
+ ((u = pr),
+ P && P(),
+ (P = null),
+ (a.value = pr),
+ (je = !1),
+ (N = !1)),
+ ue();
+ });
+ },
+ };
+ function Ae(z) {
+ return z.reduce((X, ee) => X.then(() => _(ee)), Promise.resolve());
+ }
+ return Re;
+}
+function cw(t, e) {
+ const n = [],
+ r = [],
+ i = [],
+ o = Math.max(e.matched.length, t.matched.length);
+ for (let s = 0; s < o; s++) {
+ const l = e.matched[s];
+ l && (t.matched.find((u) => qi(u, l)) ? r.push(l) : n.push(l));
+ const a = t.matched[s];
+ a && (e.matched.find((u) => qi(u, a)) || i.push(a));
+ }
+ return [n, r, i];
+}
+function Kg() {
+ return qe(Pa);
+}
+const Ue = (t, e) => {
+ const n = t.__vccOpts || t;
+ for (const [r, i] of e) n[r] = i;
+ return n;
+};
+function vt(t, e, ...n) {
+ if (t in e) {
+ let i = e[t];
+ return typeof i == "function" ? i(...n) : i;
+ }
+ let r = new Error(
+ `Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(
+ e
+ )
+ .map((i) => `"${i}"`)
+ .join(", ")}.`
+ );
+ throw (Error.captureStackTrace && Error.captureStackTrace(r, vt), r);
+}
+var Gn = ((t) => (
+ (t[(t.None = 0)] = "None"),
+ (t[(t.RenderStrategy = 1)] = "RenderStrategy"),
+ (t[(t.Static = 2)] = "Static"),
+ t
+ ))(Gn || {}),
+ _r = ((t) => (
+ (t[(t.Unmount = 0)] = "Unmount"), (t[(t.Hidden = 1)] = "Hidden"), t
+ ))(_r || {});
+function tt(o) {
+ var s = o,
+ { visible: t = !0, features: e = 0, ourProps: n, theirProps: r } = s,
+ i = Qe(s, ["visible", "features", "ourProps", "theirProps"]);
+ var l;
+ let a = Jg(r, n),
+ u = Object.assign(i, { props: a });
+ if (t || (e & 2 && a.static)) return pu(u);
+ if (e & 1) {
+ let c = (l = a.unmount) == null || l ? 0 : 1;
+ return vt(c, {
+ [0]() {
+ return null;
+ },
+ [1]() {
+ return pu(
+ be(W({}, i), {
+ props: be(W({}, a), {
+ hidden: !0,
+ style: { display: "none" },
+ }),
+ })
+ );
+ },
+ });
+ }
+ return pu(u);
+}
+function pu({ props: t, attrs: e, slots: n, slot: r, name: i }) {
+ var o, s;
+ let f = so(t, ["unmount", "static"]),
+ { as: l } = f,
+ a = Qe(f, ["as"]),
+ u = (o = n.default) == null ? void 0 : o.call(n, r),
+ c = {};
+ if (r) {
+ let h = !1,
+ p = [];
+ for (let [g, v] of Object.entries(r))
+ typeof v == "boolean" && (h = !0), v === !0 && p.push(g);
+ h && (c["data-headlessui-state"] = p.join(" "));
+ }
+ if (l === "template") {
+ if (
+ ((u = qg(u != null ? u : [])),
+ Object.keys(a).length > 0 || Object.keys(e).length > 0)
+ ) {
+ let [h, ...p] = u != null ? u : [];
+ if (!dw(h) || p.length > 0)
+ throw new Error(
+ [
+ 'Passing props on "template"!',
+ "",
+ `The current component <${i} /> is rendering a "template".`,
+ "However we need to passthrough the following props:",
+ Object.keys(a)
+ .concat(Object.keys(e))
+ .map((b) => b.trim())
+ .filter((b, x, S) => S.indexOf(b) === x)
+ .sort((b, x) => b.localeCompare(x))
+ .map((b) => ` - ${b}`).join(`
+`),
+ "",
+ "You can apply a few solutions:",
+ [
+ 'Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',
+ "Render a single element as the child so that we can forward the props onto that element.",
+ ].map((b) => ` - ${b}`).join(`
+`),
+ ].join(`
+`)
+ );
+ let g = Jg((s = h.props) != null ? s : {}, a),
+ v = sr(h, g);
+ for (let b in g)
+ b.startsWith("on") &&
+ (v.props || (v.props = {}), (v.props[b] = g[b]));
+ return v;
+ }
+ return Array.isArray(u) && u.length === 1 ? u[0] : u;
+ }
+ return ze(l, Object.assign({}, a, c), { default: () => u });
+}
+function qg(t) {
+ return t.flatMap((e) => (e.type === He ? qg(e.children) : [e]));
+}
+function Jg(...t) {
+ if (t.length === 0) return {};
+ if (t.length === 1) return t[0];
+ let e = {},
+ n = {};
+ for (let r of t)
+ for (let i in r)
+ i.startsWith("on") && typeof r[i] == "function"
+ ? (n[i] != null || (n[i] = []), n[i].push(r[i]))
+ : (e[i] = r[i]);
+ if (e.disabled || e["aria-disabled"])
+ return Object.assign(
+ e,
+ Object.fromEntries(Object.keys(n).map((r) => [r, void 0]))
+ );
+ for (let r in n)
+ Object.assign(e, {
+ [r](i, ...o) {
+ let s = n[r];
+ for (let l of s) {
+ if (i instanceof Event && i.defaultPrevented) return;
+ l(i, ...o);
+ }
+ },
+ });
+ return e;
+}
+function Ed(t) {
+ let e = Object.assign({}, t);
+ for (let n in e) e[n] === void 0 && delete e[n];
+ return e;
+}
+function so(t, e = []) {
+ let n = Object.assign({}, t);
+ for (let r of e) r in n && delete n[r];
+ return n;
+}
+function dw(t) {
+ return t == null
+ ? !1
+ : typeof t.type == "string" ||
+ typeof t.type == "object" ||
+ typeof t.type == "function";
+}
+let fw = 0;
+function hw() {
+ return ++fw;
+}
+function At() {
+ return hw();
+}
+var Ie = ((t) => (
+ (t.Space = " "),
+ (t.Enter = "Enter"),
+ (t.Escape = "Escape"),
+ (t.Backspace = "Backspace"),
+ (t.Delete = "Delete"),
+ (t.ArrowLeft = "ArrowLeft"),
+ (t.ArrowUp = "ArrowUp"),
+ (t.ArrowRight = "ArrowRight"),
+ (t.ArrowDown = "ArrowDown"),
+ (t.Home = "Home"),
+ (t.End = "End"),
+ (t.PageUp = "PageUp"),
+ (t.PageDown = "PageDown"),
+ (t.Tab = "Tab"),
+ t
+))(Ie || {});
+function pw(t) {
+ throw new Error("Unexpected object: " + t);
+}
+var Ze = ((t) => (
+ (t[(t.First = 0)] = "First"),
+ (t[(t.Previous = 1)] = "Previous"),
+ (t[(t.Next = 2)] = "Next"),
+ (t[(t.Last = 3)] = "Last"),
+ (t[(t.Specific = 4)] = "Specific"),
+ (t[(t.Nothing = 5)] = "Nothing"),
+ t
+))(Ze || {});
+function Gg(t, e) {
+ let n = e.resolveItems();
+ if (n.length <= 0) return null;
+ let r = e.resolveActiveIndex(),
+ i = r != null ? r : -1,
+ o = (() => {
+ switch (t.focus) {
+ case 0:
+ return n.findIndex((s) => !e.resolveDisabled(s));
+ case 1: {
+ let s = n
+ .slice()
+ .reverse()
+ .findIndex((l, a, u) =>
+ i !== -1 && u.length - a - 1 >= i
+ ? !1
+ : !e.resolveDisabled(l)
+ );
+ return s === -1 ? s : n.length - 1 - s;
+ }
+ case 2:
+ return n.findIndex((s, l) =>
+ l <= i ? !1 : !e.resolveDisabled(s)
+ );
+ case 3: {
+ let s = n
+ .slice()
+ .reverse()
+ .findIndex((l) => !e.resolveDisabled(l));
+ return s === -1 ? s : n.length - 1 - s;
+ }
+ case 4:
+ return n.findIndex((s) => e.resolveId(s) === t.id);
+ case 5:
+ return null;
+ default:
+ pw(t);
+ }
+ })();
+ return o === -1 ? r : o;
+}
+function fe(t) {
+ var e;
+ return t == null || t.value == null
+ ? null
+ : (e = t.value.$el) != null
+ ? e
+ : t.value;
+}
+let Yg = Symbol("Context");
+var gt = ((t) => (
+ (t[(t.Open = 1)] = "Open"),
+ (t[(t.Closed = 2)] = "Closed"),
+ (t[(t.Closing = 4)] = "Closing"),
+ (t[(t.Opening = 8)] = "Opening"),
+ t
+))(gt || {});
+function mw() {
+ return ms() !== null;
+}
+function ms() {
+ return qe(Yg, null);
+}
+function Ad(t) {
+ kt(Yg, t);
+}
+function Wh(t, e) {
+ if (t) return t;
+ let n = e != null ? e : "button";
+ if (typeof n == "string" && n.toLowerCase() === "button") return "button";
+}
+function Td(t, e) {
+ let n = oe(Wh(t.value.type, t.value.as));
+ return (
+ Ye(() => {
+ n.value = Wh(t.value.type, t.value.as);
+ }),
+ Mt(() => {
+ var r;
+ n.value ||
+ (fe(e) &&
+ fe(e) instanceof HTMLButtonElement &&
+ !((r = fe(e)) != null && r.hasAttribute("type")) &&
+ (n.value = "button"));
+ }),
+ n
+ );
+}
+var gw = Object.defineProperty,
+ yw = (t, e, n) =>
+ e in t
+ ? gw(t, e, {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: n,
+ })
+ : (t[e] = n),
+ Uh = (t, e, n) => (yw(t, typeof e != "symbol" ? e + "" : e, n), n);
+class vw {
+ constructor() {
+ Uh(this, "current", this.detect()), Uh(this, "currentId", 0);
+ }
+ set(e) {
+ this.current !== e && ((this.currentId = 0), (this.current = e));
+ }
+ reset() {
+ this.set(this.detect());
+ }
+ nextId() {
+ return ++this.currentId;
+ }
+ get isServer() {
+ return this.current === "server";
+ }
+ get isClient() {
+ return this.current === "client";
+ }
+ detect() {
+ return typeof window == "undefined" || typeof document == "undefined"
+ ? "server"
+ : "client";
+ }
+}
+let gs = new vw();
+function vn(t) {
+ if (gs.isServer) return null;
+ if (t instanceof Node) return t.ownerDocument;
+ if (t != null && t.hasOwnProperty("value")) {
+ let e = fe(t);
+ if (e) return e.ownerDocument;
+ }
+ return document;
+}
+function Od({ container: t, accept: e, walk: n, enabled: r }) {
+ Mt(() => {
+ let i = t.value;
+ if (!i || (r !== void 0 && !r.value)) return;
+ let o = vn(t);
+ if (!o) return;
+ let s = Object.assign((a) => e(a), { acceptNode: e }),
+ l = o.createTreeWalker(i, NodeFilter.SHOW_ELEMENT, s, !1);
+ for (; l.nextNode(); ) n(l.currentNode);
+ });
+}
+let mc = [
+ "[contentEditable=true]",
+ "[tabindex]",
+ "a[href]",
+ "area[href]",
+ "button:not([disabled])",
+ "iframe",
+ "input:not([disabled])",
+ "select:not([disabled])",
+ "textarea:not([disabled])",
+]
+ .map((t) => `${t}:not([tabindex='-1'])`)
+ .join(",");
+var Qt = ((t) => (
+ (t[(t.First = 1)] = "First"),
+ (t[(t.Previous = 2)] = "Previous"),
+ (t[(t.Next = 4)] = "Next"),
+ (t[(t.Last = 8)] = "Last"),
+ (t[(t.WrapAround = 16)] = "WrapAround"),
+ (t[(t.NoScroll = 32)] = "NoScroll"),
+ t
+ ))(Qt || {}),
+ Sl = ((t) => (
+ (t[(t.Error = 0)] = "Error"),
+ (t[(t.Overflow = 1)] = "Overflow"),
+ (t[(t.Success = 2)] = "Success"),
+ (t[(t.Underflow = 3)] = "Underflow"),
+ t
+ ))(Sl || {}),
+ bw = ((t) => (
+ (t[(t.Previous = -1)] = "Previous"), (t[(t.Next = 1)] = "Next"), t
+ ))(bw || {});
+function Qg(t = document.body) {
+ return t == null
+ ? []
+ : Array.from(t.querySelectorAll(mc)).sort((e, n) =>
+ Math.sign(
+ (e.tabIndex || Number.MAX_SAFE_INTEGER) -
+ (n.tabIndex || Number.MAX_SAFE_INTEGER)
+ )
+ );
+}
+var Rd = ((t) => (
+ (t[(t.Strict = 0)] = "Strict"), (t[(t.Loose = 1)] = "Loose"), t
+))(Rd || {});
+function Pd(t, e = 0) {
+ var n;
+ return t === ((n = vn(t)) == null ? void 0 : n.body)
+ ? !1
+ : vt(e, {
+ [0]() {
+ return t.matches(mc);
+ },
+ [1]() {
+ let r = t;
+ for (; r !== null; ) {
+ if (r.matches(mc)) return !0;
+ r = r.parentElement;
+ }
+ return !1;
+ },
+ });
+}
+function Xg(t) {
+ let e = vn(t);
+ Ct(() => {
+ e && !Pd(e.activeElement, 0) && Rr(t);
+ });
+}
+var ww = ((t) => (
+ (t[(t.Keyboard = 0)] = "Keyboard"), (t[(t.Mouse = 1)] = "Mouse"), t
+))(ww || {});
+typeof window != "undefined" &&
+ typeof document != "undefined" &&
+ (document.addEventListener(
+ "keydown",
+ (t) => {
+ t.metaKey ||
+ t.altKey ||
+ t.ctrlKey ||
+ (document.documentElement.dataset.headlessuiFocusVisible = "");
+ },
+ !0
+ ),
+ document.addEventListener(
+ "click",
+ (t) => {
+ t.detail === 1
+ ? delete document.documentElement.dataset.headlessuiFocusVisible
+ : t.detail === 0 &&
+ (document.documentElement.dataset.headlessuiFocusVisible =
+ "");
+ },
+ !0
+ ));
+function Rr(t) {
+ t == null || t.focus({ preventScroll: !0 });
+}
+let xw = ["textarea", "input"].join(",");
+function kw(t) {
+ var e, n;
+ return (n =
+ (e = t == null ? void 0 : t.matches) == null
+ ? void 0
+ : e.call(t, xw)) != null
+ ? n
+ : !1;
+}
+function Na(t, e = (n) => n) {
+ return t.slice().sort((n, r) => {
+ let i = e(n),
+ o = e(r);
+ if (i === null || o === null) return 0;
+ let s = i.compareDocumentPosition(o);
+ return s & Node.DOCUMENT_POSITION_FOLLOWING
+ ? -1
+ : s & Node.DOCUMENT_POSITION_PRECEDING
+ ? 1
+ : 0;
+ });
+}
+function Cw(t, e) {
+ return li(Qg(), e, { relativeTo: t });
+}
+function li(
+ t,
+ e,
+ { sorted: n = !0, relativeTo: r = null, skipElements: i = [] } = {}
+) {
+ var o;
+ let s =
+ (o = Array.isArray(t)
+ ? t.length > 0
+ ? t[0].ownerDocument
+ : document
+ : t == null
+ ? void 0
+ : t.ownerDocument) != null
+ ? o
+ : document,
+ l = Array.isArray(t) ? (n ? Na(t) : t) : Qg(t);
+ i.length > 0 && l.length > 1 && (l = l.filter((g) => !i.includes(g))),
+ (r = r != null ? r : s.activeElement);
+ let a = (() => {
+ if (e & 5) return 1;
+ if (e & 10) return -1;
+ throw new Error(
+ "Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"
+ );
+ })(),
+ u = (() => {
+ if (e & 1) return 0;
+ if (e & 2) return Math.max(0, l.indexOf(r)) - 1;
+ if (e & 4) return Math.max(0, l.indexOf(r)) + 1;
+ if (e & 8) return l.length - 1;
+ throw new Error(
+ "Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"
+ );
+ })(),
+ c = e & 32 ? { preventScroll: !0 } : {},
+ f = 0,
+ h = l.length,
+ p;
+ do {
+ if (f >= h || f + h <= 0) return 0;
+ let g = u + f;
+ if (e & 16) g = (g + h) % h;
+ else {
+ if (g < 0) return 3;
+ if (g >= h) return 1;
+ }
+ (p = l[g]), p == null || p.focus(c), (f += a);
+ } while (p !== s.activeElement);
+ return e & 6 && kw(p) && p.select(), 2;
+}
+function Is(t, e, n) {
+ gs.isServer ||
+ Mt((r) => {
+ document.addEventListener(t, e, n),
+ r(() => document.removeEventListener(t, e, n));
+ });
+}
+function Zg(t, e, n) {
+ gs.isServer ||
+ Mt((r) => {
+ window.addEventListener(t, e, n),
+ r(() => window.removeEventListener(t, e, n));
+ });
+}
+function Nd(t, e, n = $(() => !0)) {
+ function r(o, s) {
+ if (!n.value || o.defaultPrevented) return;
+ let l = s(o);
+ if (l === null || !l.getRootNode().contains(l)) return;
+ let a = (function u(c) {
+ return typeof c == "function"
+ ? u(c())
+ : Array.isArray(c) || c instanceof Set
+ ? c
+ : [c];
+ })(t);
+ for (let u of a) {
+ if (u === null) continue;
+ let c = u instanceof HTMLElement ? u : fe(u);
+ if (
+ (c != null && c.contains(l)) ||
+ (o.composed && o.composedPath().includes(c))
+ )
+ return;
+ }
+ return (
+ !Pd(l, Rd.Loose) && l.tabIndex !== -1 && o.preventDefault(), e(o, l)
+ );
+ }
+ let i = oe(null);
+ Is(
+ "pointerdown",
+ (o) => {
+ var s, l;
+ n.value &&
+ (i.value =
+ ((l = (s = o.composedPath) == null ? void 0 : s.call(o)) ==
+ null
+ ? void 0
+ : l[0]) || o.target);
+ },
+ !0
+ ),
+ Is(
+ "mousedown",
+ (o) => {
+ var s, l;
+ n.value &&
+ (i.value =
+ ((l =
+ (s = o.composedPath) == null
+ ? void 0
+ : s.call(o)) == null
+ ? void 0
+ : l[0]) || o.target);
+ },
+ !0
+ ),
+ Is(
+ "click",
+ (o) => {
+ i.value && (r(o, () => i.value), (i.value = null));
+ },
+ !0
+ ),
+ Is(
+ "touchend",
+ (o) =>
+ r(o, () => (o.target instanceof HTMLElement ? o.target : null)),
+ !0
+ ),
+ Zg(
+ "blur",
+ (o) =>
+ r(o, () =>
+ window.document.activeElement instanceof HTMLIFrameElement
+ ? window.document.activeElement
+ : null
+ ),
+ !0
+ );
+}
+var gi = ((t) => (
+ (t[(t.None = 1)] = "None"),
+ (t[(t.Focusable = 2)] = "Focusable"),
+ (t[(t.Hidden = 4)] = "Hidden"),
+ t
+))(gi || {});
+let Gi = xe({
+ name: "Hidden",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ features: { type: Number, default: 1 },
+ },
+ setup(t, { slots: e, attrs: n }) {
+ return () => {
+ let s = t,
+ { features: r } = s,
+ i = Qe(s, ["features"]),
+ o = {
+ "aria-hidden": (r & 2) === 2 ? !0 : void 0,
+ style: W(
+ {
+ position: "fixed",
+ top: 1,
+ left: 1,
+ width: 1,
+ height: 0,
+ padding: 0,
+ margin: -1,
+ overflow: "hidden",
+ clip: "rect(0, 0, 0, 0)",
+ whiteSpace: "nowrap",
+ borderWidth: "0",
+ },
+ (r & 4) === 4 && (r & 2) !== 2 && { display: "none" }
+ ),
+ };
+ return tt({
+ ourProps: o,
+ theirProps: i,
+ slot: {},
+ attrs: n,
+ slots: e,
+ name: "Hidden",
+ });
+ };
+ },
+});
+function jd(t = {}, e = null, n = []) {
+ for (let [r, i] of Object.entries(t)) t1(n, e1(e, r), i);
+ return n;
+}
+function e1(t, e) {
+ return t ? t + "[" + e + "]" : e;
+}
+function t1(t, e, n) {
+ if (Array.isArray(n))
+ for (let [r, i] of n.entries()) t1(t, e1(e, r.toString()), i);
+ else
+ n instanceof Date
+ ? t.push([e, n.toISOString()])
+ : typeof n == "boolean"
+ ? t.push([e, n ? "1" : "0"])
+ : typeof n == "string"
+ ? t.push([e, n])
+ : typeof n == "number"
+ ? t.push([e, `${n}`])
+ : n == null
+ ? t.push([e, ""])
+ : jd(n, e, t);
+}
+function n1(t) {
+ var e, n;
+ let r = (e = t == null ? void 0 : t.form) != null ? e : t.closest("form");
+ if (r) {
+ for (let i of r.elements)
+ if (
+ i !== t &&
+ ((i.tagName === "INPUT" && i.type === "submit") ||
+ (i.tagName === "BUTTON" && i.type === "submit") ||
+ (i.nodeName === "INPUT" && i.type === "image"))
+ ) {
+ i.click();
+ return;
+ }
+ (n = r.requestSubmit) == null || n.call(r);
+ }
+}
+function Ld(t, e, n) {
+ let r = oe(n == null ? void 0 : n.value),
+ i = $(() => t.value !== void 0);
+ return [
+ $(() => (i.value ? t.value : r.value)),
+ function (o) {
+ return i.value || (r.value = o), e == null ? void 0 : e(o);
+ },
+ ];
+}
+function Kh(t) {
+ return [t.screenX, t.screenY];
+}
+function r1() {
+ let t = oe([-1, -1]);
+ return {
+ wasMoved(e) {
+ let n = Kh(e);
+ return t.value[0] === n[0] && t.value[1] === n[1]
+ ? !1
+ : ((t.value = n), !0);
+ },
+ update(e) {
+ t.value = Kh(e);
+ },
+ };
+}
+function i1() {
+ return (
+ /iPhone/gi.test(window.navigator.platform) ||
+ (/Mac/gi.test(window.navigator.platform) &&
+ window.navigator.maxTouchPoints > 0)
+ );
+}
+function Sw() {
+ return /Android/gi.test(window.navigator.userAgent);
+}
+function _w() {
+ return i1() || Sw();
+}
+function Dd(t) {
+ typeof queueMicrotask == "function"
+ ? queueMicrotask(t)
+ : Promise.resolve()
+ .then(t)
+ .catch((e) =>
+ setTimeout(() => {
+ throw e;
+ })
+ );
+}
+function lo() {
+ let t = [],
+ e = {
+ addEventListener(n, r, i, o) {
+ return (
+ n.addEventListener(r, i, o),
+ e.add(() => n.removeEventListener(r, i, o))
+ );
+ },
+ requestAnimationFrame(...n) {
+ let r = requestAnimationFrame(...n);
+ e.add(() => cancelAnimationFrame(r));
+ },
+ nextFrame(...n) {
+ e.requestAnimationFrame(() => {
+ e.requestAnimationFrame(...n);
+ });
+ },
+ setTimeout(...n) {
+ let r = setTimeout(...n);
+ e.add(() => clearTimeout(r));
+ },
+ microTask(...n) {
+ let r = { current: !0 };
+ return (
+ Dd(() => {
+ r.current && n[0]();
+ }),
+ e.add(() => {
+ r.current = !1;
+ })
+ );
+ },
+ style(n, r, i) {
+ let o = n.style.getPropertyValue(r);
+ return (
+ Object.assign(n.style, { [r]: i }),
+ this.add(() => {
+ Object.assign(n.style, { [r]: o });
+ })
+ );
+ },
+ group(n) {
+ let r = lo();
+ return n(r), this.add(() => r.dispose());
+ },
+ add(n) {
+ return (
+ t.push(n),
+ () => {
+ let r = t.indexOf(n);
+ if (r >= 0) for (let i of t.splice(r, 1)) i();
+ }
+ );
+ },
+ dispose() {
+ for (let n of t.splice(0)) n();
+ },
+ };
+ return e;
+}
+function Mw(t, e) {
+ return t === e;
+}
+var Ew = ((t) => (
+ (t[(t.Open = 0)] = "Open"), (t[(t.Closed = 1)] = "Closed"), t
+ ))(Ew || {}),
+ Aw = ((t) => (
+ (t[(t.Single = 0)] = "Single"), (t[(t.Multi = 1)] = "Multi"), t
+ ))(Aw || {}),
+ Tw = ((t) => (
+ (t[(t.Pointer = 0)] = "Pointer"), (t[(t.Other = 1)] = "Other"), t
+ ))(Tw || {});
+let o1 = Symbol("ComboboxContext");
+function ao(t) {
+ let e = qe(o1, null);
+ if (e === null) {
+ let n = new Error(
+ `<${t} /> is missing a parent component.`
+ );
+ throw (Error.captureStackTrace && Error.captureStackTrace(n, ao), n);
+ }
+ return e;
+}
+let Ow = xe({
+ name: "Combobox",
+ emits: { "update:modelValue": (t) => !0 },
+ props: {
+ as: { type: [Object, String], default: "template" },
+ disabled: { type: [Boolean], default: !1 },
+ by: { type: [String, Function], default: () => Mw },
+ modelValue: {
+ type: [Object, String, Number, Boolean],
+ default: void 0,
+ },
+ defaultValue: {
+ type: [Object, String, Number, Boolean],
+ default: void 0,
+ },
+ form: { type: String, optional: !0 },
+ name: { type: String, optional: !0 },
+ nullable: { type: Boolean, default: !1 },
+ multiple: { type: [Boolean], default: !1 },
+ },
+ inheritAttrs: !1,
+ setup(t, { slots: e, attrs: n, emit: r }) {
+ let i = oe(1),
+ o = oe(null),
+ s = oe(null),
+ l = oe(null),
+ a = oe(null),
+ u = oe({ static: !1, hold: !1 }),
+ c = oe([]),
+ f = oe(null),
+ h = oe(1),
+ p = oe(!1);
+ function g(_ = (C) => C) {
+ let C = f.value !== null ? c.value[f.value] : null,
+ E = Na(_(c.value.slice()), (P) => fe(P.dataRef.domRef)),
+ R = C ? E.indexOf(C) : null;
+ return R === -1 && (R = null), { options: E, activeOptionIndex: R };
+ }
+ let v = $(() => (t.multiple ? 1 : 0)),
+ b = $(() => t.nullable),
+ [x, S] = Ld(
+ $(() => t.modelValue),
+ (_) => r("update:modelValue", _),
+ $(() => t.defaultValue)
+ ),
+ T = $(() =>
+ x.value === void 0
+ ? vt(v.value, { [1]: [], [0]: void 0 })
+ : x.value
+ ),
+ d = null,
+ y = null,
+ m = {
+ comboboxState: i,
+ value: T,
+ mode: v,
+ compare(_, C) {
+ if (typeof t.by == "string") {
+ let E = t.by;
+ return (
+ (_ == null ? void 0 : _[E]) ===
+ (C == null ? void 0 : C[E])
+ );
+ }
+ return t.by(_, C);
+ },
+ defaultValue: $(() => t.defaultValue),
+ nullable: b,
+ inputRef: s,
+ labelRef: o,
+ buttonRef: l,
+ optionsRef: a,
+ disabled: $(() => t.disabled),
+ options: c,
+ change(_) {
+ S(_);
+ },
+ activeOptionIndex: $(() => {
+ if (p.value && f.value === null && c.value.length > 0) {
+ let _ = c.value.findIndex((C) => !C.dataRef.disabled);
+ _ !== -1 && (f.value = _);
+ }
+ return f.value;
+ }),
+ activationTrigger: h,
+ optionsPropsRef: u,
+ closeCombobox() {
+ (p.value = !1),
+ !t.disabled &&
+ i.value !== 1 &&
+ ((i.value = 1), (f.value = null));
+ },
+ openCombobox() {
+ if (((p.value = !0), t.disabled || i.value === 0)) return;
+ let _ = c.value.findIndex((C) => {
+ let E = de(C.dataRef.value);
+ return vt(v.value, {
+ [0]: () => m.compare(de(m.value.value), de(E)),
+ [1]: () =>
+ de(m.value.value).some((R) =>
+ m.compare(de(R), de(E))
+ ),
+ });
+ });
+ _ !== -1 && (f.value = _), (i.value = 0);
+ },
+ goToOption(_, C, E) {
+ (p.value = !1),
+ d !== null && cancelAnimationFrame(d),
+ (d = requestAnimationFrame(() => {
+ if (
+ t.disabled ||
+ (a.value && !u.value.static && i.value === 1)
+ )
+ return;
+ let R = g();
+ if (R.activeOptionIndex === null) {
+ let L = R.options.findIndex(
+ (I) => !I.dataRef.disabled
+ );
+ L !== -1 && (R.activeOptionIndex = L);
+ }
+ let P = Gg(
+ _ === Ze.Specific
+ ? { focus: Ze.Specific, id: C }
+ : { focus: _ },
+ {
+ resolveItems: () => R.options,
+ resolveActiveIndex: () =>
+ R.activeOptionIndex,
+ resolveId: (L) => L.id,
+ resolveDisabled: (L) => L.dataRef.disabled,
+ }
+ );
+ (f.value = P),
+ (h.value = E != null ? E : 1),
+ (c.value = R.options);
+ }));
+ },
+ selectOption(_) {
+ let C = c.value.find((R) => R.id === _);
+ if (!C) return;
+ let { dataRef: E } = C;
+ S(
+ vt(v.value, {
+ [0]: () => E.value,
+ [1]: () => {
+ let R = de(m.value.value).slice(),
+ P = de(E.value),
+ L = R.findIndex((I) => m.compare(P, de(I)));
+ return L === -1 ? R.push(P) : R.splice(L, 1), R;
+ },
+ })
+ );
+ },
+ selectActiveOption() {
+ if (m.activeOptionIndex.value === null) return;
+ let { dataRef: _, id: C } =
+ c.value[m.activeOptionIndex.value];
+ S(
+ vt(v.value, {
+ [0]: () => _.value,
+ [1]: () => {
+ let E = de(m.value.value).slice(),
+ R = de(_.value),
+ P = E.findIndex((L) => m.compare(R, de(L)));
+ return P === -1 ? E.push(R) : E.splice(P, 1), E;
+ },
+ })
+ ),
+ m.goToOption(Ze.Specific, C);
+ },
+ registerOption(_, C) {
+ y && cancelAnimationFrame(y);
+ let E = { id: _, dataRef: C },
+ R = g((P) => (P.push(E), P));
+ if (f.value === null) {
+ let P = C.value.value;
+ vt(v.value, {
+ [0]: () => m.compare(de(m.value.value), de(P)),
+ [1]: () =>
+ de(m.value.value).some((L) =>
+ m.compare(de(L), de(P))
+ ),
+ }) && (R.activeOptionIndex = R.options.indexOf(E));
+ }
+ (c.value = R.options),
+ (f.value = R.activeOptionIndex),
+ (h.value = 1),
+ R.options.some((P) => !fe(P.dataRef.domRef)) &&
+ (y = requestAnimationFrame(() => {
+ let P = g();
+ (c.value = P.options),
+ (f.value = P.activeOptionIndex);
+ }));
+ },
+ unregisterOption(_) {
+ var C;
+ m.activeOptionIndex.value !== null &&
+ ((C = m.options.value[m.activeOptionIndex.value]) ==
+ null
+ ? void 0
+ : C.id) === _ &&
+ (p.value = !0);
+ let E = g((R) => {
+ let P = R.findIndex((L) => L.id === _);
+ return P !== -1 && R.splice(P, 1), R;
+ });
+ (c.value = E.options),
+ (f.value = E.activeOptionIndex),
+ (h.value = 1);
+ },
+ };
+ Nd(
+ [s, l, a],
+ () => m.closeCombobox(),
+ $(() => i.value === 0)
+ ),
+ kt(o1, m),
+ Ad($(() => vt(i.value, { [0]: gt.Open, [1]: gt.Closed })));
+ let w = $(() =>
+ m.activeOptionIndex.value === null
+ ? null
+ : c.value[m.activeOptionIndex.value].dataRef.value
+ ),
+ k = $(() => {
+ var _;
+ return (_ = fe(s)) == null ? void 0 : _.closest("form");
+ });
+ return (
+ Ye(() => {
+ Rt(
+ [k],
+ () => {
+ if (!k.value || t.defaultValue === void 0) return;
+ function _() {
+ m.change(t.defaultValue);
+ }
+ return (
+ k.value.addEventListener("reset", _),
+ () => {
+ var C;
+ (C = k.value) == null ||
+ C.removeEventListener("reset", _);
+ }
+ );
+ },
+ { immediate: !0 }
+ );
+ }),
+ () => {
+ let L = t,
+ { name: _, disabled: C, form: E } = L,
+ R = Qe(L, ["name", "disabled", "form"]),
+ P = {
+ open: i.value === 0,
+ disabled: C,
+ activeIndex: m.activeOptionIndex.value,
+ activeOption: w.value,
+ value: T.value,
+ };
+ return ze(He, [
+ ...(_ != null && T.value != null
+ ? jd({ [_]: T.value }).map(([I, M]) =>
+ ze(
+ Gi,
+ Ed({
+ features: gi.Hidden,
+ key: I,
+ as: "input",
+ type: "hidden",
+ hidden: !0,
+ readOnly: !0,
+ form: E,
+ name: I,
+ value: M,
+ })
+ )
+ )
+ : []),
+ tt({
+ theirProps: W(
+ W({}, n),
+ so(R, [
+ "modelValue",
+ "defaultValue",
+ "nullable",
+ "multiple",
+ "onUpdate:modelValue",
+ "by",
+ ])
+ ),
+ ourProps: {},
+ slot: P,
+ slots: e,
+ attrs: n,
+ name: "Combobox",
+ }),
+ ]);
+ }
+ );
+ },
+});
+xe({
+ name: "ComboboxLabel",
+ props: {
+ as: { type: [Object, String], default: "label" },
+ id: {
+ type: String,
+ default: () => `headlessui-combobox-label-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n }) {
+ let r = ao("ComboboxLabel");
+ function i() {
+ var o;
+ (o = fe(r.inputRef)) == null || o.focus({ preventScroll: !0 });
+ }
+ return () => {
+ let o = {
+ open: r.comboboxState.value === 0,
+ disabled: r.disabled.value,
+ },
+ u = t,
+ { id: s } = u,
+ l = Qe(u, ["id"]),
+ a = { id: s, ref: r.labelRef, onClick: i };
+ return tt({
+ ourProps: a,
+ theirProps: l,
+ slot: o,
+ attrs: e,
+ slots: n,
+ name: "ComboboxLabel",
+ });
+ };
+ },
+});
+let Rw = xe({
+ name: "ComboboxButton",
+ props: {
+ as: { type: [Object, String], default: "button" },
+ id: {
+ type: String,
+ default: () => `headlessui-combobox-button-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = ao("ComboboxButton");
+ r({ el: i.buttonRef, $el: i.buttonRef });
+ function o(a) {
+ i.disabled.value ||
+ (i.comboboxState.value === 0
+ ? i.closeCombobox()
+ : (a.preventDefault(), i.openCombobox()),
+ Ct(() => {
+ var u;
+ return (u = fe(i.inputRef)) == null
+ ? void 0
+ : u.focus({ preventScroll: !0 });
+ }));
+ }
+ function s(a) {
+ switch (a.key) {
+ case Ie.ArrowDown:
+ a.preventDefault(),
+ a.stopPropagation(),
+ i.comboboxState.value === 1 && i.openCombobox(),
+ Ct(() => {
+ var u;
+ return (u = i.inputRef.value) == null
+ ? void 0
+ : u.focus({ preventScroll: !0 });
+ });
+ return;
+ case Ie.ArrowUp:
+ a.preventDefault(),
+ a.stopPropagation(),
+ i.comboboxState.value === 1 &&
+ (i.openCombobox(),
+ Ct(() => {
+ i.value.value || i.goToOption(Ze.Last);
+ })),
+ Ct(() => {
+ var u;
+ return (u = i.inputRef.value) == null
+ ? void 0
+ : u.focus({ preventScroll: !0 });
+ });
+ return;
+ case Ie.Escape:
+ if (i.comboboxState.value !== 0) return;
+ a.preventDefault(),
+ i.optionsRef.value &&
+ !i.optionsPropsRef.value.static &&
+ a.stopPropagation(),
+ i.closeCombobox(),
+ Ct(() => {
+ var u;
+ return (u = i.inputRef.value) == null
+ ? void 0
+ : u.focus({ preventScroll: !0 });
+ });
+ return;
+ }
+ }
+ let l = Td(
+ $(() => ({ as: t.as, type: e.type })),
+ i.buttonRef
+ );
+ return () => {
+ var a, u;
+ let c = {
+ open: i.comboboxState.value === 0,
+ disabled: i.disabled.value,
+ value: i.value.value,
+ },
+ g = t,
+ { id: f } = g,
+ h = Qe(g, ["id"]),
+ p = {
+ ref: i.buttonRef,
+ id: f,
+ type: l.value,
+ tabindex: "-1",
+ "aria-haspopup": "listbox",
+ "aria-controls":
+ (a = fe(i.optionsRef)) == null ? void 0 : a.id,
+ "aria-expanded": i.comboboxState.value === 0,
+ "aria-labelledby": i.labelRef.value
+ ? [
+ (u = fe(i.labelRef)) == null
+ ? void 0
+ : u.id,
+ f,
+ ].join(" ")
+ : void 0,
+ disabled: i.disabled.value === !0 ? !0 : void 0,
+ onKeydown: s,
+ onClick: o,
+ };
+ return tt({
+ ourProps: p,
+ theirProps: h,
+ slot: c,
+ attrs: e,
+ slots: n,
+ name: "ComboboxButton",
+ });
+ };
+ },
+ }),
+ Pw = xe({
+ name: "ComboboxInput",
+ props: {
+ as: { type: [Object, String], default: "input" },
+ static: { type: Boolean, default: !1 },
+ unmount: { type: Boolean, default: !0 },
+ displayValue: { type: Function },
+ defaultValue: { type: String, default: void 0 },
+ id: {
+ type: String,
+ default: () => `headlessui-combobox-input-${At()}`,
+ },
+ },
+ emits: { change: (t) => !0 },
+ setup(t, { emit: e, attrs: n, slots: r, expose: i }) {
+ let o = ao("ComboboxInput"),
+ s = $(() => vn(fe(o.inputRef))),
+ l = { value: !1 };
+ i({ el: o.inputRef, $el: o.inputRef });
+ function a() {
+ o.change(null);
+ let x = fe(o.optionsRef);
+ x && (x.scrollTop = 0), o.goToOption(Ze.Nothing);
+ }
+ let u = $(() => {
+ var x;
+ let S = o.value.value;
+ return fe(o.inputRef)
+ ? typeof t.displayValue != "undefined" && S !== void 0
+ ? (x = t.displayValue(S)) != null
+ ? x
+ : ""
+ : typeof S == "string"
+ ? S
+ : ""
+ : "";
+ });
+ Ye(() => {
+ Rt(
+ [u, o.comboboxState, s],
+ ([x, S], [T, d]) => {
+ if (l.value) return;
+ let y = fe(o.inputRef);
+ y &&
+ (((d === 0 && S === 1) || x !== T) && (y.value = x),
+ requestAnimationFrame(() => {
+ var m;
+ if (
+ l.value ||
+ !y ||
+ ((m = s.value) == null
+ ? void 0
+ : m.activeElement) !== y
+ )
+ return;
+ let { selectionStart: w, selectionEnd: k } = y;
+ Math.abs(
+ (k != null ? k : 0) - (w != null ? w : 0)
+ ) === 0 &&
+ w === 0 &&
+ y.setSelectionRange(
+ y.value.length,
+ y.value.length
+ );
+ }));
+ },
+ { immediate: !0 }
+ ),
+ Rt([o.comboboxState], ([x], [S]) => {
+ if (x === 0 && S === 1) {
+ if (l.value) return;
+ let T = fe(o.inputRef);
+ if (!T) return;
+ let d = T.value,
+ {
+ selectionStart: y,
+ selectionEnd: m,
+ selectionDirection: w,
+ } = T;
+ (T.value = ""),
+ (T.value = d),
+ w !== null
+ ? T.setSelectionRange(y, m, w)
+ : T.setSelectionRange(y, m);
+ }
+ });
+ });
+ let c = oe(!1);
+ function f() {
+ c.value = !0;
+ }
+ function h() {
+ lo().nextFrame(() => {
+ c.value = !1;
+ });
+ }
+ function p(x) {
+ switch (((l.value = !0), x.key)) {
+ case Ie.Enter:
+ if (
+ ((l.value = !1),
+ o.comboboxState.value !== 0 || c.value)
+ )
+ return;
+ if (
+ (x.preventDefault(),
+ x.stopPropagation(),
+ o.activeOptionIndex.value === null)
+ ) {
+ o.closeCombobox();
+ return;
+ }
+ o.selectActiveOption(),
+ o.mode.value === 0 && o.closeCombobox();
+ break;
+ case Ie.ArrowDown:
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ vt(o.comboboxState.value, {
+ [0]: () => o.goToOption(Ze.Next),
+ [1]: () => o.openCombobox(),
+ })
+ );
+ case Ie.ArrowUp:
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ vt(o.comboboxState.value, {
+ [0]: () => o.goToOption(Ze.Previous),
+ [1]: () => {
+ o.openCombobox(),
+ Ct(() => {
+ o.value.value ||
+ o.goToOption(Ze.Last);
+ });
+ },
+ })
+ );
+ case Ie.Home:
+ if (x.shiftKey) break;
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ o.goToOption(Ze.First)
+ );
+ case Ie.PageUp:
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ o.goToOption(Ze.First)
+ );
+ case Ie.End:
+ if (x.shiftKey) break;
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ o.goToOption(Ze.Last)
+ );
+ case Ie.PageDown:
+ return (
+ (l.value = !1),
+ x.preventDefault(),
+ x.stopPropagation(),
+ o.goToOption(Ze.Last)
+ );
+ case Ie.Escape:
+ if (((l.value = !1), o.comboboxState.value !== 0))
+ return;
+ x.preventDefault(),
+ o.optionsRef.value &&
+ !o.optionsPropsRef.value.static &&
+ x.stopPropagation(),
+ o.nullable.value &&
+ o.mode.value === 0 &&
+ o.value.value === null &&
+ a(),
+ o.closeCombobox();
+ break;
+ case Ie.Tab:
+ if (((l.value = !1), o.comboboxState.value !== 0))
+ return;
+ o.mode.value === 0 && o.selectActiveOption(),
+ o.closeCombobox();
+ break;
+ }
+ }
+ function g(x) {
+ e("change", x),
+ o.nullable.value &&
+ o.mode.value === 0 &&
+ x.target.value === "" &&
+ a(),
+ o.openCombobox();
+ }
+ function v() {
+ l.value = !1;
+ }
+ let b = $(() => {
+ var x, S, T, d;
+ return (d =
+ (T =
+ (S = t.defaultValue) != null
+ ? S
+ : o.defaultValue.value !== void 0
+ ? (x = t.displayValue) == null
+ ? void 0
+ : x.call(t, o.defaultValue.value)
+ : null) != null
+ ? T
+ : o.defaultValue.value) != null
+ ? d
+ : "";
+ });
+ return () => {
+ var x, S, T, d, y, m;
+ let w = { open: o.comboboxState.value === 0 },
+ P = t,
+ { id: k, displayValue: _, onChange: C } = P,
+ E = Qe(P, ["id", "displayValue", "onChange"]),
+ R = {
+ "aria-controls":
+ (x = o.optionsRef.value) == null ? void 0 : x.id,
+ "aria-expanded": o.comboboxState.value === 0,
+ "aria-activedescendant":
+ o.activeOptionIndex.value === null ||
+ (S = o.options.value[o.activeOptionIndex.value]) ==
+ null
+ ? void 0
+ : S.id,
+ "aria-labelledby":
+ (y =
+ (T = fe(o.labelRef)) == null ? void 0 : T.id) !=
+ null
+ ? y
+ : (d = fe(o.buttonRef)) == null
+ ? void 0
+ : d.id,
+ "aria-autocomplete": "list",
+ id: k,
+ onCompositionstart: f,
+ onCompositionend: h,
+ onKeydown: p,
+ onInput: g,
+ onBlur: v,
+ role: "combobox",
+ type: (m = n.type) != null ? m : "text",
+ tabIndex: 0,
+ ref: o.inputRef,
+ defaultValue: b.value,
+ disabled: o.disabled.value === !0 ? !0 : void 0,
+ };
+ return tt({
+ ourProps: R,
+ theirProps: E,
+ slot: w,
+ attrs: n,
+ slots: r,
+ features: Gn.RenderStrategy | Gn.Static,
+ name: "ComboboxInput",
+ });
+ };
+ },
+ }),
+ Nw = xe({
+ name: "ComboboxOptions",
+ props: {
+ as: { type: [Object, String], default: "ul" },
+ static: { type: Boolean, default: !1 },
+ unmount: { type: Boolean, default: !0 },
+ hold: { type: [Boolean], default: !1 },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = ao("ComboboxOptions"),
+ o = `headlessui-combobox-options-${At()}`;
+ r({ el: i.optionsRef, $el: i.optionsRef }),
+ Mt(() => {
+ i.optionsPropsRef.value.static = t.static;
+ }),
+ Mt(() => {
+ i.optionsPropsRef.value.hold = t.hold;
+ });
+ let s = ms(),
+ l = $(() =>
+ s !== null
+ ? (s.value & gt.Open) === gt.Open
+ : i.comboboxState.value === 0
+ );
+ return (
+ Od({
+ container: $(() => fe(i.optionsRef)),
+ enabled: $(() => i.comboboxState.value === 0),
+ accept(a) {
+ return a.getAttribute("role") === "option"
+ ? NodeFilter.FILTER_REJECT
+ : a.hasAttribute("role")
+ ? NodeFilter.FILTER_SKIP
+ : NodeFilter.FILTER_ACCEPT;
+ },
+ walk(a) {
+ a.setAttribute("role", "none");
+ },
+ }),
+ () => {
+ var a, u, c;
+ let f = { open: i.comboboxState.value === 0 },
+ h = {
+ "aria-labelledby":
+ (c =
+ (a = fe(i.labelRef)) == null
+ ? void 0
+ : a.id) != null
+ ? c
+ : (u = fe(i.buttonRef)) == null
+ ? void 0
+ : u.id,
+ id: o,
+ ref: i.optionsRef,
+ role: "listbox",
+ "aria-multiselectable":
+ i.mode.value === 1 ? !0 : void 0,
+ },
+ p = so(t, ["hold"]);
+ return tt({
+ ourProps: h,
+ theirProps: p,
+ slot: f,
+ attrs: e,
+ slots: n,
+ features: Gn.RenderStrategy | Gn.Static,
+ visible: l.value,
+ name: "ComboboxOptions",
+ });
+ }
+ );
+ },
+ }),
+ jw = xe({
+ name: "ComboboxOption",
+ props: {
+ as: { type: [Object, String], default: "li" },
+ value: { type: [Object, String, Number, Boolean] },
+ disabled: { type: Boolean, default: !1 },
+ },
+ setup(t, { slots: e, attrs: n, expose: r }) {
+ let i = ao("ComboboxOption"),
+ o = `headlessui-combobox-option-${At()}`,
+ s = oe(null);
+ r({ el: s, $el: s });
+ let l = $(() =>
+ i.activeOptionIndex.value !== null
+ ? i.options.value[i.activeOptionIndex.value].id === o
+ : !1
+ ),
+ a = $(() =>
+ vt(i.mode.value, {
+ [0]: () => i.compare(de(i.value.value), de(t.value)),
+ [1]: () =>
+ de(i.value.value).some((b) =>
+ i.compare(de(b), de(t.value))
+ ),
+ })
+ ),
+ u = $(() => ({
+ disabled: t.disabled,
+ value: t.value,
+ domRef: s,
+ }));
+ Ye(() => i.registerOption(o, u)),
+ Bt(() => i.unregisterOption(o)),
+ Mt(() => {
+ i.comboboxState.value === 0 &&
+ l.value &&
+ i.activationTrigger.value !== 0 &&
+ Ct(() => {
+ var b, x;
+ return (x =
+ (b = fe(s)) == null
+ ? void 0
+ : b.scrollIntoView) == null
+ ? void 0
+ : x.call(b, { block: "nearest" });
+ });
+ });
+ function c(b) {
+ if (t.disabled) return b.preventDefault();
+ i.selectOption(o),
+ i.mode.value === 0 && i.closeCombobox(),
+ _w() ||
+ requestAnimationFrame(() => {
+ var x;
+ return (x = fe(i.inputRef)) == null
+ ? void 0
+ : x.focus();
+ });
+ }
+ function f() {
+ if (t.disabled) return i.goToOption(Ze.Nothing);
+ i.goToOption(Ze.Specific, o);
+ }
+ let h = r1();
+ function p(b) {
+ h.update(b);
+ }
+ function g(b) {
+ h.wasMoved(b) &&
+ (t.disabled || l.value || i.goToOption(Ze.Specific, o, 0));
+ }
+ function v(b) {
+ h.wasMoved(b) &&
+ (t.disabled ||
+ (l.value &&
+ (i.optionsPropsRef.value.hold ||
+ i.goToOption(Ze.Nothing))));
+ }
+ return () => {
+ let { disabled: b } = t,
+ x = { active: l.value, selected: a.value, disabled: b },
+ S = {
+ id: o,
+ ref: s,
+ role: "option",
+ tabIndex: b === !0 ? void 0 : -1,
+ "aria-disabled": b === !0 ? !0 : void 0,
+ "aria-selected": a.value,
+ disabled: void 0,
+ onClick: c,
+ onFocus: f,
+ onPointerenter: p,
+ onMouseenter: p,
+ onPointermove: g,
+ onMousemove: g,
+ onPointerleave: v,
+ onMouseleave: v,
+ };
+ return tt({
+ ourProps: S,
+ theirProps: t,
+ slot: x,
+ attrs: n,
+ slots: e,
+ name: "ComboboxOption",
+ });
+ };
+ },
+ });
+var _o = ((t) => (
+ (t[(t.Forwards = 0)] = "Forwards"), (t[(t.Backwards = 1)] = "Backwards"), t
+))(_o || {});
+function Lw() {
+ let t = oe(0);
+ return (
+ Zg("keydown", (e) => {
+ e.key === "Tab" && (t.value = e.shiftKey ? 1 : 0);
+ }),
+ t
+ );
+}
+function s1(t, e, n, r) {
+ gs.isServer ||
+ Mt((i) => {
+ (t = t != null ? t : window),
+ t.addEventListener(e, n, r),
+ i(() => t.removeEventListener(e, n, r));
+ });
+}
+function Dw(t) {
+ function e() {
+ document.readyState !== "loading" &&
+ (t(), document.removeEventListener("DOMContentLoaded", e));
+ }
+ typeof window != "undefined" &&
+ typeof document != "undefined" &&
+ (document.addEventListener("DOMContentLoaded", e), e());
+}
+function l1(t) {
+ if (!t) return new Set();
+ if (typeof t == "function") return new Set(t());
+ let e = new Set();
+ for (let n of t.value) {
+ let r = fe(n);
+ r instanceof HTMLElement && e.add(r);
+ }
+ return e;
+}
+var a1 = ((t) => (
+ (t[(t.None = 1)] = "None"),
+ (t[(t.InitialFocus = 2)] = "InitialFocus"),
+ (t[(t.TabLock = 4)] = "TabLock"),
+ (t[(t.FocusLock = 8)] = "FocusLock"),
+ (t[(t.RestoreFocus = 16)] = "RestoreFocus"),
+ (t[(t.All = 30)] = "All"),
+ t
+))(a1 || {});
+let bo = Object.assign(
+ xe({
+ name: "FocusTrap",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ initialFocus: { type: Object, default: null },
+ features: { type: Number, default: 30 },
+ containers: {
+ type: [Object, Function],
+ default: oe(new Set()),
+ },
+ },
+ inheritAttrs: !1,
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = oe(null);
+ r({ el: i, $el: i });
+ let o = $(() => vn(i)),
+ s = oe(!1);
+ Ye(() => (s.value = !0)),
+ Bt(() => (s.value = !1)),
+ Bw(
+ { ownerDocument: o },
+ $(() => s.value && Boolean(t.features & 16))
+ );
+ let l = $w(
+ {
+ ownerDocument: o,
+ container: i,
+ initialFocus: $(() => t.initialFocus),
+ },
+ $(() => s.value && Boolean(t.features & 2))
+ );
+ zw(
+ {
+ ownerDocument: o,
+ container: i,
+ containers: t.containers,
+ previousActiveElement: l,
+ },
+ $(() => s.value && Boolean(t.features & 8))
+ );
+ let a = Lw();
+ function u(p) {
+ let g = fe(i);
+ !g ||
+ ((v) => v())(() => {
+ vt(a.value, {
+ [_o.Forwards]: () => {
+ li(g, Qt.First, {
+ skipElements: [p.relatedTarget],
+ });
+ },
+ [_o.Backwards]: () => {
+ li(g, Qt.Last, {
+ skipElements: [p.relatedTarget],
+ });
+ },
+ });
+ });
+ }
+ let c = oe(!1);
+ function f(p) {
+ p.key === "Tab" &&
+ ((c.value = !0),
+ requestAnimationFrame(() => {
+ c.value = !1;
+ }));
+ }
+ function h(p) {
+ if (!s.value) return;
+ let g = l1(t.containers);
+ fe(i) instanceof HTMLElement && g.add(fe(i));
+ let v = p.relatedTarget;
+ v instanceof HTMLElement &&
+ v.dataset.headlessuiFocusGuard !== "true" &&
+ (u1(g, v) ||
+ (c.value
+ ? li(
+ fe(i),
+ vt(a.value, {
+ [_o.Forwards]: () => Qt.Next,
+ [_o.Backwards]: () => Qt.Previous,
+ }) | Qt.WrapAround,
+ { relativeTo: p.target }
+ )
+ : p.target instanceof HTMLElement &&
+ Rr(p.target)));
+ }
+ return () => {
+ let p = {},
+ g = { ref: i, onKeydown: f, onFocusout: h },
+ T = t,
+ { features: v, initialFocus: b, containers: x } = T,
+ S = Qe(T, ["features", "initialFocus", "containers"]);
+ return ze(He, [
+ Boolean(v & 4) &&
+ ze(Gi, {
+ as: "button",
+ type: "button",
+ "data-headlessui-focus-guard": !0,
+ onFocus: u,
+ features: gi.Focusable,
+ }),
+ tt({
+ ourProps: g,
+ theirProps: W(W({}, e), S),
+ slot: p,
+ attrs: e,
+ slots: n,
+ name: "FocusTrap",
+ }),
+ Boolean(v & 4) &&
+ ze(Gi, {
+ as: "button",
+ type: "button",
+ "data-headlessui-focus-guard": !0,
+ onFocus: u,
+ features: gi.Focusable,
+ }),
+ ]);
+ };
+ },
+ }),
+ { features: a1 }
+ ),
+ Zr = [];
+Dw(() => {
+ function t(e) {
+ e.target instanceof HTMLElement &&
+ e.target !== document.body &&
+ Zr[0] !== e.target &&
+ (Zr.unshift(e.target),
+ (Zr = Zr.filter((n) => n != null && n.isConnected)),
+ Zr.splice(10));
+ }
+ window.addEventListener("click", t, { capture: !0 }),
+ window.addEventListener("mousedown", t, { capture: !0 }),
+ window.addEventListener("focus", t, { capture: !0 }),
+ document.body.addEventListener("click", t, { capture: !0 }),
+ document.body.addEventListener("mousedown", t, { capture: !0 }),
+ document.body.addEventListener("focus", t, { capture: !0 });
+});
+function Iw(t) {
+ let e = oe(Zr.slice());
+ return (
+ Rt(
+ [t],
+ ([n], [r]) => {
+ r === !0 && n === !1
+ ? Dd(() => {
+ e.value.splice(0);
+ })
+ : r === !1 && n === !0 && (e.value = Zr.slice());
+ },
+ { flush: "post" }
+ ),
+ () => {
+ var n;
+ return (n = e.value.find((r) => r != null && r.isConnected)) != null
+ ? n
+ : null;
+ }
+ );
+}
+function Bw({ ownerDocument: t }, e) {
+ let n = Iw(e);
+ Ye(() => {
+ Mt(
+ () => {
+ var r, i;
+ e.value ||
+ (((r = t.value) == null ? void 0 : r.activeElement) ===
+ ((i = t.value) == null ? void 0 : i.body) &&
+ Rr(n()));
+ },
+ { flush: "post" }
+ );
+ }),
+ Bt(() => {
+ e.value && Rr(n());
+ });
+}
+function $w({ ownerDocument: t, container: e, initialFocus: n }, r) {
+ let i = oe(null),
+ o = oe(!1);
+ return (
+ Ye(() => (o.value = !0)),
+ Bt(() => (o.value = !1)),
+ Ye(() => {
+ Rt(
+ [e, n, r],
+ (s, l) => {
+ if (
+ s.every((u, c) => (l == null ? void 0 : l[c]) === u) ||
+ !r.value
+ )
+ return;
+ let a = fe(e);
+ a &&
+ Dd(() => {
+ var u, c;
+ if (!o.value) return;
+ let f = fe(n),
+ h =
+ (u = t.value) == null
+ ? void 0
+ : u.activeElement;
+ if (f) {
+ if (f === h) {
+ i.value = h;
+ return;
+ }
+ } else if (a.contains(h)) {
+ i.value = h;
+ return;
+ }
+ f
+ ? Rr(f)
+ : li(a, Qt.First | Qt.NoScroll) === Sl.Error &&
+ console.warn(
+ "There are no focusable elements inside the "
+ ),
+ (i.value =
+ (c = t.value) == null
+ ? void 0
+ : c.activeElement);
+ });
+ },
+ { immediate: !0, flush: "post" }
+ );
+ }),
+ i
+ );
+}
+function zw(
+ { ownerDocument: t, container: e, containers: n, previousActiveElement: r },
+ i
+) {
+ var o;
+ s1(
+ (o = t.value) == null ? void 0 : o.defaultView,
+ "focus",
+ (s) => {
+ if (!i.value) return;
+ let l = l1(n);
+ fe(e) instanceof HTMLElement && l.add(fe(e));
+ let a = r.value;
+ if (!a) return;
+ let u = s.target;
+ u && u instanceof HTMLElement
+ ? u1(l, u)
+ ? ((r.value = u), Rr(u))
+ : (s.preventDefault(), s.stopPropagation(), Rr(a))
+ : Rr(r.value);
+ },
+ !0
+ );
+}
+function u1(t, e) {
+ for (let n of t) if (n.contains(e)) return !0;
+ return !1;
+}
+let mu = new Map(),
+ wo = new Map();
+function qh(t, e = oe(!0)) {
+ Mt((n) => {
+ var r;
+ if (!e.value) return;
+ let i = fe(t);
+ if (!i) return;
+ n(function () {
+ var s;
+ if (!i) return;
+ let l = (s = wo.get(i)) != null ? s : 1;
+ if ((l === 1 ? wo.delete(i) : wo.set(i, l - 1), l !== 1)) return;
+ let a = mu.get(i);
+ a &&
+ (a["aria-hidden"] === null
+ ? i.removeAttribute("aria-hidden")
+ : i.setAttribute("aria-hidden", a["aria-hidden"]),
+ (i.inert = a.inert),
+ mu.delete(i));
+ });
+ let o = (r = wo.get(i)) != null ? r : 0;
+ wo.set(i, o + 1),
+ o === 0 &&
+ (mu.set(i, {
+ "aria-hidden": i.getAttribute("aria-hidden"),
+ inert: i.inert,
+ }),
+ i.setAttribute("aria-hidden", "true"),
+ (i.inert = !0));
+ });
+}
+let c1 = Symbol("ForcePortalRootContext");
+function Hw() {
+ return qe(c1, !1);
+}
+let gc = xe({
+ name: "ForcePortalRoot",
+ props: {
+ as: { type: [Object, String], default: "template" },
+ force: { type: Boolean, default: !1 },
+ },
+ setup(t, { slots: e, attrs: n }) {
+ return (
+ kt(c1, t.force),
+ () => {
+ let o = t,
+ { force: r } = o,
+ i = Qe(o, ["force"]);
+ return tt({
+ theirProps: i,
+ ourProps: {},
+ slot: {},
+ slots: e,
+ attrs: n,
+ name: "ForcePortalRoot",
+ });
+ }
+ );
+ },
+});
+function Fw(t) {
+ let e = vn(t);
+ if (!e) {
+ if (t === null) return null;
+ throw new Error(
+ `[Headless UI]: Cannot find ownerDocument for contextElement: ${t}`
+ );
+ }
+ let n = e.getElementById("headlessui-portal-root");
+ if (n) return n;
+ let r = e.createElement("div");
+ return (
+ r.setAttribute("id", "headlessui-portal-root"), e.body.appendChild(r)
+ );
+}
+let d1 = xe({
+ name: "Portal",
+ props: { as: { type: [Object, String], default: "div" } },
+ setup(t, { slots: e, attrs: n }) {
+ let r = oe(null),
+ i = $(() => vn(r)),
+ o = Hw(),
+ s = qe(f1, null),
+ l = oe(o === !0 || s == null ? Fw(r.value) : s.resolveTarget());
+ Mt(() => {
+ o || (s != null && (l.value = s.resolveTarget()));
+ });
+ let a = qe(yc, null);
+ return (
+ Ye(() => {
+ let u = fe(r);
+ u && a && Bt(a.register(u));
+ }),
+ Bt(() => {
+ var u, c;
+ let f =
+ (u = i.value) == null
+ ? void 0
+ : u.getElementById("headlessui-portal-root");
+ f &&
+ l.value === f &&
+ l.value.children.length <= 0 &&
+ ((c = l.value.parentElement) == null ||
+ c.removeChild(l.value));
+ }),
+ () => {
+ if (l.value === null) return null;
+ let u = { ref: r, "data-headlessui-portal": "" };
+ return ze(
+ xd,
+ { to: l.value },
+ tt({
+ ourProps: u,
+ theirProps: t,
+ slot: {},
+ attrs: n,
+ slots: e,
+ name: "Portal",
+ })
+ );
+ }
+ );
+ },
+ }),
+ yc = Symbol("PortalParentContext");
+function Vw() {
+ let t = qe(yc, null),
+ e = oe([]);
+ function n(o) {
+ return e.value.push(o), t && t.register(o), () => r(o);
+ }
+ function r(o) {
+ let s = e.value.indexOf(o);
+ s !== -1 && e.value.splice(s, 1), t && t.unregister(o);
+ }
+ let i = { register: n, unregister: r, portals: e };
+ return [
+ e,
+ xe({
+ name: "PortalWrapper",
+ setup(o, { slots: s }) {
+ return (
+ kt(yc, i),
+ () => {
+ var l;
+ return (l = s.default) == null ? void 0 : l.call(s);
+ }
+ );
+ },
+ }),
+ ];
+}
+let f1 = Symbol("PortalGroupContext"),
+ Ww = xe({
+ name: "PortalGroup",
+ props: {
+ as: { type: [Object, String], default: "template" },
+ target: { type: Object, default: null },
+ },
+ setup(t, { attrs: e, slots: n }) {
+ let r = Sn({
+ resolveTarget() {
+ return t.target;
+ },
+ });
+ return (
+ kt(f1, r),
+ () => {
+ let s = t,
+ { target: i } = s,
+ o = Qe(s, ["target"]);
+ return tt({
+ theirProps: o,
+ ourProps: {},
+ slot: {},
+ attrs: e,
+ slots: n,
+ name: "PortalGroup",
+ });
+ }
+ );
+ },
+ }),
+ h1 = Symbol("StackContext");
+var vc = ((t) => ((t[(t.Add = 0)] = "Add"), (t[(t.Remove = 1)] = "Remove"), t))(
+ vc || {}
+);
+function Uw() {
+ return qe(h1, () => {});
+}
+function Kw({ type: t, enabled: e, element: n, onUpdate: r }) {
+ let i = Uw();
+ function o(...s) {
+ r == null || r(...s), i(...s);
+ }
+ Ye(() => {
+ Rt(
+ e,
+ (s, l) => {
+ s ? o(0, t, n) : l === !0 && o(1, t, n);
+ },
+ { immediate: !0, flush: "sync" }
+ );
+ }),
+ Bt(() => {
+ e.value && o(1, t, n);
+ }),
+ kt(h1, o);
+}
+let p1 = Symbol("DescriptionContext");
+function qw() {
+ let t = qe(p1, null);
+ if (t === null) throw new Error("Missing parent");
+ return t;
+}
+function ja({ slot: t = oe({}), name: e = "Description", props: n = {} } = {}) {
+ let r = oe([]);
+ function i(o) {
+ return (
+ r.value.push(o),
+ () => {
+ let s = r.value.indexOf(o);
+ s !== -1 && r.value.splice(s, 1);
+ }
+ );
+ }
+ return (
+ kt(p1, { register: i, slot: t, name: e, props: n }),
+ $(() => (r.value.length > 0 ? r.value.join(" ") : void 0))
+ );
+}
+let Jw = xe({
+ name: "Description",
+ props: {
+ as: { type: [Object, String], default: "p" },
+ id: { type: String, default: () => `headlessui-description-${At()}` },
+ },
+ setup(t, { attrs: e, slots: n }) {
+ let r = qw();
+ return (
+ Ye(() => Bt(r.register(t.id))),
+ () => {
+ let {
+ name: i = "Description",
+ slot: o = oe({}),
+ props: s = {},
+ } = r,
+ c = t,
+ { id: l } = c,
+ a = Qe(c, ["id"]),
+ u = be(
+ W(
+ {},
+ Object.entries(s).reduce(
+ (f, [h, p]) => Object.assign(f, { [h]: ne(p) }),
+ {}
+ )
+ ),
+ { id: l }
+ );
+ return tt({
+ ourProps: u,
+ theirProps: a,
+ slot: o.value,
+ attrs: e,
+ slots: n,
+ name: i,
+ });
+ }
+ );
+ },
+});
+function Gw(t) {
+ let e = rg(t.getSnapshot());
+ return (
+ Bt(
+ t.subscribe(() => {
+ e.value = t.getSnapshot();
+ })
+ ),
+ e
+ );
+}
+function Yw(t, e) {
+ let n = t(),
+ r = new Set();
+ return {
+ getSnapshot() {
+ return n;
+ },
+ subscribe(i) {
+ return r.add(i), () => r.delete(i);
+ },
+ dispatch(i, ...o) {
+ let s = e[i].call(n, ...o);
+ s && ((n = s), r.forEach((l) => l()));
+ },
+ };
+}
+function Qw() {
+ let t;
+ return {
+ before({ doc: e }) {
+ var n;
+ let r = e.documentElement;
+ t =
+ ((n = e.defaultView) != null ? n : window).innerWidth -
+ r.clientWidth;
+ },
+ after({ doc: e, d: n }) {
+ let r = e.documentElement,
+ i = r.clientWidth - r.offsetWidth,
+ o = t - i;
+ n.style(r, "paddingRight", `${o}px`);
+ },
+ };
+}
+function Xw() {
+ if (!i1()) return {};
+ let t;
+ return {
+ before() {
+ t = window.pageYOffset;
+ },
+ after({ doc: e, d: n, meta: r }) {
+ function i(s) {
+ return r.containers
+ .flatMap((l) => l())
+ .some((l) => l.contains(s));
+ }
+ if (
+ window.getComputedStyle(e.documentElement).scrollBehavior !==
+ "auto"
+ ) {
+ let s = lo();
+ s.style(e.documentElement, "scroll-behavior", "auto"),
+ n.add(() => n.microTask(() => s.dispose()));
+ }
+ n.style(e.body, "marginTop", `-${t}px`), window.scrollTo(0, 0);
+ let o = null;
+ n.addEventListener(
+ e,
+ "click",
+ (s) => {
+ if (s.target instanceof HTMLElement)
+ try {
+ let l = s.target.closest("a");
+ if (!l) return;
+ let { hash: a } = new URL(l.href),
+ u = e.querySelector(a);
+ u && !i(u) && (o = u);
+ } catch (l) {}
+ },
+ !0
+ ),
+ n.addEventListener(
+ e,
+ "touchmove",
+ (s) => {
+ s.target instanceof HTMLElement &&
+ !i(s.target) &&
+ s.preventDefault();
+ },
+ { passive: !1 }
+ ),
+ n.add(() => {
+ window.scrollTo(0, window.pageYOffset + t),
+ o &&
+ o.isConnected &&
+ (o.scrollIntoView({ block: "nearest" }),
+ (o = null));
+ });
+ },
+ };
+}
+function Zw() {
+ return {
+ before({ doc: t, d: e }) {
+ e.style(t.documentElement, "overflow", "hidden");
+ },
+ };
+}
+function ex(t) {
+ let e = {};
+ for (let n of t) Object.assign(e, n(e));
+ return e;
+}
+let ni = Yw(() => new Map(), {
+ PUSH(t, e) {
+ var n;
+ let r =
+ (n = this.get(t)) != null
+ ? n
+ : { doc: t, count: 0, d: lo(), meta: new Set() };
+ return r.count++, r.meta.add(e), this.set(t, r), this;
+ },
+ POP(t, e) {
+ let n = this.get(t);
+ return n && (n.count--, n.meta.delete(e)), this;
+ },
+ SCROLL_PREVENT({ doc: t, d: e, meta: n }) {
+ let r = { doc: t, d: e, meta: ex(n) },
+ i = [Xw(), Qw(), Zw()];
+ i.forEach(({ before: o }) => (o == null ? void 0 : o(r))),
+ i.forEach(({ after: o }) => (o == null ? void 0 : o(r)));
+ },
+ SCROLL_ALLOW({ d: t }) {
+ t.dispose();
+ },
+ TEARDOWN({ doc: t }) {
+ this.delete(t);
+ },
+});
+ni.subscribe(() => {
+ let t = ni.getSnapshot(),
+ e = new Map();
+ for (let [n] of t) e.set(n, n.documentElement.style.overflow);
+ for (let n of t.values()) {
+ let r = e.get(n.doc) === "hidden",
+ i = n.count !== 0;
+ ((i && !r) || (!i && r)) &&
+ ni.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n),
+ n.count === 0 && ni.dispatch("TEARDOWN", n);
+ }
+});
+function tx(t, e, n) {
+ let r = Gw(ni),
+ i = $(() => {
+ let o = t.value ? r.value.get(t.value) : void 0;
+ return o ? o.count > 0 : !1;
+ });
+ return (
+ Rt(
+ [t, e],
+ ([o, s], [l], a) => {
+ if (!o || !s) return;
+ ni.dispatch("PUSH", o, n);
+ let u = !1;
+ a(() => {
+ u || (ni.dispatch("POP", l != null ? l : o, n), (u = !0));
+ });
+ },
+ { immediate: !0 }
+ ),
+ i
+ );
+}
+function nx({
+ defaultContainers: t = [],
+ portals: e,
+ mainTreeNodeRef: n,
+} = {}) {
+ let r = oe(null),
+ i = vn(r);
+ function o() {
+ var s;
+ let l = [];
+ for (let a of t)
+ a !== null &&
+ (a instanceof HTMLElement
+ ? l.push(a)
+ : "value" in a &&
+ a.value instanceof HTMLElement &&
+ l.push(a.value));
+ if (e != null && e.value) for (let a of e.value) l.push(a);
+ for (let a of (s =
+ i == null ? void 0 : i.querySelectorAll("html > *, body > *")) !=
+ null
+ ? s
+ : [])
+ a !== document.body &&
+ a !== document.head &&
+ a instanceof HTMLElement &&
+ a.id !== "headlessui-portal-root" &&
+ (a.contains(fe(r)) ||
+ l.some((u) => a.contains(u)) ||
+ l.push(a));
+ return l;
+ }
+ return {
+ resolveContainers: o,
+ contains(s) {
+ return o().some((l) => l.contains(s));
+ },
+ mainTreeNodeRef: r,
+ MainTreeNode() {
+ return n != null ? null : ze(Gi, { features: gi.Hidden, ref: r });
+ },
+ };
+}
+var rx = ((t) => (
+ (t[(t.Open = 0)] = "Open"), (t[(t.Closed = 1)] = "Closed"), t
+))(rx || {});
+let bc = Symbol("DialogContext");
+function ys(t) {
+ let e = qe(bc, null);
+ if (e === null) {
+ let n = new Error(`<${t} /> is missing a parent component.`);
+ throw (Error.captureStackTrace && Error.captureStackTrace(n, ys), n);
+ }
+ return e;
+}
+let Bs = "DC8F892D-2EBD-447C-A4C8-A03058436FF4",
+ ix = xe({
+ name: "Dialog",
+ inheritAttrs: !1,
+ props: {
+ as: { type: [Object, String], default: "div" },
+ static: { type: Boolean, default: !1 },
+ unmount: { type: Boolean, default: !0 },
+ open: { type: [Boolean, String], default: Bs },
+ initialFocus: { type: Object, default: null },
+ id: { type: String, default: () => `headlessui-dialog-${At()}` },
+ },
+ emits: { close: (t) => !0 },
+ setup(t, { emit: e, attrs: n, slots: r, expose: i }) {
+ var o;
+ let s = oe(!1);
+ Ye(() => {
+ s.value = !0;
+ });
+ let l = oe(0),
+ a = ms(),
+ u = $(() =>
+ t.open === Bs && a !== null
+ ? (a.value & gt.Open) === gt.Open
+ : t.open
+ ),
+ c = oe(null),
+ f = $(() => vn(c));
+ if ((i({ el: c, $el: c }), !(t.open !== Bs || a !== null)))
+ throw new Error(
+ "You forgot to provide an `open` prop to the `Dialog`."
+ );
+ if (typeof u.value != "boolean")
+ throw new Error(
+ `You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${
+ u.value === Bs ? void 0 : t.open
+ }`
+ );
+ let h = $(() => (s.value && u.value ? 0 : 1)),
+ p = $(() => h.value === 0),
+ g = $(() => l.value > 1),
+ v = qe(bc, null) !== null,
+ [b, x] = Vw(),
+ {
+ resolveContainers: S,
+ mainTreeNodeRef: T,
+ MainTreeNode: d,
+ } = nx({
+ portals: b,
+ defaultContainers: [
+ $(() => {
+ var N;
+ return (N = P.panelRef.value) != null ? N : c.value;
+ }),
+ ],
+ }),
+ y = $(() => (g.value ? "parent" : "leaf")),
+ m = $(() =>
+ a !== null ? (a.value & gt.Closing) === gt.Closing : !1
+ ),
+ w = $(() => (v || m.value ? !1 : p.value)),
+ k = $(() => {
+ var N, D, K;
+ return (K = Array.from(
+ (D =
+ (N = f.value) == null
+ ? void 0
+ : N.querySelectorAll("body > *")) != null
+ ? D
+ : []
+ ).find((ae) =>
+ ae.id === "headlessui-portal-root"
+ ? !1
+ : ae.contains(fe(T)) && ae instanceof HTMLElement
+ )) != null
+ ? K
+ : null;
+ });
+ qh(k, w);
+ let _ = $(() => (g.value ? !0 : p.value)),
+ C = $(() => {
+ var N, D, K;
+ return (K = Array.from(
+ (D =
+ (N = f.value) == null
+ ? void 0
+ : N.querySelectorAll(
+ "[data-headlessui-portal]"
+ )) != null
+ ? D
+ : []
+ ).find(
+ (ae) => ae.contains(fe(T)) && ae instanceof HTMLElement
+ )) != null
+ ? K
+ : null;
+ });
+ qh(C, _),
+ Kw({
+ type: "Dialog",
+ enabled: $(() => h.value === 0),
+ element: c,
+ onUpdate: (N, D) => {
+ if (D === "Dialog")
+ return vt(N, {
+ [vc.Add]: () => (l.value += 1),
+ [vc.Remove]: () => (l.value -= 1),
+ });
+ },
+ });
+ let E = ja({
+ name: "DialogDescription",
+ slot: $(() => ({ open: u.value })),
+ }),
+ R = oe(null),
+ P = {
+ titleId: R,
+ panelRef: oe(null),
+ dialogState: h,
+ setTitleId(N) {
+ R.value !== N && (R.value = N);
+ },
+ close() {
+ e("close", !1);
+ },
+ };
+ kt(bc, P);
+ let L = $(() => !(!p.value || g.value));
+ Nd(
+ S,
+ (N, D) => {
+ P.close(), Ct(() => (D == null ? void 0 : D.focus()));
+ },
+ L
+ );
+ let I = $(() => !(g.value || h.value !== 0));
+ s1(
+ (o = f.value) == null ? void 0 : o.defaultView,
+ "keydown",
+ (N) => {
+ I.value &&
+ (N.defaultPrevented ||
+ (N.key === Ie.Escape &&
+ (N.preventDefault(),
+ N.stopPropagation(),
+ P.close())));
+ }
+ );
+ let M = $(() => !(m.value || h.value !== 0 || v));
+ return (
+ tx(f, M, (N) => {
+ var D;
+ return {
+ containers: [
+ ...((D = N.containers) != null ? D : []),
+ S,
+ ],
+ };
+ }),
+ Mt((N) => {
+ if (h.value !== 0) return;
+ let D = fe(c);
+ if (!D) return;
+ let K = new ResizeObserver((ae) => {
+ for (let Q of ae) {
+ let me = Q.target.getBoundingClientRect();
+ me.x === 0 &&
+ me.y === 0 &&
+ me.width === 0 &&
+ me.height === 0 &&
+ P.close();
+ }
+ });
+ K.observe(D), N(() => K.disconnect());
+ }),
+ () => {
+ let je = t,
+ { id: N, open: D, initialFocus: K } = je,
+ ae = Qe(je, ["id", "open", "initialFocus"]),
+ Q = be(W({}, n), {
+ ref: c,
+ id: N,
+ role: "dialog",
+ "aria-modal": h.value === 0 ? !0 : void 0,
+ "aria-labelledby": R.value,
+ "aria-describedby": E.value,
+ }),
+ me = { open: h.value === 0 };
+ return ze(gc, { force: !0 }, () => [
+ ze(d1, () =>
+ ze(Ww, { target: c.value }, () =>
+ ze(gc, { force: !1 }, () =>
+ ze(
+ bo,
+ {
+ initialFocus: K,
+ containers: S,
+ features: p.value
+ ? vt(y.value, {
+ parent: bo.features
+ .RestoreFocus,
+ leaf:
+ bo.features.All &
+ ~bo.features
+ .FocusLock,
+ })
+ : bo.features.None,
+ },
+ () =>
+ ze(x, {}, () =>
+ tt({
+ ourProps: Q,
+ theirProps: W(W({}, ae), n),
+ slot: me,
+ attrs: n,
+ slots: r,
+ visible: h.value === 0,
+ features:
+ Gn.RenderStrategy |
+ Gn.Static,
+ name: "Dialog",
+ })
+ )
+ )
+ )
+ )
+ ),
+ ze(d),
+ ]);
+ }
+ );
+ },
+ });
+xe({
+ name: "DialogOverlay",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ id: {
+ type: String,
+ default: () => `headlessui-dialog-overlay-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n }) {
+ let r = ys("DialogOverlay");
+ function i(o) {
+ o.target === o.currentTarget &&
+ (o.preventDefault(), o.stopPropagation(), r.close());
+ }
+ return () => {
+ let l = t,
+ { id: o } = l,
+ s = Qe(l, ["id"]);
+ return tt({
+ ourProps: { id: o, "aria-hidden": !0, onClick: i },
+ theirProps: s,
+ slot: { open: r.dialogState.value === 0 },
+ attrs: e,
+ slots: n,
+ name: "DialogOverlay",
+ });
+ };
+ },
+});
+xe({
+ name: "DialogBackdrop",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ id: {
+ type: String,
+ default: () => `headlessui-dialog-backdrop-${At()}`,
+ },
+ },
+ inheritAttrs: !1,
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = ys("DialogBackdrop"),
+ o = oe(null);
+ return (
+ r({ el: o, $el: o }),
+ Ye(() => {
+ if (i.panelRef.value === null)
+ throw new Error(
+ "A component is being used, but a component is missing."
+ );
+ }),
+ () => {
+ let u = t,
+ { id: s } = u,
+ l = Qe(u, ["id"]),
+ a = { id: s, ref: o, "aria-hidden": !0 };
+ return ze(gc, { force: !0 }, () =>
+ ze(d1, () =>
+ tt({
+ ourProps: a,
+ theirProps: W(W({}, e), l),
+ slot: { open: i.dialogState.value === 0 },
+ attrs: e,
+ slots: n,
+ name: "DialogBackdrop",
+ })
+ )
+ );
+ }
+ );
+ },
+});
+let ox = xe({
+ name: "DialogPanel",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ id: {
+ type: String,
+ default: () => `headlessui-dialog-panel-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = ys("DialogPanel");
+ r({ el: i.panelRef, $el: i.panelRef });
+ function o(s) {
+ s.stopPropagation();
+ }
+ return () => {
+ let u = t,
+ { id: s } = u,
+ l = Qe(u, ["id"]),
+ a = { id: s, ref: i.panelRef, onClick: o };
+ return tt({
+ ourProps: a,
+ theirProps: l,
+ slot: { open: i.dialogState.value === 0 },
+ attrs: e,
+ slots: n,
+ name: "DialogPanel",
+ });
+ };
+ },
+ }),
+ sx = xe({
+ name: "DialogTitle",
+ props: {
+ as: { type: [Object, String], default: "h2" },
+ id: {
+ type: String,
+ default: () => `headlessui-dialog-title-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n }) {
+ let r = ys("DialogTitle");
+ return (
+ Ye(() => {
+ r.setTitleId(t.id), Bt(() => r.setTitleId(null));
+ }),
+ () => {
+ let s = t,
+ { id: i } = s,
+ o = Qe(s, ["id"]);
+ return tt({
+ ourProps: { id: i },
+ theirProps: o,
+ slot: { open: r.dialogState.value === 0 },
+ attrs: e,
+ slots: n,
+ name: "DialogTitle",
+ });
+ }
+ );
+ },
+ }),
+ Jh =
+ /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
+function Gh(t) {
+ var e, n;
+ let r = (e = t.innerText) != null ? e : "",
+ i = t.cloneNode(!0);
+ if (!(i instanceof HTMLElement)) return r;
+ let o = !1;
+ for (let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
+ l.remove(), (o = !0);
+ let s = o ? ((n = i.innerText) != null ? n : "") : r;
+ return Jh.test(s) && (s = s.replace(Jh, "")), s;
+}
+function lx(t) {
+ let e = t.getAttribute("aria-label");
+ if (typeof e == "string") return e.trim();
+ let n = t.getAttribute("aria-labelledby");
+ if (n) {
+ let r = n
+ .split(" ")
+ .map((i) => {
+ let o = document.getElementById(i);
+ if (o) {
+ let s = o.getAttribute("aria-label");
+ return typeof s == "string" ? s.trim() : Gh(o).trim();
+ }
+ return null;
+ })
+ .filter(Boolean);
+ if (r.length > 0) return r.join(", ");
+ }
+ return Gh(t).trim();
+}
+function ax(t) {
+ let e = oe(""),
+ n = oe("");
+ return () => {
+ let r = fe(t);
+ if (!r) return "";
+ let i = r.innerText;
+ if (e.value === i) return n.value;
+ let o = lx(r).trim().toLowerCase();
+ return (e.value = i), (n.value = o), o;
+ };
+}
+var ux = ((t) => (
+ (t[(t.Open = 0)] = "Open"), (t[(t.Closed = 1)] = "Closed"), t
+ ))(ux || {}),
+ cx = ((t) => (
+ (t[(t.Pointer = 0)] = "Pointer"), (t[(t.Other = 1)] = "Other"), t
+ ))(cx || {});
+function dx(t) {
+ requestAnimationFrame(() => requestAnimationFrame(t));
+}
+let m1 = Symbol("MenuContext");
+function La(t) {
+ let e = qe(m1, null);
+ if (e === null) {
+ let n = new Error(`<${t} /> is missing a parent component.`);
+ throw (Error.captureStackTrace && Error.captureStackTrace(n, La), n);
+ }
+ return e;
+}
+let fx = xe({
+ name: "Menu",
+ props: { as: { type: [Object, String], default: "template" } },
+ setup(t, { slots: e, attrs: n }) {
+ let r = oe(1),
+ i = oe(null),
+ o = oe(null),
+ s = oe([]),
+ l = oe(""),
+ a = oe(null),
+ u = oe(1);
+ function c(h = (p) => p) {
+ let p = a.value !== null ? s.value[a.value] : null,
+ g = Na(h(s.value.slice()), (b) => fe(b.dataRef.domRef)),
+ v = p ? g.indexOf(p) : null;
+ return v === -1 && (v = null), { items: g, activeItemIndex: v };
+ }
+ let f = {
+ menuState: r,
+ buttonRef: i,
+ itemsRef: o,
+ items: s,
+ searchQuery: l,
+ activeItemIndex: a,
+ activationTrigger: u,
+ closeMenu: () => {
+ (r.value = 1), (a.value = null);
+ },
+ openMenu: () => (r.value = 0),
+ goToItem(h, p, g) {
+ let v = c(),
+ b = Gg(
+ h === Ze.Specific
+ ? { focus: Ze.Specific, id: p }
+ : { focus: h },
+ {
+ resolveItems: () => v.items,
+ resolveActiveIndex: () => v.activeItemIndex,
+ resolveId: (x) => x.id,
+ resolveDisabled: (x) => x.dataRef.disabled,
+ }
+ );
+ (l.value = ""),
+ (a.value = b),
+ (u.value = g != null ? g : 1),
+ (s.value = v.items);
+ },
+ search(h) {
+ let p = l.value !== "" ? 0 : 1;
+ l.value += h.toLowerCase();
+ let g = (
+ a.value !== null
+ ? s.value
+ .slice(a.value + p)
+ .concat(s.value.slice(0, a.value + p))
+ : s.value
+ ).find(
+ (b) =>
+ b.dataRef.textValue.startsWith(l.value) &&
+ !b.dataRef.disabled
+ ),
+ v = g ? s.value.indexOf(g) : -1;
+ v === -1 || v === a.value || ((a.value = v), (u.value = 1));
+ },
+ clearSearch() {
+ l.value = "";
+ },
+ registerItem(h, p) {
+ let g = c((v) => [...v, { id: h, dataRef: p }]);
+ (s.value = g.items),
+ (a.value = g.activeItemIndex),
+ (u.value = 1);
+ },
+ unregisterItem(h) {
+ let p = c((g) => {
+ let v = g.findIndex((b) => b.id === h);
+ return v !== -1 && g.splice(v, 1), g;
+ });
+ (s.value = p.items),
+ (a.value = p.activeItemIndex),
+ (u.value = 1);
+ },
+ };
+ return (
+ Nd(
+ [i, o],
+ (h, p) => {
+ var g;
+ f.closeMenu(),
+ Pd(p, Rd.Loose) ||
+ (h.preventDefault(),
+ (g = fe(i)) == null || g.focus());
+ },
+ $(() => r.value === 0)
+ ),
+ kt(m1, f),
+ Ad($(() => vt(r.value, { [0]: gt.Open, [1]: gt.Closed }))),
+ () => {
+ let h = { open: r.value === 0, close: f.closeMenu };
+ return tt({
+ ourProps: {},
+ theirProps: t,
+ slot: h,
+ slots: e,
+ attrs: n,
+ name: "Menu",
+ });
+ }
+ );
+ },
+ }),
+ hx = xe({
+ name: "MenuButton",
+ props: {
+ disabled: { type: Boolean, default: !1 },
+ as: { type: [Object, String], default: "button" },
+ id: {
+ type: String,
+ default: () => `headlessui-menu-button-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = La("MenuButton");
+ r({ el: i.buttonRef, $el: i.buttonRef });
+ function o(u) {
+ switch (u.key) {
+ case Ie.Space:
+ case Ie.Enter:
+ case Ie.ArrowDown:
+ u.preventDefault(),
+ u.stopPropagation(),
+ i.openMenu(),
+ Ct(() => {
+ var c;
+ (c = fe(i.itemsRef)) == null ||
+ c.focus({ preventScroll: !0 }),
+ i.goToItem(Ze.First);
+ });
+ break;
+ case Ie.ArrowUp:
+ u.preventDefault(),
+ u.stopPropagation(),
+ i.openMenu(),
+ Ct(() => {
+ var c;
+ (c = fe(i.itemsRef)) == null ||
+ c.focus({ preventScroll: !0 }),
+ i.goToItem(Ze.Last);
+ });
+ break;
+ }
+ }
+ function s(u) {
+ switch (u.key) {
+ case Ie.Space:
+ u.preventDefault();
+ break;
+ }
+ }
+ function l(u) {
+ t.disabled ||
+ (i.menuState.value === 0
+ ? (i.closeMenu(),
+ Ct(() => {
+ var c;
+ return (c = fe(i.buttonRef)) == null
+ ? void 0
+ : c.focus({ preventScroll: !0 });
+ }))
+ : (u.preventDefault(),
+ i.openMenu(),
+ dx(() => {
+ var c;
+ return (c = fe(i.itemsRef)) == null
+ ? void 0
+ : c.focus({ preventScroll: !0 });
+ })));
+ }
+ let a = Td(
+ $(() => ({ as: t.as, type: e.type })),
+ i.buttonRef
+ );
+ return () => {
+ var u;
+ let c = { open: i.menuState.value === 0 },
+ g = t,
+ { id: f } = g,
+ h = Qe(g, ["id"]),
+ p = {
+ ref: i.buttonRef,
+ id: f,
+ type: a.value,
+ "aria-haspopup": "menu",
+ "aria-controls":
+ (u = fe(i.itemsRef)) == null ? void 0 : u.id,
+ "aria-expanded": i.menuState.value === 0,
+ onKeydown: o,
+ onKeyup: s,
+ onClick: l,
+ };
+ return tt({
+ ourProps: p,
+ theirProps: h,
+ slot: c,
+ attrs: e,
+ slots: n,
+ name: "MenuButton",
+ });
+ };
+ },
+ }),
+ px = xe({
+ name: "MenuItems",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ static: { type: Boolean, default: !1 },
+ unmount: { type: Boolean, default: !0 },
+ id: {
+ type: String,
+ default: () => `headlessui-menu-items-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = La("MenuItems"),
+ o = oe(null);
+ r({ el: i.itemsRef, $el: i.itemsRef }),
+ Od({
+ container: $(() => fe(i.itemsRef)),
+ enabled: $(() => i.menuState.value === 0),
+ accept(c) {
+ return c.getAttribute("role") === "menuitem"
+ ? NodeFilter.FILTER_REJECT
+ : c.hasAttribute("role")
+ ? NodeFilter.FILTER_SKIP
+ : NodeFilter.FILTER_ACCEPT;
+ },
+ walk(c) {
+ c.setAttribute("role", "none");
+ },
+ });
+ function s(c) {
+ var f;
+ switch ((o.value && clearTimeout(o.value), c.key)) {
+ case Ie.Space:
+ if (i.searchQuery.value !== "")
+ return (
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.search(c.key)
+ );
+ case Ie.Enter:
+ if (
+ (c.preventDefault(),
+ c.stopPropagation(),
+ i.activeItemIndex.value !== null)
+ ) {
+ let h = i.items.value[i.activeItemIndex.value];
+ (f = fe(h.dataRef.domRef)) == null || f.click();
+ }
+ i.closeMenu(), Xg(fe(i.buttonRef));
+ break;
+ case Ie.ArrowDown:
+ return (
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.goToItem(Ze.Next)
+ );
+ case Ie.ArrowUp:
+ return (
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.goToItem(Ze.Previous)
+ );
+ case Ie.Home:
+ case Ie.PageUp:
+ return (
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.goToItem(Ze.First)
+ );
+ case Ie.End:
+ case Ie.PageDown:
+ return (
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.goToItem(Ze.Last)
+ );
+ case Ie.Escape:
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.closeMenu(),
+ Ct(() => {
+ var h;
+ return (h = fe(i.buttonRef)) == null
+ ? void 0
+ : h.focus({ preventScroll: !0 });
+ });
+ break;
+ case Ie.Tab:
+ c.preventDefault(),
+ c.stopPropagation(),
+ i.closeMenu(),
+ Ct(() =>
+ Cw(
+ fe(i.buttonRef),
+ c.shiftKey ? Qt.Previous : Qt.Next
+ )
+ );
+ break;
+ default:
+ c.key.length === 1 &&
+ (i.search(c.key),
+ (o.value = setTimeout(() => i.clearSearch(), 350)));
+ break;
+ }
+ }
+ function l(c) {
+ switch (c.key) {
+ case Ie.Space:
+ c.preventDefault();
+ break;
+ }
+ }
+ let a = ms(),
+ u = $(() =>
+ a !== null
+ ? (a.value & gt.Open) === gt.Open
+ : i.menuState.value === 0
+ );
+ return () => {
+ var c, f;
+ let h = { open: i.menuState.value === 0 },
+ b = t,
+ { id: p } = b,
+ g = Qe(b, ["id"]),
+ v = {
+ "aria-activedescendant":
+ i.activeItemIndex.value === null ||
+ (c = i.items.value[i.activeItemIndex.value]) == null
+ ? void 0
+ : c.id,
+ "aria-labelledby":
+ (f = fe(i.buttonRef)) == null ? void 0 : f.id,
+ id: p,
+ onKeydown: s,
+ onKeyup: l,
+ role: "menu",
+ tabIndex: 0,
+ ref: i.itemsRef,
+ };
+ return tt({
+ ourProps: v,
+ theirProps: g,
+ slot: h,
+ attrs: e,
+ slots: n,
+ features: Gn.RenderStrategy | Gn.Static,
+ visible: u.value,
+ name: "MenuItems",
+ });
+ };
+ },
+ }),
+ mx = xe({
+ name: "MenuItem",
+ inheritAttrs: !1,
+ props: {
+ as: { type: [Object, String], default: "template" },
+ disabled: { type: Boolean, default: !1 },
+ id: { type: String, default: () => `headlessui-menu-item-${At()}` },
+ },
+ setup(t, { slots: e, attrs: n, expose: r }) {
+ let i = La("MenuItem"),
+ o = oe(null);
+ r({ el: o, $el: o });
+ let s = $(() =>
+ i.activeItemIndex.value !== null
+ ? i.items.value[i.activeItemIndex.value].id === t.id
+ : !1
+ ),
+ l = ax(o),
+ a = $(() => ({
+ disabled: t.disabled,
+ get textValue() {
+ return l();
+ },
+ domRef: o,
+ }));
+ Ye(() => i.registerItem(t.id, a)),
+ Bt(() => i.unregisterItem(t.id)),
+ Mt(() => {
+ i.menuState.value === 0 &&
+ s.value &&
+ i.activationTrigger.value !== 0 &&
+ Ct(() => {
+ var v, b;
+ return (b =
+ (v = fe(o)) == null
+ ? void 0
+ : v.scrollIntoView) == null
+ ? void 0
+ : b.call(v, { block: "nearest" });
+ });
+ });
+ function u(v) {
+ if (t.disabled) return v.preventDefault();
+ i.closeMenu(), Xg(fe(i.buttonRef));
+ }
+ function c() {
+ if (t.disabled) return i.goToItem(Ze.Nothing);
+ i.goToItem(Ze.Specific, t.id);
+ }
+ let f = r1();
+ function h(v) {
+ f.update(v);
+ }
+ function p(v) {
+ f.wasMoved(v) &&
+ (t.disabled || s.value || i.goToItem(Ze.Specific, t.id, 0));
+ }
+ function g(v) {
+ f.wasMoved(v) &&
+ (t.disabled || (s.value && i.goToItem(Ze.Nothing)));
+ }
+ return () => {
+ let { disabled: v } = t,
+ b = { active: s.value, disabled: v, close: i.closeMenu },
+ T = t,
+ { id: x } = T,
+ S = Qe(T, ["id"]);
+ return tt({
+ ourProps: {
+ id: x,
+ ref: o,
+ role: "menuitem",
+ tabIndex: v === !0 ? void 0 : -1,
+ "aria-disabled": v === !0 ? !0 : void 0,
+ disabled: void 0,
+ onClick: u,
+ onFocus: c,
+ onPointerenter: h,
+ onMouseenter: h,
+ onPointermove: p,
+ onMousemove: p,
+ onPointerleave: g,
+ onMouseleave: g,
+ },
+ theirProps: W(W({}, n), S),
+ slot: b,
+ attrs: n,
+ slots: e,
+ name: "MenuItem",
+ });
+ };
+ },
+ }),
+ g1 = Symbol("LabelContext");
+function y1() {
+ let t = qe(g1, null);
+ if (t === null) {
+ let e = new Error(
+ "You used a component, but it is not inside a parent."
+ );
+ throw (Error.captureStackTrace && Error.captureStackTrace(e, y1), e);
+ }
+ return t;
+}
+function Id({ slot: t = {}, name: e = "Label", props: n = {} } = {}) {
+ let r = oe([]);
+ function i(o) {
+ return (
+ r.value.push(o),
+ () => {
+ let s = r.value.indexOf(o);
+ s !== -1 && r.value.splice(s, 1);
+ }
+ );
+ }
+ return (
+ kt(g1, { register: i, slot: t, name: e, props: n }),
+ $(() => (r.value.length > 0 ? r.value.join(" ") : void 0))
+ );
+}
+let gx = xe({
+ name: "Label",
+ props: {
+ as: { type: [Object, String], default: "label" },
+ passive: { type: [Boolean], default: !1 },
+ id: { type: String, default: () => `headlessui-label-${At()}` },
+ },
+ setup(t, { slots: e, attrs: n }) {
+ let r = y1();
+ return (
+ Ye(() => Bt(r.register(t.id))),
+ () => {
+ let { name: i = "Label", slot: o = {}, props: s = {} } = r,
+ f = t,
+ { id: l, passive: a } = f,
+ u = Qe(f, ["id", "passive"]),
+ c = be(
+ W(
+ {},
+ Object.entries(s).reduce(
+ (h, [p, g]) => Object.assign(h, { [p]: ne(g) }),
+ {}
+ )
+ ),
+ { id: l }
+ );
+ return (
+ a && (delete c.onClick, delete c.htmlFor, delete u.onClick),
+ tt({
+ ourProps: c,
+ theirProps: u,
+ slot: o,
+ attrs: n,
+ slots: e,
+ name: i,
+ })
+ );
+ }
+ );
+ },
+});
+function yx(t, e) {
+ return t === e;
+}
+let v1 = Symbol("RadioGroupContext");
+function b1(t) {
+ let e = qe(v1, null);
+ if (e === null) {
+ let n = new Error(
+ `<${t} /> is missing a parent component.`
+ );
+ throw (Error.captureStackTrace && Error.captureStackTrace(n, b1), n);
+ }
+ return e;
+}
+let hR = xe({
+ name: "RadioGroup",
+ emits: { "update:modelValue": (t) => !0 },
+ props: {
+ as: { type: [Object, String], default: "div" },
+ disabled: { type: [Boolean], default: !1 },
+ by: { type: [String, Function], default: () => yx },
+ modelValue: {
+ type: [Object, String, Number, Boolean],
+ default: void 0,
+ },
+ defaultValue: {
+ type: [Object, String, Number, Boolean],
+ default: void 0,
+ },
+ form: { type: String, optional: !0 },
+ name: { type: String, optional: !0 },
+ id: { type: String, default: () => `headlessui-radiogroup-${At()}` },
+ },
+ inheritAttrs: !1,
+ setup(t, { emit: e, attrs: n, slots: r, expose: i }) {
+ let o = oe(null),
+ s = oe([]),
+ l = Id({ name: "RadioGroupLabel" }),
+ a = ja({ name: "RadioGroupDescription" });
+ i({ el: o, $el: o });
+ let [u, c] = Ld(
+ $(() => t.modelValue),
+ (g) => e("update:modelValue", g),
+ $(() => t.defaultValue)
+ ),
+ f = {
+ options: s,
+ value: u,
+ disabled: $(() => t.disabled),
+ firstOption: $(() => s.value.find((g) => !g.propsRef.disabled)),
+ containsCheckedOption: $(() =>
+ s.value.some((g) =>
+ f.compare(de(g.propsRef.value), de(t.modelValue))
+ )
+ ),
+ compare(g, v) {
+ if (typeof t.by == "string") {
+ let b = t.by;
+ return (
+ (g == null ? void 0 : g[b]) ===
+ (v == null ? void 0 : v[b])
+ );
+ }
+ return t.by(g, v);
+ },
+ change(g) {
+ var v;
+ if (t.disabled || f.compare(de(u.value), de(g))) return !1;
+ let b =
+ (v = s.value.find((x) =>
+ f.compare(de(x.propsRef.value), de(g))
+ )) == null
+ ? void 0
+ : v.propsRef;
+ return b != null && b.disabled ? !1 : (c(g), !0);
+ },
+ registerOption(g) {
+ s.value.push(g), (s.value = Na(s.value, (v) => v.element));
+ },
+ unregisterOption(g) {
+ let v = s.value.findIndex((b) => b.id === g);
+ v !== -1 && s.value.splice(v, 1);
+ },
+ };
+ kt(v1, f),
+ Od({
+ container: $(() => fe(o)),
+ accept(g) {
+ return g.getAttribute("role") === "radio"
+ ? NodeFilter.FILTER_REJECT
+ : g.hasAttribute("role")
+ ? NodeFilter.FILTER_SKIP
+ : NodeFilter.FILTER_ACCEPT;
+ },
+ walk(g) {
+ g.setAttribute("role", "none");
+ },
+ });
+ function h(g) {
+ if (!o.value || !o.value.contains(g.target)) return;
+ let v = s.value
+ .filter((b) => b.propsRef.disabled === !1)
+ .map((b) => b.element);
+ switch (g.key) {
+ case Ie.Enter:
+ n1(g.currentTarget);
+ break;
+ case Ie.ArrowLeft:
+ case Ie.ArrowUp:
+ if (
+ (g.preventDefault(),
+ g.stopPropagation(),
+ li(v, Qt.Previous | Qt.WrapAround) === Sl.Success)
+ ) {
+ let b = s.value.find((x) => {
+ var S;
+ return (
+ x.element ===
+ ((S = vn(o)) == null ? void 0 : S.activeElement)
+ );
+ });
+ b && f.change(b.propsRef.value);
+ }
+ break;
+ case Ie.ArrowRight:
+ case Ie.ArrowDown:
+ if (
+ (g.preventDefault(),
+ g.stopPropagation(),
+ li(v, Qt.Next | Qt.WrapAround) === Sl.Success)
+ ) {
+ let b = s.value.find((x) => {
+ var S;
+ return (
+ x.element ===
+ ((S = vn(x.element)) == null
+ ? void 0
+ : S.activeElement)
+ );
+ });
+ b && f.change(b.propsRef.value);
+ }
+ break;
+ case Ie.Space:
+ {
+ g.preventDefault(), g.stopPropagation();
+ let b = s.value.find((x) => {
+ var S;
+ return (
+ x.element ===
+ ((S = vn(x.element)) == null
+ ? void 0
+ : S.activeElement)
+ );
+ });
+ b && f.change(b.propsRef.value);
+ }
+ break;
+ }
+ }
+ let p = $(() => {
+ var g;
+ return (g = fe(o)) == null ? void 0 : g.closest("form");
+ });
+ return (
+ Ye(() => {
+ Rt(
+ [p],
+ () => {
+ if (!p.value || t.defaultValue === void 0) return;
+ function g() {
+ f.change(t.defaultValue);
+ }
+ return (
+ p.value.addEventListener("reset", g),
+ () => {
+ var v;
+ (v = p.value) == null ||
+ v.removeEventListener("reset", g);
+ }
+ );
+ },
+ { immediate: !0 }
+ );
+ }),
+ () => {
+ let d = t,
+ { disabled: g, name: v, id: b, form: x } = d,
+ S = Qe(d, ["disabled", "name", "id", "form"]),
+ T = {
+ ref: o,
+ id: b,
+ role: "radiogroup",
+ "aria-labelledby": l.value,
+ "aria-describedby": a.value,
+ onKeydown: h,
+ };
+ return ze(He, [
+ ...(v != null && u.value != null
+ ? jd({ [v]: u.value }).map(([y, m]) =>
+ ze(
+ Gi,
+ Ed({
+ features: gi.Hidden,
+ key: y,
+ as: "input",
+ type: "hidden",
+ hidden: !0,
+ readOnly: !0,
+ form: x,
+ name: y,
+ value: m,
+ })
+ )
+ )
+ : []),
+ tt({
+ ourProps: T,
+ theirProps: W(
+ W({}, n),
+ so(S, ["modelValue", "defaultValue", "by"])
+ ),
+ slot: {},
+ attrs: n,
+ slots: r,
+ name: "RadioGroup",
+ }),
+ ]);
+ }
+ );
+ },
+});
+var vx = ((t) => (
+ (t[(t.Empty = 1)] = "Empty"), (t[(t.Active = 2)] = "Active"), t
+))(vx || {});
+let pR = xe({
+ name: "RadioGroupOption",
+ props: {
+ as: { type: [Object, String], default: "div" },
+ value: { type: [Object, String, Number, Boolean] },
+ disabled: { type: Boolean, default: !1 },
+ id: {
+ type: String,
+ default: () => `headlessui-radiogroup-option-${At()}`,
+ },
+ },
+ setup(t, { attrs: e, slots: n, expose: r }) {
+ let i = b1("RadioGroupOption"),
+ o = Id({ name: "RadioGroupLabel" }),
+ s = ja({ name: "RadioGroupDescription" }),
+ l = oe(null),
+ a = $(() => ({ value: t.value, disabled: t.disabled })),
+ u = oe(1);
+ r({ el: l, $el: l });
+ let c = $(() => fe(l));
+ Ye(() => i.registerOption({ id: t.id, element: c, propsRef: a })),
+ Bt(() => i.unregisterOption(t.id));
+ let f = $(() => {
+ var S;
+ return (
+ ((S = i.firstOption.value) == null ? void 0 : S.id) === t.id
+ );
+ }),
+ h = $(() => i.disabled.value || t.disabled),
+ p = $(() => i.compare(de(i.value.value), de(t.value))),
+ g = $(() =>
+ h.value
+ ? -1
+ : p.value || (!i.containsCheckedOption.value && f.value)
+ ? 0
+ : -1
+ );
+ function v() {
+ var S;
+ i.change(t.value) &&
+ ((u.value |= 2), (S = fe(l)) == null || S.focus());
+ }
+ function b() {
+ u.value |= 2;
+ }
+ function x() {
+ u.value &= -3;
+ }
+ return () => {
+ let k = t,
+ { id: S, value: T, disabled: d } = k,
+ y = Qe(k, ["id", "value", "disabled"]),
+ m = {
+ checked: p.value,
+ disabled: h.value,
+ active: Boolean(u.value & 2),
+ },
+ w = {
+ id: S,
+ ref: l,
+ role: "radio",
+ "aria-checked": p.value ? "true" : "false",
+ "aria-labelledby": o.value,
+ "aria-describedby": s.value,
+ "aria-disabled": h.value ? !0 : void 0,
+ tabIndex: g.value,
+ onClick: h.value ? void 0 : v,
+ onFocus: h.value ? void 0 : b,
+ onBlur: h.value ? void 0 : x,
+ };
+ return tt({
+ ourProps: w,
+ theirProps: y,
+ slot: m,
+ attrs: e,
+ slots: n,
+ name: "RadioGroupOption",
+ });
+ };
+ },
+});
+let w1 = Symbol("GroupContext"),
+ bx = xe({
+ name: "SwitchGroup",
+ props: { as: { type: [Object, String], default: "template" } },
+ setup(t, { slots: e, attrs: n }) {
+ let r = oe(null),
+ i = Id({
+ name: "SwitchLabel",
+ props: {
+ htmlFor: $(() => {
+ var s;
+ return (s = r.value) == null ? void 0 : s.id;
+ }),
+ onClick(s) {
+ r.value &&
+ (s.currentTarget.tagName === "LABEL" &&
+ s.preventDefault(),
+ r.value.click(),
+ r.value.focus({ preventScroll: !0 }));
+ },
+ },
+ }),
+ o = ja({ name: "SwitchDescription" });
+ return (
+ kt(w1, { switchRef: r, labelledby: i, describedby: o }),
+ () =>
+ tt({
+ theirProps: t,
+ ourProps: {},
+ slot: {},
+ slots: e,
+ attrs: n,
+ name: "SwitchGroup",
+ })
+ );
+ },
+ }),
+ wx = xe({
+ name: "Switch",
+ emits: { "update:modelValue": (t) => !0 },
+ props: {
+ as: { type: [Object, String], default: "button" },
+ modelValue: { type: Boolean, default: void 0 },
+ defaultChecked: { type: Boolean, optional: !0 },
+ form: { type: String, optional: !0 },
+ name: { type: String, optional: !0 },
+ value: { type: String, optional: !0 },
+ id: { type: String, default: () => `headlessui-switch-${At()}` },
+ },
+ inheritAttrs: !1,
+ setup(t, { emit: e, attrs: n, slots: r, expose: i }) {
+ let o = qe(w1, null),
+ [s, l] = Ld(
+ $(() => t.modelValue),
+ (b) => e("update:modelValue", b),
+ $(() => t.defaultChecked)
+ );
+ function a() {
+ l(!s.value);
+ }
+ let u = oe(null),
+ c = o === null ? u : o.switchRef,
+ f = Td(
+ $(() => ({ as: t.as, type: n.type })),
+ c
+ );
+ i({ el: c, $el: c });
+ function h(b) {
+ b.preventDefault(), a();
+ }
+ function p(b) {
+ b.key === Ie.Space
+ ? (b.preventDefault(), a())
+ : b.key === Ie.Enter && n1(b.currentTarget);
+ }
+ function g(b) {
+ b.preventDefault();
+ }
+ let v = $(() => {
+ var b, x;
+ return (x = (b = fe(c)) == null ? void 0 : b.closest) == null
+ ? void 0
+ : x.call(b, "form");
+ });
+ return (
+ Ye(() => {
+ Rt(
+ [v],
+ () => {
+ if (!v.value || t.defaultChecked === void 0) return;
+ function b() {
+ l(t.defaultChecked);
+ }
+ return (
+ v.value.addEventListener("reset", b),
+ () => {
+ var x;
+ (x = v.value) == null ||
+ x.removeEventListener("reset", b);
+ }
+ );
+ },
+ { immediate: !0 }
+ );
+ }),
+ () => {
+ let w = t,
+ { id: b, name: x, value: S, form: T } = w,
+ d = Qe(w, ["id", "name", "value", "form"]),
+ y = { checked: s.value },
+ m = {
+ id: b,
+ ref: c,
+ role: "switch",
+ type: f.value,
+ tabIndex: 0,
+ "aria-checked": s.value,
+ "aria-labelledby":
+ o == null ? void 0 : o.labelledby.value,
+ "aria-describedby":
+ o == null ? void 0 : o.describedby.value,
+ onClick: h,
+ onKeyup: p,
+ onKeypress: g,
+ };
+ return ze(He, [
+ x != null && s.value != null
+ ? ze(
+ Gi,
+ Ed({
+ features: gi.Hidden,
+ as: "input",
+ type: "checkbox",
+ hidden: !0,
+ readOnly: !0,
+ checked: s.value,
+ form: T,
+ name: x,
+ value: S,
+ })
+ )
+ : null,
+ tt({
+ ourProps: m,
+ theirProps: W(
+ W({}, n),
+ so(d, ["modelValue", "defaultChecked"])
+ ),
+ slot: y,
+ attrs: n,
+ slots: r,
+ name: "Switch",
+ }),
+ ]);
+ }
+ );
+ },
+ }),
+ xx = gx,
+ kx = Jw;
+function Cx(t) {
+ let e = { called: !1 };
+ return (...n) => {
+ if (!e.called) return (e.called = !0), t(...n);
+ };
+}
+function gu(t, ...e) {
+ t && e.length > 0 && t.classList.add(...e);
+}
+function $s(t, ...e) {
+ t && e.length > 0 && t.classList.remove(...e);
+}
+var wc = ((t) => ((t.Finished = "finished"), (t.Cancelled = "cancelled"), t))(
+ wc || {}
+);
+function Sx(t, e) {
+ let n = lo();
+ if (!t) return n.dispose;
+ let { transitionDuration: r, transitionDelay: i } = getComputedStyle(t),
+ [o, s] = [r, i].map((l) => {
+ let [a = 0] = l
+ .split(",")
+ .filter(Boolean)
+ .map((u) =>
+ u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3
+ )
+ .sort((u, c) => c - u);
+ return a;
+ });
+ return (
+ o !== 0 ? n.setTimeout(() => e("finished"), o + s) : e("finished"),
+ n.add(() => e("cancelled")),
+ n.dispose
+ );
+}
+function Yh(t, e, n, r, i, o) {
+ let s = lo(),
+ l = o !== void 0 ? Cx(o) : () => {};
+ return (
+ $s(t, ...i),
+ gu(t, ...e, ...n),
+ s.nextFrame(() => {
+ $s(t, ...n),
+ gu(t, ...r),
+ s.add(Sx(t, (a) => ($s(t, ...r, ...e), gu(t, ...i), l(a))));
+ }),
+ s.add(() => $s(t, ...e, ...n, ...r, ...i)),
+ s.add(() => l("cancelled")),
+ s.dispose
+ );
+}
+function Jr(t = "") {
+ return t.split(" ").filter((e) => e.trim().length > 1);
+}
+let Bd = Symbol("TransitionContext");
+var _x = ((t) => ((t.Visible = "visible"), (t.Hidden = "hidden"), t))(_x || {});
+function Mx() {
+ return qe(Bd, null) !== null;
+}
+function Ex() {
+ let t = qe(Bd, null);
+ if (t === null)
+ throw new Error(
+ "A is used but it is missing a parent ."
+ );
+ return t;
+}
+function Ax() {
+ let t = qe($d, null);
+ if (t === null)
+ throw new Error(
+ "A is used but it is missing a parent ."
+ );
+ return t;
+}
+let $d = Symbol("NestingContext");
+function Da(t) {
+ return "children" in t
+ ? Da(t.children)
+ : t.value.filter(({ state: e }) => e === "visible").length > 0;
+}
+function x1(t) {
+ let e = oe([]),
+ n = oe(!1);
+ Ye(() => (n.value = !0)), Bt(() => (n.value = !1));
+ function r(o, s = _r.Hidden) {
+ let l = e.value.findIndex(({ id: a }) => a === o);
+ l !== -1 &&
+ (vt(s, {
+ [_r.Unmount]() {
+ e.value.splice(l, 1);
+ },
+ [_r.Hidden]() {
+ e.value[l].state = "hidden";
+ },
+ }),
+ !Da(e) && n.value && (t == null || t()));
+ }
+ function i(o) {
+ let s = e.value.find(({ id: l }) => l === o);
+ return (
+ s
+ ? s.state !== "visible" && (s.state = "visible")
+ : e.value.push({ id: o, state: "visible" }),
+ () => r(o, _r.Unmount)
+ );
+ }
+ return { children: e, register: i, unregister: r };
+}
+let k1 = Gn.RenderStrategy,
+ C1 = xe({
+ props: {
+ as: { type: [Object, String], default: "div" },
+ show: { type: [Boolean], default: null },
+ unmount: { type: [Boolean], default: !0 },
+ appear: { type: [Boolean], default: !1 },
+ enter: { type: [String], default: "" },
+ enterFrom: { type: [String], default: "" },
+ enterTo: { type: [String], default: "" },
+ entered: { type: [String], default: "" },
+ leave: { type: [String], default: "" },
+ leaveFrom: { type: [String], default: "" },
+ leaveTo: { type: [String], default: "" },
+ },
+ emits: {
+ beforeEnter: () => !0,
+ afterEnter: () => !0,
+ beforeLeave: () => !0,
+ afterLeave: () => !0,
+ },
+ setup(t, { emit: e, attrs: n, slots: r, expose: i }) {
+ let o = oe(0);
+ function s() {
+ (o.value |= gt.Opening), e("beforeEnter");
+ }
+ function l() {
+ (o.value &= ~gt.Opening), e("afterEnter");
+ }
+ function a() {
+ (o.value |= gt.Closing), e("beforeLeave");
+ }
+ function u() {
+ (o.value &= ~gt.Closing), e("afterLeave");
+ }
+ if (!Mx() && mw())
+ return () =>
+ ze(
+ S1,
+ be(W({}, t), {
+ onBeforeEnter: s,
+ onAfterEnter: l,
+ onBeforeLeave: a,
+ onAfterLeave: u,
+ }),
+ r
+ );
+ let c = oe(null),
+ f = $(() => (t.unmount ? _r.Unmount : _r.Hidden));
+ i({ el: c, $el: c });
+ let { show: h, appear: p } = Ex(),
+ { register: g, unregister: v } = Ax(),
+ b = oe(h.value ? "visible" : "hidden"),
+ x = { value: !0 },
+ S = At(),
+ T = { value: !1 },
+ d = x1(() => {
+ !T.value &&
+ b.value !== "hidden" &&
+ ((b.value = "hidden"), v(S), u());
+ });
+ Ye(() => {
+ let P = g(S);
+ Bt(P);
+ }),
+ Mt(() => {
+ if (f.value === _r.Hidden && S) {
+ if (h.value && b.value !== "visible") {
+ b.value = "visible";
+ return;
+ }
+ vt(b.value, {
+ hidden: () => v(S),
+ visible: () => g(S),
+ });
+ }
+ });
+ let y = Jr(t.enter),
+ m = Jr(t.enterFrom),
+ w = Jr(t.enterTo),
+ k = Jr(t.entered),
+ _ = Jr(t.leave),
+ C = Jr(t.leaveFrom),
+ E = Jr(t.leaveTo);
+ Ye(() => {
+ Mt(() => {
+ if (b.value === "visible") {
+ let P = fe(c);
+ if (P instanceof Comment && P.data === "")
+ throw new Error(
+ "Did you forget to passthrough the `ref` to the actual DOM node?"
+ );
+ }
+ });
+ });
+ function R(P) {
+ let L = x.value && !p.value,
+ I = fe(c);
+ !I ||
+ !(I instanceof HTMLElement) ||
+ L ||
+ ((T.value = !0),
+ h.value && s(),
+ h.value || a(),
+ P(
+ h.value
+ ? Yh(I, y, m, w, k, (M) => {
+ (T.value = !1), M === wc.Finished && l();
+ })
+ : Yh(I, _, C, E, k, (M) => {
+ (T.value = !1),
+ M === wc.Finished &&
+ (Da(d) ||
+ ((b.value = "hidden"),
+ v(S),
+ u()));
+ })
+ ));
+ }
+ return (
+ Ye(() => {
+ Rt(
+ [h],
+ (P, L, I) => {
+ R(I), (x.value = !1);
+ },
+ { immediate: !0 }
+ );
+ }),
+ kt($d, d),
+ Ad(
+ $(
+ () =>
+ vt(b.value, {
+ visible: gt.Open,
+ hidden: gt.Closed,
+ }) | o.value
+ )
+ ),
+ () => {
+ let Re = t,
+ {
+ appear: P,
+ show: L,
+ enter: I,
+ enterFrom: M,
+ enterTo: N,
+ entered: D,
+ leave: K,
+ leaveFrom: ae,
+ leaveTo: Q,
+ } = Re,
+ me = Qe(Re, [
+ "appear",
+ "show",
+ "enter",
+ "enterFrom",
+ "enterTo",
+ "entered",
+ "leave",
+ "leaveFrom",
+ "leaveTo",
+ ]),
+ je = { ref: c },
+ Le = W(
+ W({}, me),
+ p.value && h.value && gs.isServer
+ ? { class: ye([n.class, me.class, ...y, ...m]) }
+ : {}
+ );
+ return tt({
+ theirProps: Le,
+ ourProps: je,
+ slot: {},
+ slots: r,
+ attrs: n,
+ features: k1,
+ visible: b.value === "visible",
+ name: "TransitionChild",
+ });
+ }
+ );
+ },
+ }),
+ Tx = C1,
+ S1 = xe({
+ inheritAttrs: !1,
+ props: {
+ as: { type: [Object, String], default: "div" },
+ show: { type: [Boolean], default: null },
+ unmount: { type: [Boolean], default: !0 },
+ appear: { type: [Boolean], default: !1 },
+ enter: { type: [String], default: "" },
+ enterFrom: { type: [String], default: "" },
+ enterTo: { type: [String], default: "" },
+ entered: { type: [String], default: "" },
+ leave: { type: [String], default: "" },
+ leaveFrom: { type: [String], default: "" },
+ leaveTo: { type: [String], default: "" },
+ },
+ emits: {
+ beforeEnter: () => !0,
+ afterEnter: () => !0,
+ beforeLeave: () => !0,
+ afterLeave: () => !0,
+ },
+ setup(t, { emit: e, attrs: n, slots: r }) {
+ let i = ms(),
+ o = $(() =>
+ t.show === null && i !== null
+ ? (i.value & gt.Open) === gt.Open
+ : t.show
+ );
+ Mt(() => {
+ if (![!0, !1].includes(o.value))
+ throw new Error(
+ 'A is used but it is missing a `:show="true | false"` prop.'
+ );
+ });
+ let s = oe(o.value ? "visible" : "hidden"),
+ l = x1(() => {
+ s.value = "hidden";
+ }),
+ a = oe(!0),
+ u = { show: o, appear: $(() => t.appear || !a.value) };
+ return (
+ Ye(() => {
+ Mt(() => {
+ (a.value = !1),
+ o.value
+ ? (s.value = "visible")
+ : Da(l) || (s.value = "hidden");
+ });
+ }),
+ kt($d, l),
+ kt(Bd, u),
+ () => {
+ let c = so(t, [
+ "show",
+ "appear",
+ "unmount",
+ "onBeforeEnter",
+ "onBeforeLeave",
+ "onAfterEnter",
+ "onAfterLeave",
+ ]),
+ f = { unmount: t.unmount };
+ return tt({
+ ourProps: be(W({}, f), { as: "template" }),
+ theirProps: {},
+ slot: {},
+ slots: be(W({}, r), {
+ default: () => [
+ ze(
+ Tx,
+ W(
+ W(
+ W(
+ {
+ onBeforeEnter: () =>
+ e("beforeEnter"),
+ onAfterEnter: () =>
+ e("afterEnter"),
+ onBeforeLeave: () =>
+ e("beforeLeave"),
+ onAfterLeave: () =>
+ e("afterLeave"),
+ },
+ n
+ ),
+ f
+ ),
+ c
+ ),
+ r.default
+ ),
+ ],
+ }),
+ attrs: {},
+ features: k1,
+ visible: s.value === "visible",
+ name: "Transition",
+ });
+ }
+ );
+ },
+ });
+var Zt = "top",
+ xn = "bottom",
+ kn = "right",
+ en = "left",
+ zd = "auto",
+ vs = [Zt, xn, kn, en],
+ Yi = "start",
+ Qo = "end",
+ Ox = "clippingParents",
+ _1 = "viewport",
+ xo = "popper",
+ Rx = "reference",
+ Qh = vs.reduce(function (t, e) {
+ return t.concat([e + "-" + Yi, e + "-" + Qo]);
+ }, []),
+ M1 = [].concat(vs, [zd]).reduce(function (t, e) {
+ return t.concat([e, e + "-" + Yi, e + "-" + Qo]);
+ }, []),
+ Px = "beforeRead",
+ Nx = "read",
+ jx = "afterRead",
+ Lx = "beforeMain",
+ Dx = "main",
+ Ix = "afterMain",
+ Bx = "beforeWrite",
+ $x = "write",
+ zx = "afterWrite",
+ Hx = [Px, Nx, jx, Lx, Dx, Ix, Bx, $x, zx];
+function Yn(t) {
+ return t ? (t.nodeName || "").toLowerCase() : null;
+}
+function ln(t) {
+ if (t == null) return window;
+ if (t.toString() !== "[object Window]") {
+ var e = t.ownerDocument;
+ return (e && e.defaultView) || window;
+ }
+ return t;
+}
+function yi(t) {
+ var e = ln(t).Element;
+ return t instanceof e || t instanceof Element;
+}
+function bn(t) {
+ var e = ln(t).HTMLElement;
+ return t instanceof e || t instanceof HTMLElement;
+}
+function Hd(t) {
+ if (typeof ShadowRoot == "undefined") return !1;
+ var e = ln(t).ShadowRoot;
+ return t instanceof e || t instanceof ShadowRoot;
+}
+function Fx(t) {
+ var e = t.state;
+ Object.keys(e.elements).forEach(function (n) {
+ var r = e.styles[n] || {},
+ i = e.attributes[n] || {},
+ o = e.elements[n];
+ !bn(o) ||
+ !Yn(o) ||
+ (Object.assign(o.style, r),
+ Object.keys(i).forEach(function (s) {
+ var l = i[s];
+ l === !1
+ ? o.removeAttribute(s)
+ : o.setAttribute(s, l === !0 ? "" : l);
+ }));
+ });
+}
+function Vx(t) {
+ var e = t.state,
+ n = {
+ popper: {
+ position: e.options.strategy,
+ left: "0",
+ top: "0",
+ margin: "0",
+ },
+ arrow: { position: "absolute" },
+ reference: {},
+ };
+ return (
+ Object.assign(e.elements.popper.style, n.popper),
+ (e.styles = n),
+ e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow),
+ function () {
+ Object.keys(e.elements).forEach(function (r) {
+ var i = e.elements[r],
+ o = e.attributes[r] || {},
+ s = Object.keys(
+ e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]
+ ),
+ l = s.reduce(function (a, u) {
+ return (a[u] = ""), a;
+ }, {});
+ !bn(i) ||
+ !Yn(i) ||
+ (Object.assign(i.style, l),
+ Object.keys(o).forEach(function (a) {
+ i.removeAttribute(a);
+ }));
+ });
+ }
+ );
+}
+const E1 = {
+ name: "applyStyles",
+ enabled: !0,
+ phase: "write",
+ fn: Fx,
+ effect: Vx,
+ requires: ["computeStyles"],
+};
+function Kn(t) {
+ return t.split("-")[0];
+}
+var ai = Math.max,
+ _l = Math.min,
+ Qi = Math.round;
+function xc() {
+ var t = navigator.userAgentData;
+ return t != null && t.brands && Array.isArray(t.brands)
+ ? t.brands
+ .map(function (e) {
+ return e.brand + "/" + e.version;
+ })
+ .join(" ")
+ : navigator.userAgent;
+}
+function A1() {
+ return !/^((?!chrome|android).)*safari/i.test(xc());
+}
+function Xi(t, e, n) {
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
+ var r = t.getBoundingClientRect(),
+ i = 1,
+ o = 1;
+ e &&
+ bn(t) &&
+ ((i = (t.offsetWidth > 0 && Qi(r.width) / t.offsetWidth) || 1),
+ (o = (t.offsetHeight > 0 && Qi(r.height) / t.offsetHeight) || 1));
+ var s = yi(t) ? ln(t) : window,
+ l = s.visualViewport,
+ a = !A1() && n,
+ u = (r.left + (a && l ? l.offsetLeft : 0)) / i,
+ c = (r.top + (a && l ? l.offsetTop : 0)) / o,
+ f = r.width / i,
+ h = r.height / o;
+ return {
+ width: f,
+ height: h,
+ top: c,
+ right: u + f,
+ bottom: c + h,
+ left: u,
+ x: u,
+ y: c,
+ };
+}
+function Fd(t) {
+ var e = Xi(t),
+ n = t.offsetWidth,
+ r = t.offsetHeight;
+ return (
+ Math.abs(e.width - n) <= 1 && (n = e.width),
+ Math.abs(e.height - r) <= 1 && (r = e.height),
+ { x: t.offsetLeft, y: t.offsetTop, width: n, height: r }
+ );
+}
+function T1(t, e) {
+ var n = e.getRootNode && e.getRootNode();
+ if (t.contains(e)) return !0;
+ if (n && Hd(n)) {
+ var r = e;
+ do {
+ if (r && t.isSameNode(r)) return !0;
+ r = r.parentNode || r.host;
+ } while (r);
+ }
+ return !1;
+}
+function lr(t) {
+ return ln(t).getComputedStyle(t);
+}
+function Wx(t) {
+ return ["table", "td", "th"].indexOf(Yn(t)) >= 0;
+}
+function Br(t) {
+ return ((yi(t) ? t.ownerDocument : t.document) || window.document)
+ .documentElement;
+}
+function Ia(t) {
+ return Yn(t) === "html"
+ ? t
+ : t.assignedSlot || t.parentNode || (Hd(t) ? t.host : null) || Br(t);
+}
+function Xh(t) {
+ return !bn(t) || lr(t).position === "fixed" ? null : t.offsetParent;
+}
+function Ux(t) {
+ var e = /firefox/i.test(xc()),
+ n = /Trident/i.test(xc());
+ if (n && bn(t)) {
+ var r = lr(t);
+ if (r.position === "fixed") return null;
+ }
+ var i = Ia(t);
+ for (
+ Hd(i) && (i = i.host);
+ bn(i) && ["html", "body"].indexOf(Yn(i)) < 0;
+
+ ) {
+ var o = lr(i);
+ if (
+ o.transform !== "none" ||
+ o.perspective !== "none" ||
+ o.contain === "paint" ||
+ ["transform", "perspective"].indexOf(o.willChange) !== -1 ||
+ (e && o.willChange === "filter") ||
+ (e && o.filter && o.filter !== "none")
+ )
+ return i;
+ i = i.parentNode;
+ }
+ return null;
+}
+function bs(t) {
+ for (var e = ln(t), n = Xh(t); n && Wx(n) && lr(n).position === "static"; )
+ n = Xh(n);
+ return n &&
+ (Yn(n) === "html" || (Yn(n) === "body" && lr(n).position === "static"))
+ ? e
+ : n || Ux(t) || e;
+}
+function Vd(t) {
+ return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
+}
+function Lo(t, e, n) {
+ return ai(t, _l(e, n));
+}
+function Kx(t, e, n) {
+ var r = Lo(t, e, n);
+ return r > n ? n : r;
+}
+function O1() {
+ return { top: 0, right: 0, bottom: 0, left: 0 };
+}
+function R1(t) {
+ return Object.assign({}, O1(), t);
+}
+function P1(t, e) {
+ return e.reduce(function (n, r) {
+ return (n[r] = t), n;
+ }, {});
+}
+var qx = function (e, n) {
+ return (
+ (e =
+ typeof e == "function"
+ ? e(Object.assign({}, n.rects, { placement: n.placement }))
+ : e),
+ R1(typeof e != "number" ? e : P1(e, vs))
+ );
+};
+function Jx(t) {
+ var e,
+ n = t.state,
+ r = t.name,
+ i = t.options,
+ o = n.elements.arrow,
+ s = n.modifiersData.popperOffsets,
+ l = Kn(n.placement),
+ a = Vd(l),
+ u = [en, kn].indexOf(l) >= 0,
+ c = u ? "height" : "width";
+ if (!(!o || !s)) {
+ var f = qx(i.padding, n),
+ h = Fd(o),
+ p = a === "y" ? Zt : en,
+ g = a === "y" ? xn : kn,
+ v =
+ n.rects.reference[c] +
+ n.rects.reference[a] -
+ s[a] -
+ n.rects.popper[c],
+ b = s[a] - n.rects.reference[a],
+ x = bs(o),
+ S = x ? (a === "y" ? x.clientHeight || 0 : x.clientWidth || 0) : 0,
+ T = v / 2 - b / 2,
+ d = f[p],
+ y = S - h[c] - f[g],
+ m = S / 2 - h[c] / 2 + T,
+ w = Lo(d, m, y),
+ k = a;
+ n.modifiersData[r] =
+ ((e = {}), (e[k] = w), (e.centerOffset = w - m), e);
+ }
+}
+function Gx(t) {
+ var e = t.state,
+ n = t.options,
+ r = n.element,
+ i = r === void 0 ? "[data-popper-arrow]" : r;
+ i != null &&
+ ((typeof i == "string" &&
+ ((i = e.elements.popper.querySelector(i)), !i)) ||
+ !T1(e.elements.popper, i) ||
+ (e.elements.arrow = i));
+}
+const Yx = {
+ name: "arrow",
+ enabled: !0,
+ phase: "main",
+ fn: Jx,
+ effect: Gx,
+ requires: ["popperOffsets"],
+ requiresIfExists: ["preventOverflow"],
+};
+function Zi(t) {
+ return t.split("-")[1];
+}
+var Qx = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
+function Xx(t, e) {
+ var n = t.x,
+ r = t.y,
+ i = e.devicePixelRatio || 1;
+ return { x: Qi(n * i) / i || 0, y: Qi(r * i) / i || 0 };
+}
+function Zh(t) {
+ var e,
+ n = t.popper,
+ r = t.popperRect,
+ i = t.placement,
+ o = t.variation,
+ s = t.offsets,
+ l = t.position,
+ a = t.gpuAcceleration,
+ u = t.adaptive,
+ c = t.roundOffsets,
+ f = t.isFixed,
+ h = s.x,
+ p = h === void 0 ? 0 : h,
+ g = s.y,
+ v = g === void 0 ? 0 : g,
+ b = typeof c == "function" ? c({ x: p, y: v }) : { x: p, y: v };
+ (p = b.x), (v = b.y);
+ var x = s.hasOwnProperty("x"),
+ S = s.hasOwnProperty("y"),
+ T = en,
+ d = Zt,
+ y = window;
+ if (u) {
+ var m = bs(n),
+ w = "clientHeight",
+ k = "clientWidth";
+ if (
+ (m === ln(n) &&
+ ((m = Br(n)),
+ lr(m).position !== "static" &&
+ l === "absolute" &&
+ ((w = "scrollHeight"), (k = "scrollWidth"))),
+ (m = m),
+ i === Zt || ((i === en || i === kn) && o === Qo))
+ ) {
+ d = xn;
+ var _ =
+ f && m === y && y.visualViewport
+ ? y.visualViewport.height
+ : m[w];
+ (v -= _ - r.height), (v *= a ? 1 : -1);
+ }
+ if (i === en || ((i === Zt || i === xn) && o === Qo)) {
+ T = kn;
+ var C =
+ f && m === y && y.visualViewport
+ ? y.visualViewport.width
+ : m[k];
+ (p -= C - r.width), (p *= a ? 1 : -1);
+ }
+ }
+ var E = Object.assign({ position: l }, u && Qx),
+ R = c === !0 ? Xx({ x: p, y: v }, ln(n)) : { x: p, y: v };
+ if (((p = R.x), (v = R.y), a)) {
+ var P;
+ return Object.assign(
+ {},
+ E,
+ ((P = {}),
+ (P[d] = S ? "0" : ""),
+ (P[T] = x ? "0" : ""),
+ (P.transform =
+ (y.devicePixelRatio || 1) <= 1
+ ? "translate(" + p + "px, " + v + "px)"
+ : "translate3d(" + p + "px, " + v + "px, 0)"),
+ P)
+ );
+ }
+ return Object.assign(
+ {},
+ E,
+ ((e = {}),
+ (e[d] = S ? v + "px" : ""),
+ (e[T] = x ? p + "px" : ""),
+ (e.transform = ""),
+ e)
+ );
+}
+function Zx(t) {
+ var e = t.state,
+ n = t.options,
+ r = n.gpuAcceleration,
+ i = r === void 0 ? !0 : r,
+ o = n.adaptive,
+ s = o === void 0 ? !0 : o,
+ l = n.roundOffsets,
+ a = l === void 0 ? !0 : l,
+ u = {
+ placement: Kn(e.placement),
+ variation: Zi(e.placement),
+ popper: e.elements.popper,
+ popperRect: e.rects.popper,
+ gpuAcceleration: i,
+ isFixed: e.options.strategy === "fixed",
+ };
+ e.modifiersData.popperOffsets != null &&
+ (e.styles.popper = Object.assign(
+ {},
+ e.styles.popper,
+ Zh(
+ Object.assign({}, u, {
+ offsets: e.modifiersData.popperOffsets,
+ position: e.options.strategy,
+ adaptive: s,
+ roundOffsets: a,
+ })
+ )
+ )),
+ e.modifiersData.arrow != null &&
+ (e.styles.arrow = Object.assign(
+ {},
+ e.styles.arrow,
+ Zh(
+ Object.assign({}, u, {
+ offsets: e.modifiersData.arrow,
+ position: "absolute",
+ adaptive: !1,
+ roundOffsets: a,
+ })
+ )
+ )),
+ (e.attributes.popper = Object.assign({}, e.attributes.popper, {
+ "data-popper-placement": e.placement,
+ }));
+}
+const e3 = {
+ name: "computeStyles",
+ enabled: !0,
+ phase: "beforeWrite",
+ fn: Zx,
+ data: {},
+};
+var zs = { passive: !0 };
+function t3(t) {
+ var e = t.state,
+ n = t.instance,
+ r = t.options,
+ i = r.scroll,
+ o = i === void 0 ? !0 : i,
+ s = r.resize,
+ l = s === void 0 ? !0 : s,
+ a = ln(e.elements.popper),
+ u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
+ return (
+ o &&
+ u.forEach(function (c) {
+ c.addEventListener("scroll", n.update, zs);
+ }),
+ l && a.addEventListener("resize", n.update, zs),
+ function () {
+ o &&
+ u.forEach(function (c) {
+ c.removeEventListener("scroll", n.update, zs);
+ }),
+ l && a.removeEventListener("resize", n.update, zs);
+ }
+ );
+}
+const n3 = {
+ name: "eventListeners",
+ enabled: !0,
+ phase: "write",
+ fn: function () {},
+ effect: t3,
+ data: {},
+};
+var r3 = { left: "right", right: "left", bottom: "top", top: "bottom" };
+function sl(t) {
+ return t.replace(/left|right|bottom|top/g, function (e) {
+ return r3[e];
+ });
+}
+var i3 = { start: "end", end: "start" };
+function ep(t) {
+ return t.replace(/start|end/g, function (e) {
+ return i3[e];
+ });
+}
+function Wd(t) {
+ var e = ln(t),
+ n = e.pageXOffset,
+ r = e.pageYOffset;
+ return { scrollLeft: n, scrollTop: r };
+}
+function Ud(t) {
+ return Xi(Br(t)).left + Wd(t).scrollLeft;
+}
+function o3(t, e) {
+ var n = ln(t),
+ r = Br(t),
+ i = n.visualViewport,
+ o = r.clientWidth,
+ s = r.clientHeight,
+ l = 0,
+ a = 0;
+ if (i) {
+ (o = i.width), (s = i.height);
+ var u = A1();
+ (u || (!u && e === "fixed")) && ((l = i.offsetLeft), (a = i.offsetTop));
+ }
+ return { width: o, height: s, x: l + Ud(t), y: a };
+}
+function s3(t) {
+ var e,
+ n = Br(t),
+ r = Wd(t),
+ i = (e = t.ownerDocument) == null ? void 0 : e.body,
+ o = ai(
+ n.scrollWidth,
+ n.clientWidth,
+ i ? i.scrollWidth : 0,
+ i ? i.clientWidth : 0
+ ),
+ s = ai(
+ n.scrollHeight,
+ n.clientHeight,
+ i ? i.scrollHeight : 0,
+ i ? i.clientHeight : 0
+ ),
+ l = -r.scrollLeft + Ud(t),
+ a = -r.scrollTop;
+ return (
+ lr(i || n).direction === "rtl" &&
+ (l += ai(n.clientWidth, i ? i.clientWidth : 0) - o),
+ { width: o, height: s, x: l, y: a }
+ );
+}
+function Kd(t) {
+ var e = lr(t),
+ n = e.overflow,
+ r = e.overflowX,
+ i = e.overflowY;
+ return /auto|scroll|overlay|hidden/.test(n + i + r);
+}
+function N1(t) {
+ return ["html", "body", "#document"].indexOf(Yn(t)) >= 0
+ ? t.ownerDocument.body
+ : bn(t) && Kd(t)
+ ? t
+ : N1(Ia(t));
+}
+function Do(t, e) {
+ var n;
+ e === void 0 && (e = []);
+ var r = N1(t),
+ i = r === ((n = t.ownerDocument) == null ? void 0 : n.body),
+ o = ln(r),
+ s = i ? [o].concat(o.visualViewport || [], Kd(r) ? r : []) : r,
+ l = e.concat(s);
+ return i ? l : l.concat(Do(Ia(s)));
+}
+function kc(t) {
+ return Object.assign({}, t, {
+ left: t.x,
+ top: t.y,
+ right: t.x + t.width,
+ bottom: t.y + t.height,
+ });
+}
+function l3(t, e) {
+ var n = Xi(t, !1, e === "fixed");
+ return (
+ (n.top = n.top + t.clientTop),
+ (n.left = n.left + t.clientLeft),
+ (n.bottom = n.top + t.clientHeight),
+ (n.right = n.left + t.clientWidth),
+ (n.width = t.clientWidth),
+ (n.height = t.clientHeight),
+ (n.x = n.left),
+ (n.y = n.top),
+ n
+ );
+}
+function tp(t, e, n) {
+ return e === _1 ? kc(o3(t, n)) : yi(e) ? l3(e, n) : kc(s3(Br(t)));
+}
+function a3(t) {
+ var e = Do(Ia(t)),
+ n = ["absolute", "fixed"].indexOf(lr(t).position) >= 0,
+ r = n && bn(t) ? bs(t) : t;
+ return yi(r)
+ ? e.filter(function (i) {
+ return yi(i) && T1(i, r) && Yn(i) !== "body";
+ })
+ : [];
+}
+function u3(t, e, n, r) {
+ var i = e === "clippingParents" ? a3(t) : [].concat(e),
+ o = [].concat(i, [n]),
+ s = o[0],
+ l = o.reduce(function (a, u) {
+ var c = tp(t, u, r);
+ return (
+ (a.top = ai(c.top, a.top)),
+ (a.right = _l(c.right, a.right)),
+ (a.bottom = _l(c.bottom, a.bottom)),
+ (a.left = ai(c.left, a.left)),
+ a
+ );
+ }, tp(t, s, r));
+ return (
+ (l.width = l.right - l.left),
+ (l.height = l.bottom - l.top),
+ (l.x = l.left),
+ (l.y = l.top),
+ l
+ );
+}
+function j1(t) {
+ var e = t.reference,
+ n = t.element,
+ r = t.placement,
+ i = r ? Kn(r) : null,
+ o = r ? Zi(r) : null,
+ s = e.x + e.width / 2 - n.width / 2,
+ l = e.y + e.height / 2 - n.height / 2,
+ a;
+ switch (i) {
+ case Zt:
+ a = { x: s, y: e.y - n.height };
+ break;
+ case xn:
+ a = { x: s, y: e.y + e.height };
+ break;
+ case kn:
+ a = { x: e.x + e.width, y: l };
+ break;
+ case en:
+ a = { x: e.x - n.width, y: l };
+ break;
+ default:
+ a = { x: e.x, y: e.y };
+ }
+ var u = i ? Vd(i) : null;
+ if (u != null) {
+ var c = u === "y" ? "height" : "width";
+ switch (o) {
+ case Yi:
+ a[u] = a[u] - (e[c] / 2 - n[c] / 2);
+ break;
+ case Qo:
+ a[u] = a[u] + (e[c] / 2 - n[c] / 2);
+ break;
+ }
+ }
+ return a;
+}
+function Xo(t, e) {
+ e === void 0 && (e = {});
+ var n = e,
+ r = n.placement,
+ i = r === void 0 ? t.placement : r,
+ o = n.strategy,
+ s = o === void 0 ? t.strategy : o,
+ l = n.boundary,
+ a = l === void 0 ? Ox : l,
+ u = n.rootBoundary,
+ c = u === void 0 ? _1 : u,
+ f = n.elementContext,
+ h = f === void 0 ? xo : f,
+ p = n.altBoundary,
+ g = p === void 0 ? !1 : p,
+ v = n.padding,
+ b = v === void 0 ? 0 : v,
+ x = R1(typeof b != "number" ? b : P1(b, vs)),
+ S = h === xo ? Rx : xo,
+ T = t.rects.popper,
+ d = t.elements[g ? S : h],
+ y = u3(yi(d) ? d : d.contextElement || Br(t.elements.popper), a, c, s),
+ m = Xi(t.elements.reference),
+ w = j1({
+ reference: m,
+ element: T,
+ strategy: "absolute",
+ placement: i,
+ }),
+ k = kc(Object.assign({}, T, w)),
+ _ = h === xo ? k : m,
+ C = {
+ top: y.top - _.top + x.top,
+ bottom: _.bottom - y.bottom + x.bottom,
+ left: y.left - _.left + x.left,
+ right: _.right - y.right + x.right,
+ },
+ E = t.modifiersData.offset;
+ if (h === xo && E) {
+ var R = E[i];
+ Object.keys(C).forEach(function (P) {
+ var L = [kn, xn].indexOf(P) >= 0 ? 1 : -1,
+ I = [Zt, xn].indexOf(P) >= 0 ? "y" : "x";
+ C[P] += R[I] * L;
+ });
+ }
+ return C;
+}
+function c3(t, e) {
+ e === void 0 && (e = {});
+ var n = e,
+ r = n.placement,
+ i = n.boundary,
+ o = n.rootBoundary,
+ s = n.padding,
+ l = n.flipVariations,
+ a = n.allowedAutoPlacements,
+ u = a === void 0 ? M1 : a,
+ c = Zi(r),
+ f = c
+ ? l
+ ? Qh
+ : Qh.filter(function (g) {
+ return Zi(g) === c;
+ })
+ : vs,
+ h = f.filter(function (g) {
+ return u.indexOf(g) >= 0;
+ });
+ h.length === 0 && (h = f);
+ var p = h.reduce(function (g, v) {
+ return (
+ (g[v] = Xo(t, {
+ placement: v,
+ boundary: i,
+ rootBoundary: o,
+ padding: s,
+ })[Kn(v)]),
+ g
+ );
+ }, {});
+ return Object.keys(p).sort(function (g, v) {
+ return p[g] - p[v];
+ });
+}
+function d3(t) {
+ if (Kn(t) === zd) return [];
+ var e = sl(t);
+ return [ep(t), e, ep(e)];
+}
+function f3(t) {
+ var e = t.state,
+ n = t.options,
+ r = t.name;
+ if (!e.modifiersData[r]._skip) {
+ for (
+ var i = n.mainAxis,
+ o = i === void 0 ? !0 : i,
+ s = n.altAxis,
+ l = s === void 0 ? !0 : s,
+ a = n.fallbackPlacements,
+ u = n.padding,
+ c = n.boundary,
+ f = n.rootBoundary,
+ h = n.altBoundary,
+ p = n.flipVariations,
+ g = p === void 0 ? !0 : p,
+ v = n.allowedAutoPlacements,
+ b = e.options.placement,
+ x = Kn(b),
+ S = x === b,
+ T = a || (S || !g ? [sl(b)] : d3(b)),
+ d = [b].concat(T).reduce(function (Le, Re) {
+ return Le.concat(
+ Kn(Re) === zd
+ ? c3(e, {
+ placement: Re,
+ boundary: c,
+ rootBoundary: f,
+ padding: u,
+ flipVariations: g,
+ allowedAutoPlacements: v,
+ })
+ : Re
+ );
+ }, []),
+ y = e.rects.reference,
+ m = e.rects.popper,
+ w = new Map(),
+ k = !0,
+ _ = d[0],
+ C = 0;
+ C < d.length;
+ C++
+ ) {
+ var E = d[C],
+ R = Kn(E),
+ P = Zi(E) === Yi,
+ L = [Zt, xn].indexOf(R) >= 0,
+ I = L ? "width" : "height",
+ M = Xo(e, {
+ placement: E,
+ boundary: c,
+ rootBoundary: f,
+ altBoundary: h,
+ padding: u,
+ }),
+ N = L ? (P ? kn : en) : P ? xn : Zt;
+ y[I] > m[I] && (N = sl(N));
+ var D = sl(N),
+ K = [];
+ if (
+ (o && K.push(M[R] <= 0),
+ l && K.push(M[N] <= 0, M[D] <= 0),
+ K.every(function (Le) {
+ return Le;
+ }))
+ ) {
+ (_ = E), (k = !1);
+ break;
+ }
+ w.set(E, K);
+ }
+ if (k)
+ for (
+ var ae = g ? 3 : 1,
+ Q = function (Re) {
+ var Ae = d.find(function (z) {
+ var X = w.get(z);
+ if (X)
+ return X.slice(0, Re).every(function (ee) {
+ return ee;
+ });
+ });
+ if (Ae) return (_ = Ae), "break";
+ },
+ me = ae;
+ me > 0;
+ me--
+ ) {
+ var je = Q(me);
+ if (je === "break") break;
+ }
+ e.placement !== _ &&
+ ((e.modifiersData[r]._skip = !0),
+ (e.placement = _),
+ (e.reset = !0));
+ }
+}
+const h3 = {
+ name: "flip",
+ enabled: !0,
+ phase: "main",
+ fn: f3,
+ requiresIfExists: ["offset"],
+ data: { _skip: !1 },
+};
+function np(t, e, n) {
+ return (
+ n === void 0 && (n = { x: 0, y: 0 }),
+ {
+ top: t.top - e.height - n.y,
+ right: t.right - e.width + n.x,
+ bottom: t.bottom - e.height + n.y,
+ left: t.left - e.width - n.x,
+ }
+ );
+}
+function rp(t) {
+ return [Zt, kn, xn, en].some(function (e) {
+ return t[e] >= 0;
+ });
+}
+function p3(t) {
+ var e = t.state,
+ n = t.name,
+ r = e.rects.reference,
+ i = e.rects.popper,
+ o = e.modifiersData.preventOverflow,
+ s = Xo(e, { elementContext: "reference" }),
+ l = Xo(e, { altBoundary: !0 }),
+ a = np(s, r),
+ u = np(l, i, o),
+ c = rp(a),
+ f = rp(u);
+ (e.modifiersData[n] = {
+ referenceClippingOffsets: a,
+ popperEscapeOffsets: u,
+ isReferenceHidden: c,
+ hasPopperEscaped: f,
+ }),
+ (e.attributes.popper = Object.assign({}, e.attributes.popper, {
+ "data-popper-reference-hidden": c,
+ "data-popper-escaped": f,
+ }));
+}
+const m3 = {
+ name: "hide",
+ enabled: !0,
+ phase: "main",
+ requiresIfExists: ["preventOverflow"],
+ fn: p3,
+};
+function g3(t, e, n) {
+ var r = Kn(t),
+ i = [en, Zt].indexOf(r) >= 0 ? -1 : 1,
+ o =
+ typeof n == "function"
+ ? n(Object.assign({}, e, { placement: t }))
+ : n,
+ s = o[0],
+ l = o[1];
+ return (
+ (s = s || 0),
+ (l = (l || 0) * i),
+ [en, kn].indexOf(r) >= 0 ? { x: l, y: s } : { x: s, y: l }
+ );
+}
+function y3(t) {
+ var e = t.state,
+ n = t.options,
+ r = t.name,
+ i = n.offset,
+ o = i === void 0 ? [0, 0] : i,
+ s = M1.reduce(function (c, f) {
+ return (c[f] = g3(f, e.rects, o)), c;
+ }, {}),
+ l = s[e.placement],
+ a = l.x,
+ u = l.y;
+ e.modifiersData.popperOffsets != null &&
+ ((e.modifiersData.popperOffsets.x += a),
+ (e.modifiersData.popperOffsets.y += u)),
+ (e.modifiersData[r] = s);
+}
+const v3 = {
+ name: "offset",
+ enabled: !0,
+ phase: "main",
+ requires: ["popperOffsets"],
+ fn: y3,
+};
+function b3(t) {
+ var e = t.state,
+ n = t.name;
+ e.modifiersData[n] = j1({
+ reference: e.rects.reference,
+ element: e.rects.popper,
+ strategy: "absolute",
+ placement: e.placement,
+ });
+}
+const w3 = {
+ name: "popperOffsets",
+ enabled: !0,
+ phase: "read",
+ fn: b3,
+ data: {},
+};
+function x3(t) {
+ return t === "x" ? "y" : "x";
+}
+function k3(t) {
+ var e = t.state,
+ n = t.options,
+ r = t.name,
+ i = n.mainAxis,
+ o = i === void 0 ? !0 : i,
+ s = n.altAxis,
+ l = s === void 0 ? !1 : s,
+ a = n.boundary,
+ u = n.rootBoundary,
+ c = n.altBoundary,
+ f = n.padding,
+ h = n.tether,
+ p = h === void 0 ? !0 : h,
+ g = n.tetherOffset,
+ v = g === void 0 ? 0 : g,
+ b = Xo(e, { boundary: a, rootBoundary: u, padding: f, altBoundary: c }),
+ x = Kn(e.placement),
+ S = Zi(e.placement),
+ T = !S,
+ d = Vd(x),
+ y = x3(d),
+ m = e.modifiersData.popperOffsets,
+ w = e.rects.reference,
+ k = e.rects.popper,
+ _ =
+ typeof v == "function"
+ ? v(Object.assign({}, e.rects, { placement: e.placement }))
+ : v,
+ C =
+ typeof _ == "number"
+ ? { mainAxis: _, altAxis: _ }
+ : Object.assign({ mainAxis: 0, altAxis: 0 }, _),
+ E = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null,
+ R = { x: 0, y: 0 };
+ if (!!m) {
+ if (o) {
+ var P,
+ L = d === "y" ? Zt : en,
+ I = d === "y" ? xn : kn,
+ M = d === "y" ? "height" : "width",
+ N = m[d],
+ D = N + b[L],
+ K = N - b[I],
+ ae = p ? -k[M] / 2 : 0,
+ Q = S === Yi ? w[M] : k[M],
+ me = S === Yi ? -k[M] : -w[M],
+ je = e.elements.arrow,
+ Le = p && je ? Fd(je) : { width: 0, height: 0 },
+ Re = e.modifiersData["arrow#persistent"]
+ ? e.modifiersData["arrow#persistent"].padding
+ : O1(),
+ Ae = Re[L],
+ z = Re[I],
+ X = Lo(0, w[M], Le[M]),
+ ee = T
+ ? w[M] / 2 - ae - X - Ae - C.mainAxis
+ : Q - X - Ae - C.mainAxis,
+ ue = T
+ ? -w[M] / 2 + ae + X + z + C.mainAxis
+ : me + X + z + C.mainAxis,
+ Pe = e.elements.arrow && bs(e.elements.arrow),
+ A = Pe
+ ? d === "y"
+ ? Pe.clientTop || 0
+ : Pe.clientLeft || 0
+ : 0,
+ O = (P = E == null ? void 0 : E[d]) != null ? P : 0,
+ j = N + ee - O - A,
+ H = N + ue - O,
+ V = Lo(p ? _l(D, j) : D, N, p ? ai(K, H) : K);
+ (m[d] = V), (R[d] = V - N);
+ }
+ if (l) {
+ var q,
+ se = d === "x" ? Zt : en,
+ Z = d === "x" ? xn : kn,
+ te = m[y],
+ J = y === "y" ? "height" : "width",
+ he = te + b[se],
+ ce = te - b[Z],
+ pe = [Zt, en].indexOf(x) !== -1,
+ ke = (q = E == null ? void 0 : E[y]) != null ? q : 0,
+ Oe = pe ? he : te - w[J] - k[J] - ke + C.altAxis,
+ Je = pe ? te + w[J] + k[J] - ke - C.altAxis : ce,
+ Fe =
+ p && pe ? Kx(Oe, te, Je) : Lo(p ? Oe : he, te, p ? Je : ce);
+ (m[y] = Fe), (R[y] = Fe - te);
+ }
+ e.modifiersData[r] = R;
+ }
+}
+const C3 = {
+ name: "preventOverflow",
+ enabled: !0,
+ phase: "main",
+ fn: k3,
+ requiresIfExists: ["offset"],
+};
+function S3(t) {
+ return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
+}
+function _3(t) {
+ return t === ln(t) || !bn(t) ? Wd(t) : S3(t);
+}
+function M3(t) {
+ var e = t.getBoundingClientRect(),
+ n = Qi(e.width) / t.offsetWidth || 1,
+ r = Qi(e.height) / t.offsetHeight || 1;
+ return n !== 1 || r !== 1;
+}
+function E3(t, e, n) {
+ n === void 0 && (n = !1);
+ var r = bn(e),
+ i = bn(e) && M3(e),
+ o = Br(e),
+ s = Xi(t, i, n),
+ l = { scrollLeft: 0, scrollTop: 0 },
+ a = { x: 0, y: 0 };
+ return (
+ (r || (!r && !n)) &&
+ ((Yn(e) !== "body" || Kd(o)) && (l = _3(e)),
+ bn(e)
+ ? ((a = Xi(e, !0)), (a.x += e.clientLeft), (a.y += e.clientTop))
+ : o && (a.x = Ud(o))),
+ {
+ x: s.left + l.scrollLeft - a.x,
+ y: s.top + l.scrollTop - a.y,
+ width: s.width,
+ height: s.height,
+ }
+ );
+}
+function A3(t) {
+ var e = new Map(),
+ n = new Set(),
+ r = [];
+ t.forEach(function (o) {
+ e.set(o.name, o);
+ });
+ function i(o) {
+ n.add(o.name);
+ var s = [].concat(o.requires || [], o.requiresIfExists || []);
+ s.forEach(function (l) {
+ if (!n.has(l)) {
+ var a = e.get(l);
+ a && i(a);
+ }
+ }),
+ r.push(o);
+ }
+ return (
+ t.forEach(function (o) {
+ n.has(o.name) || i(o);
+ }),
+ r
+ );
+}
+function T3(t) {
+ var e = A3(t);
+ return Hx.reduce(function (n, r) {
+ return n.concat(
+ e.filter(function (i) {
+ return i.phase === r;
+ })
+ );
+ }, []);
+}
+function O3(t) {
+ var e;
+ return function () {
+ return (
+ e ||
+ (e = new Promise(function (n) {
+ Promise.resolve().then(function () {
+ (e = void 0), n(t());
+ });
+ })),
+ e
+ );
+ };
+}
+function R3(t) {
+ var e = t.reduce(function (n, r) {
+ var i = n[r.name];
+ return (
+ (n[r.name] = i
+ ? Object.assign({}, i, r, {
+ options: Object.assign({}, i.options, r.options),
+ data: Object.assign({}, i.data, r.data),
+ })
+ : r),
+ n
+ );
+ }, {});
+ return Object.keys(e).map(function (n) {
+ return e[n];
+ });
+}
+var ip = { placement: "bottom", modifiers: [], strategy: "absolute" };
+function op() {
+ for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
+ e[n] = arguments[n];
+ return !e.some(function (r) {
+ return !(r && typeof r.getBoundingClientRect == "function");
+ });
+}
+function P3(t) {
+ t === void 0 && (t = {});
+ var e = t,
+ n = e.defaultModifiers,
+ r = n === void 0 ? [] : n,
+ i = e.defaultOptions,
+ o = i === void 0 ? ip : i;
+ return function (l, a, u) {
+ u === void 0 && (u = o);
+ var c = {
+ placement: "bottom",
+ orderedModifiers: [],
+ options: Object.assign({}, ip, o),
+ modifiersData: {},
+ elements: { reference: l, popper: a },
+ attributes: {},
+ styles: {},
+ },
+ f = [],
+ h = !1,
+ p = {
+ state: c,
+ setOptions: function (x) {
+ var S = typeof x == "function" ? x(c.options) : x;
+ v(),
+ (c.options = Object.assign({}, o, c.options, S)),
+ (c.scrollParents = {
+ reference: yi(l)
+ ? Do(l)
+ : l.contextElement
+ ? Do(l.contextElement)
+ : [],
+ popper: Do(a),
+ });
+ var T = T3(R3([].concat(r, c.options.modifiers)));
+ return (
+ (c.orderedModifiers = T.filter(function (d) {
+ return d.enabled;
+ })),
+ g(),
+ p.update()
+ );
+ },
+ forceUpdate: function () {
+ if (!h) {
+ var x = c.elements,
+ S = x.reference,
+ T = x.popper;
+ if (!!op(S, T)) {
+ (c.rects = {
+ reference: E3(
+ S,
+ bs(T),
+ c.options.strategy === "fixed"
+ ),
+ popper: Fd(T),
+ }),
+ (c.reset = !1),
+ (c.placement = c.options.placement),
+ c.orderedModifiers.forEach(function (C) {
+ return (c.modifiersData[C.name] =
+ Object.assign({}, C.data));
+ });
+ for (
+ var d = 0;
+ d < c.orderedModifiers.length;
+ d++
+ ) {
+ if (c.reset === !0) {
+ (c.reset = !1), (d = -1);
+ continue;
+ }
+ var y = c.orderedModifiers[d],
+ m = y.fn,
+ w = y.options,
+ k = w === void 0 ? {} : w,
+ _ = y.name;
+ typeof m == "function" &&
+ (c =
+ m({
+ state: c,
+ options: k,
+ name: _,
+ instance: p,
+ }) || c);
+ }
+ }
+ }
+ },
+ update: O3(function () {
+ return new Promise(function (b) {
+ p.forceUpdate(), b(c);
+ });
+ }),
+ destroy: function () {
+ v(), (h = !0);
+ },
+ };
+ if (!op(l, a)) return p;
+ p.setOptions(u).then(function (b) {
+ !h && u.onFirstUpdate && u.onFirstUpdate(b);
+ });
+ function g() {
+ c.orderedModifiers.forEach(function (b) {
+ var x = b.name,
+ S = b.options,
+ T = S === void 0 ? {} : S,
+ d = b.effect;
+ if (typeof d == "function") {
+ var y = d({ state: c, name: x, instance: p, options: T }),
+ m = function () {};
+ f.push(y || m);
+ }
+ });
+ }
+ function v() {
+ f.forEach(function (b) {
+ return b();
+ }),
+ (f = []);
+ }
+ return p;
+ };
+}
+var N3 = [n3, w3, e3, E1, v3, h3, C3, Yx, m3],
+ L1 = P3({ defaultModifiers: N3 });
+const j3 = {
+ name: "Popover",
+ inheritAttrs: !1,
+ props: {
+ show: { default: void 0 },
+ trigger: { type: String, default: "click" },
+ hoverDelay: { type: Number, default: 0 },
+ leaveDelay: { type: Number, default: 0 },
+ placement: { type: String, default: "bottom-start" },
+ popoverClass: [String, Object, Array],
+ transition: { default: null },
+ hideOnBlur: { default: !0 },
+ },
+ emits: ["open", "close", "update:show"],
+ expose: ["open", "close"],
+ data() {
+ return {
+ showPopup: !1,
+ targetWidth: null,
+ pointerOverTargetOrPopup: !1,
+ };
+ },
+ watch: {
+ show(t) {
+ t ? this.open() : this.close();
+ },
+ },
+ created() {
+ if (
+ typeof window != "undefined" &&
+ !document.getElementById("frappeui-popper-root")
+ ) {
+ const t = document.createElement("div");
+ (t.id = "frappeui-popper-root"), document.body.appendChild(t);
+ }
+ },
+ mounted() {
+ (this.listener = (t) => {
+ [this.$refs.reference, this.$refs.popover].some(
+ (r) => r && (t.target === r || r.contains(t.target))
+ ) || this.close();
+ }),
+ this.hideOnBlur &&
+ document.addEventListener("click", this.listener),
+ this.$nextTick(() => {
+ this.targetWidth = this.$refs.target.clientWidth;
+ });
+ },
+ beforeDestroy() {
+ this.popper && this.popper.destroy(),
+ document.removeEventListener("click", this.listener);
+ },
+ computed: {
+ showPropPassed() {
+ return this.show != null;
+ },
+ isOpen: {
+ get() {
+ return this.showPropPassed ? this.show : this.showPopup;
+ },
+ set(t) {
+ (t = Boolean(t)),
+ this.showPropPassed
+ ? this.$emit("update:show", t)
+ : (this.showPopup = t),
+ t === !1
+ ? this.$emit("close")
+ : t === !0 && this.$emit("open");
+ },
+ },
+ popupTransition() {
+ let t = {
+ default: {
+ enterActiveClass: "transition duration-150 ease-out",
+ enterFromClass: "translate-y-1 opacity-0",
+ enterToClass: "translate-y-0 opacity-100",
+ leaveActiveClass: "transition duration-150 ease-in",
+ leaveFromClass: "translate-y-0 opacity-100",
+ leaveToClass: "translate-y-1 opacity-0",
+ },
+ };
+ return typeof this.transition == "string"
+ ? t[this.transition]
+ : this.transition;
+ },
+ },
+ methods: {
+ setupPopper() {
+ this.popper
+ ? this.updatePosition()
+ : (this.popper = L1(
+ this.$refs.reference,
+ this.$refs.popover,
+ { placement: this.placement }
+ ));
+ },
+ updatePosition() {
+ this.popper && this.popper.update();
+ },
+ togglePopover(t) {
+ t instanceof Event && (t = null),
+ t == null && (t = !this.isOpen),
+ (t = Boolean(t)),
+ t ? this.open() : this.close();
+ },
+ open() {
+ (this.isOpen = !0), this.$nextTick(() => this.setupPopper());
+ },
+ close() {
+ this.isOpen = !1;
+ },
+ onMouseover() {
+ (this.pointerOverTargetOrPopup = !0),
+ this.leaveTimer &&
+ (clearTimeout(this.leaveTimer),
+ (this.leaveTimer = null)),
+ this.trigger === "hover" &&
+ (this.hoverDelay
+ ? (this.hoverTimer = setTimeout(() => {
+ this.pointerOverTargetOrPopup &&
+ this.open();
+ }, Number(this.hoverDelay) * 1e3))
+ : this.open());
+ },
+ onMouseleave(t) {
+ (this.pointerOverTargetOrPopup = !1),
+ this.hoverTimer &&
+ (clearTimeout(this.hoverTimer),
+ (this.hoverTimer = null)),
+ this.trigger === "hover" &&
+ (this.leaveTimer && clearTimeout(this.leaveTimer),
+ this.leaveDelay
+ ? (this.leaveTimer = setTimeout(() => {
+ this.pointerOverTargetOrPopup ||
+ this.close();
+ }, Number(this.leaveDelay) * 1e3))
+ : this.pointerOverTargetOrPopup || this.close());
+ },
+ },
+ },
+ L3 = { ref: "reference" },
+ D3 = { class: "rounded-lg border border-gray-100 bg-white shadow-xl" };
+function I3(t, e, n, r, i, o) {
+ return (
+ B(),
+ G(
+ "div",
+ L3,
+ [
+ U(
+ "div",
+ {
+ ref: "target",
+ class: ye(["flex", t.$attrs.class]),
+ onClick:
+ e[0] ||
+ (e[0] = (...s) =>
+ o.updatePosition && o.updatePosition(...s)),
+ onFocusin:
+ e[1] ||
+ (e[1] = (...s) =>
+ o.updatePosition && o.updatePosition(...s)),
+ onKeydown:
+ e[2] ||
+ (e[2] = (...s) =>
+ o.updatePosition && o.updatePosition(...s)),
+ onMouseover:
+ e[3] ||
+ (e[3] = (...s) =>
+ o.onMouseover && o.onMouseover(...s)),
+ onMouseleave:
+ e[4] ||
+ (e[4] = (...s) =>
+ o.onMouseleave && o.onMouseleave(...s)),
+ },
+ [
+ _e(
+ t.$slots,
+ "target",
+ Dt(
+ Ft({
+ togglePopover: o.togglePopover,
+ updatePosition: o.updatePosition,
+ open: o.open,
+ close: o.close,
+ isOpen: o.isOpen,
+ })
+ )
+ ),
+ ],
+ 34
+ ),
+ (B(),
+ Be(xd, { to: "#frappeui-popper-root" }, [
+ U(
+ "div",
+ {
+ ref: "popover",
+ class: ye([
+ n.popoverClass,
+ "popover-container relative z-[100]",
+ ]),
+ style: Ir({
+ minWidth: i.targetWidth
+ ? i.targetWidth + "px"
+ : null,
+ }),
+ onMouseover:
+ e[5] ||
+ (e[5] = (s) =>
+ (i.pointerOverTargetOrPopup = !0)),
+ onMouseleave:
+ e[6] ||
+ (e[6] = (...s) =>
+ o.onMouseleave && o.onMouseleave(...s)),
+ },
+ [
+ Me(
+ Oa,
+ Dt(Ft(o.popupTransition)),
+ {
+ default: Te(() => [
+ tc(
+ U(
+ "div",
+ null,
+ [
+ _e(
+ t.$slots,
+ "body",
+ Dt(
+ Ft({
+ togglePopover:
+ o.togglePopover,
+ updatePosition:
+ o.updatePosition,
+ open: o.open,
+ close: o.close,
+ isOpen: o.isOpen,
+ })
+ ),
+ () => [
+ U("div", D3, [
+ _e(
+ t.$slots,
+ "body-main",
+ Dt(
+ Ft({
+ togglePopover:
+ o.togglePopover,
+ updatePosition:
+ o.updatePosition,
+ open: o.open,
+ close: o.close,
+ isOpen: o.isOpen,
+ })
+ )
+ ),
+ ]),
+ ]
+ ),
+ ],
+ 512
+ ),
+ [[cc, o.isOpen]]
+ ),
+ ]),
+ _: 3,
+ },
+ 16
+ ),
+ ],
+ 38
+ ),
+ ])),
+ ],
+ 512
+ )
+ );
+}
+const qd = Ue(j3, [["render", I3]]);
+var D1 =
+ typeof globalThis != "undefined"
+ ? globalThis
+ : typeof window != "undefined"
+ ? window
+ : typeof global != "undefined"
+ ? global
+ : typeof self != "undefined"
+ ? self
+ : {};
+function B3(t) {
+ return t &&
+ t.__esModule &&
+ Object.prototype.hasOwnProperty.call(t, "default")
+ ? t.default
+ : t;
+}
+var I1 = { exports: {} };
+(function (t, e) {
+ (function (r, i) {
+ t.exports = i();
+ })(typeof self != "undefined" ? self : D1, function () {
+ return (function (n) {
+ var r = {};
+ function i(o) {
+ if (r[o]) return r[o].exports;
+ var s = (r[o] = { i: o, l: !1, exports: {} });
+ return (
+ n[o].call(s.exports, s, s.exports, i), (s.l = !0), s.exports
+ );
+ }
+ return (
+ (i.m = n),
+ (i.c = r),
+ (i.d = function (o, s, l) {
+ i.o(o, s) ||
+ Object.defineProperty(o, s, {
+ configurable: !1,
+ enumerable: !0,
+ get: l,
+ });
+ }),
+ (i.r = function (o) {
+ Object.defineProperty(o, "__esModule", { value: !0 });
+ }),
+ (i.n = function (o) {
+ var s =
+ o && o.__esModule
+ ? function () {
+ return o.default;
+ }
+ : function () {
+ return o;
+ };
+ return i.d(s, "a", s), s;
+ }),
+ (i.o = function (o, s) {
+ return Object.prototype.hasOwnProperty.call(o, s);
+ }),
+ (i.p = ""),
+ i((i.s = 0))
+ );
+ })({
+ "./dist/icons.json": function (n) {
+ n.exports = {
+ activity:
+ '',
+ airplay:
+ '',
+ "alert-circle":
+ '',
+ "alert-octagon":
+ '',
+ "alert-triangle":
+ '',
+ "align-center":
+ '',
+ "align-justify":
+ '',
+ "align-left":
+ '',
+ "align-right":
+ '',
+ anchor: '',
+ aperture:
+ '',
+ archive:
+ '',
+ "arrow-down-circle":
+ '',
+ "arrow-down-left":
+ '',
+ "arrow-down-right":
+ '',
+ "arrow-down":
+ '',
+ "arrow-left-circle":
+ '',
+ "arrow-left":
+ '',
+ "arrow-right-circle":
+ '',
+ "arrow-right":
+ '',
+ "arrow-up-circle":
+ '',
+ "arrow-up-left":
+ '',
+ "arrow-up-right":
+ '',
+ "arrow-up":
+ '',
+ "at-sign":
+ '',
+ award: '',
+ "bar-chart-2":
+ '',
+ "bar-chart":
+ '',
+ "battery-charging":
+ '',
+ battery:
+ '',
+ "bell-off":
+ '',
+ bell: '',
+ bluetooth:
+ '',
+ bold: '',
+ "book-open":
+ '',
+ book: '',
+ bookmark:
+ '',
+ box: '',
+ briefcase:
+ '',
+ calendar:
+ '',
+ "camera-off":
+ '',
+ camera: '',
+ cast: '',
+ "check-circle":
+ '',
+ "check-square":
+ '',
+ check: '',
+ "chevron-down":
+ '',
+ "chevron-left":
+ '',
+ "chevron-right":
+ '',
+ "chevron-up":
+ '',
+ "chevrons-down":
+ '',
+ "chevrons-left":
+ '',
+ "chevrons-right":
+ '',
+ "chevrons-up":
+ '',
+ chrome: '',
+ circle: '',
+ clipboard:
+ '',
+ clock: '',
+ "cloud-drizzle":
+ '',
+ "cloud-lightning":
+ '',
+ "cloud-off":
+ '',
+ "cloud-rain":
+ '',
+ "cloud-snow":
+ '',
+ cloud: '',
+ code: '',
+ codepen:
+ '',
+ codesandbox:
+ '',
+ coffee: '',
+ columns:
+ '',
+ command:
+ '',
+ compass:
+ '',
+ copy: '',
+ "corner-down-left":
+ '',
+ "corner-down-right":
+ '',
+ "corner-left-down":
+ '',
+ "corner-left-up":
+ '',
+ "corner-right-down":
+ '',
+ "corner-right-up":
+ '',
+ "corner-up-left":
+ '',
+ "corner-up-right":
+ '',
+ cpu: '',
+ "credit-card":
+ '',
+ crop: '',
+ crosshair:
+ '',
+ database:
+ '',
+ delete: '',
+ disc: '',
+ "divide-circle":
+ '',
+ "divide-square":
+ '',
+ divide: '',
+ "dollar-sign":
+ '',
+ "download-cloud":
+ '',
+ download:
+ '',
+ dribbble:
+ '',
+ droplet:
+ '',
+ "edit-2":
+ '',
+ "edit-3":
+ '',
+ edit: '',
+ "external-link":
+ '',
+ "eye-off":
+ '',
+ eye: '',
+ facebook:
+ '',
+ "fast-forward":
+ '',
+ feather:
+ '',
+ figma: '',
+ "file-minus":
+ '',
+ "file-plus":
+ '',
+ "file-text":
+ '',
+ file: '',
+ film: '',
+ filter: '',
+ flag: '',
+ "folder-minus":
+ '',
+ "folder-plus":
+ '',
+ folder: '',
+ framer: '',
+ frown: '',
+ gift: '',
+ "git-branch":
+ '',
+ "git-commit":
+ '',
+ "git-merge":
+ '',
+ "git-pull-request":
+ '',
+ github: '',
+ gitlab: '',
+ globe: '',
+ grid: '',
+ "hard-drive":
+ '',
+ hash: '',
+ headphones:
+ '',
+ heart: '',
+ "help-circle":
+ '',
+ hexagon:
+ '',
+ home: '',
+ image: '',
+ inbox: '',
+ info: '',
+ instagram:
+ '',
+ italic: '',
+ key: '',
+ layers: '',
+ layout: '',
+ "life-buoy":
+ '',
+ "link-2":
+ '',
+ link: '',
+ linkedin:
+ '',
+ list: '',
+ loader: '',
+ lock: '',
+ "log-in":
+ '',
+ "log-out":
+ '',
+ mail: '',
+ "map-pin":
+ '',
+ map: '',
+ "maximize-2":
+ '',
+ maximize:
+ '',
+ meh: '',
+ menu: '',
+ "message-circle":
+ '',
+ "message-square":
+ '',
+ "mic-off":
+ '',
+ mic: '',
+ "minimize-2":
+ '',
+ minimize:
+ '',
+ "minus-circle":
+ '',
+ "minus-square":
+ '',
+ minus: '',
+ monitor:
+ '',
+ moon: '',
+ "more-horizontal":
+ '',
+ "more-vertical":
+ '',
+ "mouse-pointer":
+ '',
+ move: '',
+ music: '',
+ "navigation-2":
+ '',
+ navigation:
+ '',
+ octagon:
+ '',
+ package:
+ '',
+ paperclip:
+ '',
+ "pause-circle":
+ '',
+ pause: '',
+ "pen-tool":
+ '',
+ percent:
+ '',
+ "phone-call":
+ '',
+ "phone-forwarded":
+ '',
+ "phone-incoming":
+ '',
+ "phone-missed":
+ '',
+ "phone-off":
+ '',
+ "phone-outgoing":
+ '',
+ phone: '',
+ "pie-chart":
+ '',
+ "play-circle":
+ '',
+ play: '',
+ "plus-circle":
+ '',
+ "plus-square":
+ '',
+ plus: '',
+ pocket: '',
+ power: '',
+ printer:
+ '',
+ radio: '',
+ "refresh-ccw":
+ '',
+ "refresh-cw":
+ '',
+ repeat: '',
+ rewind: '',
+ "rotate-ccw":
+ '',
+ "rotate-cw":
+ '',
+ rss: '',
+ save: '',
+ scissors:
+ '',
+ search: '',
+ send: '',
+ server: '',
+ settings:
+ '',
+ "share-2":
+ '',
+ share: '',
+ "shield-off":
+ '',
+ shield: '',
+ "shopping-bag":
+ '',
+ "shopping-cart":
+ '',
+ shuffle:
+ '',
+ sidebar:
+ '',
+ "skip-back":
+ '',
+ "skip-forward":
+ '',
+ slack: '',
+ slash: '',
+ sliders:
+ '',
+ smartphone:
+ '',
+ smile: '',
+ speaker:
+ '',
+ square: '',
+ star: '',
+ "stop-circle":
+ '',
+ sun: '',
+ sunrise:
+ '',
+ sunset: '',
+ table: '',
+ tablet: '',
+ tag: '',
+ target: '',
+ terminal:
+ '',
+ thermometer:
+ '',
+ "thumbs-down":
+ '',
+ "thumbs-up":
+ '',
+ "toggle-left":
+ '',
+ "toggle-right":
+ '',
+ tool: '',
+ "trash-2":
+ '',
+ trash: '',
+ trello: '',
+ "trending-down":
+ '',
+ "trending-up":
+ '',
+ triangle:
+ '',
+ truck: '',
+ tv: '',
+ twitch: '',
+ twitter:
+ '',
+ type: '',
+ umbrella:
+ '',
+ underline:
+ '',
+ unlock: '',
+ "upload-cloud":
+ '',
+ upload: '',
+ "user-check":
+ '',
+ "user-minus":
+ '',
+ "user-plus":
+ '',
+ "user-x":
+ '',
+ user: '',
+ users: '',
+ "video-off":
+ '',
+ video: '',
+ voicemail:
+ '',
+ "volume-1":
+ '',
+ "volume-2":
+ '',
+ "volume-x":
+ '',
+ volume: '',
+ watch: '',
+ "wifi-off":
+ '',
+ wifi: '',
+ wind: '',
+ "x-circle":
+ '',
+ "x-octagon":
+ '',
+ "x-square":
+ '',
+ x: '',
+ youtube:
+ '',
+ "zap-off":
+ '',
+ zap: '',
+ "zoom-in":
+ '',
+ "zoom-out":
+ '',
+ };
+ },
+ "./node_modules/classnames/dedupe.js": function (n, r, i) {
+ var o, s;
+ /*!
+ Copyright (c) 2016 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+*/ (function () {
+ var l = (function () {
+ function a() {}
+ a.prototype = Object.create(null);
+ function u(x, S) {
+ for (var T = S.length, d = 0; d < T; ++d)
+ v(x, S[d]);
+ }
+ var c = {}.hasOwnProperty;
+ function f(x, S) {
+ x[S] = !0;
+ }
+ function h(x, S) {
+ for (var T in S) c.call(S, T) && (x[T] = !!S[T]);
+ }
+ var p = /\s+/;
+ function g(x, S) {
+ for (
+ var T = S.split(p), d = T.length, y = 0;
+ y < d;
+ ++y
+ )
+ x[T[y]] = !0;
+ }
+ function v(x, S) {
+ if (!!S) {
+ var T = typeof S;
+ T === "string"
+ ? g(x, S)
+ : Array.isArray(S)
+ ? u(x, S)
+ : T === "object"
+ ? h(x, S)
+ : T === "number" && f(x, S);
+ }
+ }
+ function b() {
+ for (
+ var x = arguments.length, S = Array(x), T = 0;
+ T < x;
+ T++
+ )
+ S[T] = arguments[T];
+ var d = new a();
+ u(d, S);
+ var y = [];
+ for (var m in d) d[m] && y.push(m);
+ return y.join(" ");
+ }
+ return b;
+ })();
+ typeof n != "undefined" && n.exports
+ ? (n.exports = l)
+ : ((o = []),
+ (s = function () {
+ return l;
+ }.apply(r, o)),
+ s !== void 0 && (n.exports = s));
+ })();
+ },
+ "./node_modules/core-js/es/array/from.js": function (n, r, i) {
+ i("./node_modules/core-js/modules/es.string.iterator.js"),
+ i("./node_modules/core-js/modules/es.array.from.js");
+ var o = i("./node_modules/core-js/internals/path.js");
+ n.exports = o.Array.from;
+ },
+ "./node_modules/core-js/internals/a-function.js": function (n, r) {
+ n.exports = function (i) {
+ if (typeof i != "function")
+ throw TypeError(String(i) + " is not a function");
+ return i;
+ };
+ },
+ "./node_modules/core-js/internals/an-object.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/is-object.js");
+ n.exports = function (s) {
+ if (!o(s)) throw TypeError(String(s) + " is not an object");
+ return s;
+ };
+ },
+ "./node_modules/core-js/internals/array-from.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/bind-context.js"),
+ s = i("./node_modules/core-js/internals/to-object.js"),
+ l = i(
+ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/is-array-iterator-method.js"
+ ),
+ u = i("./node_modules/core-js/internals/to-length.js"),
+ c = i(
+ "./node_modules/core-js/internals/create-property.js"
+ ),
+ f = i(
+ "./node_modules/core-js/internals/get-iterator-method.js"
+ );
+ n.exports = function (p) {
+ var g = s(p),
+ v = typeof this == "function" ? this : Array,
+ b = arguments.length,
+ x = b > 1 ? arguments[1] : void 0,
+ S = x !== void 0,
+ T = 0,
+ d = f(g),
+ y,
+ m,
+ w,
+ k;
+ if (
+ (S && (x = o(x, b > 2 ? arguments[2] : void 0, 2)),
+ d != null && !(v == Array && a(d)))
+ )
+ for (
+ k = d.call(g), m = new v();
+ !(w = k.next()).done;
+ T++
+ )
+ c(m, T, S ? l(k, x, [w.value, T], !0) : w.value);
+ else
+ for (y = u(g.length), m = new v(y); y > T; T++)
+ c(m, T, S ? x(g[T], T) : g[T]);
+ return (m.length = T), m;
+ };
+ },
+ "./node_modules/core-js/internals/array-includes.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/to-indexed-object.js"
+ ),
+ s = i("./node_modules/core-js/internals/to-length.js"),
+ l = i(
+ "./node_modules/core-js/internals/to-absolute-index.js"
+ );
+ n.exports = function (a) {
+ return function (u, c, f) {
+ var h = o(u),
+ p = s(h.length),
+ g = l(f, p),
+ v;
+ if (a && c != c) {
+ for (; p > g; )
+ if (((v = h[g++]), v != v)) return !0;
+ } else
+ for (; p > g; g++)
+ if ((a || g in h) && h[g] === c)
+ return a || g || 0;
+ return !a && -1;
+ };
+ };
+ },
+ "./node_modules/core-js/internals/bind-context.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/a-function.js");
+ n.exports = function (s, l, a) {
+ if ((o(s), l === void 0)) return s;
+ switch (a) {
+ case 0:
+ return function () {
+ return s.call(l);
+ };
+ case 1:
+ return function (u) {
+ return s.call(l, u);
+ };
+ case 2:
+ return function (u, c) {
+ return s.call(l, u, c);
+ };
+ case 3:
+ return function (u, c, f) {
+ return s.call(l, u, c, f);
+ };
+ }
+ return function () {
+ return s.apply(l, arguments);
+ };
+ };
+ },
+ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/an-object.js");
+ n.exports = function (s, l, a, u) {
+ try {
+ return u ? l(o(a)[0], a[1]) : l(a);
+ } catch (f) {
+ var c = s.return;
+ throw (c !== void 0 && o(c.call(s)), f);
+ }
+ };
+ },
+ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ s = o("iterator"),
+ l = !1;
+ try {
+ var a = 0,
+ u = {
+ next: function () {
+ return { done: !!a++ };
+ },
+ return: function () {
+ l = !0;
+ },
+ };
+ (u[s] = function () {
+ return this;
+ }),
+ Array.from(u, function () {
+ throw 2;
+ });
+ } catch (c) {}
+ n.exports = function (c, f) {
+ if (!f && !l) return !1;
+ var h = !1;
+ try {
+ var p = {};
+ (p[s] = function () {
+ return {
+ next: function () {
+ return { done: (h = !0) };
+ },
+ };
+ }),
+ c(p);
+ } catch (g) {}
+ return h;
+ };
+ },
+ "./node_modules/core-js/internals/classof-raw.js": function (n, r) {
+ var i = {}.toString;
+ n.exports = function (o) {
+ return i.call(o).slice(8, -1);
+ };
+ },
+ "./node_modules/core-js/internals/classof.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/classof-raw.js"),
+ s = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ l = s("toStringTag"),
+ a =
+ o(
+ (function () {
+ return arguments;
+ })()
+ ) == "Arguments",
+ u = function (c, f) {
+ try {
+ return c[f];
+ } catch (h) {}
+ };
+ n.exports = function (c) {
+ var f, h, p;
+ return c === void 0
+ ? "Undefined"
+ : c === null
+ ? "Null"
+ : typeof (h = u((f = Object(c)), l)) == "string"
+ ? h
+ : a
+ ? o(f)
+ : (p = o(f)) == "Object" &&
+ typeof f.callee == "function"
+ ? "Arguments"
+ : p;
+ };
+ },
+ "./node_modules/core-js/internals/copy-constructor-properties.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/has.js"),
+ s = i("./node_modules/core-js/internals/own-keys.js"),
+ l = i(
+ "./node_modules/core-js/internals/object-get-own-property-descriptor.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/object-define-property.js"
+ );
+ n.exports = function (u, c) {
+ for (
+ var f = s(c), h = a.f, p = l.f, g = 0;
+ g < f.length;
+ g++
+ ) {
+ var v = f[g];
+ o(u, v) || h(u, v, p(c, v));
+ }
+ };
+ },
+ "./node_modules/core-js/internals/correct-prototype-getter.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/fails.js");
+ n.exports = !o(function () {
+ function s() {}
+ return (
+ (s.prototype.constructor = null),
+ Object.getPrototypeOf(new s()) !== s.prototype
+ );
+ });
+ },
+ "./node_modules/core-js/internals/create-iterator-constructor.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/iterators-core.js"
+ ).IteratorPrototype,
+ s = i(
+ "./node_modules/core-js/internals/object-create.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/create-property-descriptor.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/set-to-string-tag.js"
+ ),
+ u = i("./node_modules/core-js/internals/iterators.js"),
+ c = function () {
+ return this;
+ };
+ n.exports = function (f, h, p) {
+ var g = h + " Iterator";
+ return (
+ (f.prototype = s(o, { next: l(1, p) })),
+ a(f, g, !1, !0),
+ (u[g] = c),
+ f
+ );
+ };
+ },
+ "./node_modules/core-js/internals/create-property-descriptor.js":
+ function (n, r) {
+ n.exports = function (i, o) {
+ return {
+ enumerable: !(i & 1),
+ configurable: !(i & 2),
+ writable: !(i & 4),
+ value: o,
+ };
+ };
+ },
+ "./node_modules/core-js/internals/create-property.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/to-primitive.js"),
+ s = i(
+ "./node_modules/core-js/internals/object-define-property.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/create-property-descriptor.js"
+ );
+ n.exports = function (a, u, c) {
+ var f = o(u);
+ f in a ? s.f(a, f, l(0, c)) : (a[f] = c);
+ };
+ },
+ "./node_modules/core-js/internals/define-iterator.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/export.js"),
+ s = i(
+ "./node_modules/core-js/internals/create-iterator-constructor.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/object-get-prototype-of.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/object-set-prototype-of.js"
+ ),
+ u = i(
+ "./node_modules/core-js/internals/set-to-string-tag.js"
+ ),
+ c = i("./node_modules/core-js/internals/hide.js"),
+ f = i("./node_modules/core-js/internals/redefine.js"),
+ h = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ p = i("./node_modules/core-js/internals/is-pure.js"),
+ g = i("./node_modules/core-js/internals/iterators.js"),
+ v = i("./node_modules/core-js/internals/iterators-core.js"),
+ b = v.IteratorPrototype,
+ x = v.BUGGY_SAFARI_ITERATORS,
+ S = h("iterator"),
+ T = "keys",
+ d = "values",
+ y = "entries",
+ m = function () {
+ return this;
+ };
+ n.exports = function (w, k, _, C, E, R, P) {
+ s(_, k, C);
+ var L = function (Le) {
+ if (Le === E && K) return K;
+ if (!x && Le in N) return N[Le];
+ switch (Le) {
+ case T:
+ return function () {
+ return new _(this, Le);
+ };
+ case d:
+ return function () {
+ return new _(this, Le);
+ };
+ case y:
+ return function () {
+ return new _(this, Le);
+ };
+ }
+ return function () {
+ return new _(this);
+ };
+ },
+ I = k + " Iterator",
+ M = !1,
+ N = w.prototype,
+ D = N[S] || N["@@iterator"] || (E && N[E]),
+ K = (!x && D) || L(E),
+ ae = (k == "Array" && N.entries) || D,
+ Q,
+ me,
+ je;
+ if (
+ (ae &&
+ ((Q = l(ae.call(new w()))),
+ b !== Object.prototype &&
+ Q.next &&
+ (!p &&
+ l(Q) !== b &&
+ (a
+ ? a(Q, b)
+ : typeof Q[S] != "function" &&
+ c(Q, S, m)),
+ u(Q, I, !0, !0),
+ p && (g[I] = m))),
+ E == d &&
+ D &&
+ D.name !== d &&
+ ((M = !0),
+ (K = function () {
+ return D.call(this);
+ })),
+ (!p || P) && N[S] !== K && c(N, S, K),
+ (g[k] = K),
+ E)
+ )
+ if (
+ ((me = {
+ values: L(d),
+ keys: R ? K : L(T),
+ entries: L(y),
+ }),
+ P)
+ )
+ for (je in me)
+ (x || M || !(je in N)) && f(N, je, me[je]);
+ else o({ target: k, proto: !0, forced: x || M }, me);
+ return me;
+ };
+ },
+ "./node_modules/core-js/internals/descriptors.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/fails.js");
+ n.exports = !o(function () {
+ return (
+ Object.defineProperty({}, "a", {
+ get: function () {
+ return 7;
+ },
+ }).a != 7
+ );
+ });
+ },
+ "./node_modules/core-js/internals/document-create-element.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i("./node_modules/core-js/internals/is-object.js"),
+ l = o.document,
+ a = s(l) && s(l.createElement);
+ n.exports = function (u) {
+ return a ? l.createElement(u) : {};
+ };
+ },
+ "./node_modules/core-js/internals/enum-bug-keys.js": function (
+ n,
+ r
+ ) {
+ n.exports = [
+ "constructor",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "toLocaleString",
+ "toString",
+ "valueOf",
+ ];
+ },
+ "./node_modules/core-js/internals/export.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i(
+ "./node_modules/core-js/internals/object-get-own-property-descriptor.js"
+ ).f,
+ l = i("./node_modules/core-js/internals/hide.js"),
+ a = i("./node_modules/core-js/internals/redefine.js"),
+ u = i("./node_modules/core-js/internals/set-global.js"),
+ c = i(
+ "./node_modules/core-js/internals/copy-constructor-properties.js"
+ ),
+ f = i("./node_modules/core-js/internals/is-forced.js");
+ n.exports = function (h, p) {
+ var g = h.target,
+ v = h.global,
+ b = h.stat,
+ x,
+ S,
+ T,
+ d,
+ y,
+ m;
+ if (
+ (v
+ ? (S = o)
+ : b
+ ? (S = o[g] || u(g, {}))
+ : (S = (o[g] || {}).prototype),
+ S)
+ )
+ for (T in p) {
+ if (
+ ((y = p[T]),
+ h.noTargetGet
+ ? ((m = s(S, T)), (d = m && m.value))
+ : (d = S[T]),
+ (x = f(
+ v ? T : g + (b ? "." : "#") + T,
+ h.forced
+ )),
+ !x && d !== void 0)
+ ) {
+ if (typeof y == typeof d) continue;
+ c(y, d);
+ }
+ (h.sham || (d && d.sham)) && l(y, "sham", !0),
+ a(S, T, y, h);
+ }
+ };
+ },
+ "./node_modules/core-js/internals/fails.js": function (n, r) {
+ n.exports = function (i) {
+ try {
+ return !!i();
+ } catch (o) {
+ return !0;
+ }
+ };
+ },
+ "./node_modules/core-js/internals/function-to-string.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/shared.js");
+ n.exports = o("native-function-to-string", Function.toString);
+ },
+ "./node_modules/core-js/internals/get-iterator-method.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/classof.js"),
+ s = i("./node_modules/core-js/internals/iterators.js"),
+ l = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ a = l("iterator");
+ n.exports = function (u) {
+ if (u != null)
+ return u[a] || u["@@iterator"] || s[o(u)];
+ };
+ },
+ "./node_modules/core-js/internals/global.js": function (n, r, i) {
+ (function (o) {
+ var s = "object",
+ l = function (a) {
+ return a && a.Math == Math && a;
+ };
+ n.exports =
+ l(typeof globalThis == s && globalThis) ||
+ l(typeof window == s && window) ||
+ l(typeof self == s && self) ||
+ l(typeof o == s && o) ||
+ Function("return this")();
+ }.call(this, i("./node_modules/webpack/buildin/global.js")));
+ },
+ "./node_modules/core-js/internals/has.js": function (n, r) {
+ var i = {}.hasOwnProperty;
+ n.exports = function (o, s) {
+ return i.call(o, s);
+ };
+ },
+ "./node_modules/core-js/internals/hidden-keys.js": function (n, r) {
+ n.exports = {};
+ },
+ "./node_modules/core-js/internals/hide.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/descriptors.js"),
+ s = i(
+ "./node_modules/core-js/internals/object-define-property.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/create-property-descriptor.js"
+ );
+ n.exports = o
+ ? function (a, u, c) {
+ return s.f(a, u, l(1, c));
+ }
+ : function (a, u, c) {
+ return (a[u] = c), a;
+ };
+ },
+ "./node_modules/core-js/internals/html.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = o.document;
+ n.exports = s && s.documentElement;
+ },
+ "./node_modules/core-js/internals/ie8-dom-define.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/descriptors.js"),
+ s = i("./node_modules/core-js/internals/fails.js"),
+ l = i(
+ "./node_modules/core-js/internals/document-create-element.js"
+ );
+ n.exports =
+ !o &&
+ !s(function () {
+ return (
+ Object.defineProperty(l("div"), "a", {
+ get: function () {
+ return 7;
+ },
+ }).a != 7
+ );
+ });
+ },
+ "./node_modules/core-js/internals/indexed-object.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/fails.js"),
+ s = i("./node_modules/core-js/internals/classof-raw.js"),
+ l = "".split;
+ n.exports = o(function () {
+ return !Object("z").propertyIsEnumerable(0);
+ })
+ ? function (a) {
+ return s(a) == "String" ? l.call(a, "") : Object(a);
+ }
+ : Object;
+ },
+ "./node_modules/core-js/internals/internal-state.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/native-weak-map.js"
+ ),
+ s = i("./node_modules/core-js/internals/global.js"),
+ l = i("./node_modules/core-js/internals/is-object.js"),
+ a = i("./node_modules/core-js/internals/hide.js"),
+ u = i("./node_modules/core-js/internals/has.js"),
+ c = i("./node_modules/core-js/internals/shared-key.js"),
+ f = i("./node_modules/core-js/internals/hidden-keys.js"),
+ h = s.WeakMap,
+ p,
+ g,
+ v,
+ b = function (w) {
+ return v(w) ? g(w) : p(w, {});
+ },
+ x = function (w) {
+ return function (k) {
+ var _;
+ if (!l(k) || (_ = g(k)).type !== w)
+ throw TypeError(
+ "Incompatible receiver, " + w + " required"
+ );
+ return _;
+ };
+ };
+ if (o) {
+ var S = new h(),
+ T = S.get,
+ d = S.has,
+ y = S.set;
+ (p = function (w, k) {
+ return y.call(S, w, k), k;
+ }),
+ (g = function (w) {
+ return T.call(S, w) || {};
+ }),
+ (v = function (w) {
+ return d.call(S, w);
+ });
+ } else {
+ var m = c("state");
+ (f[m] = !0),
+ (p = function (w, k) {
+ return a(w, m, k), k;
+ }),
+ (g = function (w) {
+ return u(w, m) ? w[m] : {};
+ }),
+ (v = function (w) {
+ return u(w, m);
+ });
+ }
+ n.exports = {
+ set: p,
+ get: g,
+ has: v,
+ enforce: b,
+ getterFor: x,
+ };
+ },
+ "./node_modules/core-js/internals/is-array-iterator-method.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ s = i("./node_modules/core-js/internals/iterators.js"),
+ l = o("iterator"),
+ a = Array.prototype;
+ n.exports = function (u) {
+ return u !== void 0 && (s.Array === u || a[l] === u);
+ };
+ },
+ "./node_modules/core-js/internals/is-forced.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/fails.js"),
+ s = /#|\.prototype\./,
+ l = function (h, p) {
+ var g = u[a(h)];
+ return g == f
+ ? !0
+ : g == c
+ ? !1
+ : typeof p == "function"
+ ? o(p)
+ : !!p;
+ },
+ a = (l.normalize = function (h) {
+ return String(h).replace(s, ".").toLowerCase();
+ }),
+ u = (l.data = {}),
+ c = (l.NATIVE = "N"),
+ f = (l.POLYFILL = "P");
+ n.exports = l;
+ },
+ "./node_modules/core-js/internals/is-object.js": function (n, r) {
+ n.exports = function (i) {
+ return typeof i == "object"
+ ? i !== null
+ : typeof i == "function";
+ };
+ },
+ "./node_modules/core-js/internals/is-pure.js": function (n, r) {
+ n.exports = !1;
+ },
+ "./node_modules/core-js/internals/iterators-core.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/object-get-prototype-of.js"
+ ),
+ s = i("./node_modules/core-js/internals/hide.js"),
+ l = i("./node_modules/core-js/internals/has.js"),
+ a = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ u = i("./node_modules/core-js/internals/is-pure.js"),
+ c = a("iterator"),
+ f = !1,
+ h = function () {
+ return this;
+ },
+ p,
+ g,
+ v;
+ [].keys &&
+ ((v = [].keys()),
+ "next" in v
+ ? ((g = o(o(v))), g !== Object.prototype && (p = g))
+ : (f = !0)),
+ p == null && (p = {}),
+ !u && !l(p, c) && s(p, c, h),
+ (n.exports = {
+ IteratorPrototype: p,
+ BUGGY_SAFARI_ITERATORS: f,
+ });
+ },
+ "./node_modules/core-js/internals/iterators.js": function (n, r) {
+ n.exports = {};
+ },
+ "./node_modules/core-js/internals/native-symbol.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/fails.js");
+ n.exports =
+ !!Object.getOwnPropertySymbols &&
+ !o(function () {
+ return !String(Symbol());
+ });
+ },
+ "./node_modules/core-js/internals/native-weak-map.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i(
+ "./node_modules/core-js/internals/function-to-string.js"
+ ),
+ l = o.WeakMap;
+ n.exports =
+ typeof l == "function" && /native code/.test(s.call(l));
+ },
+ "./node_modules/core-js/internals/object-create.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/an-object.js"),
+ s = i(
+ "./node_modules/core-js/internals/object-define-properties.js"
+ ),
+ l = i("./node_modules/core-js/internals/enum-bug-keys.js"),
+ a = i("./node_modules/core-js/internals/hidden-keys.js"),
+ u = i("./node_modules/core-js/internals/html.js"),
+ c = i(
+ "./node_modules/core-js/internals/document-create-element.js"
+ ),
+ f = i("./node_modules/core-js/internals/shared-key.js"),
+ h = f("IE_PROTO"),
+ p = "prototype",
+ g = function () {},
+ v = function () {
+ var b = c("iframe"),
+ x = l.length,
+ S = "<",
+ T = "script",
+ d = ">",
+ y = "java" + T + ":",
+ m;
+ for (
+ b.style.display = "none",
+ u.appendChild(b),
+ b.src = String(y),
+ m = b.contentWindow.document,
+ m.open(),
+ m.write(
+ S +
+ T +
+ d +
+ "document.F=Object" +
+ S +
+ "/" +
+ T +
+ d
+ ),
+ m.close(),
+ v = m.F;
+ x--;
+
+ )
+ delete v[p][l[x]];
+ return v();
+ };
+ (n.exports =
+ Object.create ||
+ function (x, S) {
+ var T;
+ return (
+ x !== null
+ ? ((g[p] = o(x)),
+ (T = new g()),
+ (g[p] = null),
+ (T[h] = x))
+ : (T = v()),
+ S === void 0 ? T : s(T, S)
+ );
+ }),
+ (a[h] = !0);
+ },
+ "./node_modules/core-js/internals/object-define-properties.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/descriptors.js"
+ ),
+ s = i(
+ "./node_modules/core-js/internals/object-define-property.js"
+ ),
+ l = i("./node_modules/core-js/internals/an-object.js"),
+ a = i(
+ "./node_modules/core-js/internals/object-keys.js"
+ );
+ n.exports = o
+ ? Object.defineProperties
+ : function (c, f) {
+ l(c);
+ for (
+ var h = a(f), p = h.length, g = 0, v;
+ p > g;
+
+ )
+ s.f(c, (v = h[g++]), f[v]);
+ return c;
+ };
+ },
+ "./node_modules/core-js/internals/object-define-property.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/descriptors.js"
+ ),
+ s = i(
+ "./node_modules/core-js/internals/ie8-dom-define.js"
+ ),
+ l = i("./node_modules/core-js/internals/an-object.js"),
+ a = i(
+ "./node_modules/core-js/internals/to-primitive.js"
+ ),
+ u = Object.defineProperty;
+ r.f = o
+ ? u
+ : function (f, h, p) {
+ if ((l(f), (h = a(h, !0)), l(p), s))
+ try {
+ return u(f, h, p);
+ } catch (g) {}
+ if ("get" in p || "set" in p)
+ throw TypeError("Accessors not supported");
+ return "value" in p && (f[h] = p.value), f;
+ };
+ },
+ "./node_modules/core-js/internals/object-get-own-property-descriptor.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/descriptors.js"
+ ),
+ s = i(
+ "./node_modules/core-js/internals/object-property-is-enumerable.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/create-property-descriptor.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/to-indexed-object.js"
+ ),
+ u = i(
+ "./node_modules/core-js/internals/to-primitive.js"
+ ),
+ c = i("./node_modules/core-js/internals/has.js"),
+ f = i(
+ "./node_modules/core-js/internals/ie8-dom-define.js"
+ ),
+ h = Object.getOwnPropertyDescriptor;
+ r.f = o
+ ? h
+ : function (g, v) {
+ if (((g = a(g)), (v = u(v, !0)), f))
+ try {
+ return h(g, v);
+ } catch (b) {}
+ if (c(g, v)) return l(!s.f.call(g, v), g[v]);
+ };
+ },
+ "./node_modules/core-js/internals/object-get-own-property-names.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/object-keys-internal.js"
+ ),
+ s = i(
+ "./node_modules/core-js/internals/enum-bug-keys.js"
+ ),
+ l = s.concat("length", "prototype");
+ r.f =
+ Object.getOwnPropertyNames ||
+ function (u) {
+ return o(u, l);
+ };
+ },
+ "./node_modules/core-js/internals/object-get-own-property-symbols.js":
+ function (n, r) {
+ r.f = Object.getOwnPropertySymbols;
+ },
+ "./node_modules/core-js/internals/object-get-prototype-of.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/has.js"),
+ s = i("./node_modules/core-js/internals/to-object.js"),
+ l = i("./node_modules/core-js/internals/shared-key.js"),
+ a = i(
+ "./node_modules/core-js/internals/correct-prototype-getter.js"
+ ),
+ u = l("IE_PROTO"),
+ c = Object.prototype;
+ n.exports = a
+ ? Object.getPrototypeOf
+ : function (f) {
+ return (
+ (f = s(f)),
+ o(f, u)
+ ? f[u]
+ : typeof f.constructor == "function" &&
+ f instanceof f.constructor
+ ? f.constructor.prototype
+ : f instanceof Object
+ ? c
+ : null
+ );
+ };
+ },
+ "./node_modules/core-js/internals/object-keys-internal.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/has.js"),
+ s = i(
+ "./node_modules/core-js/internals/to-indexed-object.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/array-includes.js"
+ ),
+ a = i(
+ "./node_modules/core-js/internals/hidden-keys.js"
+ ),
+ u = l(!1);
+ n.exports = function (c, f) {
+ var h = s(c),
+ p = 0,
+ g = [],
+ v;
+ for (v in h) !o(a, v) && o(h, v) && g.push(v);
+ for (; f.length > p; )
+ o(h, (v = f[p++])) && (~u(g, v) || g.push(v));
+ return g;
+ };
+ },
+ "./node_modules/core-js/internals/object-keys.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/object-keys-internal.js"
+ ),
+ s = i("./node_modules/core-js/internals/enum-bug-keys.js");
+ n.exports =
+ Object.keys ||
+ function (a) {
+ return o(a, s);
+ };
+ },
+ "./node_modules/core-js/internals/object-property-is-enumerable.js":
+ function (n, r, i) {
+ var o = {}.propertyIsEnumerable,
+ s = Object.getOwnPropertyDescriptor,
+ l = s && !o.call({ 1: 2 }, 1);
+ r.f = l
+ ? function (u) {
+ var c = s(this, u);
+ return !!c && c.enumerable;
+ }
+ : o;
+ },
+ "./node_modules/core-js/internals/object-set-prototype-of.js":
+ function (n, r, i) {
+ var o = i(
+ "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js"
+ );
+ n.exports =
+ Object.setPrototypeOf ||
+ ("__proto__" in {}
+ ? (function () {
+ var s = !1,
+ l = {},
+ a;
+ try {
+ (a = Object.getOwnPropertyDescriptor(
+ Object.prototype,
+ "__proto__"
+ ).set),
+ a.call(l, []),
+ (s = l instanceof Array);
+ } catch (u) {}
+ return function (c, f) {
+ return (
+ o(c, f),
+ s
+ ? a.call(c, f)
+ : (c.__proto__ = f),
+ c
+ );
+ };
+ })()
+ : void 0);
+ },
+ "./node_modules/core-js/internals/own-keys.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i(
+ "./node_modules/core-js/internals/object-get-own-property-names.js"
+ ),
+ l = i(
+ "./node_modules/core-js/internals/object-get-own-property-symbols.js"
+ ),
+ a = i("./node_modules/core-js/internals/an-object.js"),
+ u = o.Reflect;
+ n.exports =
+ (u && u.ownKeys) ||
+ function (f) {
+ var h = s.f(a(f)),
+ p = l.f;
+ return p ? h.concat(p(f)) : h;
+ };
+ },
+ "./node_modules/core-js/internals/path.js": function (n, r, i) {
+ n.exports = i("./node_modules/core-js/internals/global.js");
+ },
+ "./node_modules/core-js/internals/redefine.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i("./node_modules/core-js/internals/shared.js"),
+ l = i("./node_modules/core-js/internals/hide.js"),
+ a = i("./node_modules/core-js/internals/has.js"),
+ u = i("./node_modules/core-js/internals/set-global.js"),
+ c = i(
+ "./node_modules/core-js/internals/function-to-string.js"
+ ),
+ f = i("./node_modules/core-js/internals/internal-state.js"),
+ h = f.get,
+ p = f.enforce,
+ g = String(c).split("toString");
+ s("inspectSource", function (v) {
+ return c.call(v);
+ }),
+ (n.exports = function (v, b, x, S) {
+ var T = S ? !!S.unsafe : !1,
+ d = S ? !!S.enumerable : !1,
+ y = S ? !!S.noTargetGet : !1;
+ if (
+ (typeof x == "function" &&
+ (typeof b == "string" &&
+ !a(x, "name") &&
+ l(x, "name", b),
+ (p(x).source = g.join(
+ typeof b == "string" ? b : ""
+ ))),
+ v === o)
+ ) {
+ d ? (v[b] = x) : u(b, x);
+ return;
+ } else T ? !y && v[b] && (d = !0) : delete v[b];
+ d ? (v[b] = x) : l(v, b, x);
+ })(Function.prototype, "toString", function () {
+ return (
+ (typeof this == "function" && h(this).source) ||
+ c.call(this)
+ );
+ });
+ },
+ "./node_modules/core-js/internals/require-object-coercible.js":
+ function (n, r) {
+ n.exports = function (i) {
+ if (i == null)
+ throw TypeError("Can't call method on " + i);
+ return i;
+ };
+ },
+ "./node_modules/core-js/internals/set-global.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i("./node_modules/core-js/internals/hide.js");
+ n.exports = function (l, a) {
+ try {
+ s(o, l, a);
+ } catch (u) {
+ o[l] = a;
+ }
+ return a;
+ };
+ },
+ "./node_modules/core-js/internals/set-to-string-tag.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/object-define-property.js"
+ ).f,
+ s = i("./node_modules/core-js/internals/has.js"),
+ l = i(
+ "./node_modules/core-js/internals/well-known-symbol.js"
+ ),
+ a = l("toStringTag");
+ n.exports = function (u, c, f) {
+ u &&
+ !s((u = f ? u : u.prototype), a) &&
+ o(u, a, { configurable: !0, value: c });
+ };
+ },
+ "./node_modules/core-js/internals/shared-key.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/shared.js"),
+ s = i("./node_modules/core-js/internals/uid.js"),
+ l = o("keys");
+ n.exports = function (a) {
+ return l[a] || (l[a] = s(a));
+ };
+ },
+ "./node_modules/core-js/internals/shared.js": function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i("./node_modules/core-js/internals/set-global.js"),
+ l = i("./node_modules/core-js/internals/is-pure.js"),
+ a = "__core-js_shared__",
+ u = o[a] || s(a, {});
+ (n.exports = function (c, f) {
+ return u[c] || (u[c] = f !== void 0 ? f : {});
+ })("versions", []).push({
+ version: "3.1.3",
+ mode: l ? "pure" : "global",
+ copyright: "\xA9 2019 Denis Pushkarev (zloirock.ru)",
+ });
+ },
+ "./node_modules/core-js/internals/string-at.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/to-integer.js"),
+ s = i(
+ "./node_modules/core-js/internals/require-object-coercible.js"
+ );
+ n.exports = function (l, a, u) {
+ var c = String(s(l)),
+ f = o(a),
+ h = c.length,
+ p,
+ g;
+ return f < 0 || f >= h
+ ? u
+ ? ""
+ : void 0
+ : ((p = c.charCodeAt(f)),
+ p < 55296 ||
+ p > 56319 ||
+ f + 1 === h ||
+ (g = c.charCodeAt(f + 1)) < 56320 ||
+ g > 57343
+ ? u
+ ? c.charAt(f)
+ : p
+ : u
+ ? c.slice(f, f + 2)
+ : ((p - 55296) << 10) + (g - 56320) + 65536);
+ };
+ },
+ "./node_modules/core-js/internals/to-absolute-index.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/to-integer.js"),
+ s = Math.max,
+ l = Math.min;
+ n.exports = function (a, u) {
+ var c = o(a);
+ return c < 0 ? s(c + u, 0) : l(c, u);
+ };
+ },
+ "./node_modules/core-js/internals/to-indexed-object.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/indexed-object.js"),
+ s = i(
+ "./node_modules/core-js/internals/require-object-coercible.js"
+ );
+ n.exports = function (l) {
+ return o(s(l));
+ };
+ },
+ "./node_modules/core-js/internals/to-integer.js": function (n, r) {
+ var i = Math.ceil,
+ o = Math.floor;
+ n.exports = function (s) {
+ return isNaN((s = +s)) ? 0 : (s > 0 ? o : i)(s);
+ };
+ },
+ "./node_modules/core-js/internals/to-length.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/to-integer.js"),
+ s = Math.min;
+ n.exports = function (l) {
+ return l > 0 ? s(o(l), 9007199254740991) : 0;
+ };
+ },
+ "./node_modules/core-js/internals/to-object.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i(
+ "./node_modules/core-js/internals/require-object-coercible.js"
+ );
+ n.exports = function (s) {
+ return Object(o(s));
+ };
+ },
+ "./node_modules/core-js/internals/to-primitive.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/is-object.js");
+ n.exports = function (s, l) {
+ if (!o(s)) return s;
+ var a, u;
+ if (
+ (l &&
+ typeof (a = s.toString) == "function" &&
+ !o((u = a.call(s)))) ||
+ (typeof (a = s.valueOf) == "function" &&
+ !o((u = a.call(s)))) ||
+ (!l &&
+ typeof (a = s.toString) == "function" &&
+ !o((u = a.call(s))))
+ )
+ return u;
+ throw TypeError("Can't convert object to primitive value");
+ };
+ },
+ "./node_modules/core-js/internals/uid.js": function (n, r) {
+ var i = 0,
+ o = Math.random();
+ n.exports = function (s) {
+ return "Symbol(".concat(
+ s === void 0 ? "" : s,
+ ")_",
+ (++i + o).toString(36)
+ );
+ };
+ },
+ "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":
+ function (n, r, i) {
+ var o = i("./node_modules/core-js/internals/is-object.js"),
+ s = i("./node_modules/core-js/internals/an-object.js");
+ n.exports = function (l, a) {
+ if ((s(l), !o(a) && a !== null))
+ throw TypeError(
+ "Can't set " + String(a) + " as a prototype"
+ );
+ };
+ },
+ "./node_modules/core-js/internals/well-known-symbol.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/global.js"),
+ s = i("./node_modules/core-js/internals/shared.js"),
+ l = i("./node_modules/core-js/internals/uid.js"),
+ a = i("./node_modules/core-js/internals/native-symbol.js"),
+ u = o.Symbol,
+ c = s("wks");
+ n.exports = function (f) {
+ return (
+ c[f] ||
+ (c[f] = (a && u[f]) || (a ? u : l)("Symbol." + f))
+ );
+ };
+ },
+ "./node_modules/core-js/modules/es.array.from.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/export.js"),
+ s = i("./node_modules/core-js/internals/array-from.js"),
+ l = i(
+ "./node_modules/core-js/internals/check-correctness-of-iteration.js"
+ ),
+ a = !l(function (u) {
+ Array.from(u);
+ });
+ o({ target: "Array", stat: !0, forced: a }, { from: s });
+ },
+ "./node_modules/core-js/modules/es.string.iterator.js": function (
+ n,
+ r,
+ i
+ ) {
+ var o = i("./node_modules/core-js/internals/string-at.js"),
+ s = i("./node_modules/core-js/internals/internal-state.js"),
+ l = i(
+ "./node_modules/core-js/internals/define-iterator.js"
+ ),
+ a = "String Iterator",
+ u = s.set,
+ c = s.getterFor(a);
+ l(
+ String,
+ "String",
+ function (f) {
+ u(this, { type: a, string: String(f), index: 0 });
+ },
+ function () {
+ var h = c(this),
+ p = h.string,
+ g = h.index,
+ v;
+ return g >= p.length
+ ? { value: void 0, done: !0 }
+ : ((v = o(p, g, !0)),
+ (h.index += v.length),
+ { value: v, done: !1 });
+ }
+ );
+ },
+ "./node_modules/webpack/buildin/global.js": function (n, r) {
+ var i;
+ i = (function () {
+ return this;
+ })();
+ try {
+ i = i || Function("return this")() || (0, eval)("this");
+ } catch (o) {
+ typeof window == "object" && (i = window);
+ }
+ n.exports = i;
+ },
+ "./src/default-attrs.json": function (n) {
+ n.exports = {
+ xmlns: "http://www.w3.org/2000/svg",
+ width: 24,
+ height: 24,
+ viewBox: "0 0 24 24",
+ fill: "none",
+ stroke: "currentColor",
+ "stroke-width": 2,
+ "stroke-linecap": "round",
+ "stroke-linejoin": "round",
+ };
+ },
+ "./src/icon.js": function (n, r, i) {
+ Object.defineProperty(r, "__esModule", { value: !0 });
+ var o =
+ Object.assign ||
+ function (v) {
+ for (var b = 1; b < arguments.length; b++) {
+ var x = arguments[b];
+ for (var S in x)
+ Object.prototype.hasOwnProperty.call(
+ x,
+ S
+ ) && (v[S] = x[S]);
+ }
+ return v;
+ },
+ s = (function () {
+ function v(b, x) {
+ for (var S = 0; S < x.length; S++) {
+ var T = x[S];
+ (T.enumerable = T.enumerable || !1),
+ (T.configurable = !0),
+ "value" in T && (T.writable = !0),
+ Object.defineProperty(b, T.key, T);
+ }
+ }
+ return function (b, x, S) {
+ return x && v(b.prototype, x), S && v(b, S), b;
+ };
+ })(),
+ l = i("./node_modules/classnames/dedupe.js"),
+ a = f(l),
+ u = i("./src/default-attrs.json"),
+ c = f(u);
+ function f(v) {
+ return v && v.__esModule ? v : { default: v };
+ }
+ function h(v, b) {
+ if (!(v instanceof b))
+ throw new TypeError(
+ "Cannot call a class as a function"
+ );
+ }
+ var p = (function () {
+ function v(b, x) {
+ var S =
+ arguments.length > 2 && arguments[2] !== void 0
+ ? arguments[2]
+ : [];
+ h(this, v),
+ (this.name = b),
+ (this.contents = x),
+ (this.tags = S),
+ (this.attrs = o({}, c.default, {
+ class: "feather feather-" + b,
+ }));
+ }
+ return (
+ s(v, [
+ {
+ key: "toSvg",
+ value: function () {
+ var x =
+ arguments.length > 0 &&
+ arguments[0] !== void 0
+ ? arguments[0]
+ : {},
+ S = o({}, this.attrs, x, {
+ class: (0, a.default)(
+ this.attrs.class,
+ x.class
+ ),
+ });
+ return (
+ ""
+ );
+ },
+ },
+ {
+ key: "toString",
+ value: function () {
+ return this.contents;
+ },
+ },
+ ]),
+ v
+ );
+ })();
+ function g(v) {
+ return Object.keys(v)
+ .map(function (b) {
+ return b + '="' + v[b] + '"';
+ })
+ .join(" ");
+ }
+ r.default = p;
+ },
+ "./src/icons.js": function (n, r, i) {
+ Object.defineProperty(r, "__esModule", { value: !0 });
+ var o = i("./src/icon.js"),
+ s = f(o),
+ l = i("./dist/icons.json"),
+ a = f(l),
+ u = i("./src/tags.json"),
+ c = f(u);
+ function f(h) {
+ return h && h.__esModule ? h : { default: h };
+ }
+ r.default = Object.keys(a.default)
+ .map(function (h) {
+ return new s.default(h, a.default[h], c.default[h]);
+ })
+ .reduce(function (h, p) {
+ return (h[p.name] = p), h;
+ }, {});
+ },
+ "./src/index.js": function (n, r, i) {
+ var o = i("./src/icons.js"),
+ s = f(o),
+ l = i("./src/to-svg.js"),
+ a = f(l),
+ u = i("./src/replace.js"),
+ c = f(u);
+ function f(h) {
+ return h && h.__esModule ? h : { default: h };
+ }
+ n.exports = {
+ icons: s.default,
+ toSvg: a.default,
+ replace: c.default,
+ };
+ },
+ "./src/replace.js": function (n, r, i) {
+ Object.defineProperty(r, "__esModule", { value: !0 });
+ var o =
+ Object.assign ||
+ function (g) {
+ for (var v = 1; v < arguments.length; v++) {
+ var b = arguments[v];
+ for (var x in b)
+ Object.prototype.hasOwnProperty.call(
+ b,
+ x
+ ) && (g[x] = b[x]);
+ }
+ return g;
+ },
+ s = i("./node_modules/classnames/dedupe.js"),
+ l = c(s),
+ a = i("./src/icons.js"),
+ u = c(a);
+ function c(g) {
+ return g && g.__esModule ? g : { default: g };
+ }
+ function f() {
+ var g =
+ arguments.length > 0 && arguments[0] !== void 0
+ ? arguments[0]
+ : {};
+ if (typeof document == "undefined")
+ throw new Error(
+ "`feather.replace()` only works in a browser environment."
+ );
+ var v = document.querySelectorAll("[data-feather]");
+ Array.from(v).forEach(function (b) {
+ return h(b, g);
+ });
+ }
+ function h(g) {
+ var v =
+ arguments.length > 1 && arguments[1] !== void 0
+ ? arguments[1]
+ : {},
+ b = p(g),
+ x = b["data-feather"];
+ delete b["data-feather"];
+ var S = u.default[x].toSvg(
+ o({}, v, b, {
+ class: (0, l.default)(v.class, b.class),
+ })
+ ),
+ T = new DOMParser().parseFromString(S, "image/svg+xml"),
+ d = T.querySelector("svg");
+ g.parentNode.replaceChild(d, g);
+ }
+ function p(g) {
+ return Array.from(g.attributes).reduce(function (v, b) {
+ return (v[b.name] = b.value), v;
+ }, {});
+ }
+ r.default = f;
+ },
+ "./src/tags.json": function (n) {
+ n.exports = {
+ activity: ["pulse", "health", "action", "motion"],
+ airplay: ["stream", "cast", "mirroring"],
+ "alert-circle": ["warning", "alert", "danger"],
+ "alert-octagon": ["warning", "alert", "danger"],
+ "alert-triangle": ["warning", "alert", "danger"],
+ "align-center": ["text alignment", "center"],
+ "align-justify": ["text alignment", "justified"],
+ "align-left": ["text alignment", "left"],
+ "align-right": ["text alignment", "right"],
+ anchor: [],
+ archive: ["index", "box"],
+ "at-sign": ["mention", "at", "email", "message"],
+ award: ["achievement", "badge"],
+ aperture: ["camera", "photo"],
+ "bar-chart": ["statistics", "diagram", "graph"],
+ "bar-chart-2": ["statistics", "diagram", "graph"],
+ battery: ["power", "electricity"],
+ "battery-charging": ["power", "electricity"],
+ bell: ["alarm", "notification", "sound"],
+ "bell-off": ["alarm", "notification", "silent"],
+ bluetooth: ["wireless"],
+ "book-open": ["read", "library"],
+ book: [
+ "read",
+ "dictionary",
+ "booklet",
+ "magazine",
+ "library",
+ ],
+ bookmark: ["read", "clip", "marker", "tag"],
+ box: ["cube"],
+ briefcase: ["work", "bag", "baggage", "folder"],
+ calendar: ["date"],
+ camera: ["photo"],
+ cast: ["chromecast", "airplay"],
+ "chevron-down": ["expand"],
+ "chevron-up": ["collapse"],
+ circle: ["off", "zero", "record"],
+ clipboard: ["copy"],
+ clock: ["time", "watch", "alarm"],
+ "cloud-drizzle": ["weather", "shower"],
+ "cloud-lightning": ["weather", "bolt"],
+ "cloud-rain": ["weather"],
+ "cloud-snow": ["weather", "blizzard"],
+ cloud: ["weather"],
+ codepen: ["logo"],
+ codesandbox: ["logo"],
+ code: ["source", "programming"],
+ coffee: [
+ "drink",
+ "cup",
+ "mug",
+ "tea",
+ "cafe",
+ "hot",
+ "beverage",
+ ],
+ columns: ["layout"],
+ command: ["keyboard", "cmd", "terminal", "prompt"],
+ compass: ["navigation", "safari", "travel", "direction"],
+ copy: ["clone", "duplicate"],
+ "corner-down-left": ["arrow", "return"],
+ "corner-down-right": ["arrow"],
+ "corner-left-down": ["arrow"],
+ "corner-left-up": ["arrow"],
+ "corner-right-down": ["arrow"],
+ "corner-right-up": ["arrow"],
+ "corner-up-left": ["arrow"],
+ "corner-up-right": ["arrow"],
+ cpu: ["processor", "technology"],
+ "credit-card": ["purchase", "payment", "cc"],
+ crop: ["photo", "image"],
+ crosshair: ["aim", "target"],
+ database: ["storage", "memory"],
+ delete: ["remove"],
+ disc: ["album", "cd", "dvd", "music"],
+ "dollar-sign": ["currency", "money", "payment"],
+ droplet: ["water"],
+ edit: ["pencil", "change"],
+ "edit-2": ["pencil", "change"],
+ "edit-3": ["pencil", "change"],
+ eye: ["view", "watch"],
+ "eye-off": ["view", "watch", "hide", "hidden"],
+ "external-link": ["outbound"],
+ facebook: ["logo", "social"],
+ "fast-forward": ["music"],
+ figma: ["logo", "design", "tool"],
+ "file-minus": ["delete", "remove", "erase"],
+ "file-plus": ["add", "create", "new"],
+ "file-text": ["data", "txt", "pdf"],
+ film: ["movie", "video"],
+ filter: ["funnel", "hopper"],
+ flag: ["report"],
+ "folder-minus": ["directory"],
+ "folder-plus": ["directory"],
+ folder: ["directory"],
+ framer: ["logo", "design", "tool"],
+ frown: ["emoji", "face", "bad", "sad", "emotion"],
+ gift: ["present", "box", "birthday", "party"],
+ "git-branch": ["code", "version control"],
+ "git-commit": ["code", "version control"],
+ "git-merge": ["code", "version control"],
+ "git-pull-request": ["code", "version control"],
+ github: ["logo", "version control"],
+ gitlab: ["logo", "version control"],
+ globe: ["world", "browser", "language", "translate"],
+ "hard-drive": ["computer", "server", "memory", "data"],
+ hash: ["hashtag", "number", "pound"],
+ headphones: ["music", "audio", "sound"],
+ heart: ["like", "love", "emotion"],
+ "help-circle": ["question mark"],
+ hexagon: ["shape", "node.js", "logo"],
+ home: ["house", "living"],
+ image: ["picture"],
+ inbox: ["email"],
+ instagram: ["logo", "camera"],
+ key: ["password", "login", "authentication", "secure"],
+ layers: ["stack"],
+ layout: ["window", "webpage"],
+ "life-buoy": ["help", "life ring", "support"],
+ link: ["chain", "url"],
+ "link-2": ["chain", "url"],
+ linkedin: ["logo", "social media"],
+ list: ["options"],
+ lock: ["security", "password", "secure"],
+ "log-in": ["sign in", "arrow", "enter"],
+ "log-out": ["sign out", "arrow", "exit"],
+ mail: ["email", "message"],
+ "map-pin": ["location", "navigation", "travel", "marker"],
+ map: ["location", "navigation", "travel"],
+ maximize: ["fullscreen"],
+ "maximize-2": ["fullscreen", "arrows", "expand"],
+ meh: ["emoji", "face", "neutral", "emotion"],
+ menu: ["bars", "navigation", "hamburger"],
+ "message-circle": ["comment", "chat"],
+ "message-square": ["comment", "chat"],
+ "mic-off": ["record", "sound", "mute"],
+ mic: ["record", "sound", "listen"],
+ minimize: ["exit fullscreen", "close"],
+ "minimize-2": ["exit fullscreen", "arrows", "close"],
+ minus: ["subtract"],
+ monitor: ["tv", "screen", "display"],
+ moon: ["dark", "night"],
+ "more-horizontal": ["ellipsis"],
+ "more-vertical": ["ellipsis"],
+ "mouse-pointer": ["arrow", "cursor"],
+ move: ["arrows"],
+ music: ["note"],
+ navigation: ["location", "travel"],
+ "navigation-2": ["location", "travel"],
+ octagon: ["stop"],
+ package: ["box", "container"],
+ paperclip: ["attachment"],
+ pause: ["music", "stop"],
+ "pause-circle": ["music", "audio", "stop"],
+ "pen-tool": ["vector", "drawing"],
+ percent: ["discount"],
+ "phone-call": ["ring"],
+ "phone-forwarded": ["call"],
+ "phone-incoming": ["call"],
+ "phone-missed": ["call"],
+ "phone-off": ["call", "mute"],
+ "phone-outgoing": ["call"],
+ phone: ["call"],
+ play: ["music", "start"],
+ "pie-chart": ["statistics", "diagram"],
+ "play-circle": ["music", "start"],
+ plus: ["add", "new"],
+ "plus-circle": ["add", "new"],
+ "plus-square": ["add", "new"],
+ pocket: ["logo", "save"],
+ power: ["on", "off"],
+ printer: ["fax", "office", "device"],
+ radio: ["signal"],
+ "refresh-cw": ["synchronise", "arrows"],
+ "refresh-ccw": ["arrows"],
+ repeat: ["loop", "arrows"],
+ rewind: ["music"],
+ "rotate-ccw": ["arrow"],
+ "rotate-cw": ["arrow"],
+ rss: ["feed", "subscribe"],
+ save: ["floppy disk"],
+ scissors: ["cut"],
+ search: ["find", "magnifier", "magnifying glass"],
+ send: [
+ "message",
+ "mail",
+ "email",
+ "paper airplane",
+ "paper aeroplane",
+ ],
+ settings: ["cog", "edit", "gear", "preferences"],
+ "share-2": ["network", "connections"],
+ shield: ["security", "secure"],
+ "shield-off": ["security", "insecure"],
+ "shopping-bag": ["ecommerce", "cart", "purchase", "store"],
+ "shopping-cart": ["ecommerce", "cart", "purchase", "store"],
+ shuffle: ["music"],
+ "skip-back": ["music"],
+ "skip-forward": ["music"],
+ slack: ["logo"],
+ slash: ["ban", "no"],
+ sliders: ["settings", "controls"],
+ smartphone: ["cellphone", "device"],
+ smile: ["emoji", "face", "happy", "good", "emotion"],
+ speaker: ["audio", "music"],
+ star: ["bookmark", "favorite", "like"],
+ "stop-circle": ["media", "music"],
+ sun: ["brightness", "weather", "light"],
+ sunrise: ["weather", "time", "morning", "day"],
+ sunset: ["weather", "time", "evening", "night"],
+ tablet: ["device"],
+ tag: ["label"],
+ target: ["logo", "bullseye"],
+ terminal: ["code", "command line", "prompt"],
+ thermometer: [
+ "temperature",
+ "celsius",
+ "fahrenheit",
+ "weather",
+ ],
+ "thumbs-down": ["dislike", "bad", "emotion"],
+ "thumbs-up": ["like", "good", "emotion"],
+ "toggle-left": ["on", "off", "switch"],
+ "toggle-right": ["on", "off", "switch"],
+ tool: ["settings", "spanner"],
+ trash: ["garbage", "delete", "remove", "bin"],
+ "trash-2": ["garbage", "delete", "remove", "bin"],
+ triangle: ["delta"],
+ truck: [
+ "delivery",
+ "van",
+ "shipping",
+ "transport",
+ "lorry",
+ ],
+ tv: ["television", "stream"],
+ twitch: ["logo"],
+ twitter: ["logo", "social"],
+ type: ["text"],
+ umbrella: ["rain", "weather"],
+ unlock: ["security"],
+ "user-check": ["followed", "subscribed"],
+ "user-minus": [
+ "delete",
+ "remove",
+ "unfollow",
+ "unsubscribe",
+ ],
+ "user-plus": [
+ "new",
+ "add",
+ "create",
+ "follow",
+ "subscribe",
+ ],
+ "user-x": [
+ "delete",
+ "remove",
+ "unfollow",
+ "unsubscribe",
+ "unavailable",
+ ],
+ user: ["person", "account"],
+ users: ["group"],
+ "video-off": ["camera", "movie", "film"],
+ video: ["camera", "movie", "film"],
+ voicemail: ["phone"],
+ volume: ["music", "sound", "mute"],
+ "volume-1": ["music", "sound"],
+ "volume-2": ["music", "sound"],
+ "volume-x": ["music", "sound", "mute"],
+ watch: ["clock", "time"],
+ "wifi-off": ["disabled"],
+ wifi: ["connection", "signal", "wireless"],
+ wind: ["weather", "air"],
+ "x-circle": [
+ "cancel",
+ "close",
+ "delete",
+ "remove",
+ "times",
+ "clear",
+ ],
+ "x-octagon": [
+ "delete",
+ "stop",
+ "alert",
+ "warning",
+ "times",
+ "clear",
+ ],
+ "x-square": [
+ "cancel",
+ "close",
+ "delete",
+ "remove",
+ "times",
+ "clear",
+ ],
+ x: [
+ "cancel",
+ "close",
+ "delete",
+ "remove",
+ "times",
+ "clear",
+ ],
+ youtube: ["logo", "video", "play"],
+ "zap-off": ["flash", "camera", "lightning"],
+ zap: ["flash", "camera", "lightning"],
+ "zoom-in": ["magnifying glass"],
+ "zoom-out": ["magnifying glass"],
+ };
+ },
+ "./src/to-svg.js": function (n, r, i) {
+ Object.defineProperty(r, "__esModule", { value: !0 });
+ var o = i("./src/icons.js"),
+ s = l(o);
+ function l(u) {
+ return u && u.__esModule ? u : { default: u };
+ }
+ function a(u) {
+ var c =
+ arguments.length > 1 && arguments[1] !== void 0
+ ? arguments[1]
+ : {};
+ if (
+ (console.warn(
+ "feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."
+ ),
+ !u)
+ )
+ throw new Error(
+ "The required `key` (icon name) parameter is missing."
+ );
+ if (!s.default[u])
+ throw new Error(
+ "No icon matching '" +
+ u +
+ "'. See the complete list of icons at https://feathericons.com"
+ );
+ return s.default[u].toSvg(c);
+ }
+ r.default = a;
+ },
+ 0: function (n, r, i) {
+ i("./node_modules/core-js/es/array/from.js"),
+ (n.exports = i("./src/index.js"));
+ },
+ });
+ });
+})(I1);
+const Cc = B3(I1.exports),
+ sp = Object.keys(Cc.icons),
+ ui = {
+ props: {
+ name: {
+ type: String,
+ required: !0,
+ validator(t) {
+ const e = sp.includes(t);
+ return (
+ e ||
+ (console.groupCollapsed(
+ "[frappe-ui] name property for feather-icon must be one of "
+ ),
+ console.dir(sp),
+ console.groupEnd()),
+ e
+ );
+ },
+ },
+ color: { type: String, default: null },
+ strokeWidth: { type: Number, default: 1.5 },
+ },
+ render() {
+ let t = Cc.icons[this.name];
+ return (
+ t || (t = Cc.icons.circle),
+ ze(
+ "svg",
+ yt(
+ t.attrs,
+ {
+ fill: "none",
+ stroke: "currentColor",
+ color: this.color,
+ "stroke-linecap": "round",
+ "stroke-linejoin": "round",
+ "stroke-width": this.strokeWidth,
+ width: null,
+ height: null,
+ class: [t.attrs.class, "shrink-0"],
+ innerHTML: t.contents,
+ },
+ this.$attrs
+ )
+ )
+ );
+ },
+ },
+ $3 = { name: "LoadingIndicator" },
+ z3 = {
+ class: "max-w-xs animate-spin",
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "none",
+ viewBox: "0 0 24 24",
+ },
+ H3 = U(
+ "circle",
+ {
+ class: "opacity-25",
+ cx: "12",
+ cy: "12",
+ r: "10",
+ stroke: "currentColor",
+ "stroke-width": "4",
+ },
+ null,
+ -1
+ ),
+ F3 = U(
+ "path",
+ {
+ class: "opacity-75",
+ fill: "currentColor",
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",
+ },
+ null,
+ -1
+ ),
+ V3 = [H3, F3];
+function W3(t, e, n, r, i, o) {
+ return B(), G("svg", z3, V3);
+}
+const U3 = Ue($3, [["render", W3]]),
+ K3 = ["disabled", "ariaLabel"],
+ vi = xe({
+ __name: "Button",
+ props: {
+ theme: { default: "gray" },
+ size: { default: "sm" },
+ variant: { default: "subtle" },
+ label: {},
+ icon: {},
+ iconLeft: {},
+ iconRight: {},
+ loading: { type: Boolean, default: !1 },
+ loadingText: {},
+ disabled: { type: Boolean, default: !1 },
+ route: {},
+ link: {},
+ },
+ setup(t) {
+ const e = t,
+ n = yd(),
+ r = Kg(),
+ i = $(() => {
+ let c = {
+ gray: "text-white bg-gray-900 hover:bg-gray-800 active:bg-gray-700",
+ blue: "text-white bg-blue-500 hover:bg-blue-600 active:bg-blue-700",
+ green: "text-white bg-green-600 hover:bg-green-700 active:bg-green-800",
+ red: "text-white bg-red-600 hover:bg-red-700 active:bg-red-800",
+ }[e.theme],
+ f = {
+ gray: "text-gray-800 bg-gray-100 hover:bg-gray-200 active:bg-gray-300",
+ blue: "text-blue-600 bg-blue-100 hover:bg-blue-200 active:bg-blue-300",
+ green: "text-green-800 bg-green-100 hover:bg-green-200 active:bg-green-300",
+ red: "text-red-700 bg-red-100 hover:bg-red-200 active:bg-red-300",
+ }[e.theme],
+ h = {
+ gray: "text-gray-800 bg-white border border-gray-300 hover:border-gray-400 active:border-gray-400 active:bg-gray-300",
+ blue: "text-blue-600 bg-white border border-blue-300 hover:border-blue-400 active:border-blue-400 active:bg-blue-300",
+ green: "text-green-800 bg-white border border-green-400 hover:border-green-500 active:border-green-500 active:bg-green-300",
+ red: "text-red-700 bg-white border border-red-300 hover:border-red-400 active:border-red-400 active:bg-red-200",
+ }[e.theme],
+ p = {
+ gray: "text-gray-800 bg-transparent hover:bg-gray-200 active:bg-gray-300",
+ blue: "text-blue-600 bg-transparent hover:bg-blue-200 active:bg-blue-300",
+ green: "text-green-800 bg-transparent hover:bg-green-200 active:bg-green-300",
+ red: "text-red-700 bg-transparent hover:bg-red-200 active:bg-red-300",
+ }[e.theme],
+ g = {
+ gray: "focus-visible:ring focus-visible:ring-gray-400",
+ blue: "focus-visible:ring focus-visible:ring-blue-400",
+ green: "focus-visible:ring focus-visible:ring-green-400",
+ red: "focus-visible:ring focus-visible:ring-red-400",
+ }[e.theme],
+ v = { subtle: f, solid: c, outline: h, ghost: p }[
+ e.variant
+ ],
+ b = `${e.theme}-${e.variant}`,
+ x = {
+ gray: "bg-gray-100 text-gray-500",
+ "gray-outline":
+ "bg-gray-100 text-gray-500 border border-gray-300",
+ "gray-ghost": "text-gray-500",
+ "blue-solid": "bg-blue-300 text-white",
+ "blue-subtle": "bg-blue-100 text-blue-400",
+ "blue-outline":
+ "bg-blue-100 text-blue-400 border border-blue-300",
+ "blue-ghost": "text-blue-400",
+ green: "bg-green-100 text-green-500",
+ "green-outline":
+ "bg-green-100 text-green-500 border border-green-400",
+ "green-ghost": "text-green-500",
+ red: "bg-red-100 text-red-400",
+ "red-outline":
+ "bg-red-100 text-red-400 border border-red-300",
+ "red-ghost": "text-red-400",
+ },
+ S = x[b] || x[e.theme],
+ T = {
+ sm: "h-7 text-base px-2 rounded",
+ md: "h-8 text-base font-medium px-2.5 rounded",
+ lg: "h-10 text-lg font-medium px-3 rounded-md",
+ xl: "h-11.5 text-xl font-medium px-3.5 rounded-lg",
+ "2xl": "h-13 text-2xl font-medium px-3.5 rounded-xl",
+ }[e.size];
+ return (
+ a.value &&
+ (T = {
+ sm: "h-7 w-7 rounded",
+ md: "h-8 w-8 rounded",
+ lg: "h-10 w-10 rounded-md",
+ xl: "h-11.5 w-11.5 rounded-lg",
+ "2xl": "h-13 w-13 rounded-xl",
+ }[e.size]),
+ [
+ "inline-flex items-center justify-center gap-2 transition-colors focus:outline-none",
+ s.value ? S : v,
+ g,
+ T,
+ ]
+ );
+ }),
+ o = $(
+ () =>
+ ({
+ sm: "h-4",
+ md: "h-4.5",
+ lg: "h-5",
+ xl: "h-6",
+ "2xl": "h-6",
+ }[e.size])
+ ),
+ s = $(() => e.disabled || e.loading),
+ l = $(() => (a.value ? e.label : null)),
+ a = $(() => e.icon || n.icon),
+ u = () => {
+ if (e.route) return r.push(e.route);
+ if (e.link) return window.open(e.link, "_blank");
+ };
+ return (c, f) => (
+ B(),
+ G(
+ "button",
+ yt(c.$attrs, {
+ class: i.value,
+ onClick: u,
+ disabled: s.value,
+ ariaLabel: l.value,
+ }),
+ [
+ c.loading
+ ? (B(),
+ Be(
+ U3,
+ {
+ key: 0,
+ class: ye({
+ "h-3 w-3": c.size == "sm",
+ "h-[13.5px] w-[13.5px]":
+ c.size == "md",
+ "h-[15px] w-[15px]": c.size == "lg",
+ "h-4.5 w-4.5":
+ c.size == "xl" ||
+ c.size == "2xl",
+ }),
+ },
+ null,
+ 8,
+ ["class"]
+ ))
+ : c.$slots.prefix || c.iconLeft
+ ? _e(c.$slots, "prefix", { key: 1 }, () => [
+ c.iconLeft
+ ? (B(),
+ Be(
+ ui,
+ {
+ key: 0,
+ name: c.iconLeft,
+ class: ye(o.value),
+ "aria-hidden": "true",
+ },
+ null,
+ 8,
+ ["name", "class"]
+ ))
+ : De("", !0),
+ ])
+ : De("", !0),
+ c.loading && c.loadingText
+ ? (B(),
+ G(He, { key: 2 }, [Pn(Ge(c.loadingText), 1)], 64))
+ : a.value && !c.loading
+ ? (B(),
+ G(
+ He,
+ { key: 3 },
+ [
+ c.icon
+ ? (B(),
+ Be(
+ ui,
+ {
+ key: 0,
+ name: c.icon,
+ class: ye(o.value),
+ "aria-label": c.label,
+ },
+ null,
+ 8,
+ [
+ "name",
+ "class",
+ "aria-label",
+ ]
+ ))
+ : c.$slots.icon
+ ? _e(c.$slots, "icon", { key: 1 })
+ : De("", !0),
+ ],
+ 64
+ ))
+ : (B(),
+ G(
+ "span",
+ {
+ key: 4,
+ class: ye({ "sr-only": a.value }),
+ },
+ [
+ _e(c.$slots, "default", {}, () => [
+ Pn(Ge(c.label), 1),
+ ]),
+ ],
+ 2
+ )),
+ _e(c.$slots, "suffix", {}, () => [
+ c.iconRight
+ ? (B(),
+ Be(
+ ui,
+ {
+ key: 0,
+ name: c.iconRight,
+ class: ye(o.value),
+ "aria-hidden": "true",
+ },
+ null,
+ 8,
+ ["name", "class"]
+ ))
+ : De("", !0),
+ ]),
+ ],
+ 16,
+ K3
+ )
+ );
+ },
+ }),
+ q3 = {
+ name: "Autocomplete",
+ props: ["modelValue", "options", "placeholder"],
+ emits: ["update:modelValue", "update:query", "change"],
+ components: {
+ Popover: qd,
+ Button: vi,
+ FeatherIcon: ui,
+ Combobox: Ow,
+ ComboboxInput: Pw,
+ ComboboxOptions: Nw,
+ ComboboxOption: jw,
+ ComboboxButton: Rw,
+ },
+ data() {
+ return { query: "", showOptions: !1 };
+ },
+ computed: {
+ valuePropPassed() {
+ return "value" in this.$attrs;
+ },
+ selectedValue: {
+ get() {
+ return this.valuePropPassed
+ ? this.$attrs.value
+ : this.modelValue;
+ },
+ set(t) {
+ (this.query = ""),
+ t && (this.showOptions = !1),
+ this.$emit(
+ this.valuePropPassed
+ ? "change"
+ : "update:modelValue",
+ t
+ );
+ },
+ },
+ groups() {
+ var e;
+ return !this.options || this.options.length == 0
+ ? []
+ : ((e = this.options[0]) != null && e.group
+ ? this.options
+ : [{ group: "", items: this.options }]
+ )
+ .map((n, r) => ({
+ key: r,
+ group: n.group,
+ hideLabel: n.hideLabel || !1,
+ items: this.filterOptions(n.items),
+ }))
+ .filter((n) => n.items.length > 0);
+ },
+ },
+ watch: {
+ query(t) {
+ this.$emit("update:query", t);
+ },
+ showOptions(t) {
+ t &&
+ this.$nextTick(() => {
+ this.$refs.search.el.focus();
+ });
+ },
+ },
+ methods: {
+ filterOptions(t) {
+ return this.query
+ ? t.filter((e) =>
+ [e.label, e.value].some((r) =>
+ (r || "")
+ .toString()
+ .toLowerCase()
+ .includes(this.query.toLowerCase())
+ )
+ )
+ : t;
+ },
+ displayValue(t) {
+ if (typeof t == "string") {
+ let n = this.groups
+ .flatMap((r) => r.items)
+ .find((r) => r.value === t);
+ return (n == null ? void 0 : n.label) || t;
+ }
+ return t == null ? void 0 : t.label;
+ },
+ },
+ },
+ J3 = { class: "w-full" },
+ G3 = ["onClick"],
+ Y3 = { class: "flex items-center" },
+ Q3 = {
+ key: 0,
+ class: "overflow-hidden text-ellipsis whitespace-nowrap text-base leading-5",
+ },
+ X3 = { key: 1, class: "text-base leading-5 text-gray-500" },
+ Z3 = {
+ class: "sticky top-0 z-10 flex items-stretch space-x-1.5 bg-white pt-1.5",
+ },
+ ek = { class: "relative w-full" },
+ tk = { key: 0, class: "px-2.5 py-1.5 text-sm font-medium text-gray-500" },
+ nk = { key: 0, class: "rounded-md px-2.5 py-1.5 text-base text-gray-600" };
+function rk(t, e, n, r, i, o) {
+ const s = ft("FeatherIcon"),
+ l = ft("ComboboxInput"),
+ a = ft("ComboboxOption"),
+ u = ft("ComboboxOptions"),
+ c = ft("Popover"),
+ f = ft("Combobox");
+ return (
+ B(),
+ Be(
+ f,
+ {
+ modelValue: o.selectedValue,
+ "onUpdate:modelValue":
+ e[3] || (e[3] = (h) => (o.selectedValue = h)),
+ nullable: "",
+ },
+ {
+ default: Te(({ open: h }) => [
+ Me(
+ c,
+ {
+ class: "w-full",
+ show: i.showOptions,
+ "onUpdate:show":
+ e[2] || (e[2] = (p) => (i.showOptions = p)),
+ },
+ {
+ target: Te(({ open: p, togglePopover: g }) => [
+ _e(
+ t.$slots,
+ "target",
+ Dt(Ft({ open: p, togglePopover: g })),
+ () => [
+ U("div", J3, [
+ U(
+ "button",
+ {
+ class: ye([
+ "flex h-7 w-full items-center justify-between gap-2 rounded bg-gray-100 px-2 py-1 transition-colors hover:bg-gray-200 focus:ring-2 focus:ring-gray-400",
+ { "bg-gray-200": h },
+ ]),
+ onClick: () => g(),
+ },
+ [
+ U("div", Y3, [
+ _e(t.$slots, "prefix"),
+ o.selectedValue
+ ? (B(),
+ G(
+ "span",
+ Q3,
+ Ge(
+ o.displayValue(
+ o.selectedValue
+ )
+ ),
+ 1
+ ))
+ : (B(),
+ G(
+ "span",
+ X3,
+ Ge(
+ n.placeholder ||
+ ""
+ ),
+ 1
+ )),
+ ]),
+ Me(s, {
+ name: "chevron-down",
+ class: "h-4 w-4 text-gray-600",
+ "aria-hidden": "true",
+ }),
+ ],
+ 10,
+ G3
+ ),
+ ]),
+ ]
+ ),
+ ]),
+ body: Te(({ isOpen: p }) => [
+ tc(
+ U(
+ "div",
+ null,
+ [
+ Me(
+ u,
+ {
+ class: "mt-1 max-h-[15rem] overflow-y-auto rounded-lg bg-white px-1.5 pb-1.5 shadow-2xl",
+ static: "",
+ },
+ {
+ default: Te(() => [
+ U("div", Z3, [
+ U("div", ek, [
+ Me(
+ l,
+ {
+ ref: "search",
+ class: "form-input w-full",
+ type: "text",
+ onChange:
+ e[0] ||
+ (e[0] =
+ (
+ g
+ ) => {
+ i.query =
+ g.target.value;
+ }),
+ value: i.query,
+ autocomplete:
+ "off",
+ placeholder:
+ "Search",
+ },
+ null,
+ 8,
+ ["value"]
+ ),
+ U(
+ "button",
+ {
+ class: "absolute right-0 inline-flex h-7 w-7 items-center justify-center",
+ onClick:
+ e[1] ||
+ (e[1] =
+ (
+ g
+ ) =>
+ (o.selectedValue =
+ null)),
+ },
+ [
+ Me(s, {
+ name: "x",
+ class: "w-4",
+ }),
+ ]
+ ),
+ ]),
+ ]),
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(o.groups, (g) =>
+ tc(
+ (B(),
+ G(
+ "div",
+ {
+ class: "mt-1.5",
+ key: g.key,
+ },
+ [
+ g.group &&
+ !g.hideLabel
+ ? (B(),
+ G(
+ "div",
+ tk,
+ Ge(
+ g.group
+ ),
+ 1
+ ))
+ : De(
+ "",
+ !0
+ ),
+ (B(
+ !0
+ ),
+ G(
+ He,
+ null,
+ wn(
+ g.items,
+ (
+ v
+ ) => (
+ B(),
+ Be(
+ a,
+ {
+ as: "template",
+ key: v.value,
+ value: v,
+ },
+ {
+ default:
+ Te(
+ ({
+ active: b,
+ selected:
+ x,
+ }) => [
+ U(
+ "li",
+ {
+ class: ye(
+ [
+ "flex items-center rounded px-2.5 py-1.5 text-base",
+ {
+ "bg-gray-100":
+ b,
+ },
+ ]
+ ),
+ },
+ [
+ _e(
+ t.$slots,
+ "item-prefix",
+ Dt(
+ Ft(
+ {
+ active: b,
+ selected:
+ x,
+ option: v,
+ }
+ )
+ )
+ ),
+ Pn(
+ " " +
+ Ge(
+ v.label
+ ),
+ 1
+ ),
+ ],
+ 2
+ ),
+ ]
+ ),
+ _: 2,
+ },
+ 1032,
+ [
+ "value",
+ ]
+ )
+ )
+ ),
+ 128
+ )),
+ ]
+ )),
+ [
+ [
+ cc,
+ g
+ .items
+ .length >
+ 0,
+ ],
+ ]
+ )
+ ),
+ 128
+ )),
+ o.groups.length == 0
+ ? (B(),
+ G(
+ "li",
+ nk,
+ " No results found "
+ ))
+ : De("", !0),
+ ]),
+ _: 3,
+ }
+ ),
+ ],
+ 512
+ ),
+ [[cc, p]]
+ ),
+ ]),
+ _: 2,
+ },
+ 1032,
+ ["show"]
+ ),
+ ]),
+ _: 3,
+ },
+ 8,
+ ["modelValue"]
+ )
+ );
+}
+const ik = Ue(q3, [["render", rk]]),
+ ok = ["src"],
+ mR = xe({
+ __name: "Avatar",
+ props: {
+ image: {},
+ label: {},
+ size: { default: "md" },
+ shape: { default: "circle" },
+ },
+ setup(t) {
+ const e = t,
+ n = $(
+ () =>
+ ({
+ circle: "rounded-full",
+ square: {
+ xs: "rounded-[4px]",
+ sm: "rounded-[5px]",
+ md: "rounded-[5px]",
+ lg: "rounded-[6px]",
+ xl: "rounded-[6px]",
+ "2xl": "rounded-[8px]",
+ "3xl": "rounded-[10px]",
+ }[e.size],
+ }[e.shape])
+ ),
+ r = $(
+ () =>
+ ({
+ xs: "w-4 h-4",
+ sm: "w-5 h-5",
+ md: "w-6 h-6",
+ lg: "w-7 h-7",
+ xl: "w-8 h-8",
+ "2xl": "w-10 h-10",
+ "3xl": "w-11.5 h-11.5",
+ }[e.size])
+ ),
+ i = $(() => [
+ "font-medium",
+ {
+ xs: "text-2xs",
+ sm: "text-sm",
+ md: "text-base",
+ lg: "text-base",
+ xl: "text-lg",
+ "2xl": "text-xl",
+ "3xl": "text-2xl",
+ }[e.size],
+ ]),
+ o = $(
+ () =>
+ ({
+ xs: "-mr-[.1rem] -mb-[.1rem] h-2 w-2",
+ sm: "-mr-[.1rem] -mb-[.1rem] h-[9px] w-[9px]",
+ md: "-mr-[.1rem] -mb-[.1rem] h-2.5 w-2.5",
+ lg: "-mr-[.1rem] -mb-[.1rem] h-3 w-3",
+ xl: "-mr-[.1rem] -mb-[.1rem] h-3 w-3",
+ "2xl": "-mr-[.1rem] -mb-[.1rem] h-3.5 w-3.5",
+ "3xl": "-mr-[.2rem] -mb-[.2rem] h-4 w-4",
+ }[e.size])
+ ),
+ s = $(
+ () =>
+ ({
+ xs: "h-1 w-1",
+ sm: "h-[5px] w-[5px]",
+ md: "h-1.5 w-1.5",
+ lg: "h-2 w-2",
+ xl: "h-2 w-2",
+ "2xl": "h-2.5 w-2.5",
+ "3xl": "h-3 w-3",
+ }[e.size])
+ ),
+ l = $(
+ () =>
+ ({
+ xs: "h-2.5 w-2.5",
+ sm: "h-3 w-3",
+ md: "h-4 w-4",
+ lg: "h-4 w-4",
+ xl: "h-4 w-4",
+ "2xl": "h-5 w-5",
+ "3xl": "h-5 w-5",
+ }[e.size])
+ );
+ return (a, u) => (
+ B(),
+ G(
+ "div",
+ {
+ class: ye([
+ "relative inline-block shrink-0",
+ [r.value, n.value],
+ ]),
+ },
+ [
+ a.image
+ ? (B(),
+ G(
+ "img",
+ {
+ key: 0,
+ src: a.image,
+ class: ye([
+ n.value,
+ "h-full w-full object-cover",
+ ]),
+ },
+ null,
+ 10,
+ ok
+ ))
+ : (B(),
+ G(
+ "div",
+ {
+ key: 1,
+ class: ye([
+ "flex h-full w-full items-center justify-center bg-gray-100 uppercase text-gray-600",
+ [i.value, n.value],
+ ]),
+ },
+ [
+ a.$slots.default
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: ye(l.value),
+ },
+ [_e(a.$slots, "default")],
+ 2
+ ))
+ : (B(),
+ G(
+ He,
+ { key: 1 },
+ [
+ Pn(
+ Ge(
+ a.label &&
+ a.label[0]
+ ),
+ 1
+ ),
+ ],
+ 64
+ )),
+ ],
+ 2
+ )),
+ a.$slots.indicator
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 2,
+ class: ye([
+ "absolute bottom-0 right-0 grid place-items-center rounded-full bg-white",
+ o.value,
+ ]),
+ },
+ [
+ U(
+ "div",
+ { class: ye(s.value) },
+ [_e(a.$slots, "indicator")],
+ 2
+ ),
+ ],
+ 2
+ ))
+ : De("", !0),
+ ],
+ 2
+ )
+ );
+ },
+ });
+xe({
+ __name: "Badge",
+ props: {
+ theme: { default: "gray" },
+ size: { default: "md" },
+ variant: { default: "subtle" },
+ label: {},
+ },
+ setup(t) {
+ const e = t,
+ n = $(() => {
+ let r = {
+ gray: "text-white bg-gray-900",
+ blue: "text-white bg-blue-500",
+ green: "text-white bg-green-600",
+ orange: "text-white bg-amber-600",
+ red: "text-white bg-red-600",
+ }[e.theme],
+ i = {
+ gray: "text-gray-700 bg-gray-100",
+ blue: "text-blue-600 bg-blue-100",
+ green: "text-green-800 bg-green-200",
+ orange: "text-amber-700 bg-amber-100",
+ red: "text-red-600 bg-red-100",
+ }[e.theme],
+ o = {
+ gray: "text-gray-700 bg-white border border-gray-300",
+ blue: "text-blue-600 bg-white border border-blue-300",
+ green: "text-green-800 bg-white border border-green-300",
+ orange: "text-amber-700 bg-white border border-amber-300",
+ red: "text-red-600 bg-white border border-red-300",
+ }[e.theme],
+ s = {
+ gray: "text-gray-700 bg-transparent",
+ blue: "text-blue-600 bg-transparent",
+ green: "text-green-800 bg-transparent",
+ orange: "text-amber-700 bg-transparent",
+ red: "text-red-600 bg-transparent",
+ }[e.theme],
+ l = { subtle: i, solid: r, outline: o, ghost: s }[
+ e.variant
+ ],
+ a = {
+ sm: "h-4 text-xs px-1.5",
+ md: "h-5 text-xs px-1.5",
+ lg: "h-6 text-sm px-2",
+ }[e.size];
+ return [l, a];
+ });
+ return (r, i) => (
+ B(),
+ G(
+ "div",
+ {
+ class: ye([
+ "inline-flex select-none items-center gap-1 rounded-full",
+ n.value,
+ ]),
+ },
+ [
+ r.$slots.prefix
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: ye([
+ e.size == "lg" ? "max-h-6" : "max-h-4",
+ ]),
+ },
+ [_e(r.$slots, "prefix")],
+ 2
+ ))
+ : De("", !0),
+ _e(r.$slots, "default", {}, () => {
+ var o;
+ return [
+ Pn(
+ Ge(
+ (o = e.label) == null
+ ? void 0
+ : o.toString()
+ ),
+ 1
+ ),
+ ];
+ }),
+ r.$slots.suffix
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 1,
+ class: ye([
+ e.size == "lg" ? "max-h-6" : "max-h-4",
+ ]),
+ },
+ [_e(r.$slots, "suffix")],
+ 2
+ ))
+ : De("", !0),
+ ],
+ 2
+ )
+ );
+ },
+});
+function B1(t) {
+ return zm() ? (i2(t), !0) : !1;
+}
+function Jd(t) {
+ return typeof t == "function" ? t() : ne(t);
+}
+const Ba = typeof window != "undefined" && typeof document != "undefined";
+typeof WorkerGlobalScope != "undefined" &&
+ globalThis instanceof WorkerGlobalScope;
+const sk = Object.prototype.toString,
+ lk = (t) => sk.call(t) === "[object Object]",
+ ak = () => {};
+function uk(t, e = !0) {
+ ps() ? Ye(t) : e ? t() : Ct(t);
+}
+function ck(t) {
+ var e;
+ const n = Jd(t);
+ return (e = n == null ? void 0 : n.$el) != null ? e : n;
+}
+const Gd = Ba ? window : void 0;
+Ba && window.document;
+Ba && window.navigator;
+Ba && window.location;
+function dk(...t) {
+ let e, n, r, i;
+ if (
+ (typeof t[0] == "string" || Array.isArray(t[0])
+ ? (([n, r, i] = t), (e = Gd))
+ : ([e, n, r, i] = t),
+ !e)
+ )
+ return ak;
+ Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
+ const o = [],
+ s = () => {
+ o.forEach((c) => c()), (o.length = 0);
+ },
+ l = (c, f, h, p) => (
+ c.addEventListener(f, h, p), () => c.removeEventListener(f, h, p)
+ ),
+ a = Rt(
+ () => [ck(e), Jd(i)],
+ ([c, f]) => {
+ if ((s(), !c)) return;
+ const h = lk(f) ? W({}, f) : f;
+ o.push(...n.flatMap((p) => r.map((g) => l(c, p, g, h))));
+ },
+ { immediate: !0, flush: "post" }
+ ),
+ u = () => {
+ a(), s();
+ };
+ return B1(u), u;
+}
+function fk() {
+ const t = oe(!1);
+ return (
+ ps() &&
+ Ye(() => {
+ t.value = !0;
+ }),
+ t
+ );
+}
+function hk(t) {
+ const e = fk();
+ return $(() => (e.value, Boolean(t())));
+}
+function pk(t, e = {}) {
+ const { window: n = Gd } = e,
+ r = hk(
+ () => n && "matchMedia" in n && typeof n.matchMedia == "function"
+ );
+ let i;
+ const o = oe(!1),
+ s = (u) => {
+ o.value = u.matches;
+ },
+ l = () => {
+ !i ||
+ ("removeEventListener" in i
+ ? i.removeEventListener("change", s)
+ : i.removeListener(s));
+ },
+ a = Mt(() => {
+ !r.value ||
+ (l(),
+ (i = n.matchMedia(Jd(t))),
+ "addEventListener" in i
+ ? i.addEventListener("change", s)
+ : i.addListener(s),
+ (o.value = i.matches));
+ });
+ return (
+ B1(() => {
+ a(), l(), (i = void 0);
+ }),
+ o
+ );
+}
+function mk(t = {}) {
+ const {
+ window: e = Gd,
+ initialWidth: n = Number.POSITIVE_INFINITY,
+ initialHeight: r = Number.POSITIVE_INFINITY,
+ listenOrientation: i = !0,
+ includeScrollbar: o = !0,
+ } = t,
+ s = oe(n),
+ l = oe(r),
+ a = () => {
+ e &&
+ (o
+ ? ((s.value = e.innerWidth), (l.value = e.innerHeight))
+ : ((s.value = e.document.documentElement.clientWidth),
+ (l.value = e.document.documentElement.clientHeight)));
+ };
+ if ((a(), uk(a), dk("resize", a, { passive: !0 }), i)) {
+ const u = pk("(orientation: portrait)");
+ Rt(u, () => a());
+ }
+ return { width: s, height: l };
+}
+const gk = {
+ name: "Dropdown",
+ props: {
+ button: { type: Object, default: null },
+ options: { type: Array, default: () => [] },
+ placement: { type: String, default: "left" },
+ },
+ components: {
+ Menu: fx,
+ MenuButton: hx,
+ MenuItems: px,
+ MenuItem: mx,
+ Button: vi,
+ FeatherIcon: ui,
+ Popover: qd,
+ },
+ methods: {
+ normalizeDropdownItem(t) {
+ let e = t.onClick || null;
+ return (
+ !e &&
+ t.route &&
+ this.$router &&
+ (e = () => this.$router.push(t.route)),
+ {
+ label: t.label,
+ icon: t.icon,
+ group: t.group,
+ component: t.component,
+ onClick: e,
+ }
+ );
+ },
+ filterOptions(t) {
+ return (t || [])
+ .filter(Boolean)
+ .filter((e) => (e.condition ? e.condition() : !0))
+ .map((e) => this.normalizeDropdownItem(e));
+ },
+ },
+ computed: {
+ groups() {
+ var e;
+ return (
+ (e = this.options[0]) != null && e.group
+ ? this.options
+ : [{ group: "", items: this.options }]
+ ).map((n, r) => ({
+ key: r,
+ group: n.group,
+ hideLabel: n.hideLabel || !1,
+ items: this.filterOptions(n.items),
+ }));
+ },
+ dropdownTransition() {
+ return {
+ enterActiveClass: "transition duration-100 ease-out",
+ enterFromClass: "transform scale-95 opacity-0",
+ enterToClass: "transform scale-100 opacity-100",
+ leaveActiveClass: "transition duration-75 ease-in",
+ leaveFromClass: "transform scale-100 opacity-100",
+ leaveToClass: "transform scale-95 opacity-0",
+ };
+ },
+ popoverPlacement() {
+ return this.placement === "left"
+ ? "bottom-start"
+ : this.placement === "right"
+ ? "bottom-end"
+ : this.placement === "center"
+ ? "bottom-center"
+ : "bottom";
+ },
+ },
+ },
+ yk = {
+ key: 0,
+ class: "flex h-7 items-center px-2 text-sm font-medium text-gray-500",
+ },
+ vk = ["onClick"],
+ bk = { class: "whitespace-nowrap" };
+function wk(t, e, n, r, i, o) {
+ const s = ft("Button"),
+ l = ft("MenuButton"),
+ a = ft("FeatherIcon"),
+ u = ft("MenuItem"),
+ c = ft("MenuItems"),
+ f = ft("Popover"),
+ h = ft("Menu");
+ return (
+ B(),
+ Be(
+ h,
+ { as: "div", class: "relative inline-block text-left" },
+ {
+ default: Te(({ open: p }) => [
+ Me(
+ f,
+ {
+ transition: o.dropdownTransition,
+ show: p,
+ placement: o.popoverPlacement,
+ },
+ {
+ target: Te(() => [
+ Me(
+ l,
+ { as: "div" },
+ {
+ default: Te(() => [
+ t.$slots.default
+ ? _e(
+ t.$slots,
+ "default",
+ Dt(
+ yt(
+ { key: 0 },
+ { open: p }
+ )
+ )
+ )
+ : (B(),
+ Be(
+ s,
+ yt(
+ {
+ key: 1,
+ active: p,
+ },
+ n.button
+ ),
+ {
+ default: Te(() => {
+ var g;
+ return [
+ Pn(
+ Ge(
+ n.button
+ ? ((g =
+ n.button) ==
+ null
+ ? void 0
+ : g.label) ||
+ null
+ : "Options"
+ ),
+ 1
+ ),
+ ];
+ }),
+ _: 2,
+ },
+ 1040,
+ ["active"]
+ )),
+ ]),
+ _: 2,
+ },
+ 1024
+ ),
+ ]),
+ body: Te(() => [
+ Me(
+ c,
+ {
+ class: ye([
+ "mt-2 min-w-40 divide-y divide-gray-100 rounded-lg bg-white shadow-2xl ring-1 ring-black ring-opacity-5 focus:outline-none",
+ {
+ "left-0 origin-top-left":
+ n.placement == "left",
+ "right-0 origin-top-right":
+ n.placement == "right",
+ "inset-x-0 origin-top":
+ n.placement == "center",
+ },
+ ]),
+ },
+ {
+ default: Te(() => [
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(
+ o.groups,
+ (g) => (
+ B(),
+ G(
+ "div",
+ {
+ key: g.key,
+ class: "p-1.5",
+ },
+ [
+ g.group &&
+ !g.hideLabel
+ ? (B(),
+ G(
+ "div",
+ yk,
+ Ge(
+ g.group
+ ),
+ 1
+ ))
+ : De(
+ "",
+ !0
+ ),
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(
+ g.items,
+ (v) => (
+ B(),
+ Be(
+ u,
+ {
+ key: v.label,
+ },
+ {
+ default:
+ Te(
+ ({
+ active: b,
+ }) => [
+ v.component
+ ? (B(),
+ Be(
+ mi(
+ v.component
+ ),
+ {
+ key: 0,
+ active: b,
+ },
+ null,
+ 8,
+ [
+ "active",
+ ]
+ ))
+ : (B(),
+ G(
+ "button",
+ {
+ key: 1,
+ class: ye(
+ [
+ b
+ ? "bg-gray-100"
+ : "text-gray-800",
+ "group flex h-7 w-full items-center rounded px-2 text-base",
+ ]
+ ),
+ onClick:
+ v.onClick,
+ },
+ [
+ v.icon &&
+ typeof v.icon ==
+ "string"
+ ? (B(),
+ Be(
+ a,
+ {
+ key: 0,
+ name: v.icon,
+ class: "mr-2 h-4 w-4 flex-shrink-0 text-gray-700",
+ "aria-hidden":
+ "true",
+ },
+ null,
+ 8,
+ [
+ "name",
+ ]
+ ))
+ : v.icon
+ ? (B(),
+ Be(
+ mi(
+ v.icon
+ ),
+ {
+ key: 1,
+ class: "mr-2 h-4 w-4 flex-shrink-0 text-gray-700",
+ }
+ ))
+ : De(
+ "",
+ !0
+ ),
+ U(
+ "span",
+ bk,
+ Ge(
+ v.label
+ ),
+ 1
+ ),
+ ],
+ 10,
+ vk
+ )),
+ ]
+ ),
+ _: 2,
+ },
+ 1024
+ )
+ )
+ ),
+ 128
+ )),
+ ]
+ )
+ )
+ ),
+ 128
+ )),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["class"]
+ ),
+ ]),
+ _: 2,
+ },
+ 1032,
+ ["transition", "show", "placement"]
+ ),
+ ]),
+ _: 3,
+ }
+ )
+ );
+}
+const xk = Ue(gk, [["render", wk]]),
+ kk = { class: "flex min-w-0 items-center" },
+ Ck = U(
+ "svg",
+ {
+ class: "w-4 text-gray-600",
+ xmlns: "http://www.w3.org/2000/svg",
+ width: "24",
+ height: "24",
+ viewBox: "0 0 24 24",
+ fill: "none",
+ stroke: "currentColor",
+ "stroke-width": "2",
+ "stroke-linecap": "round",
+ "stroke-linejoin": "round",
+ },
+ [
+ U("circle", { cx: "12", cy: "12", r: "1" }),
+ U("circle", { cx: "19", cy: "12", r: "1" }),
+ U("circle", { cx: "5", cy: "12", r: "1" }),
+ ],
+ -1
+ ),
+ Sk = U(
+ "span",
+ { class: "ml-1 mr-0.5 text-base text-gray-500", "aria-hidden": "true" },
+ " / ",
+ -1
+ ),
+ _k = {
+ class: "flex min-w-0 items-center overflow-hidden text-ellipsis whitespace-nowrap",
+ },
+ Mk = {
+ key: 0,
+ class: "mx-0.5 text-base text-gray-500",
+ "aria-hidden": "true",
+ };
+xe({
+ __name: "Breadcrumbs",
+ props: { items: {} },
+ setup(t) {
+ const e = t,
+ n = Kg(),
+ { width: r } = mk(),
+ i = $(() => (e.items || []).filter(Boolean)),
+ o = $(() =>
+ r.value > 640
+ ? []
+ : i.value.slice(0, -2).map((a) => {
+ let u = a.onClick
+ ? a.onClick
+ : () => n.push(a.route);
+ return be(W({}, a), {
+ icon: null,
+ label: a.label,
+ onClick: u,
+ });
+ })
+ ),
+ s = $(() => (r.value > 640 ? i.value : i.value.slice(-2)));
+ return (l, a) => (
+ B(),
+ G("div", kk, [
+ o.value.length
+ ? (B(),
+ G(
+ He,
+ { key: 0 },
+ [
+ Me(
+ xk,
+ { class: "h-7", options: o.value },
+ {
+ default: Te(() => [
+ Me(
+ vi,
+ { variant: "ghost" },
+ { icon: Te(() => [Ck]), _: 1 }
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["options"]
+ ),
+ Sk,
+ ],
+ 64
+ ))
+ : De("", !0),
+ U("div", _k, [
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(
+ s.value,
+ (u, c) => (
+ B(),
+ G(
+ He,
+ { key: u.label },
+ [
+ (B(),
+ Be(
+ mi(
+ u.route
+ ? "router-link"
+ : "button"
+ ),
+ yt(
+ {
+ class: [
+ "flex items-center rounded px-0.5 py-1 text-lg font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-400",
+ [
+ c ==
+ s.value.length - 1
+ ? "text-gray-900"
+ : "text-gray-600 hover:text-gray-700",
+ ],
+ ],
+ },
+ u.route
+ ? { to: u.route }
+ : { onClick: u.onClick }
+ ),
+ {
+ default: Te(() => [
+ _e(l.$slots, "prefix", {
+ item: u,
+ }),
+ U(
+ "span",
+ null,
+ Ge(u.label),
+ 1
+ ),
+ ]),
+ _: 2,
+ },
+ 1040,
+ ["class"]
+ )),
+ c != s.value.length - 1
+ ? (B(), G("span", Mk, " / "))
+ : De("", !0),
+ ],
+ 64
+ )
+ )
+ ),
+ 128
+ )),
+ ]),
+ ])
+ );
+ },
+});
+let Ek = 0;
+function Ak() {
+ return ++Ek;
+}
+function $1() {
+ return "frappe-ui-" + Ak();
+}
+const Tk = ["disabled", "id", "checked"],
+ Ok = ["for"],
+ $a = xe({
+ __name: "Checkbox",
+ props: {
+ size: { default: "sm" },
+ label: {},
+ checked: { type: Boolean },
+ disabled: { type: Boolean },
+ padding: { type: Boolean, default: !1 },
+ modelValue: { type: Boolean },
+ id: {},
+ },
+ setup(t) {
+ var s;
+ const e = t,
+ n = hs(),
+ r = (s = e.id) != null ? s : $1(),
+ i = $(() => [
+ { sm: "text-base font-medium", md: "text-lg font-medium" }[
+ e.size
+ ],
+ e.disabled ? "text-gray-500" : "text-gray-800",
+ "select-none",
+ ]),
+ o = $(() => {
+ let l = e.disabled
+ ? "border-gray-300 bg-gray-50 text-gray-400"
+ : "border-gray-500 text-gray-900 hover:border-gray-600 focus:ring-offset-0 focus:border-gray-900 active:border-gray-700 transition",
+ a = e.disabled
+ ? ""
+ : e.padding
+ ? "focus:ring-0"
+ : "hover:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400 active:bg-gray-100",
+ u = { sm: "w-3.5 h-3.5", md: "w-4 h-4" }[e.size];
+ return [l, a, u];
+ });
+ return (l, a) => (
+ B(),
+ G(
+ "div",
+ {
+ class: ye([
+ "inline-flex items-center space-x-2 rounded transition",
+ {
+ "px-2.5 py-1.5": l.padding && l.size === "sm",
+ "px-3 py-2": l.padding && l.size === "md",
+ "focus-within:bg-gray-100 focus-within:ring-2 focus-within:ring-gray-400 hover:bg-gray-200 active:bg-gray-300":
+ l.padding && !l.disabled,
+ },
+ ]),
+ },
+ [
+ U(
+ "input",
+ yt(
+ {
+ class: ["rounded-sm", o.value],
+ type: "checkbox",
+ disabled: l.disabled,
+ id: ne(r),
+ checked: Boolean(l.modelValue),
+ onChange:
+ a[0] ||
+ (a[0] = (u) =>
+ l.$emit(
+ "update:modelValue",
+ u.target.checked
+ )),
+ },
+ ne(n)
+ ),
+ null,
+ 16,
+ Tk
+ ),
+ l.label
+ ? (B(),
+ G(
+ "label",
+ {
+ key: 0,
+ class: ye(["block", i.value]),
+ for: ne(r),
+ },
+ Ge(l.label),
+ 11,
+ Ok
+ ))
+ : De("", !0),
+ ],
+ 2
+ )
+ );
+ },
+ });
+function za(t, e, n) {
+ var r;
+ return function () {
+ var i = this,
+ o = arguments,
+ s = function () {
+ (r = void 0), n || t.apply(i, o);
+ },
+ l = n && !r;
+ clearTimeout(r), (r = window.setTimeout(s, e)), l && t.apply(i, o);
+ };
+}
+const Rk = {
+ name: "Input",
+ inheritAttrs: !1,
+ expose: ["getInputValue"],
+ components: { FeatherIcon: ui },
+ props: {
+ label: { type: String },
+ type: {
+ type: String,
+ default: "text",
+ validator(t) {
+ let e = [
+ "text",
+ "number",
+ "checkbox",
+ "textarea",
+ "select",
+ "email",
+ "password",
+ "date",
+ ].includes(t);
+ return (
+ e ||
+ console.warn(
+ `Invalid value "${t}" for "type" prop for Input`
+ ),
+ e
+ );
+ },
+ },
+ modelValue: { type: [String, Number, Boolean, Object, Array] },
+ inputClass: { type: [String, Array, Object] },
+ debounce: { type: Number },
+ options: { type: Array },
+ disabled: { type: Boolean },
+ rows: { type: Number, default: 3 },
+ placeholder: { type: String },
+ iconLeft: { type: String },
+ },
+ emits: ["input", "change", "update:modelValue"],
+ methods: {
+ focus() {
+ this.$refs.input.focus();
+ },
+ blur() {
+ this.$refs.input.blur();
+ },
+ getInputValue(t) {
+ let e = t ? t.target : this.$refs.input,
+ n = e.value;
+ return this.type == "checkbox" && (n = e.checked), n;
+ },
+ },
+ computed: {
+ passedInputValue() {
+ return "value" in this.$attrs
+ ? this.$attrs.value
+ : this.modelValue || null;
+ },
+ inputAttributes() {
+ let t = {},
+ e = (n) => {
+ this.$emit("input", this.getInputValue(n));
+ };
+ return (
+ this.debounce && (e = za(e, this.debounce)),
+ this.type == "checkbox" &&
+ (t.checked = this.passedInputValue),
+ Object.assign(t, this.$attrs, {
+ onInput: e,
+ onChange: (n) => {
+ this.$emit("change", this.getInputValue(n)),
+ this.$emit(
+ "update:modelValue",
+ this.getInputValue(n)
+ );
+ },
+ })
+ );
+ },
+ selectOptions() {
+ return this.options
+ .map((t) =>
+ typeof t == "string" ? { label: t, value: t } : t
+ )
+ .filter(Boolean);
+ },
+ isNormalInput() {
+ return [
+ "text",
+ "number",
+ "checkbox",
+ "email",
+ "password",
+ "date",
+ ].includes(this.type);
+ },
+ },
+ },
+ Pk = { key: 0, class: "mb-2 block text-sm leading-4 text-gray-700" },
+ Nk = ["type", "disabled", "placeholder", "value"],
+ jk = ["placeholder", "value", "disabled", "rows"],
+ Lk = ["disabled"],
+ Dk = ["value", "disabled", "selected"],
+ Ik = { key: 1, class: "ml-2 inline-block text-base leading-4" };
+function Bk(t, e, n, r, i, o) {
+ const s = ft("FeatherIcon");
+ return (
+ B(),
+ G(
+ "label",
+ {
+ class: ye([
+ n.type == "checkbox" ? "flex" : "block",
+ t.$attrs.class,
+ ]),
+ },
+ [
+ n.label && n.type != "checkbox"
+ ? (B(), G("span", Pk, Ge(n.label), 1))
+ : De("", !0),
+ U(
+ "div",
+ {
+ class: ye([
+ "relative flex",
+ {
+ "items-center":
+ o.isNormalInput || n.type == "select",
+ },
+ ]),
+ },
+ [
+ n.iconLeft && n.type != "checkbox"
+ ? (B(),
+ Be(
+ s,
+ {
+ key: 0,
+ name: n.iconLeft,
+ class: ye([
+ "absolute mx-2 h-4 w-4 text-gray-600",
+ { "mt-2": n.type == "textarea" },
+ ]),
+ },
+ null,
+ 8,
+ ["name", "class"]
+ ))
+ : De("", !0),
+ o.isNormalInput
+ ? (B(),
+ G(
+ "input",
+ yt({ key: 1 }, o.inputAttributes, {
+ class: [
+ "border-gray-400 placeholder-gray-500",
+ [
+ {
+ "form-input block w-full":
+ n.type != "checkbox",
+ "form-checkbox":
+ n.type == "checkbox",
+ "pl-8":
+ n.iconLeft &&
+ n.type != "checkbox",
+ },
+ n.inputClass,
+ ],
+ ],
+ ref: "input",
+ type: n.type || "text",
+ disabled: n.disabled,
+ placeholder: n.placeholder,
+ value: o.passedInputValue,
+ }),
+ null,
+ 16,
+ Nk
+ ))
+ : De("", !0),
+ n.type === "textarea"
+ ? (B(),
+ G(
+ "textarea",
+ yt({ key: 2 }, o.inputAttributes, {
+ placeholder: n.placeholder,
+ class: [
+ "placeholder-gray-500",
+ [
+ "form-textarea block w-full resize-none",
+ n.inputClass,
+ { "pl-8": n.iconLeft },
+ ],
+ ],
+ ref: "input",
+ value: o.passedInputValue,
+ disabled: n.disabled,
+ rows: n.rows,
+ }),
+ null,
+ 16,
+ jk
+ ))
+ : De("", !0),
+ n.type === "select"
+ ? (B(),
+ G(
+ "select",
+ yt({ key: 3 }, o.inputAttributes, {
+ class: [
+ "form-select block w-full",
+ { "pl-8": n.iconLeft },
+ ],
+ ref: "input",
+ disabled: n.disabled,
+ }),
+ [
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(
+ o.selectOptions,
+ (l) => (
+ B(),
+ G(
+ "option",
+ {
+ key: l.value,
+ value: l.value,
+ disabled:
+ l.disabled ||
+ !1,
+ selected:
+ o.passedInputValue ===
+ l.value,
+ },
+ Ge(l.label),
+ 9,
+ Dk
+ )
+ )
+ ),
+ 128
+ )),
+ ],
+ 16,
+ Lk
+ ))
+ : De("", !0),
+ ],
+ 2
+ ),
+ n.label && n.type == "checkbox"
+ ? (B(), G("span", Ik, Ge(n.label), 1))
+ : De("", !0),
+ ],
+ 2
+ )
+ );
+}
+const gR = Ue(Rk, [["render", Bk]]),
+ $k = {
+ name: "Dialog",
+ props: {
+ modelValue: { type: Boolean, required: !0 },
+ options: {
+ type: Object,
+ default() {
+ return {};
+ },
+ },
+ },
+ emits: ["update:modelValue", "close", "after-leave"],
+ components: {
+ HDialog: ix,
+ DialogPanel: ox,
+ DialogTitle: sx,
+ TransitionChild: C1,
+ TransitionRoot: S1,
+ Button: vi,
+ FeatherIcon: ui,
+ },
+ data() {
+ return { dialogActions: [] };
+ },
+ watch: {
+ "options.actions": {
+ handler(t) {
+ !t ||
+ (this.dialogActions = t.map((e) => {
+ let n = oe(!1);
+ return be(W({}, e), {
+ loading: n,
+ onClick: e.onClick
+ ? () =>
+ cr(this, null, function* () {
+ n.value = !0;
+ try {
+ yield e.onClick();
+ } finally {
+ n.value = !1;
+ }
+ })
+ : this.close,
+ });
+ }));
+ },
+ immediate: !0,
+ },
+ },
+ methods: {
+ close() {
+ this.open = !1;
+ },
+ },
+ computed: {
+ open: {
+ get() {
+ return this.modelValue;
+ },
+ set(t) {
+ this.$emit("update:modelValue", t),
+ t || this.$emit("close");
+ },
+ },
+ icon() {
+ var e;
+ if (!((e = this.options) != null && e.icon)) return null;
+ let t = this.options.icon;
+ return typeof t == "string" && (t = { name: t }), t;
+ },
+ dialogPositionClasses() {
+ var e;
+ let t =
+ ((e = this.options) == null ? void 0 : e.position) ||
+ "center";
+ return {
+ "justify-center": t === "center",
+ "pt-[20vh]": t === "top",
+ };
+ },
+ },
+ },
+ zk = ["data-dialog"],
+ Hk = { class: "bg-white px-4 pb-6 pt-5 sm:px-6" },
+ Fk = { class: "flex" },
+ Vk = { class: "flex-1" },
+ Wk = { class: "mb-6 flex items-center justify-between" },
+ Uk = { class: "flex items-center space-x-2" },
+ Kk = { class: "text-2xl font-semibold leading-6 text-gray-900" },
+ qk = U(
+ "svg",
+ {
+ width: "16",
+ height: "16",
+ viewBox: "0 0 16 16",
+ fill: "none",
+ xmlns: "http://www.w3.org/2000/svg",
+ },
+ [
+ U("path", {
+ "fill-rule": "evenodd",
+ "clip-rule": "evenodd",
+ d: "M12.8567 3.85355C13.052 3.65829 13.052 3.34171 12.8567 3.14645C12.6615 2.95118 12.3449 2.95118 12.1496 3.14645L8.00201 7.29405L3.85441 3.14645C3.65914 2.95118 3.34256 2.95118 3.1473 3.14645C2.95204 3.34171 2.95204 3.65829 3.1473 3.85355L7.29491 8.00116L3.14645 12.1496C2.95118 12.3449 2.95118 12.6615 3.14645 12.8567C3.34171 13.052 3.65829 13.052 3.85355 12.8567L8.00201 8.70827L12.1505 12.8567C12.3457 13.052 12.6623 13.052 12.8576 12.8567C13.0528 12.6615 13.0528 12.3449 12.8576 12.1496L8.70912 8.00116L12.8567 3.85355Z",
+ fill: "#383838",
+ }),
+ ],
+ -1
+ ),
+ Jk = { key: 0, class: "text-p-base text-gray-700" },
+ Gk = { key: 0, class: "px-4 pb-7 pt-4 sm:px-6" },
+ Yk = { class: "space-y-2" };
+function Qk(t, e, n, r, i, o) {
+ const s = ft("TransitionChild"),
+ l = ft("FeatherIcon"),
+ a = ft("DialogTitle"),
+ u = ft("Button"),
+ c = ft("DialogPanel"),
+ f = ft("HDialog"),
+ h = ft("TransitionRoot");
+ return (
+ B(),
+ Be(
+ h,
+ {
+ as: "template",
+ show: o.open,
+ onAfterLeave: e[0] || (e[0] = (p) => t.$emit("after-leave")),
+ },
+ {
+ default: Te(() => [
+ Me(
+ f,
+ {
+ as: "div",
+ class: "fixed inset-0 z-10 overflow-y-auto",
+ onClose: o.close,
+ },
+ {
+ default: Te(() => [
+ U(
+ "div",
+ {
+ class: ye([
+ "flex min-h-screen flex-col items-center px-4 py-4 text-center",
+ o.dialogPositionClasses,
+ ]),
+ },
+ [
+ Me(
+ s,
+ {
+ as: "template",
+ enter: "ease-out duration-150",
+ "enter-from": "opacity-0",
+ "enter-to": "opacity-100",
+ leave: "ease-in duration-150",
+ "leave-from": "opacity-100",
+ "leave-to": "opacity-0",
+ },
+ {
+ default: Te(() => [
+ U(
+ "div",
+ {
+ class: "fixed inset-0 bg-black-overlay-200 transition-opacity",
+ "data-dialog":
+ n.options.title,
+ },
+ null,
+ 8,
+ zk
+ ),
+ ]),
+ _: 1,
+ }
+ ),
+ Me(
+ s,
+ {
+ as: "template",
+ enter: "ease-out duration-150",
+ "enter-from":
+ "opacity-50 translate-y-2 scale-95",
+ "enter-to":
+ "opacity-100 translate-y-0 scale-100",
+ leave: "ease-in duration-150",
+ "leave-from":
+ "opacity-100 translate-y-0 scale-100",
+ "leave-to":
+ "opacity-50 translate-y-4 translate-y-4 scale-95",
+ },
+ {
+ default: Te(() => [
+ Me(
+ c,
+ {
+ class: ye([
+ "my-8 inline-block w-full transform overflow-hidden rounded-xl bg-white text-left align-middle shadow-xl transition-all",
+ {
+ "max-w-7xl":
+ n
+ .options
+ .size ===
+ "7xl",
+ "max-w-6xl":
+ n
+ .options
+ .size ===
+ "6xl",
+ "max-w-5xl":
+ n
+ .options
+ .size ===
+ "5xl",
+ "max-w-4xl":
+ n
+ .options
+ .size ===
+ "4xl",
+ "max-w-3xl":
+ n
+ .options
+ .size ===
+ "3xl",
+ "max-w-2xl":
+ n
+ .options
+ .size ===
+ "2xl",
+ "max-w-xl":
+ n
+ .options
+ .size ===
+ "xl",
+ "max-w-lg":
+ n
+ .options
+ .size ===
+ "lg" ||
+ !n
+ .options
+ .size,
+ "max-w-md":
+ n
+ .options
+ .size ===
+ "md",
+ "max-w-sm":
+ n
+ .options
+ .size ===
+ "sm",
+ "max-w-xs":
+ n
+ .options
+ .size ===
+ "xs",
+ },
+ ]),
+ },
+ {
+ default: Te(() => [
+ _e(
+ t.$slots,
+ "body",
+ {},
+ () => [
+ _e(
+ t.$slots,
+ "body-main",
+ {},
+ () => [
+ U(
+ "div",
+ Hk,
+ [
+ U(
+ "div",
+ Fk,
+ [
+ U(
+ "div",
+ Vk,
+ [
+ U(
+ "div",
+ Wk,
+ [
+ U(
+ "div",
+ Uk,
+ [
+ o.icon
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: ye(
+ [
+ "flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full",
+ {
+ "bg-gray-100":
+ !o
+ .icon
+ .appearance,
+ "bg-yellow-100":
+ o
+ .icon
+ .appearance ===
+ "warning",
+ "bg-blue-100":
+ o
+ .icon
+ .appearance ===
+ "info",
+ "bg-red-100":
+ o
+ .icon
+ .appearance ===
+ "danger",
+ "bg-green-100":
+ o
+ .icon
+ .appearance ===
+ "success",
+ },
+ ]
+ ),
+ },
+ [
+ Me(
+ l,
+ {
+ name: o
+ .icon
+ .name,
+ class: ye(
+ [
+ "h-4 w-4",
+ {
+ "text-gray-600":
+ !o
+ .icon
+ .appearance,
+ "text-yellow-600":
+ o
+ .icon
+ .appearance ===
+ "warning",
+ "text-blue-600":
+ o
+ .icon
+ .appearance ===
+ "info",
+ "text-red-600":
+ o
+ .icon
+ .appearance ===
+ "danger",
+ "text-green-600":
+ o
+ .icon
+ .appearance ===
+ "success",
+ },
+ ]
+ ),
+ "aria-hidden":
+ "true",
+ },
+ null,
+ 8,
+ [
+ "name",
+ "class",
+ ]
+ ),
+ ],
+ 2
+ ))
+ : De(
+ "",
+ !0
+ ),
+ Me(
+ a,
+ {
+ as: "header",
+ },
+ {
+ default:
+ Te(
+ () => [
+ _e(
+ t.$slots,
+ "body-title",
+ {},
+ () => [
+ U(
+ "h3",
+ Kk,
+ Ge(
+ n
+ .options
+ .title ||
+ "Untitled"
+ ),
+ 1
+ ),
+ ]
+ ),
+ ]
+ ),
+ _: 3,
+ }
+ ),
+ ]
+ ),
+ Me(
+ u,
+ {
+ variant:
+ "ghost",
+ onClick:
+ o.close,
+ },
+ {
+ icon: Te(
+ () => [
+ qk,
+ ]
+ ),
+ _: 1,
+ },
+ 8,
+ [
+ "onClick",
+ ]
+ ),
+ ]
+ ),
+ _e(
+ t.$slots,
+ "body-content",
+ {},
+ () => [
+ n
+ .options
+ .message
+ ? (B(),
+ G(
+ "p",
+ Jk,
+ Ge(
+ n
+ .options
+ .message
+ ),
+ 1
+ ))
+ : De(
+ "",
+ !0
+ ),
+ ]
+ ),
+ ]
+ ),
+ ]
+ ),
+ ]
+ ),
+ ]
+ ),
+ i
+ .dialogActions
+ .length ||
+ t.$slots
+ .actions
+ ? (B(),
+ G(
+ "div",
+ Gk,
+ [
+ _e(
+ t.$slots,
+ "actions",
+ Dt(
+ Ft(
+ {
+ close: o.close,
+ }
+ )
+ ),
+ () => [
+ U(
+ "div",
+ Yk,
+ [
+ (B(
+ !0
+ ),
+ G(
+ He,
+ null,
+ wn(
+ i.dialogActions,
+ (
+ p
+ ) => (
+ B(),
+ Be(
+ u,
+ yt(
+ {
+ class: "w-full",
+ key: p.label,
+ },
+ p
+ ),
+ {
+ default:
+ Te(
+ () => [
+ Pn(
+ Ge(
+ p.label
+ ),
+ 1
+ ),
+ ]
+ ),
+ _: 2,
+ },
+ 1040
+ )
+ )
+ ),
+ 128
+ )),
+ ]
+ ),
+ ]
+ ),
+ ]
+ ))
+ : De(
+ "",
+ !0
+ ),
+ ]
+ ),
+ ]),
+ _: 3,
+ },
+ 8,
+ ["class"]
+ ),
+ ]),
+ _: 3,
+ }
+ ),
+ ],
+ 2
+ ),
+ ]),
+ _: 3,
+ },
+ 8,
+ ["onClose"]
+ ),
+ ]),
+ _: 3,
+ },
+ 8,
+ ["show"]
+ )
+ );
+}
+const yR = Ue($k, [["render", Qk]]);
+xe({
+ __name: "Divider",
+ props: {
+ orientation: { default: "horizontal" },
+ position: { default: "center" },
+ flexItem: { type: Boolean },
+ action: {},
+ },
+ setup(t) {
+ const e = t,
+ n = $(() => {
+ let i = {
+ horizontal: "border-t-[1px] w-full",
+ vertical: "border-l-[1px]",
+ }[e.orientation],
+ o = e.flexItem ? "self-stretch h-auto" : "h-full";
+ return [i, o];
+ }),
+ r = $(
+ () =>
+ ({
+ horizontal: {
+ center: "left-1/2 top-0 -translate-y-2/4 -translate-x-1/2",
+ start: "left-0 top-0 -translate-y-2/4 ml-4",
+ end: "right-0 -translate-y-2/4 mr-4",
+ },
+ vertical: {
+ center: "-translate-x-2/4 top-1/2 left-0 -translate-y-1/2",
+ start: "-translate-x-2/4 top-0 mt-4 left-0",
+ end: "-translate-x-2/4 bottom-0 mb-4 left-0",
+ },
+ }[e.orientation][e.position])
+ );
+ return (i, o) => (
+ B(),
+ Be(
+ mi(e.action ? "div" : "hr"),
+ {
+ class: ye([
+ "relative whitespace-nowrap border-0 border-gray-300",
+ n.value,
+ ]),
+ },
+ {
+ default: Te(() => {
+ var s, l, a;
+ return [
+ e.action
+ ? (B(),
+ G(
+ "span",
+ {
+ key: 0,
+ class: ye(["absolute", r.value]),
+ },
+ [
+ Me(
+ ne(vi),
+ {
+ label:
+ (s = e.action) == null
+ ? void 0
+ : s.label,
+ loading:
+ (l = e.action) == null
+ ? void 0
+ : l.loading,
+ size: "sm",
+ variant: "outline",
+ onClick:
+ (a = e.action) == null
+ ? void 0
+ : a.handler,
+ },
+ null,
+ 8,
+ ["label", "loading", "onClick"]
+ ),
+ ],
+ 2
+ ))
+ : De("", !0),
+ ];
+ }),
+ _: 1,
+ },
+ 8,
+ ["class"]
+ )
+ );
+ },
+});
+class Xk {
+ constructor() {
+ Za(this, "listeners");
+ Za(this, "failed");
+ (this.listeners = {}), (this.failed = !1);
+ }
+ on(e, n) {
+ (this.listeners[e] = this.listeners[e] || []),
+ this.listeners[e].push(n);
+ }
+ trigger(e, n) {
+ (this.listeners[e] || []).forEach((i) => {
+ i.call(this, n);
+ });
+ }
+ upload(e, n) {
+ return new Promise((r, i) => {
+ let o = new XMLHttpRequest();
+ o.upload.addEventListener("loadstart", () => {
+ this.trigger("start");
+ }),
+ o.upload.addEventListener("progress", (a) => {
+ a.lengthComputable &&
+ this.trigger("progress", {
+ uploaded: a.loaded,
+ total: a.total,
+ });
+ }),
+ o.upload.addEventListener("load", () => {
+ this.trigger("finish");
+ }),
+ o.addEventListener("error", () => {
+ this.trigger("error"), i();
+ }),
+ (o.onreadystatechange = () => {
+ if (o.readyState == XMLHttpRequest.DONE) {
+ let a;
+ if (o.status === 200) {
+ let u = null;
+ try {
+ u = JSON.parse(o.responseText);
+ } catch (f) {
+ u = o.responseText;
+ }
+ let c = u.message || u;
+ r(c);
+ } else if (o.status === 403)
+ a = JSON.parse(o.responseText);
+ else {
+ this.failed = !0;
+ try {
+ a = JSON.parse(o.responseText);
+ } catch (u) {}
+ }
+ a && a.exc && console.error(JSON.parse(a.exc)[0]), i(a);
+ }
+ });
+ const s = n.upload_endpoint || "/api/method/upload_file";
+ o.open("POST", s, !0),
+ o.setRequestHeader("Accept", "application/json"),
+ window.csrf_token &&
+ window.csrf_token !== "{{ csrf_token }}" &&
+ o.setRequestHeader(
+ "X-Frappe-CSRF-Token",
+ window.csrf_token
+ );
+ let l = new FormData();
+ e && l.append("file", e, e.name),
+ l.append("is_private", n.private ? "1" : "0"),
+ l.append("folder", n.folder || "Home"),
+ n.file_url && l.append("file_url", n.file_url),
+ n.doctype && l.append("doctype", n.doctype),
+ n.docname && l.append("docname", n.docname),
+ n.fieldname && l.append("fieldname", n.fieldname),
+ n.method && l.append("method", n.method),
+ n.type && l.append("type", n.type),
+ o.send(l);
+ });
+ }
+}
+const Zk = {
+ name: "FileUploader",
+ props: ["fileTypes", "uploadArgs", "validateFile"],
+ data() {
+ return {
+ uploader: null,
+ uploading: !1,
+ uploaded: 0,
+ error: null,
+ message: "",
+ total: 0,
+ file: null,
+ finishedUploading: !1,
+ };
+ },
+ computed: {
+ progress() {
+ let t = Math.floor((this.uploaded / this.total) * 100);
+ return isNaN(t) ? 0 : t;
+ },
+ success() {
+ return this.finishedUploading && !this.error;
+ },
+ },
+ methods: {
+ openFileSelector() {
+ this.$refs.input.click();
+ },
+ onFileAdd(t) {
+ return cr(this, null, function* () {
+ if (
+ ((this.error = null),
+ (this.file = t.target.files[0]),
+ this.file && this.validateFile)
+ )
+ try {
+ let e = yield this.validateFile(this.file);
+ e && (this.error = e);
+ } catch (e) {
+ this.error = e;
+ }
+ this.error || this.uploadFile(this.file);
+ });
+ },
+ uploadFile(t) {
+ return cr(this, null, function* () {
+ (this.error = null),
+ (this.uploaded = 0),
+ (this.total = 0),
+ (this.uploader = new Xk()),
+ this.uploader.on("start", () => {
+ this.uploading = !0;
+ }),
+ this.uploader.on("progress", (e) => {
+ (this.uploaded = e.uploaded),
+ (this.total = e.total);
+ }),
+ this.uploader.on("error", () => {
+ (this.uploading = !1),
+ (this.error = "Error Uploading File");
+ }),
+ this.uploader.on("finish", () => {
+ (this.uploading = !1),
+ (this.finishedUploading = !0);
+ }),
+ this.uploader
+ .upload(t, this.uploadArgs || {})
+ .then((e) => {
+ this.$emit("success", e);
+ })
+ .catch((e) => {
+ this.uploading = !1;
+ let n = "Error Uploading File";
+ e != null && e._server_messages
+ ? (n = JSON.parse(
+ JSON.parse(e._server_messages)[0]
+ ).message)
+ : e != null &&
+ e.exc &&
+ (n = JSON.parse(e.exc)[0]
+ .split(
+ `
+`
+ )
+ .slice(-2, -1)[0]),
+ (this.error = n),
+ this.$emit("failure", e);
+ });
+ });
+ },
+ },
+ },
+ e8 = ["accept"];
+function t8(t, e, n, r, i, o) {
+ return (
+ B(),
+ G("div", null, [
+ U(
+ "input",
+ {
+ ref: "input",
+ type: "file",
+ accept: n.fileTypes,
+ class: "hidden",
+ onChange:
+ e[0] ||
+ (e[0] = (...s) => o.onFileAdd && o.onFileAdd(...s)),
+ },
+ null,
+ 40,
+ e8
+ ),
+ _e(
+ t.$slots,
+ "default",
+ Dt(
+ Ft({
+ file: i.file,
+ uploading: i.uploading,
+ progress: o.progress,
+ uploaded: i.uploaded,
+ message: i.message,
+ error: i.error,
+ total: i.total,
+ success: o.success,
+ openFileSelector: o.openFileSelector,
+ })
+ )
+ ),
+ ])
+ );
+}
+const vR = Ue(Zk, [["render", t8]]),
+ n8 = { class: "relative flex items-center" },
+ r8 = ["type", "placeholder", "disabled", "id", "value"],
+ i8 = xe({
+ __name: "TextInput",
+ props: {
+ type: { default: "text" },
+ size: { default: "sm" },
+ variant: { default: "subtle" },
+ placeholder: {},
+ disabled: { type: Boolean },
+ id: {},
+ modelValue: {},
+ debounce: {},
+ },
+ emits: ["update:modelValue"],
+ setup(t, { expose: e, emit: n }) {
+ const r = t,
+ i = n,
+ o = yd(),
+ s = hs(),
+ l = oe(null);
+ e({ el: l });
+ const a = $(() => (r.disabled ? "text-gray-600" : "text-gray-800")),
+ u = $(() => {
+ let g = {
+ sm: "text-base rounded h-7",
+ md: "text-base rounded h-8",
+ lg: "text-lg rounded-md h-10",
+ xl: "text-xl rounded-md h-10",
+ }[r.size],
+ v = {
+ sm: [
+ "py-1.5",
+ o.prefix ? "pl-8" : "pl-2",
+ o.suffix ? "pr-8" : "pr-2",
+ ],
+ md: [
+ "py-1.5",
+ o.prefix ? "pl-9" : "pl-2.5",
+ o.suffix ? "pr-9" : "pr-2.5",
+ ],
+ lg: [
+ "py-1.5",
+ o.prefix ? "pl-10" : "pl-3",
+ o.suffix ? "pr-10" : "pr-3",
+ ],
+ xl: [
+ "py-1.5",
+ o.prefix ? "pl-10" : "pl-3",
+ o.suffix ? "pr-10" : "pr-3",
+ ],
+ }[r.size],
+ b = r.disabled ? "disabled" : r.variant,
+ x = {
+ subtle: "border border-gray-100 bg-gray-100 placeholder-gray-500 hover:border-gray-200 hover:bg-gray-200 focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ outline:
+ "border border-gray-300 bg-white placeholder-gray-500 hover:border-gray-400 hover:shadow-sm focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ disabled: [
+ "border bg-gray-50 placeholder-gray-400",
+ r.variant === "outline"
+ ? "border-gray-300"
+ : "border-transparent",
+ ],
+ }[b];
+ return [g, v, x, a.value, "transition-colors w-full"];
+ });
+ let c = $(
+ () =>
+ ({ sm: "pl-2", md: "pl-2.5", lg: "pl-3", xl: "pl-3" }[
+ r.size
+ ])
+ ),
+ f = $(
+ () =>
+ ({ sm: "pr-2", md: "pr-2.5", lg: "pr-3", xl: "pr-3" }[
+ r.size
+ ])
+ ),
+ h = (g) => {
+ i("update:modelValue", g);
+ };
+ r.debounce && (h = za(h, r.debounce));
+ let p = (g) => {
+ h(g.target.value);
+ };
+ return (g, v) => (
+ B(),
+ G("div", n8, [
+ g.$slots.prefix
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: ye([
+ "absolute inset-y-0 left-0 flex items-center",
+ a.value,
+ ne(c),
+ ]),
+ },
+ [_e(g.$slots, "prefix")],
+ 2
+ ))
+ : De("", !0),
+ U(
+ "input",
+ yt(
+ {
+ ref_key: "inputRef",
+ ref: l,
+ type: g.type,
+ placeholder: g.placeholder,
+ class: u.value,
+ disabled: g.disabled,
+ id: g.id,
+ value: g.modelValue,
+ onInput:
+ v[0] ||
+ (v[0] = (...b) => ne(p) && ne(p)(...b)),
+ onChange:
+ v[1] ||
+ (v[1] = (...b) => ne(p) && ne(p)(...b)),
+ },
+ ne(s)
+ ),
+ null,
+ 16,
+ r8
+ ),
+ g.$slots.suffix
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 1,
+ class: ye([
+ "absolute inset-y-0 right-0 flex items-center",
+ a.value,
+ ne(f),
+ ]),
+ },
+ [_e(g.$slots, "suffix")],
+ 2
+ ))
+ : De("", !0),
+ ])
+ );
+ },
+ }),
+ o8 = { class: "relative flex items-center" },
+ s8 = ["disabled", "id", "value"],
+ l8 = ["value", "disabled", "selected"],
+ a8 = xe({
+ __name: "Select",
+ props: {
+ size: { default: "sm" },
+ variant: { default: "subtle" },
+ placeholder: {},
+ disabled: { type: Boolean },
+ id: {},
+ modelValue: {},
+ options: {},
+ },
+ emits: ["update:modelValue"],
+ setup(t, { emit: e }) {
+ const n = t,
+ r = e,
+ i = yd(),
+ o = hs();
+ function s(f) {
+ r("update:modelValue", f.target.value);
+ }
+ const l = $(() => {
+ var f;
+ return (
+ ((f = n.options) == null
+ ? void 0
+ : f
+ .map((h) =>
+ typeof h == "string"
+ ? { label: h, value: h }
+ : h
+ )
+ .filter(Boolean)) || []
+ );
+ }),
+ a = $(() => (n.disabled ? "text-gray-500" : "text-gray-800")),
+ u = $(() => {
+ let f = {
+ sm: "text-base rounded h-7",
+ md: "text-base rounded h-8",
+ lg: "text-lg rounded-md h-10",
+ xl: "text-xl rounded-md h-10",
+ }[n.size],
+ h = {
+ sm: ["py-0", i.prefix ? "pl-8" : "pl-2"],
+ md: ["py-0", i.prefix ? "pl-9" : "pl-2.5"],
+ lg: ["py-0", i.prefix ? "pl-10" : "pl-3"],
+ xl: ["py-0", i.prefix ? "pl-10" : "pl-3"],
+ }[n.size],
+ p = n.disabled ? "disabled" : n.variant,
+ g = {
+ subtle: "border border-gray-100 bg-gray-100 hover:border-gray-200 hover:bg-gray-200 focus:border-gray-500 focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ outline:
+ "border border-gray-300 bg-white hover:border-gray-400 focus:border-gray-500 focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ ghost: "bg-transparent border-transparent hover:bg-gray-200 focus:bg-gray-200 focus:border-gray-500 focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ disabled: [
+ "border",
+ n.variant !== "ghost" ? "bg-gray-50" : "",
+ n.variant === "outline"
+ ? "border-gray-300"
+ : "border-transparent",
+ ],
+ }[p];
+ return [f, h, g, a.value, "transition-colors w-full"];
+ });
+ let c = $(
+ () =>
+ ({ sm: "pl-2", md: "pl-2.5", lg: "pl-3", xl: "pl-3" }[
+ n.size
+ ])
+ );
+ return (f, h) => (
+ B(),
+ G("div", o8, [
+ f.$slots.prefix
+ ? (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: ye([
+ "absolute inset-y-0 left-0 flex items-center",
+ a.value,
+ ne(c),
+ ]),
+ },
+ [_e(f.$slots, "prefix")],
+ 2
+ ))
+ : De("", !0),
+ U(
+ "select",
+ yt(
+ {
+ class: u.value,
+ disabled: f.disabled,
+ id: f.id,
+ value: f.modelValue,
+ onChange: s,
+ },
+ ne(o)
+ ),
+ [
+ (B(!0),
+ G(
+ He,
+ null,
+ wn(
+ l.value,
+ (p) => (
+ B(),
+ G(
+ "option",
+ {
+ key: p.value,
+ value: p.value,
+ disabled: p.disabled || !1,
+ selected:
+ f.modelValue === p.value,
+ },
+ Ge(p.label),
+ 9,
+ l8
+ )
+ )
+ ),
+ 128
+ )),
+ ],
+ 16,
+ s8
+ ),
+ ])
+ );
+ },
+ }),
+ u8 = ["placeholder", "disabled", "id", "value", "rows"],
+ c8 = xe({
+ __name: "Textarea",
+ props: {
+ size: { default: "sm" },
+ variant: { default: "subtle" },
+ placeholder: {},
+ disabled: { type: Boolean },
+ id: {},
+ modelValue: {},
+ debounce: {},
+ rows: { default: 3 },
+ },
+ emits: ["update:modelValue"],
+ setup(t, { emit: e }) {
+ const n = t,
+ r = e,
+ i = hs(),
+ o = $(() => {
+ let a = {
+ sm: "text-base rounded",
+ md: "text-base rounded",
+ lg: "text-lg rounded-md",
+ xl: "text-xl rounded-md",
+ }[n.size],
+ u = {
+ sm: ["py-1.5 px-2"],
+ md: ["py-1.5 px-2.5"],
+ lg: ["py-1.5 px-3"],
+ xl: ["py-1.5 px-3"],
+ }[n.size],
+ c = n.disabled ? "disabled" : n.variant,
+ f = {
+ subtle: "border border-gray-100 bg-gray-100 placeholder-gray-500 hover:border-gray-200 hover:bg-gray-200 focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ outline:
+ "border border-gray-300 bg-white placeholder-gray-500 hover:border-gray-400 hover:shadow-sm focus:bg-white focus:border-gray-500 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400",
+ disabled: [
+ "border bg-gray-50 placeholder-gray-400",
+ n.variant === "outline"
+ ? "border-gray-300"
+ : "border-transparent",
+ ],
+ }[c];
+ return [
+ a,
+ u,
+ f,
+ n.disabled ? "text-gray-600" : "text-gray-800",
+ "transition-colors w-full block",
+ ];
+ });
+ let s = (a) => {
+ r("update:modelValue", a);
+ };
+ n.debounce && (s = za(s, n.debounce));
+ let l = (a) => {
+ s(a.target.value);
+ };
+ return (a, u) => (
+ B(),
+ G(
+ "textarea",
+ yt(
+ {
+ placeholder: a.placeholder,
+ class: o.value,
+ disabled: a.disabled,
+ id: a.id,
+ value: a.modelValue,
+ rows: a.rows,
+ onInput:
+ u[0] || (u[0] = (...c) => ne(l) && ne(l)(...c)),
+ onChange:
+ u[1] || (u[1] = (...c) => ne(l) && ne(l)(...c)),
+ },
+ ne(i)
+ ),
+ null,
+ 16,
+ u8
+ )
+ );
+ },
+ }),
+ d8 = ["for"],
+ f8 = { inheritAttrs: !1 };
+xe(
+ be(W({}, f8), {
+ __name: "FormControl",
+ props: {
+ label: {},
+ description: {},
+ type: { default: "text" },
+ size: { default: "sm" },
+ },
+ setup(t) {
+ const e = $1(),
+ n = t,
+ r = hs(),
+ i = $(() => {
+ let l = {};
+ for (let a in r)
+ a !== "class" && a !== "style" && (l[a] = r[a]);
+ return l;
+ }),
+ o = $(() => [
+ { sm: "text-xs", md: "text-base" }[n.size],
+ "text-gray-600",
+ ]),
+ s = $(() => [
+ { sm: "text-xs", md: "text-base" }[n.size],
+ "text-gray-600",
+ ]);
+ return (l, a) =>
+ l.type != "checkbox"
+ ? (B(),
+ G(
+ "div",
+ { key: 0, class: ye(["space-y-1.5", ne(r).class]) },
+ [
+ l.label
+ ? (B(),
+ G(
+ "label",
+ {
+ key: 0,
+ class: ye(["block", o.value]),
+ for: ne(e),
+ },
+ Ge(l.label),
+ 11,
+ d8
+ ))
+ : De("", !0),
+ l.type === "select"
+ ? (B(),
+ Be(
+ a8,
+ yt(
+ { key: 1, id: ne(e) },
+ be(W({}, i.value), {
+ size: l.size,
+ })
+ ),
+ ou({ _: 2 }, [
+ l.$slots.prefix
+ ? {
+ name: "prefix",
+ fn: Te(() => [
+ _e(
+ l.$slots,
+ "prefix"
+ ),
+ ]),
+ key: "0",
+ }
+ : void 0,
+ ]),
+ 1040,
+ ["id"]
+ ))
+ : l.type === "autocomplete"
+ ? (B(),
+ Be(
+ ik,
+ Dt(yt({ key: 2 }, W({}, i.value))),
+ ou({ _: 2 }, [
+ l.$slots.prefix
+ ? {
+ name: "prefix",
+ fn: Te(() => [
+ _e(
+ l.$slots,
+ "prefix"
+ ),
+ ]),
+ key: "0",
+ }
+ : void 0,
+ l.$slots["item-prefix"]
+ ? {
+ name: "item-prefix",
+ fn: Te((u) => [
+ _e(
+ l.$slots,
+ "item-prefix",
+ Dt(Ft(u))
+ ),
+ ]),
+ key: "1",
+ }
+ : void 0,
+ ]),
+ 1040
+ ))
+ : l.type === "textarea"
+ ? (B(),
+ Be(
+ c8,
+ yt(
+ { key: 3, id: ne(e) },
+ be(W({}, i.value), {
+ size: l.size,
+ })
+ ),
+ null,
+ 16,
+ ["id"]
+ ))
+ : (B(),
+ Be(
+ i8,
+ yt(
+ { key: 4, id: ne(e) },
+ be(W({}, i.value), {
+ type: l.type,
+ size: l.size,
+ })
+ ),
+ ou({ _: 2 }, [
+ l.$slots.prefix
+ ? {
+ name: "prefix",
+ fn: Te(() => [
+ _e(
+ l.$slots,
+ "prefix"
+ ),
+ ]),
+ key: "0",
+ }
+ : void 0,
+ l.$slots.suffix
+ ? {
+ name: "suffix",
+ fn: Te(() => [
+ _e(
+ l.$slots,
+ "suffix"
+ ),
+ ]),
+ key: "1",
+ }
+ : void 0,
+ ]),
+ 1040,
+ ["id"]
+ )),
+ _e(l.$slots, "description", {}, () => [
+ l.description
+ ? (B(),
+ G(
+ "p",
+ { key: 0, class: ye(s.value) },
+ Ge(l.description),
+ 3
+ ))
+ : De("", !0),
+ ]),
+ ],
+ 2
+ ))
+ : (B(),
+ Be(
+ $a,
+ yt(
+ { key: 1, id: ne(e) },
+ be(W({}, i.value), {
+ label: l.label,
+ size: l.size,
+ class: ne(r).class,
+ })
+ ),
+ null,
+ 16,
+ ["id"]
+ ));
+ },
+ })
+);
+const h8 = { class: "min-w-50 space-y-[10px]" },
+ p8 = { key: 0, class: "flex items-baseline justify-between" },
+ m8 = { key: 0, class: "text-base font-medium text-gray-800" },
+ g8 = { key: 1 },
+ y8 = { key: 2, class: "self-end text-base font-medium text-gray-500" },
+ v8 = ["aria-valuenow"],
+ b8 = 0,
+ yu = 100;
+xe({
+ __name: "Progress",
+ props: {
+ value: {},
+ size: { default: "sm" },
+ label: { default: "" },
+ hint: { type: Boolean, default: !1 },
+ intervals: { type: Boolean, default: !1 },
+ intervalCount: { default: 6 },
+ },
+ setup(t) {
+ const e = t,
+ n = Zu(() => {
+ const i = { sm: "h-[2px]", md: "h-1", lg: "h-2", xl: "h-3" }[
+ e.size
+ ],
+ o = e.intervals ? "flex space-x-1" : "relative bg-gray-100";
+ return [i, o];
+ }),
+ r = Zu(() =>
+ e.value > yu
+ ? e.intervalCount
+ : Math.round((e.value / yu) * e.intervalCount)
+ );
+ return (i, o) => (
+ B(),
+ G("div", h8, [
+ e.label || e.hint
+ ? (B(),
+ G("div", p8, [
+ e.label
+ ? (B(), G("span", m8, Ge(e.label), 1))
+ : (B(), G("span", g8)),
+ e.hint
+ ? (B(), G("span", y8, Ge(e.value) + "%", 1))
+ : De("", !0),
+ ]))
+ : De("", !0),
+ U(
+ "div",
+ {
+ class: ye(["overflow-hidden rounded-xl", ne(n)]),
+ "aria-valuemax": yu,
+ "aria-valuemin": b8,
+ "aria-valuenow": e.value,
+ role: "progressbar",
+ },
+ [
+ e.intervals
+ ? (B(!0),
+ G(
+ He,
+ { key: 1 },
+ wn(
+ i.intervalCount,
+ (s) => (
+ B(),
+ G(
+ "div",
+ {
+ class: ye([
+ "h-full w-full",
+ s <= ne(r)
+ ? "bg-gray-900"
+ : "bg-gray-100",
+ ]),
+ },
+ null,
+ 2
+ )
+ )
+ ),
+ 256
+ ))
+ : (B(),
+ G(
+ "div",
+ {
+ key: 0,
+ class: "h-full bg-gray-900",
+ style: Ir(`width: ${e.value}%`),
+ },
+ null,
+ 4
+ )),
+ ],
+ 10,
+ v8
+ ),
+ ])
+ );
+ },
+});
+xe({
+ __name: "Switch",
+ props: {
+ size: { default: "sm" },
+ label: { default: "" },
+ description: { default: "" },
+ disabled: { type: Boolean, default: !1 },
+ modelValue: { type: [Boolean, Number, String] },
+ },
+ emits: ["change", "update:modelValue"],
+ setup(t, { emit: e }) {
+ const n = t,
+ r = e,
+ i = $(() => (n.label && n.description ? 2 : n.label ? 1 : 0)),
+ o = $(() => [
+ "relative inline-flex flex-shrink-0 cursor-pointer rounded-full border-transparent transition-colors duration-100 ease-in-out items-center",
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-400",
+ "disabled:cursor-not-allowed disabled:bg-gray-200",
+ n.modelValue
+ ? "bg-gray-900 enabled:hover:bg-gray-800 active:bg-gray-700 group-hover:enabled:bg-gray-800"
+ : "bg-gray-300 enabled:hover:bg-gray-400 active:bg-gray-500 group-hover:enabled:bg-gray-400",
+ n.size === "md"
+ ? "h-5 w-8 border-[3px]"
+ : "h-4 w-[26px] border-2",
+ ]),
+ s = $(() => [
+ "pointer-events-none inline-block transform rounded-full bg-white shadow ring-0 transition duration-100 ease-in-out",
+ n.size === "md" ? "h-3.5 w-3.5" : "h-3 w-3",
+ n.size === "md"
+ ? n.modelValue
+ ? "translate-x-3"
+ : "translate-x-0"
+ : n.modelValue
+ ? "translate-x-2.5"
+ : "translate-x-0",
+ ]),
+ l = $(() => [
+ "font-medium leading-normal",
+ n.disabled && i.value === 1 ? "text-gray-500" : "text-gray-800",
+ n.size === "md" ? "text-lg" : "text-base",
+ ]),
+ a = $(() => ["max-w-xs text-p-base text-gray-700"]),
+ u = $(() => {
+ const f = ["flex justify-between"];
+ return (
+ i.value === 1
+ ? (f.push(
+ "group items-center space-x-3 cursor-pointer rounded focus-visible:bg-gray-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-400"
+ ),
+ f.push(
+ n.disabled
+ ? "cursor-not-allowed"
+ : "hover:bg-gray-200 active:bg-gray-300"
+ ),
+ f.push(
+ n.size === "md"
+ ? "px-3 py-1.5"
+ : "px-2.5 py-1.5"
+ ))
+ : i.value === 2 &&
+ (f.push("items-start"),
+ f.push(
+ n.size === "md" ? "space-x-3.5" : "space-x-2.5"
+ )),
+ f
+ );
+ }),
+ c = $(() => ["flex flex-col text-left space-y-0.5"]);
+ return (f, h) => (
+ B(),
+ Be(
+ ne(bx),
+ {
+ as: "div",
+ tabindex: i.value == 1 ? 0 : -1,
+ onKeyup:
+ h[1] ||
+ (h[1] = ib(
+ _d(
+ (p) => r("update:modelValue", !f.modelValue),
+ ["self"]
+ ),
+ ["space"]
+ )),
+ class: ye(u.value),
+ },
+ {
+ default: Te(() => [
+ U(
+ "span",
+ { class: ye(c.value) },
+ [
+ n.label
+ ? (B(),
+ Be(
+ ne(xx),
+ {
+ key: 0,
+ as: "span",
+ class: ye(l.value),
+ },
+ {
+ default: Te(() => [
+ Pn(Ge(n.label), 1),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["class"]
+ ))
+ : De("", !0),
+ n.description
+ ? (B(),
+ Be(
+ ne(kx),
+ {
+ key: 1,
+ as: "span",
+ class: ye(a.value),
+ },
+ {
+ default: Te(() => [
+ Pn(Ge(n.description), 1),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["class"]
+ ))
+ : De("", !0),
+ ],
+ 2
+ ),
+ Me(
+ ne(wx),
+ {
+ disabled: n.disabled,
+ "model-value": f.modelValue,
+ class: ye(o.value),
+ "onUpdate:modelValue":
+ h[0] ||
+ (h[0] = (p) =>
+ r("update:modelValue", !f.modelValue)),
+ },
+ {
+ default: Te(() => [
+ U(
+ "span",
+ {
+ "aria-hidden": "true",
+ class: ye(s.value),
+ },
+ null,
+ 2
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["disabled", "model-value", "class"]
+ ),
+ ]),
+ _: 1,
+ },
+ 8,
+ ["tabindex", "class"]
+ )
+ );
+ },
+});
+function qt(t) {
+ this.content = t;
+}
+qt.prototype = {
+ constructor: qt,
+ find: function (t) {
+ for (var e = 0; e < this.content.length; e += 2)
+ if (this.content[e] === t) return e;
+ return -1;
+ },
+ get: function (t) {
+ var e = this.find(t);
+ return e == -1 ? void 0 : this.content[e + 1];
+ },
+ update: function (t, e, n) {
+ var r = n && n != t ? this.remove(n) : this,
+ i = r.find(t),
+ o = r.content.slice();
+ return (
+ i == -1 ? o.push(n || t, e) : ((o[i + 1] = e), n && (o[i] = n)),
+ new qt(o)
+ );
+ },
+ remove: function (t) {
+ var e = this.find(t);
+ if (e == -1) return this;
+ var n = this.content.slice();
+ return n.splice(e, 2), new qt(n);
+ },
+ addToStart: function (t, e) {
+ return new qt([t, e].concat(this.remove(t).content));
+ },
+ addToEnd: function (t, e) {
+ var n = this.remove(t).content.slice();
+ return n.push(t, e), new qt(n);
+ },
+ addBefore: function (t, e, n) {
+ var r = this.remove(e),
+ i = r.content.slice(),
+ o = r.find(t);
+ return i.splice(o == -1 ? i.length : o, 0, e, n), new qt(i);
+ },
+ forEach: function (t) {
+ for (var e = 0; e < this.content.length; e += 2)
+ t(this.content[e], this.content[e + 1]);
+ },
+ prepend: function (t) {
+ return (
+ (t = qt.from(t)),
+ t.size ? new qt(t.content.concat(this.subtract(t).content)) : this
+ );
+ },
+ append: function (t) {
+ return (
+ (t = qt.from(t)),
+ t.size ? new qt(this.subtract(t).content.concat(t.content)) : this
+ );
+ },
+ subtract: function (t) {
+ var e = this;
+ t = qt.from(t);
+ for (var n = 0; n < t.content.length; n += 2)
+ e = e.remove(t.content[n]);
+ return e;
+ },
+ toObject: function () {
+ var t = {};
+ return (
+ this.forEach(function (e, n) {
+ t[e] = n;
+ }),
+ t
+ );
+ },
+ get size() {
+ return this.content.length >> 1;
+ },
+};
+qt.from = function (t) {
+ if (t instanceof qt) return t;
+ var e = [];
+ if (t) for (var n in t) e.push(n, t[n]);
+ return new qt(e);
+};
+function z1(t, e, n) {
+ for (let r = 0; ; r++) {
+ if (r == t.childCount || r == e.childCount)
+ return t.childCount == e.childCount ? null : n;
+ let i = t.child(r),
+ o = e.child(r);
+ if (i == o) {
+ n += i.nodeSize;
+ continue;
+ }
+ if (!i.sameMarkup(o)) return n;
+ if (i.isText && i.text != o.text) {
+ for (let s = 0; i.text[s] == o.text[s]; s++) n++;
+ return n;
+ }
+ if (i.content.size || o.content.size) {
+ let s = z1(i.content, o.content, n + 1);
+ if (s != null) return s;
+ }
+ n += i.nodeSize;
+ }
+}
+function H1(t, e, n, r) {
+ for (let i = t.childCount, o = e.childCount; ; ) {
+ if (i == 0 || o == 0) return i == o ? null : { a: n, b: r };
+ let s = t.child(--i),
+ l = e.child(--o),
+ a = s.nodeSize;
+ if (s == l) {
+ (n -= a), (r -= a);
+ continue;
+ }
+ if (!s.sameMarkup(l)) return { a: n, b: r };
+ if (s.isText && s.text != l.text) {
+ let u = 0,
+ c = Math.min(s.text.length, l.text.length);
+ for (
+ ;
+ u < c &&
+ s.text[s.text.length - u - 1] == l.text[l.text.length - u - 1];
+
+ )
+ u++, n--, r--;
+ return { a: n, b: r };
+ }
+ if (s.content.size || l.content.size) {
+ let u = H1(s.content, l.content, n - 1, r - 1);
+ if (u) return u;
+ }
+ (n -= a), (r -= a);
+ }
+}
+class Y {
+ constructor(e, n) {
+ if (((this.content = e), (this.size = n || 0), n == null))
+ for (let r = 0; r < e.length; r++) this.size += e[r].nodeSize;
+ }
+ nodesBetween(e, n, r, i = 0, o) {
+ for (let s = 0, l = 0; l < n; s++) {
+ let a = this.content[s],
+ u = l + a.nodeSize;
+ if (u > e && r(a, i + l, o || null, s) !== !1 && a.content.size) {
+ let c = l + 1;
+ a.nodesBetween(
+ Math.max(0, e - c),
+ Math.min(a.content.size, n - c),
+ r,
+ i + c
+ );
+ }
+ l = u;
+ }
+ }
+ descendants(e) {
+ this.nodesBetween(0, this.size, e);
+ }
+ textBetween(e, n, r, i) {
+ let o = "",
+ s = !0;
+ return (
+ this.nodesBetween(
+ e,
+ n,
+ (l, a) => {
+ l.isText
+ ? ((o += l.text.slice(Math.max(e, a) - a, n - a)),
+ (s = !r))
+ : l.isLeaf
+ ? (i
+ ? (o += typeof i == "function" ? i(l) : i)
+ : l.type.spec.leafText &&
+ (o += l.type.spec.leafText(l)),
+ (s = !r))
+ : !s && l.isBlock && ((o += r), (s = !0));
+ },
+ 0
+ ),
+ o
+ );
+ }
+ append(e) {
+ if (!e.size) return this;
+ if (!this.size) return e;
+ let n = this.lastChild,
+ r = e.firstChild,
+ i = this.content.slice(),
+ o = 0;
+ for (
+ n.isText &&
+ n.sameMarkup(r) &&
+ ((i[i.length - 1] = n.withText(n.text + r.text)), (o = 1));
+ o < e.content.length;
+ o++
+ )
+ i.push(e.content[o]);
+ return new Y(i, this.size + e.size);
+ }
+ cut(e, n = this.size) {
+ if (e == 0 && n == this.size) return this;
+ let r = [],
+ i = 0;
+ if (n > e)
+ for (let o = 0, s = 0; s < n; o++) {
+ let l = this.content[o],
+ a = s + l.nodeSize;
+ a > e &&
+ ((s < e || a > n) &&
+ (l.isText
+ ? (l = l.cut(
+ Math.max(0, e - s),
+ Math.min(l.text.length, n - s)
+ ))
+ : (l = l.cut(
+ Math.max(0, e - s - 1),
+ Math.min(l.content.size, n - s - 1)
+ ))),
+ r.push(l),
+ (i += l.nodeSize)),
+ (s = a);
+ }
+ return new Y(r, i);
+ }
+ cutByIndex(e, n) {
+ return e == n
+ ? Y.empty
+ : e == 0 && n == this.content.length
+ ? this
+ : new Y(this.content.slice(e, n));
+ }
+ replaceChild(e, n) {
+ let r = this.content[e];
+ if (r == n) return this;
+ let i = this.content.slice(),
+ o = this.size + n.nodeSize - r.nodeSize;
+ return (i[e] = n), new Y(i, o);
+ }
+ addToStart(e) {
+ return new Y([e].concat(this.content), this.size + e.nodeSize);
+ }
+ addToEnd(e) {
+ return new Y(this.content.concat(e), this.size + e.nodeSize);
+ }
+ eq(e) {
+ if (this.content.length != e.content.length) return !1;
+ for (let n = 0; n < this.content.length; n++)
+ if (!this.content[n].eq(e.content[n])) return !1;
+ return !0;
+ }
+ get firstChild() {
+ return this.content.length ? this.content[0] : null;
+ }
+ get lastChild() {
+ return this.content.length
+ ? this.content[this.content.length - 1]
+ : null;
+ }
+ get childCount() {
+ return this.content.length;
+ }
+ child(e) {
+ let n = this.content[e];
+ if (!n)
+ throw new RangeError("Index " + e + " out of range for " + this);
+ return n;
+ }
+ maybeChild(e) {
+ return this.content[e] || null;
+ }
+ forEach(e) {
+ for (let n = 0, r = 0; n < this.content.length; n++) {
+ let i = this.content[n];
+ e(i, r, n), (r += i.nodeSize);
+ }
+ }
+ findDiffStart(e, n = 0) {
+ return z1(this, e, n);
+ }
+ findDiffEnd(e, n = this.size, r = e.size) {
+ return H1(this, e, n, r);
+ }
+ findIndex(e, n = -1) {
+ if (e == 0) return Hs(0, e);
+ if (e == this.size) return Hs(this.content.length, e);
+ if (e > this.size || e < 0)
+ throw new RangeError(`Position ${e} outside of fragment (${this})`);
+ for (let r = 0, i = 0; ; r++) {
+ let o = this.child(r),
+ s = i + o.nodeSize;
+ if (s >= e) return s == e || n > 0 ? Hs(r + 1, s) : Hs(r, i);
+ i = s;
+ }
+ }
+ toString() {
+ return "<" + this.toStringInner() + ">";
+ }
+ toStringInner() {
+ return this.content.join(", ");
+ }
+ toJSON() {
+ return this.content.length ? this.content.map((e) => e.toJSON()) : null;
+ }
+ static fromJSON(e, n) {
+ if (!n) return Y.empty;
+ if (!Array.isArray(n))
+ throw new RangeError("Invalid input for Fragment.fromJSON");
+ return new Y(n.map(e.nodeFromJSON));
+ }
+ static fromArray(e) {
+ if (!e.length) return Y.empty;
+ let n,
+ r = 0;
+ for (let i = 0; i < e.length; i++) {
+ let o = e[i];
+ (r += o.nodeSize),
+ i && o.isText && e[i - 1].sameMarkup(o)
+ ? (n || (n = e.slice(0, i)),
+ (n[n.length - 1] = o.withText(
+ n[n.length - 1].text + o.text
+ )))
+ : n && n.push(o);
+ }
+ return new Y(n || e, r);
+ }
+ static from(e) {
+ if (!e) return Y.empty;
+ if (e instanceof Y) return e;
+ if (Array.isArray(e)) return this.fromArray(e);
+ if (e.attrs) return new Y([e], e.nodeSize);
+ throw new RangeError(
+ "Can not convert " +
+ e +
+ " to a Fragment" +
+ (e.nodesBetween
+ ? " (looks like multiple versions of prosemirror-model were loaded)"
+ : "")
+ );
+ }
+}
+Y.empty = new Y([], 0);
+const vu = { index: 0, offset: 0 };
+function Hs(t, e) {
+ return (vu.index = t), (vu.offset = e), vu;
+}
+function Ml(t, e) {
+ if (t === e) return !0;
+ if (!(t && typeof t == "object") || !(e && typeof e == "object")) return !1;
+ let n = Array.isArray(t);
+ if (Array.isArray(e) != n) return !1;
+ if (n) {
+ if (t.length != e.length) return !1;
+ for (let r = 0; r < t.length; r++) if (!Ml(t[r], e[r])) return !1;
+ } else {
+ for (let r in t) if (!(r in e) || !Ml(t[r], e[r])) return !1;
+ for (let r in e) if (!(r in t)) return !1;
+ }
+ return !0;
+}
+class dt {
+ constructor(e, n) {
+ (this.type = e), (this.attrs = n);
+ }
+ addToSet(e) {
+ let n,
+ r = !1;
+ for (let i = 0; i < e.length; i++) {
+ let o = e[i];
+ if (this.eq(o)) return e;
+ if (this.type.excludes(o.type)) n || (n = e.slice(0, i));
+ else {
+ if (o.type.excludes(this.type)) return e;
+ !r &&
+ o.type.rank > this.type.rank &&
+ (n || (n = e.slice(0, i)), n.push(this), (r = !0)),
+ n && n.push(o);
+ }
+ }
+ return n || (n = e.slice()), r || n.push(this), n;
+ }
+ removeFromSet(e) {
+ for (let n = 0; n < e.length; n++)
+ if (this.eq(e[n])) return e.slice(0, n).concat(e.slice(n + 1));
+ return e;
+ }
+ isInSet(e) {
+ for (let n = 0; n < e.length; n++) if (this.eq(e[n])) return !0;
+ return !1;
+ }
+ eq(e) {
+ return this == e || (this.type == e.type && Ml(this.attrs, e.attrs));
+ }
+ toJSON() {
+ let e = { type: this.type.name };
+ for (let n in this.attrs) {
+ e.attrs = this.attrs;
+ break;
+ }
+ return e;
+ }
+ static fromJSON(e, n) {
+ if (!n) throw new RangeError("Invalid input for Mark.fromJSON");
+ let r = e.marks[n.type];
+ if (!r)
+ throw new RangeError(
+ `There is no mark type ${n.type} in this schema`
+ );
+ return r.create(n.attrs);
+ }
+ static sameSet(e, n) {
+ if (e == n) return !0;
+ if (e.length != n.length) return !1;
+ for (let r = 0; r < e.length; r++) if (!e[r].eq(n[r])) return !1;
+ return !0;
+ }
+ static setFrom(e) {
+ if (!e || (Array.isArray(e) && e.length == 0)) return dt.none;
+ if (e instanceof dt) return [e];
+ let n = e.slice();
+ return n.sort((r, i) => r.type.rank - i.type.rank), n;
+ }
+}
+dt.none = [];
+class El extends Error {}
+class ie {
+ constructor(e, n, r) {
+ (this.content = e), (this.openStart = n), (this.openEnd = r);
+ }
+ get size() {
+ return this.content.size - this.openStart - this.openEnd;
+ }
+ insertAt(e, n) {
+ let r = V1(this.content, e + this.openStart, n);
+ return r && new ie(r, this.openStart, this.openEnd);
+ }
+ removeBetween(e, n) {
+ return new ie(
+ F1(this.content, e + this.openStart, n + this.openStart),
+ this.openStart,
+ this.openEnd
+ );
+ }
+ eq(e) {
+ return (
+ this.content.eq(e.content) &&
+ this.openStart == e.openStart &&
+ this.openEnd == e.openEnd
+ );
+ }
+ toString() {
+ return this.content + "(" + this.openStart + "," + this.openEnd + ")";
+ }
+ toJSON() {
+ if (!this.content.size) return null;
+ let e = { content: this.content.toJSON() };
+ return (
+ this.openStart > 0 && (e.openStart = this.openStart),
+ this.openEnd > 0 && (e.openEnd = this.openEnd),
+ e
+ );
+ }
+ static fromJSON(e, n) {
+ if (!n) return ie.empty;
+ let r = n.openStart || 0,
+ i = n.openEnd || 0;
+ if (typeof r != "number" || typeof i != "number")
+ throw new RangeError("Invalid input for Slice.fromJSON");
+ return new ie(Y.fromJSON(e, n.content), r, i);
+ }
+ static maxOpen(e, n = !0) {
+ let r = 0,
+ i = 0;
+ for (
+ let o = e.firstChild;
+ o && !o.isLeaf && (n || !o.type.spec.isolating);
+ o = o.firstChild
+ )
+ r++;
+ for (
+ let o = e.lastChild;
+ o && !o.isLeaf && (n || !o.type.spec.isolating);
+ o = o.lastChild
+ )
+ i++;
+ return new ie(e, r, i);
+ }
+}
+ie.empty = new ie(Y.empty, 0, 0);
+function F1(t, e, n) {
+ let { index: r, offset: i } = t.findIndex(e),
+ o = t.maybeChild(r),
+ { index: s, offset: l } = t.findIndex(n);
+ if (i == e || o.isText) {
+ if (l != n && !t.child(s).isText)
+ throw new RangeError("Removing non-flat range");
+ return t.cut(0, e).append(t.cut(n));
+ }
+ if (r != s) throw new RangeError("Removing non-flat range");
+ return t.replaceChild(r, o.copy(F1(o.content, e - i - 1, n - i - 1)));
+}
+function V1(t, e, n, r) {
+ let { index: i, offset: o } = t.findIndex(e),
+ s = t.maybeChild(i);
+ if (o == e || s.isText)
+ return r && !r.canReplace(i, i, n)
+ ? null
+ : t.cut(0, e).append(n).append(t.cut(e));
+ let l = V1(s.content, e - o - 1, n);
+ return l && t.replaceChild(i, s.copy(l));
+}
+function w8(t, e, n) {
+ if (n.openStart > t.depth)
+ throw new El("Inserted content deeper than insertion position");
+ if (t.depth - n.openStart != e.depth - n.openEnd)
+ throw new El("Inconsistent open depths");
+ return W1(t, e, n, 0);
+}
+function W1(t, e, n, r) {
+ let i = t.index(r),
+ o = t.node(r);
+ if (i == e.index(r) && r < t.depth - n.openStart) {
+ let s = W1(t, e, n, r + 1);
+ return o.copy(o.content.replaceChild(i, s));
+ } else if (n.content.size)
+ if (!n.openStart && !n.openEnd && t.depth == r && e.depth == r) {
+ let s = t.parent,
+ l = s.content;
+ return di(
+ s,
+ l
+ .cut(0, t.parentOffset)
+ .append(n.content)
+ .append(l.cut(e.parentOffset))
+ );
+ } else {
+ let { start: s, end: l } = x8(n, t);
+ return di(o, K1(t, s, l, e, r));
+ }
+ else return di(o, Al(t, e, r));
+}
+function U1(t, e) {
+ if (!e.type.compatibleContent(t.type))
+ throw new El("Cannot join " + e.type.name + " onto " + t.type.name);
+}
+function Sc(t, e, n) {
+ let r = t.node(n);
+ return U1(r, e.node(n)), r;
+}
+function ci(t, e) {
+ let n = e.length - 1;
+ n >= 0 && t.isText && t.sameMarkup(e[n])
+ ? (e[n] = t.withText(e[n].text + t.text))
+ : e.push(t);
+}
+function Io(t, e, n, r) {
+ let i = (e || t).node(n),
+ o = 0,
+ s = e ? e.index(n) : i.childCount;
+ t &&
+ ((o = t.index(n)),
+ t.depth > n ? o++ : t.textOffset && (ci(t.nodeAfter, r), o++));
+ for (let l = o; l < s; l++) ci(i.child(l), r);
+ e && e.depth == n && e.textOffset && ci(e.nodeBefore, r);
+}
+function di(t, e) {
+ return t.type.checkContent(e), t.copy(e);
+}
+function K1(t, e, n, r, i) {
+ let o = t.depth > i && Sc(t, e, i + 1),
+ s = r.depth > i && Sc(n, r, i + 1),
+ l = [];
+ return (
+ Io(null, t, i, l),
+ o && s && e.index(i) == n.index(i)
+ ? (U1(o, s), ci(di(o, K1(t, e, n, r, i + 1)), l))
+ : (o && ci(di(o, Al(t, e, i + 1)), l),
+ Io(e, n, i, l),
+ s && ci(di(s, Al(n, r, i + 1)), l)),
+ Io(r, null, i, l),
+ new Y(l)
+ );
+}
+function Al(t, e, n) {
+ let r = [];
+ if ((Io(null, t, n, r), t.depth > n)) {
+ let i = Sc(t, e, n + 1);
+ ci(di(i, Al(t, e, n + 1)), r);
+ }
+ return Io(e, null, n, r), new Y(r);
+}
+function x8(t, e) {
+ let n = e.depth - t.openStart,
+ i = e.node(n).copy(t.content);
+ for (let o = n - 1; o >= 0; o--) i = e.node(o).copy(Y.from(i));
+ return {
+ start: i.resolveNoCache(t.openStart + n),
+ end: i.resolveNoCache(i.content.size - t.openEnd - n),
+ };
+}
+class Zo {
+ constructor(e, n, r) {
+ (this.pos = e),
+ (this.path = n),
+ (this.parentOffset = r),
+ (this.depth = n.length / 3 - 1);
+ }
+ resolveDepth(e) {
+ return e == null ? this.depth : e < 0 ? this.depth + e : e;
+ }
+ get parent() {
+ return this.node(this.depth);
+ }
+ get doc() {
+ return this.node(0);
+ }
+ node(e) {
+ return this.path[this.resolveDepth(e) * 3];
+ }
+ index(e) {
+ return this.path[this.resolveDepth(e) * 3 + 1];
+ }
+ indexAfter(e) {
+ return (
+ (e = this.resolveDepth(e)),
+ this.index(e) + (e == this.depth && !this.textOffset ? 0 : 1)
+ );
+ }
+ start(e) {
+ return (
+ (e = this.resolveDepth(e)), e == 0 ? 0 : this.path[e * 3 - 1] + 1
+ );
+ }
+ end(e) {
+ return (
+ (e = this.resolveDepth(e)),
+ this.start(e) + this.node(e).content.size
+ );
+ }
+ before(e) {
+ if (((e = this.resolveDepth(e)), !e))
+ throw new RangeError(
+ "There is no position before the top-level node"
+ );
+ return e == this.depth + 1 ? this.pos : this.path[e * 3 - 1];
+ }
+ after(e) {
+ if (((e = this.resolveDepth(e)), !e))
+ throw new RangeError(
+ "There is no position after the top-level node"
+ );
+ return e == this.depth + 1
+ ? this.pos
+ : this.path[e * 3 - 1] + this.path[e * 3].nodeSize;
+ }
+ get textOffset() {
+ return this.pos - this.path[this.path.length - 1];
+ }
+ get nodeAfter() {
+ let e = this.parent,
+ n = this.index(this.depth);
+ if (n == e.childCount) return null;
+ let r = this.pos - this.path[this.path.length - 1],
+ i = e.child(n);
+ return r ? e.child(n).cut(r) : i;
+ }
+ get nodeBefore() {
+ let e = this.index(this.depth),
+ n = this.pos - this.path[this.path.length - 1];
+ return n
+ ? this.parent.child(e).cut(0, n)
+ : e == 0
+ ? null
+ : this.parent.child(e - 1);
+ }
+ posAtIndex(e, n) {
+ n = this.resolveDepth(n);
+ let r = this.path[n * 3],
+ i = n == 0 ? 0 : this.path[n * 3 - 1] + 1;
+ for (let o = 0; o < e; o++) i += r.child(o).nodeSize;
+ return i;
+ }
+ marks() {
+ let e = this.parent,
+ n = this.index();
+ if (e.content.size == 0) return dt.none;
+ if (this.textOffset) return e.child(n).marks;
+ let r = e.maybeChild(n - 1),
+ i = e.maybeChild(n);
+ if (!r) {
+ let l = r;
+ (r = i), (i = l);
+ }
+ let o = r.marks;
+ for (var s = 0; s < o.length; s++)
+ o[s].type.spec.inclusive === !1 &&
+ (!i || !o[s].isInSet(i.marks)) &&
+ (o = o[s--].removeFromSet(o));
+ return o;
+ }
+ marksAcross(e) {
+ let n = this.parent.maybeChild(this.index());
+ if (!n || !n.isInline) return null;
+ let r = n.marks,
+ i = e.parent.maybeChild(e.index());
+ for (var o = 0; o < r.length; o++)
+ r[o].type.spec.inclusive === !1 &&
+ (!i || !r[o].isInSet(i.marks)) &&
+ (r = r[o--].removeFromSet(r));
+ return r;
+ }
+ sharedDepth(e) {
+ for (let n = this.depth; n > 0; n--)
+ if (this.start(n) <= e && this.end(n) >= e) return n;
+ return 0;
+ }
+ blockRange(e = this, n) {
+ if (e.pos < this.pos) return e.blockRange(this);
+ for (
+ let r =
+ this.depth -
+ (this.parent.inlineContent || this.pos == e.pos ? 1 : 0);
+ r >= 0;
+ r--
+ )
+ if (e.pos <= this.end(r) && (!n || n(this.node(r))))
+ return new Tl(this, e, r);
+ return null;
+ }
+ sameParent(e) {
+ return this.pos - this.parentOffset == e.pos - e.parentOffset;
+ }
+ max(e) {
+ return e.pos > this.pos ? e : this;
+ }
+ min(e) {
+ return e.pos < this.pos ? e : this;
+ }
+ toString() {
+ let e = "";
+ for (let n = 1; n <= this.depth; n++)
+ e +=
+ (e ? "/" : "") +
+ this.node(n).type.name +
+ "_" +
+ this.index(n - 1);
+ return e + ":" + this.parentOffset;
+ }
+ static resolve(e, n) {
+ if (!(n >= 0 && n <= e.content.size))
+ throw new RangeError("Position " + n + " out of range");
+ let r = [],
+ i = 0,
+ o = n;
+ for (let s = e; ; ) {
+ let { index: l, offset: a } = s.content.findIndex(o),
+ u = o - a;
+ if ((r.push(s, l, i + a), !u || ((s = s.child(l)), s.isText)))
+ break;
+ (o = u - 1), (i += a + 1);
+ }
+ return new Zo(n, r, o);
+ }
+ static resolveCached(e, n) {
+ for (let i = 0; i < bu.length; i++) {
+ let o = bu[i];
+ if (o.pos == n && o.doc == e) return o;
+ }
+ let r = (bu[wu] = Zo.resolve(e, n));
+ return (wu = (wu + 1) % k8), r;
+ }
+}
+let bu = [],
+ wu = 0,
+ k8 = 12;
+class Tl {
+ constructor(e, n, r) {
+ (this.$from = e), (this.$to = n), (this.depth = r);
+ }
+ get start() {
+ return this.$from.before(this.depth + 1);
+ }
+ get end() {
+ return this.$to.after(this.depth + 1);
+ }
+ get parent() {
+ return this.$from.node(this.depth);
+ }
+ get startIndex() {
+ return this.$from.index(this.depth);
+ }
+ get endIndex() {
+ return this.$to.indexAfter(this.depth);
+ }
+}
+const C8 = Object.create(null);
+class Ol {
+ constructor(e, n, r, i = dt.none) {
+ (this.type = e),
+ (this.attrs = n),
+ (this.marks = i),
+ (this.content = r || Y.empty);
+ }
+ get nodeSize() {
+ return this.isLeaf ? 1 : 2 + this.content.size;
+ }
+ get childCount() {
+ return this.content.childCount;
+ }
+ child(e) {
+ return this.content.child(e);
+ }
+ maybeChild(e) {
+ return this.content.maybeChild(e);
+ }
+ forEach(e) {
+ this.content.forEach(e);
+ }
+ nodesBetween(e, n, r, i = 0) {
+ this.content.nodesBetween(e, n, r, i, this);
+ }
+ descendants(e) {
+ this.nodesBetween(0, this.content.size, e);
+ }
+ get textContent() {
+ return this.isLeaf && this.type.spec.leafText
+ ? this.type.spec.leafText(this)
+ : this.textBetween(0, this.content.size, "");
+ }
+ textBetween(e, n, r, i) {
+ return this.content.textBetween(e, n, r, i);
+ }
+ get firstChild() {
+ return this.content.firstChild;
+ }
+ get lastChild() {
+ return this.content.lastChild;
+ }
+ eq(e) {
+ return this == e || (this.sameMarkup(e) && this.content.eq(e.content));
+ }
+ sameMarkup(e) {
+ return this.hasMarkup(e.type, e.attrs, e.marks);
+ }
+ hasMarkup(e, n, r) {
+ return (
+ this.type == e &&
+ Ml(this.attrs, n || e.defaultAttrs || C8) &&
+ dt.sameSet(this.marks, r || dt.none)
+ );
+ }
+ copy(e = null) {
+ return e == this.content
+ ? this
+ : new Ol(this.type, this.attrs, e, this.marks);
+ }
+ mark(e) {
+ return e == this.marks
+ ? this
+ : new Ol(this.type, this.attrs, this.content, e);
+ }
+ cut(e, n = this.content.size) {
+ return e == 0 && n == this.content.size
+ ? this
+ : this.copy(this.content.cut(e, n));
+ }
+ slice(e, n = this.content.size, r = !1) {
+ if (e == n) return ie.empty;
+ let i = this.resolve(e),
+ o = this.resolve(n),
+ s = r ? 0 : i.sharedDepth(n),
+ l = i.start(s),
+ u = i.node(s).content.cut(i.pos - l, o.pos - l);
+ return new ie(u, i.depth - s, o.depth - s);
+ }
+ replace(e, n, r) {
+ return w8(this.resolve(e), this.resolve(n), r);
+ }
+ nodeAt(e) {
+ for (let n = this; ; ) {
+ let { index: r, offset: i } = n.content.findIndex(e);
+ if (((n = n.maybeChild(r)), !n)) return null;
+ if (i == e || n.isText) return n;
+ e -= i + 1;
+ }
+ }
+ childAfter(e) {
+ let { index: n, offset: r } = this.content.findIndex(e);
+ return { node: this.content.maybeChild(n), index: n, offset: r };
+ }
+ childBefore(e) {
+ if (e == 0) return { node: null, index: 0, offset: 0 };
+ let { index: n, offset: r } = this.content.findIndex(e);
+ if (r < e) return { node: this.content.child(n), index: n, offset: r };
+ let i = this.content.child(n - 1);
+ return { node: i, index: n - 1, offset: r - i.nodeSize };
+ }
+ resolve(e) {
+ return Zo.resolveCached(this, e);
+ }
+ resolveNoCache(e) {
+ return Zo.resolve(this, e);
+ }
+ rangeHasMark(e, n, r) {
+ let i = !1;
+ return (
+ n > e &&
+ this.nodesBetween(
+ e,
+ n,
+ (o) => (r.isInSet(o.marks) && (i = !0), !i)
+ ),
+ i
+ );
+ }
+ get isBlock() {
+ return this.type.isBlock;
+ }
+ get isTextblock() {
+ return this.type.isTextblock;
+ }
+ get inlineContent() {
+ return this.type.inlineContent;
+ }
+ get isInline() {
+ return this.type.isInline;
+ }
+ get isText() {
+ return this.type.isText;
+ }
+ get isLeaf() {
+ return this.type.isLeaf;
+ }
+ get isAtom() {
+ return this.type.isAtom;
+ }
+ toString() {
+ if (this.type.spec.toDebugString)
+ return this.type.spec.toDebugString(this);
+ let e = this.type.name;
+ return (
+ this.content.size &&
+ (e += "(" + this.content.toStringInner() + ")"),
+ S8(this.marks, e)
+ );
+ }
+ contentMatchAt(e) {
+ let n = this.type.contentMatch.matchFragment(this.content, 0, e);
+ if (!n)
+ throw new Error(
+ "Called contentMatchAt on a node with invalid content"
+ );
+ return n;
+ }
+ canReplace(e, n, r = Y.empty, i = 0, o = r.childCount) {
+ let s = this.contentMatchAt(e).matchFragment(r, i, o),
+ l = s && s.matchFragment(this.content, n);
+ if (!l || !l.validEnd) return !1;
+ for (let a = i; a < o; a++)
+ if (!this.type.allowsMarks(r.child(a).marks)) return !1;
+ return !0;
+ }
+ canReplaceWith(e, n, r, i) {
+ if (i && !this.type.allowsMarks(i)) return !1;
+ let o = this.contentMatchAt(e).matchType(r),
+ s = o && o.matchFragment(this.content, n);
+ return s ? s.validEnd : !1;
+ }
+ canAppend(e) {
+ return e.content.size
+ ? this.canReplace(this.childCount, this.childCount, e.content)
+ : this.type.compatibleContent(e.type);
+ }
+ check() {
+ this.type.checkContent(this.content);
+ let e = dt.none;
+ for (let n = 0; n < this.marks.length; n++)
+ e = this.marks[n].addToSet(e);
+ if (!dt.sameSet(e, this.marks))
+ throw new RangeError(
+ `Invalid collection of marks for node ${
+ this.type.name
+ }: ${this.marks.map((n) => n.type.name)}`
+ );
+ this.content.forEach((n) => n.check());
+ }
+ toJSON() {
+ let e = { type: this.type.name };
+ for (let n in this.attrs) {
+ e.attrs = this.attrs;
+ break;
+ }
+ return (
+ this.content.size && (e.content = this.content.toJSON()),
+ this.marks.length && (e.marks = this.marks.map((n) => n.toJSON())),
+ e
+ );
+ }
+ static fromJSON(e, n) {
+ if (!n) throw new RangeError("Invalid input for Node.fromJSON");
+ let r = null;
+ if (n.marks) {
+ if (!Array.isArray(n.marks))
+ throw new RangeError("Invalid mark data for Node.fromJSON");
+ r = n.marks.map(e.markFromJSON);
+ }
+ if (n.type == "text") {
+ if (typeof n.text != "string")
+ throw new RangeError("Invalid text node in JSON");
+ return e.text(n.text, r);
+ }
+ let i = Y.fromJSON(e, n.content);
+ return e.nodeType(n.type).create(n.attrs, i, r);
+ }
+}
+Ol.prototype.text = void 0;
+function S8(t, e) {
+ for (let n = t.length - 1; n >= 0; n--) e = t[n].type.name + "(" + e + ")";
+ return e;
+}
+class es {
+ constructor(e) {
+ (this.validEnd = e), (this.next = []), (this.wrapCache = []);
+ }
+ static parse(e, n) {
+ let r = new _8(e, n);
+ if (r.next == null) return es.empty;
+ let i = q1(r);
+ r.next && r.err("Unexpected trailing text");
+ let o = P8(R8(i));
+ return N8(o, r), o;
+ }
+ matchType(e) {
+ for (let n = 0; n < this.next.length; n++)
+ if (this.next[n].type == e) return this.next[n].next;
+ return null;
+ }
+ matchFragment(e, n = 0, r = e.childCount) {
+ let i = this;
+ for (let o = n; i && o < r; o++) i = i.matchType(e.child(o).type);
+ return i;
+ }
+ get inlineContent() {
+ return this.next.length != 0 && this.next[0].type.isInline;
+ }
+ get defaultType() {
+ for (let e = 0; e < this.next.length; e++) {
+ let { type: n } = this.next[e];
+ if (!(n.isText || n.hasRequiredAttrs())) return n;
+ }
+ return null;
+ }
+ compatible(e) {
+ for (let n = 0; n < this.next.length; n++)
+ for (let r = 0; r < e.next.length; r++)
+ if (this.next[n].type == e.next[r].type) return !0;
+ return !1;
+ }
+ fillBefore(e, n = !1, r = 0) {
+ let i = [this];
+ function o(s, l) {
+ let a = s.matchFragment(e, r);
+ if (a && (!n || a.validEnd))
+ return Y.from(l.map((u) => u.createAndFill()));
+ for (let u = 0; u < s.next.length; u++) {
+ let { type: c, next: f } = s.next[u];
+ if (!(c.isText || c.hasRequiredAttrs()) && i.indexOf(f) == -1) {
+ i.push(f);
+ let h = o(f, l.concat(c));
+ if (h) return h;
+ }
+ }
+ return null;
+ }
+ return o(this, []);
+ }
+ findWrapping(e) {
+ for (let r = 0; r < this.wrapCache.length; r += 2)
+ if (this.wrapCache[r] == e) return this.wrapCache[r + 1];
+ let n = this.computeWrapping(e);
+ return this.wrapCache.push(e, n), n;
+ }
+ computeWrapping(e) {
+ let n = Object.create(null),
+ r = [{ match: this, type: null, via: null }];
+ for (; r.length; ) {
+ let i = r.shift(),
+ o = i.match;
+ if (o.matchType(e)) {
+ let s = [];
+ for (let l = i; l.type; l = l.via) s.push(l.type);
+ return s.reverse();
+ }
+ for (let s = 0; s < o.next.length; s++) {
+ let { type: l, next: a } = o.next[s];
+ !l.isLeaf &&
+ !l.hasRequiredAttrs() &&
+ !(l.name in n) &&
+ (!i.type || a.validEnd) &&
+ (r.push({ match: l.contentMatch, type: l, via: i }),
+ (n[l.name] = !0));
+ }
+ }
+ return null;
+ }
+ get edgeCount() {
+ return this.next.length;
+ }
+ edge(e) {
+ if (e >= this.next.length)
+ throw new RangeError(
+ `There's no ${e}th edge in this content match`
+ );
+ return this.next[e];
+ }
+ toString() {
+ let e = [];
+ function n(r) {
+ e.push(r);
+ for (let i = 0; i < r.next.length; i++)
+ e.indexOf(r.next[i].next) == -1 && n(r.next[i].next);
+ }
+ return (
+ n(this),
+ e.map((r, i) => {
+ let o = i + (r.validEnd ? "*" : " ") + " ";
+ for (let s = 0; s < r.next.length; s++)
+ o +=
+ (s ? ", " : "") +
+ r.next[s].type.name +
+ "->" +
+ e.indexOf(r.next[s].next);
+ return o;
+ }).join(`
+`)
+ );
+ }
+}
+es.empty = new es(!0);
+class _8 {
+ constructor(e, n) {
+ (this.string = e),
+ (this.nodeTypes = n),
+ (this.inline = null),
+ (this.pos = 0),
+ (this.tokens = e.split(/\s*(?=\b|\W|$)/)),
+ this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(),
+ this.tokens[0] == "" && this.tokens.shift();
+ }
+ get next() {
+ return this.tokens[this.pos];
+ }
+ eat(e) {
+ return this.next == e && (this.pos++ || !0);
+ }
+ err(e) {
+ throw new SyntaxError(
+ e + " (in content expression '" + this.string + "')"
+ );
+ }
+}
+function q1(t) {
+ let e = [];
+ do e.push(M8(t));
+ while (t.eat("|"));
+ return e.length == 1 ? e[0] : { type: "choice", exprs: e };
+}
+function M8(t) {
+ let e = [];
+ do e.push(E8(t));
+ while (t.next && t.next != ")" && t.next != "|");
+ return e.length == 1 ? e[0] : { type: "seq", exprs: e };
+}
+function E8(t) {
+ let e = O8(t);
+ for (;;)
+ if (t.eat("+")) e = { type: "plus", expr: e };
+ else if (t.eat("*")) e = { type: "star", expr: e };
+ else if (t.eat("?")) e = { type: "opt", expr: e };
+ else if (t.eat("{")) e = A8(t, e);
+ else break;
+ return e;
+}
+function lp(t) {
+ /\D/.test(t.next) && t.err("Expected number, got '" + t.next + "'");
+ let e = Number(t.next);
+ return t.pos++, e;
+}
+function A8(t, e) {
+ let n = lp(t),
+ r = n;
+ return (
+ t.eat(",") && (t.next != "}" ? (r = lp(t)) : (r = -1)),
+ t.eat("}") || t.err("Unclosed braced range"),
+ { type: "range", min: n, max: r, expr: e }
+ );
+}
+function T8(t, e) {
+ let n = t.nodeTypes,
+ r = n[e];
+ if (r) return [r];
+ let i = [];
+ for (let o in n) {
+ let s = n[o];
+ s.groups.indexOf(e) > -1 && i.push(s);
+ }
+ return i.length == 0 && t.err("No node type or group '" + e + "' found"), i;
+}
+function O8(t) {
+ if (t.eat("(")) {
+ let e = q1(t);
+ return t.eat(")") || t.err("Missing closing paren"), e;
+ } else if (/\W/.test(t.next)) t.err("Unexpected token '" + t.next + "'");
+ else {
+ let e = T8(t, t.next).map(
+ (n) => (
+ t.inline == null
+ ? (t.inline = n.isInline)
+ : t.inline != n.isInline &&
+ t.err("Mixing inline and block content"),
+ { type: "name", value: n }
+ )
+ );
+ return t.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
+ }
+}
+function R8(t) {
+ let e = [[]];
+ return i(o(t, 0), n()), e;
+ function n() {
+ return e.push([]) - 1;
+ }
+ function r(s, l, a) {
+ let u = { term: a, to: l };
+ return e[s].push(u), u;
+ }
+ function i(s, l) {
+ s.forEach((a) => (a.to = l));
+ }
+ function o(s, l) {
+ if (s.type == "choice")
+ return s.exprs.reduce((a, u) => a.concat(o(u, l)), []);
+ if (s.type == "seq")
+ for (let a = 0; ; a++) {
+ let u = o(s.exprs[a], l);
+ if (a == s.exprs.length - 1) return u;
+ i(u, (l = n()));
+ }
+ else if (s.type == "star") {
+ let a = n();
+ return r(l, a), i(o(s.expr, a), a), [r(a)];
+ } else if (s.type == "plus") {
+ let a = n();
+ return i(o(s.expr, l), a), i(o(s.expr, a), a), [r(a)];
+ } else {
+ if (s.type == "opt") return [r(l)].concat(o(s.expr, l));
+ if (s.type == "range") {
+ let a = l;
+ for (let u = 0; u < s.min; u++) {
+ let c = n();
+ i(o(s.expr, a), c), (a = c);
+ }
+ if (s.max == -1) i(o(s.expr, a), a);
+ else
+ for (let u = s.min; u < s.max; u++) {
+ let c = n();
+ r(a, c), i(o(s.expr, a), c), (a = c);
+ }
+ return [r(a)];
+ } else {
+ if (s.type == "name") return [r(l, void 0, s.value)];
+ throw new Error("Unknown expr type");
+ }
+ }
+ }
+}
+function J1(t, e) {
+ return e - t;
+}
+function ap(t, e) {
+ let n = [];
+ return r(e), n.sort(J1);
+ function r(i) {
+ let o = t[i];
+ if (o.length == 1 && !o[0].term) return r(o[0].to);
+ n.push(i);
+ for (let s = 0; s < o.length; s++) {
+ let { term: l, to: a } = o[s];
+ !l && n.indexOf(a) == -1 && r(a);
+ }
+ }
+}
+function P8(t) {
+ let e = Object.create(null);
+ return n(ap(t, 0));
+ function n(r) {
+ let i = [];
+ r.forEach((s) => {
+ t[s].forEach(({ term: l, to: a }) => {
+ if (!l) return;
+ let u;
+ for (let c = 0; c < i.length; c++)
+ i[c][0] == l && (u = i[c][1]);
+ ap(t, a).forEach((c) => {
+ u || i.push([l, (u = [])]), u.indexOf(c) == -1 && u.push(c);
+ });
+ });
+ });
+ let o = (e[r.join(",")] = new es(r.indexOf(t.length - 1) > -1));
+ for (let s = 0; s < i.length; s++) {
+ let l = i[s][1].sort(J1);
+ o.next.push({ type: i[s][0], next: e[l.join(",")] || n(l) });
+ }
+ return o;
+ }
+}
+function N8(t, e) {
+ for (let n = 0, r = [t]; n < r.length; n++) {
+ let i = r[n],
+ o = !i.validEnd,
+ s = [];
+ for (let l = 0; l < i.next.length; l++) {
+ let { type: a, next: u } = i.next[l];
+ s.push(a.name),
+ o && !(a.isText || a.hasRequiredAttrs()) && (o = !1),
+ r.indexOf(u) == -1 && r.push(u);
+ }
+ o &&
+ e.err(
+ "Only non-generatable nodes (" +
+ s.join(", ") +
+ ") in a required position (see https://prosemirror.net/docs/guide/#generatable)"
+ );
+ }
+}
+function j8(t) {
+ let e = Object.create(null);
+ for (let n in t) {
+ let r = t[n];
+ if (!r.hasDefault) return null;
+ e[n] = r.default;
+ }
+ return e;
+}
+function L8(t, e) {
+ let n = Object.create(null);
+ for (let r in t) {
+ let i = e && e[r];
+ if (i === void 0) {
+ let o = t[r];
+ if (o.hasDefault) i = o.default;
+ else throw new RangeError("No value supplied for attribute " + r);
+ }
+ n[r] = i;
+ }
+ return n;
+}
+function D8(t) {
+ let e = Object.create(null);
+ if (t) for (let n in t) e[n] = new I8(t[n]);
+ return e;
+}
+class I8 {
+ constructor(e) {
+ (this.hasDefault = Object.prototype.hasOwnProperty.call(e, "default")),
+ (this.default = e.default);
+ }
+ get isRequired() {
+ return !this.hasDefault;
+ }
+}
+class Yd {
+ constructor(e, n, r, i) {
+ (this.name = e),
+ (this.rank = n),
+ (this.schema = r),
+ (this.spec = i),
+ (this.attrs = D8(i.attrs)),
+ (this.excluded = null);
+ let o = j8(this.attrs);
+ this.instance = o ? new dt(this, o) : null;
+ }
+ create(e = null) {
+ return !e && this.instance
+ ? this.instance
+ : new dt(this, L8(this.attrs, e));
+ }
+ static compile(e, n) {
+ let r = Object.create(null),
+ i = 0;
+ return e.forEach((o, s) => (r[o] = new Yd(o, i++, n, s))), r;
+ }
+ removeFromSet(e) {
+ for (var n = 0; n < e.length; n++)
+ e[n].type == this &&
+ ((e = e.slice(0, n).concat(e.slice(n + 1))), n--);
+ return e;
+ }
+ isInSet(e) {
+ for (let n = 0; n < e.length; n++) if (e[n].type == this) return e[n];
+ }
+ excludes(e) {
+ return this.excluded.indexOf(e) > -1;
+ }
+}
+class ts {
+ constructor(e, n) {
+ (this.schema = e),
+ (this.rules = n),
+ (this.tags = []),
+ (this.styles = []),
+ n.forEach((r) => {
+ r.tag ? this.tags.push(r) : r.style && this.styles.push(r);
+ }),
+ (this.normalizeLists = !this.tags.some((r) => {
+ if (!/^(ul|ol)\b/.test(r.tag) || !r.node) return !1;
+ let i = e.nodes[r.node];
+ return i.contentMatch.matchType(i);
+ }));
+ }
+ parse(e, n = {}) {
+ let r = new cp(this, n, !1);
+ return r.addAll(e, n.from, n.to), r.finish();
+ }
+ parseSlice(e, n = {}) {
+ let r = new cp(this, n, !0);
+ return r.addAll(e, n.from, n.to), ie.maxOpen(r.finish());
+ }
+ matchTag(e, n, r) {
+ for (
+ let i = r ? this.tags.indexOf(r) + 1 : 0;
+ i < this.tags.length;
+ i++
+ ) {
+ let o = this.tags[i];
+ if (
+ z8(e, o.tag) &&
+ (o.namespace === void 0 || e.namespaceURI == o.namespace) &&
+ (!o.context || n.matchesContext(o.context))
+ ) {
+ if (o.getAttrs) {
+ let s = o.getAttrs(e);
+ if (s === !1) continue;
+ o.attrs = s || void 0;
+ }
+ return o;
+ }
+ }
+ }
+ matchStyle(e, n, r, i) {
+ for (
+ let o = i ? this.styles.indexOf(i) + 1 : 0;
+ o < this.styles.length;
+ o++
+ ) {
+ let s = this.styles[o],
+ l = s.style;
+ if (
+ !(
+ l.indexOf(e) != 0 ||
+ (s.context && !r.matchesContext(s.context)) ||
+ (l.length > e.length &&
+ (l.charCodeAt(e.length) != 61 ||
+ l.slice(e.length + 1) != n))
+ )
+ ) {
+ if (s.getAttrs) {
+ let a = s.getAttrs(n);
+ if (a === !1) continue;
+ s.attrs = a || void 0;
+ }
+ return s;
+ }
+ }
+ }
+ static schemaRules(e) {
+ let n = [];
+ function r(i) {
+ let o = i.priority == null ? 50 : i.priority,
+ s = 0;
+ for (; s < n.length; s++) {
+ let l = n[s];
+ if ((l.priority == null ? 50 : l.priority) < o) break;
+ }
+ n.splice(s, 0, i);
+ }
+ for (let i in e.marks) {
+ let o = e.marks[i].spec.parseDOM;
+ o &&
+ o.forEach((s) => {
+ r((s = dp(s))),
+ s.mark || s.ignore || s.clearMark || (s.mark = i);
+ });
+ }
+ for (let i in e.nodes) {
+ let o = e.nodes[i].spec.parseDOM;
+ o &&
+ o.forEach((s) => {
+ r((s = dp(s))),
+ s.node || s.ignore || s.mark || (s.node = i);
+ });
+ }
+ return n;
+ }
+ static fromSchema(e) {
+ return (
+ e.cached.domParser ||
+ (e.cached.domParser = new ts(e, ts.schemaRules(e)))
+ );
+ }
+}
+const G1 = {
+ address: !0,
+ article: !0,
+ aside: !0,
+ blockquote: !0,
+ canvas: !0,
+ dd: !0,
+ div: !0,
+ dl: !0,
+ fieldset: !0,
+ figcaption: !0,
+ figure: !0,
+ footer: !0,
+ form: !0,
+ h1: !0,
+ h2: !0,
+ h3: !0,
+ h4: !0,
+ h5: !0,
+ h6: !0,
+ header: !0,
+ hgroup: !0,
+ hr: !0,
+ li: !0,
+ noscript: !0,
+ ol: !0,
+ output: !0,
+ p: !0,
+ pre: !0,
+ section: !0,
+ table: !0,
+ tfoot: !0,
+ ul: !0,
+ },
+ B8 = {
+ head: !0,
+ noscript: !0,
+ object: !0,
+ script: !0,
+ style: !0,
+ title: !0,
+ },
+ Y1 = { ol: !0, ul: !0 },
+ Rl = 1,
+ Pl = 2,
+ Bo = 4;
+function up(t, e, n) {
+ return e != null
+ ? (e ? Rl : 0) | (e === "full" ? Pl : 0)
+ : t && t.whitespace == "pre"
+ ? Rl | Pl
+ : n & ~Bo;
+}
+class Fs {
+ constructor(e, n, r, i, o, s, l) {
+ (this.type = e),
+ (this.attrs = n),
+ (this.marks = r),
+ (this.pendingMarks = i),
+ (this.solid = o),
+ (this.options = l),
+ (this.content = []),
+ (this.activeMarks = dt.none),
+ (this.stashMarks = []),
+ (this.match = s || (l & Bo ? null : e.contentMatch));
+ }
+ findWrapping(e) {
+ if (!this.match) {
+ if (!this.type) return [];
+ let n = this.type.contentMatch.fillBefore(Y.from(e));
+ if (n) this.match = this.type.contentMatch.matchFragment(n);
+ else {
+ let r = this.type.contentMatch,
+ i;
+ return (i = r.findWrapping(e.type))
+ ? ((this.match = r), i)
+ : null;
+ }
+ }
+ return this.match.findWrapping(e.type);
+ }
+ finish(e) {
+ if (!(this.options & Rl)) {
+ let r = this.content[this.content.length - 1],
+ i;
+ if (r && r.isText && (i = /[ \t\r\n\u000c]+$/.exec(r.text))) {
+ let o = r;
+ r.text.length == i[0].length
+ ? this.content.pop()
+ : (this.content[this.content.length - 1] = o.withText(
+ o.text.slice(0, o.text.length - i[0].length)
+ ));
+ }
+ }
+ let n = Y.from(this.content);
+ return (
+ !e &&
+ this.match &&
+ (n = n.append(this.match.fillBefore(Y.empty, !0))),
+ this.type ? this.type.create(this.attrs, n, this.marks) : n
+ );
+ }
+ popFromStashMark(e) {
+ for (let n = this.stashMarks.length - 1; n >= 0; n--)
+ if (e.eq(this.stashMarks[n]))
+ return this.stashMarks.splice(n, 1)[0];
+ }
+ applyPending(e) {
+ for (let n = 0, r = this.pendingMarks; n < r.length; n++) {
+ let i = r[n];
+ (this.type ? this.type.allowsMarkType(i.type) : F8(i.type, e)) &&
+ !i.isInSet(this.activeMarks) &&
+ ((this.activeMarks = i.addToSet(this.activeMarks)),
+ (this.pendingMarks = i.removeFromSet(this.pendingMarks)));
+ }
+ }
+ inlineContext(e) {
+ return this.type
+ ? this.type.inlineContent
+ : this.content.length
+ ? this.content[0].isInline
+ : e.parentNode &&
+ !G1.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
+ }
+}
+class cp {
+ constructor(e, n, r) {
+ (this.parser = e),
+ (this.options = n),
+ (this.isOpen = r),
+ (this.open = 0);
+ let i = n.topNode,
+ o,
+ s = up(null, n.preserveWhitespace, 0) | (r ? Bo : 0);
+ i
+ ? (o = new Fs(
+ i.type,
+ i.attrs,
+ dt.none,
+ dt.none,
+ !0,
+ n.topMatch || i.type.contentMatch,
+ s
+ ))
+ : r
+ ? (o = new Fs(null, null, dt.none, dt.none, !0, null, s))
+ : (o = new Fs(
+ e.schema.topNodeType,
+ null,
+ dt.none,
+ dt.none,
+ !0,
+ null,
+ s
+ )),
+ (this.nodes = [o]),
+ (this.find = n.findPositions),
+ (this.needsBlock = !1);
+ }
+ get top() {
+ return this.nodes[this.open];
+ }
+ addDOM(e) {
+ e.nodeType == 3
+ ? this.addTextNode(e)
+ : e.nodeType == 1 && this.addElement(e);
+ }
+ withStyleRules(e, n) {
+ let r = e.getAttribute("style");
+ if (!r) return n();
+ let i = this.readStyles(H8(r));
+ if (!i) return;
+ let [o, s] = i,
+ l = this.top;
+ for (let a = 0; a < s.length; a++) this.removePendingMark(s[a], l);
+ for (let a = 0; a < o.length; a++) this.addPendingMark(o[a]);
+ n();
+ for (let a = 0; a < o.length; a++) this.removePendingMark(o[a], l);
+ for (let a = 0; a < s.length; a++) this.addPendingMark(s[a]);
+ }
+ addTextNode(e) {
+ let n = e.nodeValue,
+ r = this.top;
+ if (
+ r.options & Pl ||
+ r.inlineContext(e) ||
+ /[^ \t\r\n\u000c]/.test(n)
+ ) {
+ if (r.options & Rl)
+ r.options & Pl
+ ? (n = n.replace(
+ /\r\n?/g,
+ `
+`
+ ))
+ : (n = n.replace(/\r?\n|\r/g, " "));
+ else if (
+ ((n = n.replace(/[ \t\r\n\u000c]+/g, " ")),
+ /^[ \t\r\n\u000c]/.test(n) &&
+ this.open == this.nodes.length - 1)
+ ) {
+ let i = r.content[r.content.length - 1],
+ o = e.previousSibling;
+ (!i ||
+ (o && o.nodeName == "BR") ||
+ (i.isText && /[ \t\r\n\u000c]$/.test(i.text))) &&
+ (n = n.slice(1));
+ }
+ n && this.insertNode(this.parser.schema.text(n)),
+ this.findInText(e);
+ } else this.findInside(e);
+ }
+ addElement(e, n) {
+ let r = e.nodeName.toLowerCase(),
+ i;
+ Y1.hasOwnProperty(r) && this.parser.normalizeLists && $8(e);
+ let o =
+ (this.options.ruleFromNode && this.options.ruleFromNode(e)) ||
+ (i = this.parser.matchTag(e, this, n));
+ if (o ? o.ignore : B8.hasOwnProperty(r))
+ this.findInside(e), this.ignoreFallback(e);
+ else if (!o || o.skip || o.closeParent) {
+ o && o.closeParent
+ ? (this.open = Math.max(0, this.open - 1))
+ : o && o.skip.nodeType && (e = o.skip);
+ let s,
+ l = this.top,
+ a = this.needsBlock;
+ if (G1.hasOwnProperty(r))
+ l.content.length &&
+ l.content[0].isInline &&
+ this.open &&
+ (this.open--, (l = this.top)),
+ (s = !0),
+ l.type || (this.needsBlock = !0);
+ else if (!e.firstChild) {
+ this.leafFallback(e);
+ return;
+ }
+ o && o.skip
+ ? this.addAll(e)
+ : this.withStyleRules(e, () => this.addAll(e)),
+ s && this.sync(l),
+ (this.needsBlock = a);
+ } else
+ this.withStyleRules(e, () => {
+ this.addElementByRule(e, o, o.consuming === !1 ? i : void 0);
+ });
+ }
+ leafFallback(e) {
+ e.nodeName == "BR" &&
+ this.top.type &&
+ this.top.type.inlineContent &&
+ this.addTextNode(
+ e.ownerDocument.createTextNode(`
+`)
+ );
+ }
+ ignoreFallback(e) {
+ e.nodeName == "BR" &&
+ (!this.top.type || !this.top.type.inlineContent) &&
+ this.findPlace(this.parser.schema.text("-"));
+ }
+ readStyles(e) {
+ let n = dt.none,
+ r = dt.none;
+ for (let i = 0; i < e.length; i += 2)
+ for (let o = void 0; ; ) {
+ let s = this.parser.matchStyle(e[i], e[i + 1], this, o);
+ if (!s) break;
+ if (s.ignore) return null;
+ if (
+ (s.clearMark
+ ? this.top.pendingMarks
+ .concat(this.top.activeMarks)
+ .forEach((l) => {
+ s.clearMark(l) && (r = l.addToSet(r));
+ })
+ : (n = this.parser.schema.marks[s.mark]
+ .create(s.attrs)
+ .addToSet(n)),
+ s.consuming === !1)
+ )
+ o = s;
+ else break;
+ }
+ return [n, r];
+ }
+ addElementByRule(e, n, r) {
+ let i, o, s;
+ n.node
+ ? ((o = this.parser.schema.nodes[n.node]),
+ o.isLeaf
+ ? this.insertNode(o.create(n.attrs)) || this.leafFallback(e)
+ : (i = this.enter(
+ o,
+ n.attrs || null,
+ n.preserveWhitespace
+ )))
+ : ((s = this.parser.schema.marks[n.mark].create(n.attrs)),
+ this.addPendingMark(s));
+ let l = this.top;
+ if (o && o.isLeaf) this.findInside(e);
+ else if (r) this.addElement(e, r);
+ else if (n.getContent)
+ this.findInside(e),
+ n
+ .getContent(e, this.parser.schema)
+ .forEach((a) => this.insertNode(a));
+ else {
+ let a = e;
+ typeof n.contentElement == "string"
+ ? (a = e.querySelector(n.contentElement))
+ : typeof n.contentElement == "function"
+ ? (a = n.contentElement(e))
+ : n.contentElement && (a = n.contentElement),
+ this.findAround(e, a, !0),
+ this.addAll(a);
+ }
+ i && this.sync(l) && this.open--, s && this.removePendingMark(s, l);
+ }
+ addAll(e, n, r) {
+ let i = n || 0;
+ for (
+ let o = n ? e.childNodes[n] : e.firstChild,
+ s = r == null ? null : e.childNodes[r];
+ o != s;
+ o = o.nextSibling, ++i
+ )
+ this.findAtPoint(e, i), this.addDOM(o);
+ this.findAtPoint(e, i);
+ }
+ findPlace(e) {
+ let n, r;
+ for (let i = this.open; i >= 0; i--) {
+ let o = this.nodes[i],
+ s = o.findWrapping(e);
+ if (
+ (s &&
+ (!n || n.length > s.length) &&
+ ((n = s), (r = o), !s.length)) ||
+ o.solid
+ )
+ break;
+ }
+ if (!n) return !1;
+ this.sync(r);
+ for (let i = 0; i < n.length; i++) this.enterInner(n[i], null, !1);
+ return !0;
+ }
+ insertNode(e) {
+ if (e.isInline && this.needsBlock && !this.top.type) {
+ let n = this.textblockFromContext();
+ n && this.enterInner(n);
+ }
+ if (this.findPlace(e)) {
+ this.closeExtra();
+ let n = this.top;
+ n.applyPending(e.type),
+ n.match && (n.match = n.match.matchType(e.type));
+ let r = n.activeMarks;
+ for (let i = 0; i < e.marks.length; i++)
+ (!n.type || n.type.allowsMarkType(e.marks[i].type)) &&
+ (r = e.marks[i].addToSet(r));
+ return n.content.push(e.mark(r)), !0;
+ }
+ return !1;
+ }
+ enter(e, n, r) {
+ let i = this.findPlace(e.create(n));
+ return i && this.enterInner(e, n, !0, r), i;
+ }
+ enterInner(e, n = null, r = !1, i) {
+ this.closeExtra();
+ let o = this.top;
+ o.applyPending(e), (o.match = o.match && o.match.matchType(e));
+ let s = up(e, i, o.options);
+ o.options & Bo && o.content.length == 0 && (s |= Bo),
+ this.nodes.push(
+ new Fs(e, n, o.activeMarks, o.pendingMarks, r, null, s)
+ ),
+ this.open++;
+ }
+ closeExtra(e = !1) {
+ let n = this.nodes.length - 1;
+ if (n > this.open) {
+ for (; n > this.open; n--)
+ this.nodes[n - 1].content.push(this.nodes[n].finish(e));
+ this.nodes.length = this.open + 1;
+ }
+ }
+ finish() {
+ return (
+ (this.open = 0),
+ this.closeExtra(this.isOpen),
+ this.nodes[0].finish(this.isOpen || this.options.topOpen)
+ );
+ }
+ sync(e) {
+ for (let n = this.open; n >= 0; n--)
+ if (this.nodes[n] == e) return (this.open = n), !0;
+ return !1;
+ }
+ get currentPos() {
+ this.closeExtra();
+ let e = 0;
+ for (let n = this.open; n >= 0; n--) {
+ let r = this.nodes[n].content;
+ for (let i = r.length - 1; i >= 0; i--) e += r[i].nodeSize;
+ n && e++;
+ }
+ return e;
+ }
+ findAtPoint(e, n) {
+ if (this.find)
+ for (let r = 0; r < this.find.length; r++)
+ this.find[r].node == e &&
+ this.find[r].offset == n &&
+ (this.find[r].pos = this.currentPos);
+ }
+ findInside(e) {
+ if (this.find)
+ for (let n = 0; n < this.find.length; n++)
+ this.find[n].pos == null &&
+ e.nodeType == 1 &&
+ e.contains(this.find[n].node) &&
+ (this.find[n].pos = this.currentPos);
+ }
+ findAround(e, n, r) {
+ if (e != n && this.find)
+ for (let i = 0; i < this.find.length; i++)
+ this.find[i].pos == null &&
+ e.nodeType == 1 &&
+ e.contains(this.find[i].node) &&
+ n.compareDocumentPosition(this.find[i].node) &
+ (r ? 2 : 4) &&
+ (this.find[i].pos = this.currentPos);
+ }
+ findInText(e) {
+ if (this.find)
+ for (let n = 0; n < this.find.length; n++)
+ this.find[n].node == e &&
+ (this.find[n].pos =
+ this.currentPos -
+ (e.nodeValue.length - this.find[n].offset));
+ }
+ matchesContext(e) {
+ if (e.indexOf("|") > -1)
+ return e.split(/\s*\|\s*/).some(this.matchesContext, this);
+ let n = e.split("/"),
+ r = this.options.context,
+ i = !this.isOpen && (!r || r.parent.type == this.nodes[0].type),
+ o = -(r ? r.depth + 1 : 0) + (i ? 0 : 1),
+ s = (l, a) => {
+ for (; l >= 0; l--) {
+ let u = n[l];
+ if (u == "") {
+ if (l == n.length - 1 || l == 0) continue;
+ for (; a >= o; a--) if (s(l - 1, a)) return !0;
+ return !1;
+ } else {
+ let c =
+ a > 0 || (a == 0 && i)
+ ? this.nodes[a].type
+ : r && a >= o
+ ? r.node(a - o).type
+ : null;
+ if (!c || (c.name != u && c.groups.indexOf(u) == -1))
+ return !1;
+ a--;
+ }
+ }
+ return !0;
+ };
+ return s(n.length - 1, this.open);
+ }
+ textblockFromContext() {
+ let e = this.options.context;
+ if (e)
+ for (let n = e.depth; n >= 0; n--) {
+ let r = e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;
+ if (r && r.isTextblock && r.defaultAttrs) return r;
+ }
+ for (let n in this.parser.schema.nodes) {
+ let r = this.parser.schema.nodes[n];
+ if (r.isTextblock && r.defaultAttrs) return r;
+ }
+ }
+ addPendingMark(e) {
+ let n = V8(e, this.top.pendingMarks);
+ n && this.top.stashMarks.push(n),
+ (this.top.pendingMarks = e.addToSet(this.top.pendingMarks));
+ }
+ removePendingMark(e, n) {
+ for (let r = this.open; r >= 0; r--) {
+ let i = this.nodes[r];
+ if (i.pendingMarks.lastIndexOf(e) > -1)
+ i.pendingMarks = e.removeFromSet(i.pendingMarks);
+ else {
+ i.activeMarks = e.removeFromSet(i.activeMarks);
+ let s = i.popFromStashMark(e);
+ s &&
+ i.type &&
+ i.type.allowsMarkType(s.type) &&
+ (i.activeMarks = s.addToSet(i.activeMarks));
+ }
+ if (i == n) break;
+ }
+ }
+}
+function $8(t) {
+ for (let e = t.firstChild, n = null; e; e = e.nextSibling) {
+ let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
+ r && Y1.hasOwnProperty(r) && n
+ ? (n.appendChild(e), (e = n))
+ : r == "li"
+ ? (n = e)
+ : r && (n = null);
+ }
+}
+function z8(t, e) {
+ return (
+ t.matches ||
+ t.msMatchesSelector ||
+ t.webkitMatchesSelector ||
+ t.mozMatchesSelector
+ ).call(t, e);
+}
+function H8(t) {
+ let e = /\s*([\w-]+)\s*:\s*([^;]+)/g,
+ n,
+ r = [];
+ for (; (n = e.exec(t)); ) r.push(n[1], n[2].trim());
+ return r;
+}
+function dp(t) {
+ let e = {};
+ for (let n in t) e[n] = t[n];
+ return e;
+}
+function F8(t, e) {
+ let n = e.schema.nodes;
+ for (let r in n) {
+ let i = n[r];
+ if (!i.allowsMarkType(t)) continue;
+ let o = [],
+ s = (l) => {
+ o.push(l);
+ for (let a = 0; a < l.edgeCount; a++) {
+ let { type: u, next: c } = l.edge(a);
+ if (u == e || (o.indexOf(c) < 0 && s(c))) return !0;
+ }
+ };
+ if (s(i.contentMatch)) return !0;
+ }
+}
+function V8(t, e) {
+ for (let n = 0; n < e.length; n++) if (t.eq(e[n])) return e[n];
+}
+class ri {
+ constructor(e, n) {
+ (this.nodes = e), (this.marks = n);
+ }
+ serializeFragment(e, n = {}, r) {
+ r || (r = xu(n).createDocumentFragment());
+ let i = r,
+ o = [];
+ return (
+ e.forEach((s) => {
+ if (o.length || s.marks.length) {
+ let l = 0,
+ a = 0;
+ for (; l < o.length && a < s.marks.length; ) {
+ let u = s.marks[a];
+ if (!this.marks[u.type.name]) {
+ a++;
+ continue;
+ }
+ if (!u.eq(o[l][0]) || u.type.spec.spanning === !1)
+ break;
+ l++, a++;
+ }
+ for (; l < o.length; ) i = o.pop()[1];
+ for (; a < s.marks.length; ) {
+ let u = s.marks[a++],
+ c = this.serializeMark(u, s.isInline, n);
+ c &&
+ (o.push([u, i]),
+ i.appendChild(c.dom),
+ (i = c.contentDOM || c.dom));
+ }
+ }
+ i.appendChild(this.serializeNodeInner(s, n));
+ }),
+ r
+ );
+ }
+ serializeNodeInner(e, n) {
+ let { dom: r, contentDOM: i } = ri.renderSpec(
+ xu(n),
+ this.nodes[e.type.name](e)
+ );
+ if (i) {
+ if (e.isLeaf)
+ throw new RangeError(
+ "Content hole not allowed in a leaf node spec"
+ );
+ this.serializeFragment(e.content, n, i);
+ }
+ return r;
+ }
+ serializeNode(e, n = {}) {
+ let r = this.serializeNodeInner(e, n);
+ for (let i = e.marks.length - 1; i >= 0; i--) {
+ let o = this.serializeMark(e.marks[i], e.isInline, n);
+ o && ((o.contentDOM || o.dom).appendChild(r), (r = o.dom));
+ }
+ return r;
+ }
+ serializeMark(e, n, r = {}) {
+ let i = this.marks[e.type.name];
+ return i && ri.renderSpec(xu(r), i(e, n));
+ }
+ static renderSpec(e, n, r = null) {
+ if (typeof n == "string") return { dom: e.createTextNode(n) };
+ if (n.nodeType != null) return { dom: n };
+ if (n.dom && n.dom.nodeType != null) return n;
+ let i = n[0],
+ o = i.indexOf(" ");
+ o > 0 && ((r = i.slice(0, o)), (i = i.slice(o + 1)));
+ let s,
+ l = r ? e.createElementNS(r, i) : e.createElement(i),
+ a = n[1],
+ u = 1;
+ if (
+ a &&
+ typeof a == "object" &&
+ a.nodeType == null &&
+ !Array.isArray(a)
+ ) {
+ u = 2;
+ for (let c in a)
+ if (a[c] != null) {
+ let f = c.indexOf(" ");
+ f > 0
+ ? l.setAttributeNS(c.slice(0, f), c.slice(f + 1), a[c])
+ : l.setAttribute(c, a[c]);
+ }
+ }
+ for (let c = u; c < n.length; c++) {
+ let f = n[c];
+ if (f === 0) {
+ if (c < n.length - 1 || c > u)
+ throw new RangeError(
+ "Content hole must be the only child of its parent node"
+ );
+ return { dom: l, contentDOM: l };
+ } else {
+ let { dom: h, contentDOM: p } = ri.renderSpec(e, f, r);
+ if ((l.appendChild(h), p)) {
+ if (s) throw new RangeError("Multiple content holes");
+ s = p;
+ }
+ }
+ }
+ return { dom: l, contentDOM: s };
+ }
+ static fromSchema(e) {
+ return (
+ e.cached.domSerializer ||
+ (e.cached.domSerializer = new ri(
+ this.nodesFromSchema(e),
+ this.marksFromSchema(e)
+ ))
+ );
+ }
+ static nodesFromSchema(e) {
+ let n = fp(e.nodes);
+ return n.text || (n.text = (r) => r.text), n;
+ }
+ static marksFromSchema(e) {
+ return fp(e.marks);
+ }
+}
+function fp(t) {
+ let e = {};
+ for (let n in t) {
+ let r = t[n].spec.toDOM;
+ r && (e[n] = r);
+ }
+ return e;
+}
+function xu(t) {
+ return t.document || window.document;
+}
+const Q1 = 65535,
+ X1 = Math.pow(2, 16);
+function W8(t, e) {
+ return t + e * X1;
+}
+function hp(t) {
+ return t & Q1;
+}
+function U8(t) {
+ return (t - (t & Q1)) / X1;
+}
+const Z1 = 1,
+ e0 = 2,
+ ll = 4,
+ t0 = 8;
+class _c {
+ constructor(e, n, r) {
+ (this.pos = e), (this.delInfo = n), (this.recover = r);
+ }
+ get deleted() {
+ return (this.delInfo & t0) > 0;
+ }
+ get deletedBefore() {
+ return (this.delInfo & (Z1 | ll)) > 0;
+ }
+ get deletedAfter() {
+ return (this.delInfo & (e0 | ll)) > 0;
+ }
+ get deletedAcross() {
+ return (this.delInfo & ll) > 0;
+ }
+}
+class sn {
+ constructor(e, n = !1) {
+ if (((this.ranges = e), (this.inverted = n), !e.length && sn.empty))
+ return sn.empty;
+ }
+ recover(e) {
+ let n = 0,
+ r = hp(e);
+ if (!this.inverted)
+ for (let i = 0; i < r; i++)
+ n += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
+ return this.ranges[r * 3] + n + U8(e);
+ }
+ mapResult(e, n = 1) {
+ return this._map(e, n, !1);
+ }
+ map(e, n = 1) {
+ return this._map(e, n, !0);
+ }
+ _map(e, n, r) {
+ let i = 0,
+ o = this.inverted ? 2 : 1,
+ s = this.inverted ? 1 : 2;
+ for (let l = 0; l < this.ranges.length; l += 3) {
+ let a = this.ranges[l] - (this.inverted ? i : 0);
+ if (a > e) break;
+ let u = this.ranges[l + o],
+ c = this.ranges[l + s],
+ f = a + u;
+ if (e <= f) {
+ let h = u ? (e == a ? -1 : e == f ? 1 : n) : n,
+ p = a + i + (h < 0 ? 0 : c);
+ if (r) return p;
+ let g = e == (n < 0 ? a : f) ? null : W8(l / 3, e - a),
+ v = e == a ? e0 : e == f ? Z1 : ll;
+ return (n < 0 ? e != a : e != f) && (v |= t0), new _c(p, v, g);
+ }
+ i += c - u;
+ }
+ return r ? e + i : new _c(e + i, 0, null);
+ }
+ touches(e, n) {
+ let r = 0,
+ i = hp(n),
+ o = this.inverted ? 2 : 1,
+ s = this.inverted ? 1 : 2;
+ for (let l = 0; l < this.ranges.length; l += 3) {
+ let a = this.ranges[l] - (this.inverted ? r : 0);
+ if (a > e) break;
+ let u = this.ranges[l + o],
+ c = a + u;
+ if (e <= c && l == i * 3) return !0;
+ r += this.ranges[l + s] - u;
+ }
+ return !1;
+ }
+ forEach(e) {
+ let n = this.inverted ? 2 : 1,
+ r = this.inverted ? 1 : 2;
+ for (let i = 0, o = 0; i < this.ranges.length; i += 3) {
+ let s = this.ranges[i],
+ l = s - (this.inverted ? o : 0),
+ a = s + (this.inverted ? 0 : o),
+ u = this.ranges[i + n],
+ c = this.ranges[i + r];
+ e(l, l + u, a, a + c), (o += c - u);
+ }
+ }
+ invert() {
+ return new sn(this.ranges, !this.inverted);
+ }
+ toString() {
+ return (this.inverted ? "-" : "") + JSON.stringify(this.ranges);
+ }
+ static offset(e) {
+ return e == 0 ? sn.empty : new sn(e < 0 ? [0, -e, 0] : [0, 0, e]);
+ }
+}
+sn.empty = new sn([]);
+class $i {
+ constructor(e = [], n, r = 0, i = e.length) {
+ (this.maps = e), (this.mirror = n), (this.from = r), (this.to = i);
+ }
+ slice(e = 0, n = this.maps.length) {
+ return new $i(this.maps, this.mirror, e, n);
+ }
+ copy() {
+ return new $i(
+ this.maps.slice(),
+ this.mirror && this.mirror.slice(),
+ this.from,
+ this.to
+ );
+ }
+ appendMap(e, n) {
+ (this.to = this.maps.push(e)),
+ n != null && this.setMirror(this.maps.length - 1, n);
+ }
+ appendMapping(e) {
+ for (let n = 0, r = this.maps.length; n < e.maps.length; n++) {
+ let i = e.getMirror(n);
+ this.appendMap(e.maps[n], i != null && i < n ? r + i : void 0);
+ }
+ }
+ getMirror(e) {
+ if (this.mirror) {
+ for (let n = 0; n < this.mirror.length; n++)
+ if (this.mirror[n] == e)
+ return this.mirror[n + (n % 2 ? -1 : 1)];
+ }
+ }
+ setMirror(e, n) {
+ this.mirror || (this.mirror = []), this.mirror.push(e, n);
+ }
+ appendMappingInverted(e) {
+ for (
+ let n = e.maps.length - 1, r = this.maps.length + e.maps.length;
+ n >= 0;
+ n--
+ ) {
+ let i = e.getMirror(n);
+ this.appendMap(
+ e.maps[n].invert(),
+ i != null && i > n ? r - i - 1 : void 0
+ );
+ }
+ }
+ invert() {
+ let e = new $i();
+ return e.appendMappingInverted(this), e;
+ }
+ map(e, n = 1) {
+ if (this.mirror) return this._map(e, n, !0);
+ for (let r = this.from; r < this.to; r++) e = this.maps[r].map(e, n);
+ return e;
+ }
+ mapResult(e, n = 1) {
+ return this._map(e, n, !1);
+ }
+ _map(e, n, r) {
+ let i = 0;
+ for (let o = this.from; o < this.to; o++) {
+ let s = this.maps[o],
+ l = s.mapResult(e, n);
+ if (l.recover != null) {
+ let a = this.getMirror(o);
+ if (a != null && a > o && a < this.to) {
+ (o = a), (e = this.maps[a].recover(l.recover));
+ continue;
+ }
+ }
+ (i |= l.delInfo), (e = l.pos);
+ }
+ return r ? e : new _c(e, i, null);
+ }
+}
+const ku = Object.create(null);
+class Wt {
+ getMap() {
+ return sn.empty;
+ }
+ merge(e) {
+ return null;
+ }
+ static fromJSON(e, n) {
+ if (!n || !n.stepType)
+ throw new RangeError("Invalid input for Step.fromJSON");
+ let r = ku[n.stepType];
+ if (!r) throw new RangeError(`No step type ${n.stepType} defined`);
+ return r.fromJSON(e, n);
+ }
+ static jsonID(e, n) {
+ if (e in ku) throw new RangeError("Duplicate use of step JSON ID " + e);
+ return (ku[e] = n), (n.prototype.jsonID = e), n;
+ }
+}
+class wt {
+ constructor(e, n) {
+ (this.doc = e), (this.failed = n);
+ }
+ static ok(e) {
+ return new wt(e, null);
+ }
+ static fail(e) {
+ return new wt(null, e);
+ }
+ static fromReplace(e, n, r, i) {
+ try {
+ return wt.ok(e.replace(n, r, i));
+ } catch (o) {
+ if (o instanceof El) return wt.fail(o.message);
+ throw o;
+ }
+ }
+}
+function Qd(t, e, n) {
+ let r = [];
+ for (let i = 0; i < t.childCount; i++) {
+ let o = t.child(i);
+ o.content.size && (o = o.copy(Qd(o.content, e, o))),
+ o.isInline && (o = e(o, n, i)),
+ r.push(o);
+ }
+ return Y.fromArray(r);
+}
+class Mr extends Wt {
+ constructor(e, n, r) {
+ super(), (this.from = e), (this.to = n), (this.mark = r);
+ }
+ apply(e) {
+ let n = e.slice(this.from, this.to),
+ r = e.resolve(this.from),
+ i = r.node(r.sharedDepth(this.to)),
+ o = new ie(
+ Qd(
+ n.content,
+ (s, l) =>
+ !s.isAtom || !l.type.allowsMarkType(this.mark.type)
+ ? s
+ : s.mark(this.mark.addToSet(s.marks)),
+ i
+ ),
+ n.openStart,
+ n.openEnd
+ );
+ return wt.fromReplace(e, this.from, this.to, o);
+ }
+ invert() {
+ return new Un(this.from, this.to, this.mark);
+ }
+ map(e) {
+ let n = e.mapResult(this.from, 1),
+ r = e.mapResult(this.to, -1);
+ return (n.deleted && r.deleted) || n.pos >= r.pos
+ ? null
+ : new Mr(n.pos, r.pos, this.mark);
+ }
+ merge(e) {
+ return e instanceof Mr &&
+ e.mark.eq(this.mark) &&
+ this.from <= e.to &&
+ this.to >= e.from
+ ? new Mr(
+ Math.min(this.from, e.from),
+ Math.max(this.to, e.to),
+ this.mark
+ )
+ : null;
+ }
+ toJSON() {
+ return {
+ stepType: "addMark",
+ mark: this.mark.toJSON(),
+ from: this.from,
+ to: this.to,
+ };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.from != "number" || typeof n.to != "number")
+ throw new RangeError("Invalid input for AddMarkStep.fromJSON");
+ return new Mr(n.from, n.to, e.markFromJSON(n.mark));
+ }
+}
+Wt.jsonID("addMark", Mr);
+class Un extends Wt {
+ constructor(e, n, r) {
+ super(), (this.from = e), (this.to = n), (this.mark = r);
+ }
+ apply(e) {
+ let n = e.slice(this.from, this.to),
+ r = new ie(
+ Qd(
+ n.content,
+ (i) => i.mark(this.mark.removeFromSet(i.marks)),
+ e
+ ),
+ n.openStart,
+ n.openEnd
+ );
+ return wt.fromReplace(e, this.from, this.to, r);
+ }
+ invert() {
+ return new Mr(this.from, this.to, this.mark);
+ }
+ map(e) {
+ let n = e.mapResult(this.from, 1),
+ r = e.mapResult(this.to, -1);
+ return (n.deleted && r.deleted) || n.pos >= r.pos
+ ? null
+ : new Un(n.pos, r.pos, this.mark);
+ }
+ merge(e) {
+ return e instanceof Un &&
+ e.mark.eq(this.mark) &&
+ this.from <= e.to &&
+ this.to >= e.from
+ ? new Un(
+ Math.min(this.from, e.from),
+ Math.max(this.to, e.to),
+ this.mark
+ )
+ : null;
+ }
+ toJSON() {
+ return {
+ stepType: "removeMark",
+ mark: this.mark.toJSON(),
+ from: this.from,
+ to: this.to,
+ };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.from != "number" || typeof n.to != "number")
+ throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
+ return new Un(n.from, n.to, e.markFromJSON(n.mark));
+ }
+}
+Wt.jsonID("removeMark", Un);
+class Er extends Wt {
+ constructor(e, n) {
+ super(), (this.pos = e), (this.mark = n);
+ }
+ apply(e) {
+ let n = e.nodeAt(this.pos);
+ if (!n) return wt.fail("No node at mark step's position");
+ let r = n.type.create(n.attrs, null, this.mark.addToSet(n.marks));
+ return wt.fromReplace(
+ e,
+ this.pos,
+ this.pos + 1,
+ new ie(Y.from(r), 0, n.isLeaf ? 0 : 1)
+ );
+ }
+ invert(e) {
+ let n = e.nodeAt(this.pos);
+ if (n) {
+ let r = this.mark.addToSet(n.marks);
+ if (r.length == n.marks.length) {
+ for (let i = 0; i < n.marks.length; i++)
+ if (!n.marks[i].isInSet(r))
+ return new Er(this.pos, n.marks[i]);
+ return new Er(this.pos, this.mark);
+ }
+ }
+ return new eo(this.pos, this.mark);
+ }
+ map(e) {
+ let n = e.mapResult(this.pos, 1);
+ return n.deletedAfter ? null : new Er(n.pos, this.mark);
+ }
+ toJSON() {
+ return {
+ stepType: "addNodeMark",
+ pos: this.pos,
+ mark: this.mark.toJSON(),
+ };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.pos != "number")
+ throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
+ return new Er(n.pos, e.markFromJSON(n.mark));
+ }
+}
+Wt.jsonID("addNodeMark", Er);
+class eo extends Wt {
+ constructor(e, n) {
+ super(), (this.pos = e), (this.mark = n);
+ }
+ apply(e) {
+ let n = e.nodeAt(this.pos);
+ if (!n) return wt.fail("No node at mark step's position");
+ let r = n.type.create(n.attrs, null, this.mark.removeFromSet(n.marks));
+ return wt.fromReplace(
+ e,
+ this.pos,
+ this.pos + 1,
+ new ie(Y.from(r), 0, n.isLeaf ? 0 : 1)
+ );
+ }
+ invert(e) {
+ let n = e.nodeAt(this.pos);
+ return !n || !this.mark.isInSet(n.marks)
+ ? this
+ : new Er(this.pos, this.mark);
+ }
+ map(e) {
+ let n = e.mapResult(this.pos, 1);
+ return n.deletedAfter ? null : new eo(n.pos, this.mark);
+ }
+ toJSON() {
+ return {
+ stepType: "removeNodeMark",
+ pos: this.pos,
+ mark: this.mark.toJSON(),
+ };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.pos != "number")
+ throw new RangeError(
+ "Invalid input for RemoveNodeMarkStep.fromJSON"
+ );
+ return new eo(n.pos, e.markFromJSON(n.mark));
+ }
+}
+Wt.jsonID("removeNodeMark", eo);
+class jt extends Wt {
+ constructor(e, n, r, i = !1) {
+ super(),
+ (this.from = e),
+ (this.to = n),
+ (this.slice = r),
+ (this.structure = i);
+ }
+ apply(e) {
+ return this.structure && Mc(e, this.from, this.to)
+ ? wt.fail("Structure replace would overwrite content")
+ : wt.fromReplace(e, this.from, this.to, this.slice);
+ }
+ getMap() {
+ return new sn([this.from, this.to - this.from, this.slice.size]);
+ }
+ invert(e) {
+ return new jt(
+ this.from,
+ this.from + this.slice.size,
+ e.slice(this.from, this.to)
+ );
+ }
+ map(e) {
+ let n = e.mapResult(this.from, 1),
+ r = e.mapResult(this.to, -1);
+ return n.deletedAcross && r.deletedAcross
+ ? null
+ : new jt(n.pos, Math.max(n.pos, r.pos), this.slice);
+ }
+ merge(e) {
+ if (!(e instanceof jt) || e.structure || this.structure) return null;
+ if (
+ this.from + this.slice.size == e.from &&
+ !this.slice.openEnd &&
+ !e.slice.openStart
+ ) {
+ let n =
+ this.slice.size + e.slice.size == 0
+ ? ie.empty
+ : new ie(
+ this.slice.content.append(e.slice.content),
+ this.slice.openStart,
+ e.slice.openEnd
+ );
+ return new jt(
+ this.from,
+ this.to + (e.to - e.from),
+ n,
+ this.structure
+ );
+ } else if (
+ e.to == this.from &&
+ !this.slice.openStart &&
+ !e.slice.openEnd
+ ) {
+ let n =
+ this.slice.size + e.slice.size == 0
+ ? ie.empty
+ : new ie(
+ e.slice.content.append(this.slice.content),
+ e.slice.openStart,
+ this.slice.openEnd
+ );
+ return new jt(e.from, this.to, n, this.structure);
+ } else return null;
+ }
+ toJSON() {
+ let e = { stepType: "replace", from: this.from, to: this.to };
+ return (
+ this.slice.size && (e.slice = this.slice.toJSON()),
+ this.structure && (e.structure = !0),
+ e
+ );
+ }
+ static fromJSON(e, n) {
+ if (typeof n.from != "number" || typeof n.to != "number")
+ throw new RangeError("Invalid input for ReplaceStep.fromJSON");
+ return new jt(n.from, n.to, ie.fromJSON(e, n.slice), !!n.structure);
+ }
+}
+Wt.jsonID("replace", jt);
+class Pt extends Wt {
+ constructor(e, n, r, i, o, s, l = !1) {
+ super(),
+ (this.from = e),
+ (this.to = n),
+ (this.gapFrom = r),
+ (this.gapTo = i),
+ (this.slice = o),
+ (this.insert = s),
+ (this.structure = l);
+ }
+ apply(e) {
+ if (
+ this.structure &&
+ (Mc(e, this.from, this.gapFrom) || Mc(e, this.gapTo, this.to))
+ )
+ return wt.fail("Structure gap-replace would overwrite content");
+ let n = e.slice(this.gapFrom, this.gapTo);
+ if (n.openStart || n.openEnd) return wt.fail("Gap is not a flat range");
+ let r = this.slice.insertAt(this.insert, n.content);
+ return r
+ ? wt.fromReplace(e, this.from, this.to, r)
+ : wt.fail("Content does not fit in gap");
+ }
+ getMap() {
+ return new sn([
+ this.from,
+ this.gapFrom - this.from,
+ this.insert,
+ this.gapTo,
+ this.to - this.gapTo,
+ this.slice.size - this.insert,
+ ]);
+ }
+ invert(e) {
+ let n = this.gapTo - this.gapFrom;
+ return new Pt(
+ this.from,
+ this.from + this.slice.size + n,
+ this.from + this.insert,
+ this.from + this.insert + n,
+ e
+ .slice(this.from, this.to)
+ .removeBetween(
+ this.gapFrom - this.from,
+ this.gapTo - this.from
+ ),
+ this.gapFrom - this.from,
+ this.structure
+ );
+ }
+ map(e) {
+ let n = e.mapResult(this.from, 1),
+ r = e.mapResult(this.to, -1),
+ i = e.map(this.gapFrom, -1),
+ o = e.map(this.gapTo, 1);
+ return (n.deletedAcross && r.deletedAcross) || i < n.pos || o > r.pos
+ ? null
+ : new Pt(
+ n.pos,
+ r.pos,
+ i,
+ o,
+ this.slice,
+ this.insert,
+ this.structure
+ );
+ }
+ toJSON() {
+ let e = {
+ stepType: "replaceAround",
+ from: this.from,
+ to: this.to,
+ gapFrom: this.gapFrom,
+ gapTo: this.gapTo,
+ insert: this.insert,
+ };
+ return (
+ this.slice.size && (e.slice = this.slice.toJSON()),
+ this.structure && (e.structure = !0),
+ e
+ );
+ }
+ static fromJSON(e, n) {
+ if (
+ typeof n.from != "number" ||
+ typeof n.to != "number" ||
+ typeof n.gapFrom != "number" ||
+ typeof n.gapTo != "number" ||
+ typeof n.insert != "number"
+ )
+ throw new RangeError(
+ "Invalid input for ReplaceAroundStep.fromJSON"
+ );
+ return new Pt(
+ n.from,
+ n.to,
+ n.gapFrom,
+ n.gapTo,
+ ie.fromJSON(e, n.slice),
+ n.insert,
+ !!n.structure
+ );
+ }
+}
+Wt.jsonID("replaceAround", Pt);
+function Mc(t, e, n) {
+ let r = t.resolve(e),
+ i = n - e,
+ o = r.depth;
+ for (; i > 0 && o > 0 && r.indexAfter(o) == r.node(o).childCount; )
+ o--, i--;
+ if (i > 0) {
+ let s = r.node(o).maybeChild(r.indexAfter(o));
+ for (; i > 0; ) {
+ if (!s || s.isLeaf) return !0;
+ (s = s.firstChild), i--;
+ }
+ }
+ return !1;
+}
+function K8(t, e, n, r) {
+ let i = [],
+ o = [],
+ s,
+ l;
+ t.doc.nodesBetween(e, n, (a, u, c) => {
+ if (!a.isInline) return;
+ let f = a.marks;
+ if (!r.isInSet(f) && c.type.allowsMarkType(r.type)) {
+ let h = Math.max(u, e),
+ p = Math.min(u + a.nodeSize, n),
+ g = r.addToSet(f);
+ for (let v = 0; v < f.length; v++)
+ f[v].isInSet(g) ||
+ (s && s.to == h && s.mark.eq(f[v])
+ ? (s.to = p)
+ : i.push((s = new Un(h, p, f[v]))));
+ l && l.to == h ? (l.to = p) : o.push((l = new Mr(h, p, r)));
+ }
+ }),
+ i.forEach((a) => t.step(a)),
+ o.forEach((a) => t.step(a));
+}
+function q8(t, e, n, r) {
+ let i = [],
+ o = 0;
+ t.doc.nodesBetween(e, n, (s, l) => {
+ if (!s.isInline) return;
+ o++;
+ let a = null;
+ if (r instanceof Yd) {
+ let u = s.marks,
+ c;
+ for (; (c = r.isInSet(u)); )
+ (a || (a = [])).push(c), (u = c.removeFromSet(u));
+ } else r ? r.isInSet(s.marks) && (a = [r]) : (a = s.marks);
+ if (a && a.length) {
+ let u = Math.min(l + s.nodeSize, n);
+ for (let c = 0; c < a.length; c++) {
+ let f = a[c],
+ h;
+ for (let p = 0; p < i.length; p++) {
+ let g = i[p];
+ g.step == o - 1 && f.eq(i[p].style) && (h = g);
+ }
+ h
+ ? ((h.to = u), (h.step = o))
+ : i.push({
+ style: f,
+ from: Math.max(l, e),
+ to: u,
+ step: o,
+ });
+ }
+ }
+ }),
+ i.forEach((s) => t.step(new Un(s.from, s.to, s.style)));
+}
+function J8(t, e, n, r = n.contentMatch) {
+ let i = t.doc.nodeAt(e),
+ o = [],
+ s = e + 1;
+ for (let l = 0; l < i.childCount; l++) {
+ let a = i.child(l),
+ u = s + a.nodeSize,
+ c = r.matchType(a.type);
+ if (!c) o.push(new jt(s, u, ie.empty));
+ else {
+ r = c;
+ for (let f = 0; f < a.marks.length; f++)
+ n.allowsMarkType(a.marks[f].type) ||
+ t.step(new Un(s, u, a.marks[f]));
+ if (a.isText && !n.spec.code) {
+ let f,
+ h = /\r?\n|\r/g,
+ p;
+ for (; (f = h.exec(a.text)); )
+ p ||
+ (p = new ie(
+ Y.from(n.schema.text(" ", n.allowedMarks(a.marks))),
+ 0,
+ 0
+ )),
+ o.push(
+ new jt(s + f.index, s + f.index + f[0].length, p)
+ );
+ }
+ }
+ s = u;
+ }
+ if (!r.validEnd) {
+ let l = r.fillBefore(Y.empty, !0);
+ t.replace(s, s, new ie(l, 0, 0));
+ }
+ for (let l = o.length - 1; l >= 0; l--) t.step(o[l]);
+}
+function G8(t, e, n) {
+ return (
+ (e == 0 || t.canReplace(e, t.childCount)) &&
+ (n == t.childCount || t.canReplace(0, n))
+ );
+}
+function uo(t) {
+ let n = t.parent.content.cutByIndex(t.startIndex, t.endIndex);
+ for (let r = t.depth; ; --r) {
+ let i = t.$from.node(r),
+ o = t.$from.index(r),
+ s = t.$to.indexAfter(r);
+ if (r < t.depth && i.canReplace(o, s, n)) return r;
+ if (r == 0 || i.type.spec.isolating || !G8(i, o, s)) break;
+ }
+ return null;
+}
+function Y8(t, e, n) {
+ let { $from: r, $to: i, depth: o } = e,
+ s = r.before(o + 1),
+ l = i.after(o + 1),
+ a = s,
+ u = l,
+ c = Y.empty,
+ f = 0;
+ for (let g = o, v = !1; g > n; g--)
+ v || r.index(g) > 0
+ ? ((v = !0), (c = Y.from(r.node(g).copy(c))), f++)
+ : a--;
+ let h = Y.empty,
+ p = 0;
+ for (let g = o, v = !1; g > n; g--)
+ v || i.after(g + 1) < i.end(g)
+ ? ((v = !0), (h = Y.from(i.node(g).copy(h))), p++)
+ : u++;
+ t.step(new Pt(a, u, s, l, new ie(c.append(h), f, p), c.size - f, !0));
+}
+function Xd(t, e, n = null, r = t) {
+ let i = Q8(t, e),
+ o = i && X8(r, e);
+ return o ? i.map(pp).concat({ type: e, attrs: n }).concat(o.map(pp)) : null;
+}
+function pp(t) {
+ return { type: t, attrs: null };
+}
+function Q8(t, e) {
+ let { parent: n, startIndex: r, endIndex: i } = t,
+ o = n.contentMatchAt(r).findWrapping(e);
+ if (!o) return null;
+ let s = o.length ? o[0] : e;
+ return n.canReplaceWith(r, i, s) ? o : null;
+}
+function X8(t, e) {
+ let { parent: n, startIndex: r, endIndex: i } = t,
+ o = n.child(r),
+ s = e.contentMatch.findWrapping(o.type);
+ if (!s) return null;
+ let a = (s.length ? s[s.length - 1] : e).contentMatch;
+ for (let u = r; a && u < i; u++) a = a.matchType(n.child(u).type);
+ return !a || !a.validEnd ? null : s;
+}
+function Z8(t, e, n) {
+ let r = Y.empty;
+ for (let s = n.length - 1; s >= 0; s--) {
+ if (r.size) {
+ let l = n[s].type.contentMatch.matchFragment(r);
+ if (!l || !l.validEnd)
+ throw new RangeError(
+ "Wrapper type given to Transform.wrap does not form valid content of its parent wrapper"
+ );
+ }
+ r = Y.from(n[s].type.create(n[s].attrs, r));
+ }
+ let i = e.start,
+ o = e.end;
+ t.step(new Pt(i, o, i, o, new ie(r, 0, 0), n.length, !0));
+}
+function eC(t, e, n, r, i) {
+ if (!r.isTextblock)
+ throw new RangeError(
+ "Type given to setBlockType should be a textblock"
+ );
+ let o = t.steps.length;
+ t.doc.nodesBetween(e, n, (s, l) => {
+ if (
+ s.isTextblock &&
+ !s.hasMarkup(r, i) &&
+ tC(t.doc, t.mapping.slice(o).map(l), r)
+ ) {
+ t.clearIncompatible(t.mapping.slice(o).map(l, 1), r);
+ let a = t.mapping.slice(o),
+ u = a.map(l, 1),
+ c = a.map(l + s.nodeSize, 1);
+ return (
+ t.step(
+ new Pt(
+ u,
+ c,
+ u + 1,
+ c - 1,
+ new ie(Y.from(r.create(i, null, s.marks)), 0, 0),
+ 1,
+ !0
+ )
+ ),
+ !1
+ );
+ }
+ });
+}
+function tC(t, e, n) {
+ let r = t.resolve(e),
+ i = r.index();
+ return r.parent.canReplaceWith(i, i + 1, n);
+}
+function nC(t, e, n, r, i) {
+ let o = t.doc.nodeAt(e);
+ if (!o) throw new RangeError("No node at given position");
+ n || (n = o.type);
+ let s = n.create(r, null, i || o.marks);
+ if (o.isLeaf) return t.replaceWith(e, e + o.nodeSize, s);
+ if (!n.validContent(o.content))
+ throw new RangeError("Invalid content for node type " + n.name);
+ t.step(
+ new Pt(
+ e,
+ e + o.nodeSize,
+ e + 1,
+ e + o.nodeSize - 1,
+ new ie(Y.from(s), 0, 0),
+ 1,
+ !0
+ )
+ );
+}
+function zi(t, e, n = 1, r) {
+ let i = t.resolve(e),
+ o = i.depth - n,
+ s = (r && r[r.length - 1]) || i.parent;
+ if (
+ o < 0 ||
+ i.parent.type.spec.isolating ||
+ !i.parent.canReplace(i.index(), i.parent.childCount) ||
+ !s.type.validContent(
+ i.parent.content.cutByIndex(i.index(), i.parent.childCount)
+ )
+ )
+ return !1;
+ for (let u = i.depth - 1, c = n - 2; u > o; u--, c--) {
+ let f = i.node(u),
+ h = i.index(u);
+ if (f.type.spec.isolating) return !1;
+ let p = f.content.cutByIndex(h, f.childCount),
+ g = r && r[c + 1];
+ g && (p = p.replaceChild(0, g.type.create(g.attrs)));
+ let v = (r && r[c]) || f;
+ if (!f.canReplace(h + 1, f.childCount) || !v.type.validContent(p))
+ return !1;
+ }
+ let l = i.indexAfter(o),
+ a = r && r[0];
+ return i.node(o).canReplaceWith(l, l, a ? a.type : i.node(o + 1).type);
+}
+function rC(t, e, n = 1, r) {
+ let i = t.doc.resolve(e),
+ o = Y.empty,
+ s = Y.empty;
+ for (let l = i.depth, a = i.depth - n, u = n - 1; l > a; l--, u--) {
+ o = Y.from(i.node(l).copy(o));
+ let c = r && r[u];
+ s = Y.from(c ? c.type.create(c.attrs, s) : i.node(l).copy(s));
+ }
+ t.step(new jt(e, e, new ie(o.append(s), n, n), !0));
+}
+function $r(t, e) {
+ let n = t.resolve(e),
+ r = n.index();
+ return n0(n.nodeBefore, n.nodeAfter) && n.parent.canReplace(r, r + 1);
+}
+function n0(t, e) {
+ return !!(t && e && !t.isLeaf && t.canAppend(e));
+}
+function Ha(t, e, n = -1) {
+ let r = t.resolve(e);
+ for (let i = r.depth; ; i--) {
+ let o,
+ s,
+ l = r.index(i);
+ if (
+ (i == r.depth
+ ? ((o = r.nodeBefore), (s = r.nodeAfter))
+ : n > 0
+ ? ((o = r.node(i + 1)), l++, (s = r.node(i).maybeChild(l)))
+ : ((o = r.node(i).maybeChild(l - 1)), (s = r.node(i + 1))),
+ o && !o.isTextblock && n0(o, s) && r.node(i).canReplace(l, l + 1))
+ )
+ return e;
+ if (i == 0) break;
+ e = n < 0 ? r.before(i) : r.after(i);
+ }
+}
+function iC(t, e, n) {
+ let r = new jt(e - n, e + n, ie.empty, !0);
+ t.step(r);
+}
+function oC(t, e, n) {
+ let r = t.resolve(e);
+ if (r.parent.canReplaceWith(r.index(), r.index(), n)) return e;
+ if (r.parentOffset == 0)
+ for (let i = r.depth - 1; i >= 0; i--) {
+ let o = r.index(i);
+ if (r.node(i).canReplaceWith(o, o, n)) return r.before(i + 1);
+ if (o > 0) return null;
+ }
+ if (r.parentOffset == r.parent.content.size)
+ for (let i = r.depth - 1; i >= 0; i--) {
+ let o = r.indexAfter(i);
+ if (r.node(i).canReplaceWith(o, o, n)) return r.after(i + 1);
+ if (o < r.node(i).childCount) return null;
+ }
+ return null;
+}
+function r0(t, e, n) {
+ let r = t.resolve(e);
+ if (!n.content.size) return e;
+ let i = n.content;
+ for (let o = 0; o < n.openStart; o++) i = i.firstChild.content;
+ for (let o = 1; o <= (n.openStart == 0 && n.size ? 2 : 1); o++)
+ for (let s = r.depth; s >= 0; s--) {
+ let l =
+ s == r.depth
+ ? 0
+ : r.pos <= (r.start(s + 1) + r.end(s + 1)) / 2
+ ? -1
+ : 1,
+ a = r.index(s) + (l > 0 ? 1 : 0),
+ u = r.node(s),
+ c = !1;
+ if (o == 1) c = u.canReplace(a, a, i);
+ else {
+ let f = u.contentMatchAt(a).findWrapping(i.firstChild.type);
+ c = f && u.canReplaceWith(a, a, f[0]);
+ }
+ if (c)
+ return l == 0
+ ? r.pos
+ : l < 0
+ ? r.before(s + 1)
+ : r.after(s + 1);
+ }
+ return null;
+}
+function Zd(t, e, n = e, r = ie.empty) {
+ if (e == n && !r.size) return null;
+ let i = t.resolve(e),
+ o = t.resolve(n);
+ return i0(i, o, r) ? new jt(e, n, r) : new sC(i, o, r).fit();
+}
+function i0(t, e, n) {
+ return (
+ !n.openStart &&
+ !n.openEnd &&
+ t.start() == e.start() &&
+ t.parent.canReplace(t.index(), e.index(), n.content)
+ );
+}
+class sC {
+ constructor(e, n, r) {
+ (this.$from = e),
+ (this.$to = n),
+ (this.unplaced = r),
+ (this.frontier = []),
+ (this.placed = Y.empty);
+ for (let i = 0; i <= e.depth; i++) {
+ let o = e.node(i);
+ this.frontier.push({
+ type: o.type,
+ match: o.contentMatchAt(e.indexAfter(i)),
+ });
+ }
+ for (let i = e.depth; i > 0; i--)
+ this.placed = Y.from(e.node(i).copy(this.placed));
+ }
+ get depth() {
+ return this.frontier.length - 1;
+ }
+ fit() {
+ for (; this.unplaced.size; ) {
+ let u = this.findFittable();
+ u ? this.placeNodes(u) : this.openMore() || this.dropNode();
+ }
+ let e = this.mustMoveInline(),
+ n = this.placed.size - this.depth - this.$from.depth,
+ r = this.$from,
+ i = this.close(e < 0 ? this.$to : r.doc.resolve(e));
+ if (!i) return null;
+ let o = this.placed,
+ s = r.depth,
+ l = i.depth;
+ for (; s && l && o.childCount == 1; )
+ (o = o.firstChild.content), s--, l--;
+ let a = new ie(o, s, l);
+ return e > -1
+ ? new Pt(r.pos, e, this.$to.pos, this.$to.end(), a, n)
+ : a.size || r.pos != this.$to.pos
+ ? new jt(r.pos, i.pos, a)
+ : null;
+ }
+ findFittable() {
+ let e = this.unplaced.openStart;
+ for (
+ let n = this.unplaced.content, r = 0, i = this.unplaced.openEnd;
+ r < e;
+ r++
+ ) {
+ let o = n.firstChild;
+ if (
+ (n.childCount > 1 && (i = 0), o.type.spec.isolating && i <= r)
+ ) {
+ e = r;
+ break;
+ }
+ n = o.content;
+ }
+ for (let n = 1; n <= 2; n++)
+ for (let r = n == 1 ? e : this.unplaced.openStart; r >= 0; r--) {
+ let i,
+ o = null;
+ r
+ ? ((o = Cu(this.unplaced.content, r - 1).firstChild),
+ (i = o.content))
+ : (i = this.unplaced.content);
+ let s = i.firstChild;
+ for (let l = this.depth; l >= 0; l--) {
+ let { type: a, match: u } = this.frontier[l],
+ c,
+ f = null;
+ if (
+ n == 1 &&
+ (s
+ ? u.matchType(s.type) ||
+ (f = u.fillBefore(Y.from(s), !1))
+ : o && a.compatibleContent(o.type))
+ )
+ return {
+ sliceDepth: r,
+ frontierDepth: l,
+ parent: o,
+ inject: f,
+ };
+ if (n == 2 && s && (c = u.findWrapping(s.type)))
+ return {
+ sliceDepth: r,
+ frontierDepth: l,
+ parent: o,
+ wrap: c,
+ };
+ if (o && u.matchType(o.type)) break;
+ }
+ }
+ }
+ openMore() {
+ let { content: e, openStart: n, openEnd: r } = this.unplaced,
+ i = Cu(e, n);
+ return !i.childCount || i.firstChild.isLeaf
+ ? !1
+ : ((this.unplaced = new ie(
+ e,
+ n + 1,
+ Math.max(r, i.size + n >= e.size - r ? n + 1 : 0)
+ )),
+ !0);
+ }
+ dropNode() {
+ let { content: e, openStart: n, openEnd: r } = this.unplaced,
+ i = Cu(e, n);
+ if (i.childCount <= 1 && n > 0) {
+ let o = e.size - n <= n + i.size;
+ this.unplaced = new ie(Mo(e, n - 1, 1), n - 1, o ? n - 1 : r);
+ } else this.unplaced = new ie(Mo(e, n, 1), n, r);
+ }
+ placeNodes({
+ sliceDepth: e,
+ frontierDepth: n,
+ parent: r,
+ inject: i,
+ wrap: o,
+ }) {
+ for (; this.depth > n; ) this.closeFrontierNode();
+ if (o) for (let v = 0; v < o.length; v++) this.openFrontierNode(o[v]);
+ let s = this.unplaced,
+ l = r ? r.content : s.content,
+ a = s.openStart - e,
+ u = 0,
+ c = [],
+ { match: f, type: h } = this.frontier[n];
+ if (i) {
+ for (let v = 0; v < i.childCount; v++) c.push(i.child(v));
+ f = f.matchFragment(i);
+ }
+ let p = l.size + e - (s.content.size - s.openEnd);
+ for (; u < l.childCount; ) {
+ let v = l.child(u),
+ b = f.matchType(v.type);
+ if (!b) break;
+ u++,
+ (u > 1 || a == 0 || v.content.size) &&
+ ((f = b),
+ c.push(
+ o0(
+ v.mark(h.allowedMarks(v.marks)),
+ u == 1 ? a : 0,
+ u == l.childCount ? p : -1
+ )
+ ));
+ }
+ let g = u == l.childCount;
+ g || (p = -1),
+ (this.placed = Eo(this.placed, n, Y.from(c))),
+ (this.frontier[n].match = f),
+ g &&
+ p < 0 &&
+ r &&
+ r.type == this.frontier[this.depth].type &&
+ this.frontier.length > 1 &&
+ this.closeFrontierNode();
+ for (let v = 0, b = l; v < p; v++) {
+ let x = b.lastChild;
+ this.frontier.push({
+ type: x.type,
+ match: x.contentMatchAt(x.childCount),
+ }),
+ (b = x.content);
+ }
+ this.unplaced = g
+ ? e == 0
+ ? ie.empty
+ : new ie(
+ Mo(s.content, e - 1, 1),
+ e - 1,
+ p < 0 ? s.openEnd : e - 1
+ )
+ : new ie(Mo(s.content, e, u), s.openStart, s.openEnd);
+ }
+ mustMoveInline() {
+ if (!this.$to.parent.isTextblock) return -1;
+ let e = this.frontier[this.depth],
+ n;
+ if (
+ !e.type.isTextblock ||
+ !Su(this.$to, this.$to.depth, e.type, e.match, !1) ||
+ (this.$to.depth == this.depth &&
+ (n = this.findCloseLevel(this.$to)) &&
+ n.depth == this.depth)
+ )
+ return -1;
+ let { depth: r } = this.$to,
+ i = this.$to.after(r);
+ for (; r > 1 && i == this.$to.end(--r); ) ++i;
+ return i;
+ }
+ findCloseLevel(e) {
+ e: for (let n = Math.min(this.depth, e.depth); n >= 0; n--) {
+ let { match: r, type: i } = this.frontier[n],
+ o = n < e.depth && e.end(n + 1) == e.pos + (e.depth - (n + 1)),
+ s = Su(e, n, i, r, o);
+ if (!!s) {
+ for (let l = n - 1; l >= 0; l--) {
+ let { match: a, type: u } = this.frontier[l],
+ c = Su(e, l, u, a, !0);
+ if (!c || c.childCount) continue e;
+ }
+ return {
+ depth: n,
+ fit: s,
+ move: o ? e.doc.resolve(e.after(n + 1)) : e,
+ };
+ }
+ }
+ }
+ close(e) {
+ let n = this.findCloseLevel(e);
+ if (!n) return null;
+ for (; this.depth > n.depth; ) this.closeFrontierNode();
+ n.fit.childCount && (this.placed = Eo(this.placed, n.depth, n.fit)),
+ (e = n.move);
+ for (let r = n.depth + 1; r <= e.depth; r++) {
+ let i = e.node(r),
+ o = i.type.contentMatch.fillBefore(i.content, !0, e.index(r));
+ this.openFrontierNode(i.type, i.attrs, o);
+ }
+ return e;
+ }
+ openFrontierNode(e, n = null, r) {
+ let i = this.frontier[this.depth];
+ (i.match = i.match.matchType(e)),
+ (this.placed = Eo(this.placed, this.depth, Y.from(e.create(n, r)))),
+ this.frontier.push({ type: e, match: e.contentMatch });
+ }
+ closeFrontierNode() {
+ let n = this.frontier.pop().match.fillBefore(Y.empty, !0);
+ n.childCount &&
+ (this.placed = Eo(this.placed, this.frontier.length, n));
+ }
+}
+function Mo(t, e, n) {
+ return e == 0
+ ? t.cutByIndex(n, t.childCount)
+ : t.replaceChild(
+ 0,
+ t.firstChild.copy(Mo(t.firstChild.content, e - 1, n))
+ );
+}
+function Eo(t, e, n) {
+ return e == 0
+ ? t.append(n)
+ : t.replaceChild(
+ t.childCount - 1,
+ t.lastChild.copy(Eo(t.lastChild.content, e - 1, n))
+ );
+}
+function Cu(t, e) {
+ for (let n = 0; n < e; n++) t = t.firstChild.content;
+ return t;
+}
+function o0(t, e, n) {
+ if (e <= 0) return t;
+ let r = t.content;
+ return (
+ e > 1 &&
+ (r = r.replaceChild(
+ 0,
+ o0(r.firstChild, e - 1, r.childCount == 1 ? n - 1 : 0)
+ )),
+ e > 0 &&
+ ((r = t.type.contentMatch.fillBefore(r).append(r)),
+ n <= 0 &&
+ (r = r.append(
+ t.type.contentMatch.matchFragment(r).fillBefore(Y.empty, !0)
+ ))),
+ t.copy(r)
+ );
+}
+function Su(t, e, n, r, i) {
+ let o = t.node(e),
+ s = i ? t.indexAfter(e) : t.index(e);
+ if (s == o.childCount && !n.compatibleContent(o.type)) return null;
+ let l = r.fillBefore(o.content, !0, s);
+ return l && !lC(n, o.content, s) ? l : null;
+}
+function lC(t, e, n) {
+ for (let r = n; r < e.childCount; r++)
+ if (!t.allowsMarks(e.child(r).marks)) return !0;
+ return !1;
+}
+function aC(t) {
+ return t.spec.defining || t.spec.definingForContent;
+}
+function uC(t, e, n, r) {
+ if (!r.size) return t.deleteRange(e, n);
+ let i = t.doc.resolve(e),
+ o = t.doc.resolve(n);
+ if (i0(i, o, r)) return t.step(new jt(e, n, r));
+ let s = l0(i, t.doc.resolve(n));
+ s[s.length - 1] == 0 && s.pop();
+ let l = -(i.depth + 1);
+ s.unshift(l);
+ for (let h = i.depth, p = i.pos - 1; h > 0; h--, p--) {
+ let g = i.node(h).type.spec;
+ if (g.defining || g.definingAsContext || g.isolating) break;
+ s.indexOf(h) > -1 ? (l = h) : i.before(h) == p && s.splice(1, 0, -h);
+ }
+ let a = s.indexOf(l),
+ u = [],
+ c = r.openStart;
+ for (let h = r.content, p = 0; ; p++) {
+ let g = h.firstChild;
+ if ((u.push(g), p == r.openStart)) break;
+ h = g.content;
+ }
+ for (let h = c - 1; h >= 0; h--) {
+ let p = u[h],
+ g = aC(p.type);
+ if (g && !p.sameMarkup(i.node(Math.abs(l) - 1))) c = h;
+ else if (g || !p.type.isTextblock) break;
+ }
+ for (let h = r.openStart; h >= 0; h--) {
+ let p = (h + c + 1) % (r.openStart + 1),
+ g = u[p];
+ if (!!g)
+ for (let v = 0; v < s.length; v++) {
+ let b = s[(v + a) % s.length],
+ x = !0;
+ b < 0 && ((x = !1), (b = -b));
+ let S = i.node(b - 1),
+ T = i.index(b - 1);
+ if (S.canReplaceWith(T, T, g.type, g.marks))
+ return t.replace(
+ i.before(b),
+ x ? o.after(b) : n,
+ new ie(s0(r.content, 0, r.openStart, p), p, r.openEnd)
+ );
+ }
+ }
+ let f = t.steps.length;
+ for (
+ let h = s.length - 1;
+ h >= 0 && (t.replace(e, n, r), !(t.steps.length > f));
+ h--
+ ) {
+ let p = s[h];
+ p < 0 || ((e = i.before(p)), (n = o.after(p)));
+ }
+}
+function s0(t, e, n, r, i) {
+ if (e < n) {
+ let o = t.firstChild;
+ t = t.replaceChild(0, o.copy(s0(o.content, e + 1, n, r, o)));
+ }
+ if (e > r) {
+ let o = i.contentMatchAt(0),
+ s = o.fillBefore(t).append(t);
+ t = s.append(o.matchFragment(s).fillBefore(Y.empty, !0));
+ }
+ return t;
+}
+function cC(t, e, n, r) {
+ if (!r.isInline && e == n && t.doc.resolve(e).parent.content.size) {
+ let i = oC(t.doc, e, r.type);
+ i != null && (e = n = i);
+ }
+ t.replaceRange(e, n, new ie(Y.from(r), 0, 0));
+}
+function dC(t, e, n) {
+ let r = t.doc.resolve(e),
+ i = t.doc.resolve(n),
+ o = l0(r, i);
+ for (let s = 0; s < o.length; s++) {
+ let l = o[s],
+ a = s == o.length - 1;
+ if ((a && l == 0) || r.node(l).type.contentMatch.validEnd)
+ return t.delete(r.start(l), i.end(l));
+ if (
+ l > 0 &&
+ (a || r.node(l - 1).canReplace(r.index(l - 1), i.indexAfter(l - 1)))
+ )
+ return t.delete(r.before(l), i.after(l));
+ }
+ for (let s = 1; s <= r.depth && s <= i.depth; s++)
+ if (
+ e - r.start(s) == r.depth - s &&
+ n > r.end(s) &&
+ i.end(s) - n != i.depth - s
+ )
+ return t.delete(r.before(s), n);
+ t.delete(e, n);
+}
+function l0(t, e) {
+ let n = [],
+ r = Math.min(t.depth, e.depth);
+ for (let i = r; i >= 0; i--) {
+ let o = t.start(i);
+ if (
+ o < t.pos - (t.depth - i) ||
+ e.end(i) > e.pos + (e.depth - i) ||
+ t.node(i).type.spec.isolating ||
+ e.node(i).type.spec.isolating
+ )
+ break;
+ (o == e.start(i) ||
+ (i == t.depth &&
+ i == e.depth &&
+ t.parent.inlineContent &&
+ e.parent.inlineContent &&
+ i &&
+ e.start(i - 1) == o - 1)) &&
+ n.push(i);
+ }
+ return n;
+}
+class Hi extends Wt {
+ constructor(e, n, r) {
+ super(), (this.pos = e), (this.attr = n), (this.value = r);
+ }
+ apply(e) {
+ let n = e.nodeAt(this.pos);
+ if (!n) return wt.fail("No node at attribute step's position");
+ let r = Object.create(null);
+ for (let o in n.attrs) r[o] = n.attrs[o];
+ r[this.attr] = this.value;
+ let i = n.type.create(r, null, n.marks);
+ return wt.fromReplace(
+ e,
+ this.pos,
+ this.pos + 1,
+ new ie(Y.from(i), 0, n.isLeaf ? 0 : 1)
+ );
+ }
+ getMap() {
+ return sn.empty;
+ }
+ invert(e) {
+ return new Hi(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
+ }
+ map(e) {
+ let n = e.mapResult(this.pos, 1);
+ return n.deletedAfter ? null : new Hi(n.pos, this.attr, this.value);
+ }
+ toJSON() {
+ return {
+ stepType: "attr",
+ pos: this.pos,
+ attr: this.attr,
+ value: this.value,
+ };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.pos != "number" || typeof n.attr != "string")
+ throw new RangeError("Invalid input for AttrStep.fromJSON");
+ return new Hi(n.pos, n.attr, n.value);
+ }
+}
+Wt.jsonID("attr", Hi);
+class ns extends Wt {
+ constructor(e, n) {
+ super(), (this.attr = e), (this.value = n);
+ }
+ apply(e) {
+ let n = Object.create(null);
+ for (let i in e.attrs) n[i] = e.attrs[i];
+ n[this.attr] = this.value;
+ let r = e.type.create(n, e.content, e.marks);
+ return wt.ok(r);
+ }
+ getMap() {
+ return sn.empty;
+ }
+ invert(e) {
+ return new ns(this.attr, e.attrs[this.attr]);
+ }
+ map(e) {
+ return this;
+ }
+ toJSON() {
+ return { stepType: "docAttr", attr: this.attr, value: this.value };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.attr != "string")
+ throw new RangeError("Invalid input for DocAttrStep.fromJSON");
+ return new ns(n.attr, n.value);
+ }
+}
+Wt.jsonID("docAttr", ns);
+let to = class extends Error {};
+to = function t(e) {
+ let n = Error.call(this, e);
+ return (n.__proto__ = t.prototype), n;
+};
+to.prototype = Object.create(Error.prototype);
+to.prototype.constructor = to;
+to.prototype.name = "TransformError";
+class a0 {
+ constructor(e) {
+ (this.doc = e),
+ (this.steps = []),
+ (this.docs = []),
+ (this.mapping = new $i());
+ }
+ get before() {
+ return this.docs.length ? this.docs[0] : this.doc;
+ }
+ step(e) {
+ let n = this.maybeStep(e);
+ if (n.failed) throw new to(n.failed);
+ return this;
+ }
+ maybeStep(e) {
+ let n = e.apply(this.doc);
+ return n.failed || this.addStep(e, n.doc), n;
+ }
+ get docChanged() {
+ return this.steps.length > 0;
+ }
+ addStep(e, n) {
+ this.docs.push(this.doc),
+ this.steps.push(e),
+ this.mapping.appendMap(e.getMap()),
+ (this.doc = n);
+ }
+ replace(e, n = e, r = ie.empty) {
+ let i = Zd(this.doc, e, n, r);
+ return i && this.step(i), this;
+ }
+ replaceWith(e, n, r) {
+ return this.replace(e, n, new ie(Y.from(r), 0, 0));
+ }
+ delete(e, n) {
+ return this.replace(e, n, ie.empty);
+ }
+ insert(e, n) {
+ return this.replaceWith(e, e, n);
+ }
+ replaceRange(e, n, r) {
+ return uC(this, e, n, r), this;
+ }
+ replaceRangeWith(e, n, r) {
+ return cC(this, e, n, r), this;
+ }
+ deleteRange(e, n) {
+ return dC(this, e, n), this;
+ }
+ lift(e, n) {
+ return Y8(this, e, n), this;
+ }
+ join(e, n = 1) {
+ return iC(this, e, n), this;
+ }
+ wrap(e, n) {
+ return Z8(this, e, n), this;
+ }
+ setBlockType(e, n = e, r, i = null) {
+ return eC(this, e, n, r, i), this;
+ }
+ setNodeMarkup(e, n, r = null, i) {
+ return nC(this, e, n, r, i), this;
+ }
+ setNodeAttribute(e, n, r) {
+ return this.step(new Hi(e, n, r)), this;
+ }
+ setDocAttribute(e, n) {
+ return this.step(new ns(e, n)), this;
+ }
+ addNodeMark(e, n) {
+ return this.step(new Er(e, n)), this;
+ }
+ removeNodeMark(e, n) {
+ if (!(n instanceof dt)) {
+ let r = this.doc.nodeAt(e);
+ if (!r) throw new RangeError("No node at position " + e);
+ if (((n = n.isInSet(r.marks)), !n)) return this;
+ }
+ return this.step(new eo(e, n)), this;
+ }
+ split(e, n = 1, r) {
+ return rC(this, e, n, r), this;
+ }
+ addMark(e, n, r) {
+ return K8(this, e, n, r), this;
+ }
+ removeMark(e, n, r) {
+ return q8(this, e, n, r), this;
+ }
+ clearIncompatible(e, n, r) {
+ return J8(this, e, n, r), this;
+ }
+}
+const _u = Object.create(null);
+class Se {
+ constructor(e, n, r) {
+ (this.$anchor = e),
+ (this.$head = n),
+ (this.ranges = r || [new u0(e.min(n), e.max(n))]);
+ }
+ get anchor() {
+ return this.$anchor.pos;
+ }
+ get head() {
+ return this.$head.pos;
+ }
+ get from() {
+ return this.$from.pos;
+ }
+ get to() {
+ return this.$to.pos;
+ }
+ get $from() {
+ return this.ranges[0].$from;
+ }
+ get $to() {
+ return this.ranges[0].$to;
+ }
+ get empty() {
+ let e = this.ranges;
+ for (let n = 0; n < e.length; n++)
+ if (e[n].$from.pos != e[n].$to.pos) return !1;
+ return !0;
+ }
+ content() {
+ return this.$from.doc.slice(this.from, this.to, !0);
+ }
+ replace(e, n = ie.empty) {
+ let r = n.content.lastChild,
+ i = null;
+ for (let l = 0; l < n.openEnd; l++) (i = r), (r = r.lastChild);
+ let o = e.steps.length,
+ s = this.ranges;
+ for (let l = 0; l < s.length; l++) {
+ let { $from: a, $to: u } = s[l],
+ c = e.mapping.slice(o);
+ e.replaceRange(c.map(a.pos), c.map(u.pos), l ? ie.empty : n),
+ l == 0 &&
+ yp(e, o, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
+ }
+ }
+ replaceWith(e, n) {
+ let r = e.steps.length,
+ i = this.ranges;
+ for (let o = 0; o < i.length; o++) {
+ let { $from: s, $to: l } = i[o],
+ a = e.mapping.slice(r),
+ u = a.map(s.pos),
+ c = a.map(l.pos);
+ o
+ ? e.deleteRange(u, c)
+ : (e.replaceRangeWith(u, c, n), yp(e, r, n.isInline ? -1 : 1));
+ }
+ }
+ static findFrom(e, n, r = !1) {
+ let i = e.parent.inlineContent
+ ? new Ce(e)
+ : Ri(e.node(0), e.parent, e.pos, e.index(), n, r);
+ if (i) return i;
+ for (let o = e.depth - 1; o >= 0; o--) {
+ let s =
+ n < 0
+ ? Ri(
+ e.node(0),
+ e.node(o),
+ e.before(o + 1),
+ e.index(o),
+ n,
+ r
+ )
+ : Ri(
+ e.node(0),
+ e.node(o),
+ e.after(o + 1),
+ e.index(o) + 1,
+ n,
+ r
+ );
+ if (s) return s;
+ }
+ return null;
+ }
+ static near(e, n = 1) {
+ return this.findFrom(e, n) || this.findFrom(e, -n) || new Rn(e.node(0));
+ }
+ static atStart(e) {
+ return Ri(e, e, 0, 0, 1) || new Rn(e);
+ }
+ static atEnd(e) {
+ return Ri(e, e, e.content.size, e.childCount, -1) || new Rn(e);
+ }
+ static fromJSON(e, n) {
+ if (!n || !n.type)
+ throw new RangeError("Invalid input for Selection.fromJSON");
+ let r = _u[n.type];
+ if (!r) throw new RangeError(`No selection type ${n.type} defined`);
+ return r.fromJSON(e, n);
+ }
+ static jsonID(e, n) {
+ if (e in _u)
+ throw new RangeError("Duplicate use of selection JSON ID " + e);
+ return (_u[e] = n), (n.prototype.jsonID = e), n;
+ }
+ getBookmark() {
+ return Ce.between(this.$anchor, this.$head).getBookmark();
+ }
+}
+Se.prototype.visible = !0;
+class u0 {
+ constructor(e, n) {
+ (this.$from = e), (this.$to = n);
+ }
+}
+let mp = !1;
+function gp(t) {
+ !mp &&
+ !t.parent.inlineContent &&
+ ((mp = !0),
+ console.warn(
+ "TextSelection endpoint not pointing into a node with inline content (" +
+ t.parent.type.name +
+ ")"
+ ));
+}
+class Ce extends Se {
+ constructor(e, n = e) {
+ gp(e), gp(n), super(e, n);
+ }
+ get $cursor() {
+ return this.$anchor.pos == this.$head.pos ? this.$head : null;
+ }
+ map(e, n) {
+ let r = e.resolve(n.map(this.head));
+ if (!r.parent.inlineContent) return Se.near(r);
+ let i = e.resolve(n.map(this.anchor));
+ return new Ce(i.parent.inlineContent ? i : r, r);
+ }
+ replace(e, n = ie.empty) {
+ if ((super.replace(e, n), n == ie.empty)) {
+ let r = this.$from.marksAcross(this.$to);
+ r && e.ensureMarks(r);
+ }
+ }
+ eq(e) {
+ return (
+ e instanceof Ce && e.anchor == this.anchor && e.head == this.head
+ );
+ }
+ getBookmark() {
+ return new Fa(this.anchor, this.head);
+ }
+ toJSON() {
+ return { type: "text", anchor: this.anchor, head: this.head };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.anchor != "number" || typeof n.head != "number")
+ throw new RangeError("Invalid input for TextSelection.fromJSON");
+ return new Ce(e.resolve(n.anchor), e.resolve(n.head));
+ }
+ static create(e, n, r = n) {
+ let i = e.resolve(n);
+ return new this(i, r == n ? i : e.resolve(r));
+ }
+ static between(e, n, r) {
+ let i = e.pos - n.pos;
+ if (((!r || i) && (r = i >= 0 ? 1 : -1), !n.parent.inlineContent)) {
+ let o = Se.findFrom(n, r, !0) || Se.findFrom(n, -r, !0);
+ if (o) n = o.$head;
+ else return Se.near(n, r);
+ }
+ return (
+ e.parent.inlineContent ||
+ (i == 0
+ ? (e = n)
+ : ((e = (Se.findFrom(e, -r, !0) || Se.findFrom(e, r, !0))
+ .$anchor),
+ e.pos < n.pos != i < 0 && (e = n))),
+ new Ce(e, n)
+ );
+ }
+}
+Se.jsonID("text", Ce);
+class Fa {
+ constructor(e, n) {
+ (this.anchor = e), (this.head = n);
+ }
+ map(e) {
+ return new Fa(e.map(this.anchor), e.map(this.head));
+ }
+ resolve(e) {
+ return Ce.between(e.resolve(this.anchor), e.resolve(this.head));
+ }
+}
+class ve extends Se {
+ constructor(e) {
+ let n = e.nodeAfter,
+ r = e.node(0).resolve(e.pos + n.nodeSize);
+ super(e, r), (this.node = n);
+ }
+ map(e, n) {
+ let { deleted: r, pos: i } = n.mapResult(this.anchor),
+ o = e.resolve(i);
+ return r ? Se.near(o) : new ve(o);
+ }
+ content() {
+ return new ie(Y.from(this.node), 0, 0);
+ }
+ eq(e) {
+ return e instanceof ve && e.anchor == this.anchor;
+ }
+ toJSON() {
+ return { type: "node", anchor: this.anchor };
+ }
+ getBookmark() {
+ return new ef(this.anchor);
+ }
+ static fromJSON(e, n) {
+ if (typeof n.anchor != "number")
+ throw new RangeError("Invalid input for NodeSelection.fromJSON");
+ return new ve(e.resolve(n.anchor));
+ }
+ static create(e, n) {
+ return new ve(e.resolve(n));
+ }
+ static isSelectable(e) {
+ return !e.isText && e.type.spec.selectable !== !1;
+ }
+}
+ve.prototype.visible = !1;
+Se.jsonID("node", ve);
+class ef {
+ constructor(e) {
+ this.anchor = e;
+ }
+ map(e) {
+ let { deleted: n, pos: r } = e.mapResult(this.anchor);
+ return n ? new Fa(r, r) : new ef(r);
+ }
+ resolve(e) {
+ let n = e.resolve(this.anchor),
+ r = n.nodeAfter;
+ return r && ve.isSelectable(r) ? new ve(n) : Se.near(n);
+ }
+}
+class Rn extends Se {
+ constructor(e) {
+ super(e.resolve(0), e.resolve(e.content.size));
+ }
+ replace(e, n = ie.empty) {
+ if (n == ie.empty) {
+ e.delete(0, e.doc.content.size);
+ let r = Se.atStart(e.doc);
+ r.eq(e.selection) || e.setSelection(r);
+ } else super.replace(e, n);
+ }
+ toJSON() {
+ return { type: "all" };
+ }
+ static fromJSON(e) {
+ return new Rn(e);
+ }
+ map(e) {
+ return new Rn(e);
+ }
+ eq(e) {
+ return e instanceof Rn;
+ }
+ getBookmark() {
+ return fC;
+ }
+}
+Se.jsonID("all", Rn);
+const fC = {
+ map() {
+ return this;
+ },
+ resolve(t) {
+ return new Rn(t);
+ },
+};
+function Ri(t, e, n, r, i, o = !1) {
+ if (e.inlineContent) return Ce.create(t, n);
+ for (
+ let s = r - (i > 0 ? 0 : 1);
+ i > 0 ? s < e.childCount : s >= 0;
+ s += i
+ ) {
+ let l = e.child(s);
+ if (l.isAtom) {
+ if (!o && ve.isSelectable(l))
+ return ve.create(t, n - (i < 0 ? l.nodeSize : 0));
+ } else {
+ let a = Ri(t, l, n + i, i < 0 ? l.childCount : 0, i, o);
+ if (a) return a;
+ }
+ n += l.nodeSize * i;
+ }
+ return null;
+}
+function yp(t, e, n) {
+ let r = t.steps.length - 1;
+ if (r < e) return;
+ let i = t.steps[r];
+ if (!(i instanceof jt || i instanceof Pt)) return;
+ let o = t.mapping.maps[r],
+ s;
+ o.forEach((l, a, u, c) => {
+ s == null && (s = c);
+ }),
+ t.setSelection(Se.near(t.doc.resolve(s), n));
+}
+function vp(t, e) {
+ return !e || !t ? t : t.bind(e);
+}
+class Vs {
+ constructor(e, n, r) {
+ (this.name = e),
+ (this.init = vp(n.init, r)),
+ (this.apply = vp(n.apply, r));
+ }
+}
+const bR = [
+ new Vs("doc", {
+ init(t) {
+ return t.doc || t.schema.topNodeType.createAndFill();
+ },
+ apply(t) {
+ return t.doc;
+ },
+ }),
+ new Vs("selection", {
+ init(t, e) {
+ return t.selection || Se.atStart(e.doc);
+ },
+ apply(t) {
+ return t.selection;
+ },
+ }),
+ new Vs("storedMarks", {
+ init(t) {
+ return t.storedMarks || null;
+ },
+ apply(t, e, n, r) {
+ return r.selection.$cursor ? t.storedMarks : null;
+ },
+ }),
+ new Vs("scrollToSelection", {
+ init() {
+ return 0;
+ },
+ apply(t, e) {
+ return t.scrolledIntoView ? e + 1 : e;
+ },
+ }),
+];
+function c0(t, e, n) {
+ for (let r in t) {
+ let i = t[r];
+ i instanceof Function
+ ? (i = i.bind(e))
+ : r == "handleDOMEvents" && (i = c0(i, e, {})),
+ (n[r] = i);
+ }
+ return n;
+}
+class Tt {
+ constructor(e) {
+ (this.spec = e),
+ (this.props = {}),
+ e.props && c0(e.props, this, this.props),
+ (this.key = e.key ? e.key.key : d0("plugin"));
+ }
+ getState(e) {
+ return e[this.key];
+ }
+}
+const Mu = Object.create(null);
+function d0(t) {
+ return t in Mu ? t + "$" + ++Mu[t] : ((Mu[t] = 0), t + "$");
+}
+class Ot {
+ constructor(e = "key") {
+ this.key = d0(e);
+ }
+ get(e) {
+ return e.config.pluginsByKey[this.key];
+ }
+ getState(e) {
+ return e[this.key];
+ }
+}
+const ki = function (t) {
+ for (var e = 0; ; e++) if (((t = t.previousSibling), !t)) return e;
+};
+const f0 = function (t, e, n, r) {
+ return n && (bp(t, e, n, r, -1) || bp(t, e, n, r, 1));
+ },
+ hC = /^(img|br|input|textarea|hr)$/i;
+function bp(t, e, n, r, i) {
+ for (;;) {
+ if (t == n && e == r) return !0;
+ if (e == (i < 0 ? 0 : Nl(t))) {
+ let o = t.parentNode;
+ if (
+ !o ||
+ o.nodeType != 1 ||
+ tf(t) ||
+ hC.test(t.nodeName) ||
+ t.contentEditable == "false"
+ )
+ return !1;
+ (e = ki(t) + (i < 0 ? 0 : 1)), (t = o);
+ } else if (t.nodeType == 1) {
+ if (
+ ((t = t.childNodes[e + (i < 0 ? -1 : 0)]),
+ t.contentEditable == "false")
+ )
+ return !1;
+ e = i < 0 ? Nl(t) : 0;
+ } else return !1;
+ }
+}
+function Nl(t) {
+ return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
+}
+function pC(t, e, n) {
+ for (let r = e == 0, i = e == Nl(t); r || i; ) {
+ if (t == n) return !0;
+ let o = ki(t);
+ if (((t = t.parentNode), !t)) return !1;
+ (r = r && o == 0), (i = i && o == Nl(t));
+ }
+}
+function tf(t) {
+ let e;
+ for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode);
+ return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
+}
+const h0 = function (t) {
+ return (
+ t.focusNode &&
+ f0(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset)
+ );
+};
+function p0(t, e) {
+ let n = document.createEvent("Event");
+ return (
+ n.initEvent("keydown", !0, !0), (n.keyCode = t), (n.key = n.code = e), n
+ );
+}
+const Qn = typeof navigator != "undefined" ? navigator : null,
+ wp = typeof document != "undefined" ? document : null,
+ zr = (Qn && Qn.userAgent) || "",
+ Ec = /Edge\/(\d+)/.exec(zr),
+ m0 = /MSIE \d/.exec(zr),
+ Ac = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zr),
+ co = !!(m0 || Ac || Ec),
+ nf = m0 ? document.documentMode : Ac ? +Ac[1] : Ec ? +Ec[1] : 0,
+ Va = !co && /gecko\/(\d+)/i.test(zr);
+Va && +(/Firefox\/(\d+)/.exec(zr) || [0, 0])[1];
+const Tc = !co && /Chrome\/(\d+)/.exec(zr),
+ Ci = !!Tc,
+ mC = Tc ? +Tc[1] : 0,
+ Si = !co && !!Qn && /Apple Computer/.test(Qn.vendor),
+ rf = Si && (/Mobile\/\w+/.test(zr) || (!!Qn && Qn.maxTouchPoints > 2)),
+ hn = rf || (Qn ? /Mac/.test(Qn.platform) : !1),
+ gC = Qn ? /Win/.test(Qn.platform) : !1,
+ ws = /Android \d/.test(zr),
+ of = !!wp && "webkitFontSmoothing" in wp.documentElement.style,
+ yC = of
+ ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1]
+ : 0;
+const g0 = function (t) {
+ t && (this.nodeName = t);
+};
+g0.prototype = Object.create(null);
+const wR = [new g0()];
+function vC(t, e = null) {
+ let n = t.domSelectionRange(),
+ r = t.state.doc;
+ if (!n.focusNode) return null;
+ let i = t.docView.nearestDesc(n.focusNode),
+ o = i && i.size == 0,
+ s = t.docView.posFromDOM(n.focusNode, n.focusOffset, 1);
+ if (s < 0) return null;
+ let l = r.resolve(s),
+ a,
+ u;
+ if (h0(n)) {
+ for (a = l; i && !i.node; ) i = i.parent;
+ let c = i.node;
+ if (
+ i &&
+ c.isAtom &&
+ ve.isSelectable(c) &&
+ i.parent &&
+ !(c.isInline && pC(n.focusNode, n.focusOffset, i.dom))
+ ) {
+ let f = i.posBefore;
+ u = new ve(s == f ? l : r.resolve(f));
+ }
+ } else {
+ let c = t.docView.posFromDOM(n.anchorNode, n.anchorOffset, 1);
+ if (c < 0) return null;
+ a = r.resolve(c);
+ }
+ if (!u) {
+ let c =
+ e == "pointer" || (t.state.selection.head < l.pos && !o) ? 1 : -1;
+ u = v0(t, a, l, c);
+ }
+ return u;
+}
+function y0(t) {
+ return t.editable
+ ? t.hasFocus()
+ : kC(t) &&
+ document.activeElement &&
+ document.activeElement.contains(t.dom);
+}
+function sf(t, e = !1) {
+ let n = t.state.selection;
+ if ((xC(t, n), !!y0(t))) {
+ if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && Ci) {
+ let r = t.domSelectionRange(),
+ i = t.domObserver.currentSelection;
+ if (
+ r.anchorNode &&
+ i.anchorNode &&
+ f0(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)
+ ) {
+ (t.input.mouseDown.delayedSelectionSync = !0),
+ t.domObserver.setCurSelection();
+ return;
+ }
+ }
+ if ((t.domObserver.disconnectSelection(), t.cursorWrapper)) wC(t);
+ else {
+ let { anchor: r, head: i } = n,
+ o,
+ s;
+ xp &&
+ !(n instanceof Ce) &&
+ (n.$from.parent.inlineContent || (o = kp(t, n.from)),
+ !n.empty && !n.$from.parent.inlineContent && (s = kp(t, n.to))),
+ t.docView.setSelection(r, i, t.root, e),
+ xp && (o && Cp(o), s && Cp(s)),
+ n.visible
+ ? t.dom.classList.remove("ProseMirror-hideselection")
+ : (t.dom.classList.add("ProseMirror-hideselection"),
+ "onselectionchange" in document && bC(t));
+ }
+ t.domObserver.setCurSelection(), t.domObserver.connectSelection();
+ }
+}
+const xp = Si || (Ci && mC < 63);
+function kp(t, e) {
+ let { node: n, offset: r } = t.docView.domFromPos(e, 0),
+ i = r < n.childNodes.length ? n.childNodes[r] : null,
+ o = r ? n.childNodes[r - 1] : null;
+ if (Si && i && i.contentEditable == "false") return Eu(i);
+ if (
+ (!i || i.contentEditable == "false") &&
+ (!o || o.contentEditable == "false")
+ ) {
+ if (i) return Eu(i);
+ if (o) return Eu(o);
+ }
+}
+function Eu(t) {
+ return (
+ (t.contentEditable = "true"),
+ Si && t.draggable && ((t.draggable = !1), (t.wasDraggable = !0)),
+ t
+ );
+}
+function Cp(t) {
+ (t.contentEditable = "false"),
+ t.wasDraggable && ((t.draggable = !0), (t.wasDraggable = null));
+}
+function bC(t) {
+ let e = t.dom.ownerDocument;
+ e.removeEventListener("selectionchange", t.input.hideSelectionGuard);
+ let n = t.domSelectionRange(),
+ r = n.anchorNode,
+ i = n.anchorOffset;
+ e.addEventListener(
+ "selectionchange",
+ (t.input.hideSelectionGuard = () => {
+ (n.anchorNode != r || n.anchorOffset != i) &&
+ (e.removeEventListener(
+ "selectionchange",
+ t.input.hideSelectionGuard
+ ),
+ setTimeout(() => {
+ (!y0(t) || t.state.selection.visible) &&
+ t.dom.classList.remove("ProseMirror-hideselection");
+ }, 20));
+ })
+ );
+}
+function wC(t) {
+ let e = t.domSelection(),
+ n = document.createRange(),
+ r = t.cursorWrapper.dom,
+ i = r.nodeName == "IMG";
+ i ? n.setEnd(r.parentNode, ki(r) + 1) : n.setEnd(r, 0),
+ n.collapse(!1),
+ e.removeAllRanges(),
+ e.addRange(n),
+ !i &&
+ !t.state.selection.visible &&
+ co &&
+ nf <= 11 &&
+ ((r.disabled = !0), (r.disabled = !1));
+}
+function xC(t, e) {
+ if (e instanceof ve) {
+ let n = t.docView.descAt(e.from);
+ n != t.lastSelectedViewDesc &&
+ (Sp(t), n && n.selectNode(), (t.lastSelectedViewDesc = n));
+ } else Sp(t);
+}
+function Sp(t) {
+ t.lastSelectedViewDesc &&
+ (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(),
+ (t.lastSelectedViewDesc = void 0));
+}
+function v0(t, e, n, r) {
+ return (
+ t.someProp("createSelectionBetween", (i) => i(t, e, n)) ||
+ Ce.between(e, n, r)
+ );
+}
+function kC(t) {
+ let e = t.domSelectionRange();
+ if (!e.anchorNode) return !1;
+ try {
+ return (
+ t.dom.contains(
+ e.anchorNode.nodeType == 3
+ ? e.anchorNode.parentNode
+ : e.anchorNode
+ ) &&
+ (t.editable ||
+ t.dom.contains(
+ e.focusNode.nodeType == 3
+ ? e.focusNode.parentNode
+ : e.focusNode
+ ))
+ );
+ } catch (n) {
+ return !1;
+ }
+}
+function Oc(t, e) {
+ let { $anchor: n, $head: r } = t.selection,
+ i = e > 0 ? n.max(r) : n.min(r),
+ o = i.parent.inlineContent
+ ? i.depth
+ ? t.doc.resolve(e > 0 ? i.after() : i.before())
+ : null
+ : i;
+ return o && Se.findFrom(o, e);
+}
+function br(t, e) {
+ return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
+}
+function _p(t, e, n) {
+ let r = t.state.selection;
+ if (r instanceof Ce)
+ if (n.indexOf("s") > -1) {
+ let { $head: i } = r,
+ o = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter;
+ if (!o || o.isText || !o.isLeaf) return !1;
+ let s = t.state.doc.resolve(i.pos + o.nodeSize * (e < 0 ? -1 : 1));
+ return br(t, new Ce(r.$anchor, s));
+ } else if (r.empty) {
+ if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
+ let i = Oc(t.state, e);
+ return i && i instanceof ve ? br(t, i) : !1;
+ } else if (!(hn && n.indexOf("m") > -1)) {
+ let i = r.$head,
+ o = i.textOffset
+ ? null
+ : e < 0
+ ? i.nodeBefore
+ : i.nodeAfter,
+ s;
+ if (!o || o.isText) return !1;
+ let l = e < 0 ? i.pos - o.nodeSize : i.pos;
+ return o.isAtom || ((s = t.docView.descAt(l)) && !s.contentDOM)
+ ? ve.isSelectable(o)
+ ? br(
+ t,
+ new ve(
+ e < 0
+ ? t.state.doc.resolve(
+ i.pos - o.nodeSize
+ )
+ : i
+ )
+ )
+ : of
+ ? br(
+ t,
+ new Ce(
+ t.state.doc.resolve(
+ e < 0 ? l : l + o.nodeSize
+ )
+ )
+ )
+ : !1
+ : !1;
+ }
+ } else return !1;
+ else {
+ if (r instanceof ve && r.node.isInline)
+ return br(t, new Ce(e > 0 ? r.$to : r.$from));
+ {
+ let i = Oc(t.state, e);
+ return i ? br(t, i) : !1;
+ }
+ }
+}
+function jl(t) {
+ return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
+}
+function $o(t, e) {
+ let n = t.pmViewDesc;
+ return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
+}
+function Ai(t, e) {
+ return e < 0 ? CC(t) : SC(t);
+}
+function CC(t) {
+ let e = t.domSelectionRange(),
+ n = e.focusNode,
+ r = e.focusOffset;
+ if (!n) return;
+ let i,
+ o,
+ s = !1;
+ for (
+ Va &&
+ n.nodeType == 1 &&
+ r < jl(n) &&
+ $o(n.childNodes[r], -1) &&
+ (s = !0);
+ ;
+
+ )
+ if (r > 0) {
+ if (n.nodeType != 1) break;
+ {
+ let l = n.childNodes[r - 1];
+ if ($o(l, -1)) (i = n), (o = --r);
+ else if (l.nodeType == 3) (n = l), (r = n.nodeValue.length);
+ else break;
+ }
+ } else {
+ if (b0(n)) break;
+ {
+ let l = n.previousSibling;
+ for (; l && $o(l, -1); )
+ (i = n.parentNode), (o = ki(l)), (l = l.previousSibling);
+ if (l) (n = l), (r = jl(n));
+ else {
+ if (((n = n.parentNode), n == t.dom)) break;
+ r = 0;
+ }
+ }
+ }
+ s ? Rc(t, n, r) : i && Rc(t, i, o);
+}
+function SC(t) {
+ let e = t.domSelectionRange(),
+ n = e.focusNode,
+ r = e.focusOffset;
+ if (!n) return;
+ let i = jl(n),
+ o,
+ s;
+ for (;;)
+ if (r < i) {
+ if (n.nodeType != 1) break;
+ let l = n.childNodes[r];
+ if ($o(l, 1)) (o = n), (s = ++r);
+ else break;
+ } else {
+ if (b0(n)) break;
+ {
+ let l = n.nextSibling;
+ for (; l && $o(l, 1); )
+ (o = l.parentNode), (s = ki(l) + 1), (l = l.nextSibling);
+ if (l) (n = l), (r = 0), (i = jl(n));
+ else {
+ if (((n = n.parentNode), n == t.dom)) break;
+ r = i = 0;
+ }
+ }
+ }
+ o && Rc(t, o, s);
+}
+function b0(t) {
+ let e = t.pmViewDesc;
+ return e && e.node && e.node.isBlock;
+}
+function _C(t, e) {
+ for (; t && e == t.childNodes.length && !tf(t); )
+ (e = ki(t) + 1), (t = t.parentNode);
+ for (; t && e < t.childNodes.length; ) {
+ let n = t.childNodes[e];
+ if (n.nodeType == 3) return n;
+ if (n.nodeType == 1 && n.contentEditable == "false") break;
+ (t = n), (e = 0);
+ }
+}
+function MC(t, e) {
+ for (; t && !e && !tf(t); ) (e = ki(t)), (t = t.parentNode);
+ for (; t && e; ) {
+ let n = t.childNodes[e - 1];
+ if (n.nodeType == 3) return n;
+ if (n.nodeType == 1 && n.contentEditable == "false") break;
+ (t = n), (e = t.childNodes.length);
+ }
+}
+function Rc(t, e, n) {
+ if (e.nodeType != 3) {
+ let o, s;
+ (s = _C(e, n))
+ ? ((e = s), (n = 0))
+ : (o = MC(e, n)) && ((e = o), (n = o.nodeValue.length));
+ }
+ let r = t.domSelection();
+ if (h0(r)) {
+ let o = document.createRange();
+ o.setEnd(e, n), o.setStart(e, n), r.removeAllRanges(), r.addRange(o);
+ } else r.extend && r.extend(e, n);
+ t.domObserver.setCurSelection();
+ let { state: i } = t;
+ setTimeout(() => {
+ t.state == i && sf(t);
+ }, 50);
+}
+function Mp(t, e) {
+ let n = t.state.doc.resolve(e);
+ if (!(Ci || gC) && n.parent.inlineContent) {
+ let i = t.coordsAtPos(e);
+ if (e > n.start()) {
+ let o = t.coordsAtPos(e - 1),
+ s = (o.top + o.bottom) / 2;
+ if (s > i.top && s < i.bottom && Math.abs(o.left - i.left) > 1)
+ return o.left < i.left ? "ltr" : "rtl";
+ }
+ if (e < n.end()) {
+ let o = t.coordsAtPos(e + 1),
+ s = (o.top + o.bottom) / 2;
+ if (s > i.top && s < i.bottom && Math.abs(o.left - i.left) > 1)
+ return o.left > i.left ? "ltr" : "rtl";
+ }
+ }
+ return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
+}
+function Ep(t, e, n) {
+ let r = t.state.selection;
+ if (
+ (r instanceof Ce && !r.empty) ||
+ n.indexOf("s") > -1 ||
+ (hn && n.indexOf("m") > -1)
+ )
+ return !1;
+ let { $from: i, $to: o } = r;
+ if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
+ let s = Oc(t.state, e);
+ if (s && s instanceof ve) return br(t, s);
+ }
+ if (!i.parent.inlineContent) {
+ let s = e < 0 ? i : o,
+ l = r instanceof Rn ? Se.near(s, e) : Se.findFrom(s, e);
+ return l ? br(t, l) : !1;
+ }
+ return !1;
+}
+function Ap(t, e) {
+ if (!(t.state.selection instanceof Ce)) return !0;
+ let { $head: n, $anchor: r, empty: i } = t.state.selection;
+ if (!n.sameParent(r)) return !0;
+ if (!i) return !1;
+ if (t.endOfTextblock(e > 0 ? "forward" : "backward")) return !0;
+ let o = !n.textOffset && (e < 0 ? n.nodeBefore : n.nodeAfter);
+ if (o && !o.isText) {
+ let s = t.state.tr;
+ return (
+ e < 0
+ ? s.delete(n.pos - o.nodeSize, n.pos)
+ : s.delete(n.pos, n.pos + o.nodeSize),
+ t.dispatch(s),
+ !0
+ );
+ }
+ return !1;
+}
+function Tp(t, e, n) {
+ t.domObserver.stop(), (e.contentEditable = n), t.domObserver.start();
+}
+function EC(t) {
+ if (!Si || t.state.selection.$head.parentOffset > 0) return !1;
+ let { focusNode: e, focusOffset: n } = t.domSelectionRange();
+ if (
+ e &&
+ e.nodeType == 1 &&
+ n == 0 &&
+ e.firstChild &&
+ e.firstChild.contentEditable == "false"
+ ) {
+ let r = e.firstChild;
+ Tp(t, r, "true"), setTimeout(() => Tp(t, r, "false"), 20);
+ }
+ return !1;
+}
+function AC(t) {
+ let e = "";
+ return (
+ t.ctrlKey && (e += "c"),
+ t.metaKey && (e += "m"),
+ t.altKey && (e += "a"),
+ t.shiftKey && (e += "s"),
+ e
+ );
+}
+function TC(t, e) {
+ let n = e.keyCode,
+ r = AC(e);
+ if (n == 8 || (hn && n == 72 && r == "c")) return Ap(t, -1) || Ai(t, -1);
+ if ((n == 46 && !e.shiftKey) || (hn && n == 68 && r == "c"))
+ return Ap(t, 1) || Ai(t, 1);
+ if (n == 13 || n == 27) return !0;
+ if (n == 37 || (hn && n == 66 && r == "c")) {
+ let i =
+ n == 37 ? (Mp(t, t.state.selection.from) == "ltr" ? -1 : 1) : -1;
+ return _p(t, i, r) || Ai(t, i);
+ } else if (n == 39 || (hn && n == 70 && r == "c")) {
+ let i = n == 39 ? (Mp(t, t.state.selection.from) == "ltr" ? 1 : -1) : 1;
+ return _p(t, i, r) || Ai(t, i);
+ } else {
+ if (n == 38 || (hn && n == 80 && r == "c"))
+ return Ep(t, -1, r) || Ai(t, -1);
+ if (n == 40 || (hn && n == 78 && r == "c"))
+ return EC(t) || Ep(t, 1, r) || Ai(t, 1);
+ if (r == (hn ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
+ return !0;
+ }
+ return !1;
+}
+function w0(t, e) {
+ t.someProp("transformCopied", (p) => {
+ e = p(e, t);
+ });
+ let n = [],
+ { content: r, openStart: i, openEnd: o } = e;
+ for (
+ ;
+ i > 1 && o > 1 && r.childCount == 1 && r.firstChild.childCount == 1;
+
+ ) {
+ i--, o--;
+ let p = r.firstChild;
+ n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null),
+ (r = p.content);
+ }
+ let s = t.someProp("clipboardSerializer") || ri.fromSchema(t.state.schema),
+ l = M0(),
+ a = l.createElement("div");
+ a.appendChild(s.serializeFragment(r, { document: l }));
+ let u = a.firstChild,
+ c,
+ f = 0;
+ for (; u && u.nodeType == 1 && (c = _0[u.nodeName.toLowerCase()]); ) {
+ for (let p = c.length - 1; p >= 0; p--) {
+ let g = l.createElement(c[p]);
+ for (; a.firstChild; ) g.appendChild(a.firstChild);
+ a.appendChild(g), f++;
+ }
+ u = a.firstChild;
+ }
+ u &&
+ u.nodeType == 1 &&
+ u.setAttribute(
+ "data-pm-slice",
+ `${i} ${o}${f ? ` -${f}` : ""} ${JSON.stringify(n)}`
+ );
+ let h =
+ t.someProp("clipboardTextSerializer", (p) => p(e, t)) ||
+ e.content.textBetween(
+ 0,
+ e.content.size,
+ `
+
+`
+ );
+ return { dom: a, text: h };
+}
+function x0(t, e, n, r, i) {
+ let o = i.parent.type.spec.code,
+ s,
+ l;
+ if (!n && !e) return null;
+ let a = e && (r || o || !n);
+ if (a) {
+ if (
+ (t.someProp("transformPastedText", (h) => {
+ e = h(e, o || r, t);
+ }),
+ o)
+ )
+ return e
+ ? new ie(
+ Y.from(
+ t.state.schema.text(
+ e.replace(
+ /\r\n?/g,
+ `
+`
+ )
+ )
+ ),
+ 0,
+ 0
+ )
+ : ie.empty;
+ let f = t.someProp("clipboardTextParser", (h) => h(e, i, r, t));
+ if (f) l = f;
+ else {
+ let h = i.marks(),
+ { schema: p } = t.state,
+ g = ri.fromSchema(p);
+ (s = document.createElement("div")),
+ e.split(/(?:\r\n?|\n)+/).forEach((v) => {
+ let b = s.appendChild(document.createElement("p"));
+ v && b.appendChild(g.serializeNode(p.text(v, h)));
+ });
+ }
+ } else
+ t.someProp("transformPastedHTML", (f) => {
+ n = f(n, t);
+ }),
+ (s = PC(n)),
+ of && NC(s);
+ let u = s && s.querySelector("[data-pm-slice]"),
+ c =
+ u &&
+ /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(
+ u.getAttribute("data-pm-slice") || ""
+ );
+ if (c && c[3])
+ for (let f = +c[3]; f > 0; f--) {
+ let h = s.firstChild;
+ for (; h && h.nodeType != 1; ) h = h.nextSibling;
+ if (!h) break;
+ s = h;
+ }
+ if (
+ (l ||
+ (l = (
+ t.someProp("clipboardParser") ||
+ t.someProp("domParser") ||
+ ts.fromSchema(t.state.schema)
+ ).parseSlice(s, {
+ preserveWhitespace: !!(a || c),
+ context: i,
+ ruleFromNode(h) {
+ return h.nodeName == "BR" &&
+ !h.nextSibling &&
+ h.parentNode &&
+ !OC.test(h.parentNode.nodeName)
+ ? { ignore: !0 }
+ : null;
+ },
+ })),
+ c)
+ )
+ l = jC(Op(l, +c[1], +c[2]), c[4]);
+ else if (
+ ((l = ie.maxOpen(RC(l.content, i), !0)), l.openStart || l.openEnd)
+ ) {
+ let f = 0,
+ h = 0;
+ for (
+ let p = l.content.firstChild;
+ f < l.openStart && !p.type.spec.isolating;
+ f++, p = p.firstChild
+ );
+ for (
+ let p = l.content.lastChild;
+ h < l.openEnd && !p.type.spec.isolating;
+ h++, p = p.lastChild
+ );
+ l = Op(l, f, h);
+ }
+ return (
+ t.someProp("transformPasted", (f) => {
+ l = f(l, t);
+ }),
+ l
+ );
+}
+const OC =
+ /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
+function RC(t, e) {
+ if (t.childCount < 2) return t;
+ for (let n = e.depth; n >= 0; n--) {
+ let i = e.node(n).contentMatchAt(e.index(n)),
+ o,
+ s = [];
+ if (
+ (t.forEach((l) => {
+ if (!s) return;
+ let a = i.findWrapping(l.type),
+ u;
+ if (!a) return (s = null);
+ if (
+ (u =
+ s.length && o.length && C0(a, o, l, s[s.length - 1], 0))
+ )
+ s[s.length - 1] = u;
+ else {
+ s.length &&
+ (s[s.length - 1] = S0(s[s.length - 1], o.length));
+ let c = k0(l, a);
+ s.push(c), (i = i.matchType(c.type)), (o = a);
+ }
+ }),
+ s)
+ )
+ return Y.from(s);
+ }
+ return t;
+}
+function k0(t, e, n = 0) {
+ for (let r = e.length - 1; r >= n; r--) t = e[r].create(null, Y.from(t));
+ return t;
+}
+function C0(t, e, n, r, i) {
+ if (i < t.length && i < e.length && t[i] == e[i]) {
+ let o = C0(t, e, n, r.lastChild, i + 1);
+ if (o) return r.copy(r.content.replaceChild(r.childCount - 1, o));
+ if (
+ r
+ .contentMatchAt(r.childCount)
+ .matchType(i == t.length - 1 ? n.type : t[i + 1])
+ )
+ return r.copy(r.content.append(Y.from(k0(n, t, i + 1))));
+ }
+}
+function S0(t, e) {
+ if (e == 0) return t;
+ let n = t.content.replaceChild(t.childCount - 1, S0(t.lastChild, e - 1)),
+ r = t.contentMatchAt(t.childCount).fillBefore(Y.empty, !0);
+ return t.copy(n.append(r));
+}
+function Pc(t, e, n, r, i, o) {
+ let s = e < 0 ? t.firstChild : t.lastChild,
+ l = s.content;
+ return (
+ t.childCount > 1 && (o = 0),
+ i < r - 1 && (l = Pc(l, e, n, r, i + 1, o)),
+ i >= n &&
+ (l =
+ e < 0
+ ? s
+ .contentMatchAt(0)
+ .fillBefore(l, o <= i)
+ .append(l)
+ : l.append(
+ s
+ .contentMatchAt(s.childCount)
+ .fillBefore(Y.empty, !0)
+ )),
+ t.replaceChild(e < 0 ? 0 : t.childCount - 1, s.copy(l))
+ );
+}
+function Op(t, e, n) {
+ return (
+ e < t.openStart &&
+ (t = new ie(
+ Pc(t.content, -1, e, t.openStart, 0, t.openEnd),
+ e,
+ t.openEnd
+ )),
+ n < t.openEnd &&
+ (t = new ie(Pc(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)),
+ t
+ );
+}
+const _0 = {
+ thead: ["table"],
+ tbody: ["table"],
+ tfoot: ["table"],
+ caption: ["table"],
+ colgroup: ["table"],
+ col: ["table", "colgroup"],
+ tr: ["table", "tbody"],
+ td: ["table", "tbody", "tr"],
+ th: ["table", "tbody", "tr"],
+};
+let Rp = null;
+function M0() {
+ return Rp || (Rp = document.implementation.createHTMLDocument("title"));
+}
+function PC(t) {
+ let e = /^(\s*]*>)*/.exec(t);
+ e && (t = t.slice(e[0].length));
+ let n = M0().createElement("div"),
+ r = /<([a-z][^>\s]+)/i.exec(t),
+ i;
+ if (
+ ((i = r && _0[r[1].toLowerCase()]) &&
+ (t =
+ i.map((o) => "<" + o + ">").join("") +
+ t +
+ i
+ .map((o) => "" + o + ">")
+ .reverse()
+ .join("")),
+ (n.innerHTML = t),
+ i)
+ )
+ for (let o = 0; o < i.length; o++) n = n.querySelector(i[o]) || n;
+ return n;
+}
+function NC(t) {
+ let e = t.querySelectorAll(
+ Ci ? "span:not([class]):not([style])" : "span.Apple-converted-space"
+ );
+ for (let n = 0; n < e.length; n++) {
+ let r = e[n];
+ r.childNodes.length == 1 &&
+ r.textContent == "\xA0" &&
+ r.parentNode &&
+ r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), r);
+ }
+}
+function jC(t, e) {
+ if (!t.size) return t;
+ let n = t.content.firstChild.type.schema,
+ r;
+ try {
+ r = JSON.parse(e);
+ } catch (l) {
+ return t;
+ }
+ let { content: i, openStart: o, openEnd: s } = t;
+ for (let l = r.length - 2; l >= 0; l -= 2) {
+ let a = n.nodes[r[l]];
+ if (!a || a.hasRequiredAttrs()) break;
+ (i = Y.from(a.create(r[l + 1], i))), o++, s++;
+ }
+ return new ie(i, o, s);
+}
+const jn = {},
+ an = {};
+function Ar(t, e) {
+ (t.input.lastSelectionOrigin = e), (t.input.lastSelectionTime = Date.now());
+}
+an.keydown = (t, e) => {
+ let n = e;
+ if (
+ ((t.input.shiftKey = n.keyCode == 16 || n.shiftKey),
+ !A0(t, n) &&
+ ((t.input.lastKeyCode = n.keyCode),
+ (t.input.lastKeyCodeTime = Date.now()),
+ !(ws && Ci && n.keyCode == 13)))
+ )
+ if (
+ (n.keyCode != 229 && t.domObserver.forceFlush(),
+ rf && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey)
+ ) {
+ let r = Date.now();
+ (t.input.lastIOSEnter = r),
+ (t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
+ t.input.lastIOSEnter == r &&
+ (t.someProp("handleKeyDown", (i) =>
+ i(t, p0(13, "Enter"))
+ ),
+ (t.input.lastIOSEnter = 0));
+ }, 200));
+ } else
+ t.someProp("handleKeyDown", (r) => r(t, n)) || TC(t, n)
+ ? n.preventDefault()
+ : Ar(t, "key");
+};
+an.keyup = (t, e) => {
+ e.keyCode == 16 && (t.input.shiftKey = !1);
+};
+an.keypress = (t, e) => {
+ let n = e;
+ if (
+ A0(t, n) ||
+ !n.charCode ||
+ (n.ctrlKey && !n.altKey) ||
+ (hn && n.metaKey)
+ )
+ return;
+ if (t.someProp("handleKeyPress", (i) => i(t, n))) {
+ n.preventDefault();
+ return;
+ }
+ let r = t.state.selection;
+ if (!(r instanceof Ce) || !r.$from.sameParent(r.$to)) {
+ let i = String.fromCharCode(n.charCode);
+ !/[\r\n]/.test(i) &&
+ !t.someProp("handleTextInput", (o) =>
+ o(t, r.$from.pos, r.$to.pos, i)
+ ) &&
+ t.dispatch(t.state.tr.insertText(i).scrollIntoView()),
+ n.preventDefault();
+ }
+};
+function Wa(t) {
+ return { left: t.clientX, top: t.clientY };
+}
+function LC(t, e) {
+ let n = e.x - t.clientX,
+ r = e.y - t.clientY;
+ return n * n + r * r < 100;
+}
+function lf(t, e, n, r, i) {
+ if (r == -1) return !1;
+ let o = t.state.doc.resolve(r);
+ for (let s = o.depth + 1; s > 0; s--)
+ if (
+ t.someProp(e, (l) =>
+ s > o.depth
+ ? l(t, n, o.nodeAfter, o.before(s), i, !0)
+ : l(t, n, o.node(s), o.before(s), i, !1)
+ )
+ )
+ return !0;
+ return !1;
+}
+function Fi(t, e, n) {
+ t.focused || t.focus();
+ let r = t.state.tr.setSelection(e);
+ n == "pointer" && r.setMeta("pointer", !0), t.dispatch(r);
+}
+function DC(t, e) {
+ if (e == -1) return !1;
+ let n = t.state.doc.resolve(e),
+ r = n.nodeAfter;
+ return r && r.isAtom && ve.isSelectable(r)
+ ? (Fi(t, new ve(n), "pointer"), !0)
+ : !1;
+}
+function IC(t, e) {
+ if (e == -1) return !1;
+ let n = t.state.selection,
+ r,
+ i;
+ n instanceof ve && (r = n.node);
+ let o = t.state.doc.resolve(e);
+ for (let s = o.depth + 1; s > 0; s--) {
+ let l = s > o.depth ? o.nodeAfter : o.node(s);
+ if (ve.isSelectable(l)) {
+ r &&
+ n.$from.depth > 0 &&
+ s >= n.$from.depth &&
+ o.before(n.$from.depth + 1) == n.$from.pos
+ ? (i = o.before(n.$from.depth))
+ : (i = o.before(s));
+ break;
+ }
+ }
+ return i != null ? (Fi(t, ve.create(t.state.doc, i), "pointer"), !0) : !1;
+}
+function BC(t, e, n, r, i) {
+ return (
+ lf(t, "handleClickOn", e, n, r) ||
+ t.someProp("handleClick", (o) => o(t, e, r)) ||
+ (i ? IC(t, n) : DC(t, n))
+ );
+}
+function $C(t, e, n, r) {
+ return (
+ lf(t, "handleDoubleClickOn", e, n, r) ||
+ t.someProp("handleDoubleClick", (i) => i(t, e, r))
+ );
+}
+function zC(t, e, n, r) {
+ return (
+ lf(t, "handleTripleClickOn", e, n, r) ||
+ t.someProp("handleTripleClick", (i) => i(t, e, r)) ||
+ HC(t, n, r)
+ );
+}
+function HC(t, e, n) {
+ if (n.button != 0) return !1;
+ let r = t.state.doc;
+ if (e == -1)
+ return r.inlineContent
+ ? (Fi(t, Ce.create(r, 0, r.content.size), "pointer"), !0)
+ : !1;
+ let i = r.resolve(e);
+ for (let o = i.depth + 1; o > 0; o--) {
+ let s = o > i.depth ? i.nodeAfter : i.node(o),
+ l = i.before(o);
+ if (s.inlineContent)
+ Fi(t, Ce.create(r, l + 1, l + 1 + s.content.size), "pointer");
+ else if (ve.isSelectable(s)) Fi(t, ve.create(r, l), "pointer");
+ else continue;
+ return !0;
+ }
+}
+function af(t) {
+ return Ll(t);
+}
+const E0 = hn ? "metaKey" : "ctrlKey";
+jn.mousedown = (t, e) => {
+ let n = e;
+ t.input.shiftKey = n.shiftKey;
+ let r = af(t),
+ i = Date.now(),
+ o = "singleClick";
+ i - t.input.lastClick.time < 500 &&
+ LC(n, t.input.lastClick) &&
+ !n[E0] &&
+ (t.input.lastClick.type == "singleClick"
+ ? (o = "doubleClick")
+ : t.input.lastClick.type == "doubleClick" && (o = "tripleClick")),
+ (t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: o });
+ let s = t.posAtCoords(Wa(n));
+ !s ||
+ (o == "singleClick"
+ ? (t.input.mouseDown && t.input.mouseDown.done(),
+ (t.input.mouseDown = new FC(t, s, n, !!r)))
+ : (o == "doubleClick" ? $C : zC)(t, s.pos, s.inside, n)
+ ? n.preventDefault()
+ : Ar(t, "pointer"));
+};
+class FC {
+ constructor(e, n, r, i) {
+ (this.view = e),
+ (this.pos = n),
+ (this.event = r),
+ (this.flushed = i),
+ (this.delayedSelectionSync = !1),
+ (this.mightDrag = null),
+ (this.startDoc = e.state.doc),
+ (this.selectNode = !!r[E0]),
+ (this.allowDefault = r.shiftKey);
+ let o, s;
+ if (n.inside > -1) (o = e.state.doc.nodeAt(n.inside)), (s = n.inside);
+ else {
+ let c = e.state.doc.resolve(n.pos);
+ (o = c.parent), (s = c.depth ? c.before() : 0);
+ }
+ const l = i ? null : r.target,
+ a = l ? e.docView.nearestDesc(l, !0) : null;
+ this.target = a ? a.dom : null;
+ let { selection: u } = e.state;
+ ((r.button == 0 &&
+ o.type.spec.draggable &&
+ o.type.spec.selectable !== !1) ||
+ (u instanceof ve && u.from <= s && u.to > s)) &&
+ (this.mightDrag = {
+ node: o,
+ pos: s,
+ addAttr: !!(this.target && !this.target.draggable),
+ setUneditable: !!(
+ this.target &&
+ Va &&
+ !this.target.hasAttribute("contentEditable")
+ ),
+ }),
+ this.target &&
+ this.mightDrag &&
+ (this.mightDrag.addAttr || this.mightDrag.setUneditable) &&
+ (this.view.domObserver.stop(),
+ this.mightDrag.addAttr && (this.target.draggable = !0),
+ this.mightDrag.setUneditable &&
+ setTimeout(() => {
+ this.view.input.mouseDown == this &&
+ this.target.setAttribute(
+ "contentEditable",
+ "false"
+ );
+ }, 20),
+ this.view.domObserver.start()),
+ e.root.addEventListener("mouseup", (this.up = this.up.bind(this))),
+ e.root.addEventListener(
+ "mousemove",
+ (this.move = this.move.bind(this))
+ ),
+ Ar(e, "pointer");
+ }
+ done() {
+ this.view.root.removeEventListener("mouseup", this.up),
+ this.view.root.removeEventListener("mousemove", this.move),
+ this.mightDrag &&
+ this.target &&
+ (this.view.domObserver.stop(),
+ this.mightDrag.addAttr &&
+ this.target.removeAttribute("draggable"),
+ this.mightDrag.setUneditable &&
+ this.target.removeAttribute("contentEditable"),
+ this.view.domObserver.start()),
+ this.delayedSelectionSync && setTimeout(() => sf(this.view)),
+ (this.view.input.mouseDown = null);
+ }
+ up(e) {
+ if ((this.done(), !this.view.dom.contains(e.target))) return;
+ let n = this.pos;
+ this.view.state.doc != this.startDoc &&
+ (n = this.view.posAtCoords(Wa(e))),
+ this.updateAllowDefault(e),
+ this.allowDefault || !n
+ ? Ar(this.view, "pointer")
+ : BC(this.view, n.pos, n.inside, e, this.selectNode)
+ ? e.preventDefault()
+ : e.button == 0 &&
+ (this.flushed ||
+ (Si && this.mightDrag && !this.mightDrag.node.isAtom) ||
+ (Ci &&
+ !this.view.state.selection.visible &&
+ Math.min(
+ Math.abs(
+ n.pos - this.view.state.selection.from
+ ),
+ Math.abs(n.pos - this.view.state.selection.to)
+ ) <= 2))
+ ? (Fi(
+ this.view,
+ Se.near(this.view.state.doc.resolve(n.pos)),
+ "pointer"
+ ),
+ e.preventDefault())
+ : Ar(this.view, "pointer");
+ }
+ move(e) {
+ this.updateAllowDefault(e),
+ Ar(this.view, "pointer"),
+ e.buttons == 0 && this.done();
+ }
+ updateAllowDefault(e) {
+ !this.allowDefault &&
+ (Math.abs(this.event.x - e.clientX) > 4 ||
+ Math.abs(this.event.y - e.clientY) > 4) &&
+ (this.allowDefault = !0);
+ }
+}
+jn.touchstart = (t) => {
+ (t.input.lastTouch = Date.now()), af(t), Ar(t, "pointer");
+};
+jn.touchmove = (t) => {
+ (t.input.lastTouch = Date.now()), Ar(t, "pointer");
+};
+jn.contextmenu = (t) => af(t);
+function A0(t, e) {
+ return t.composing
+ ? !0
+ : Si && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500
+ ? ((t.input.compositionEndedAt = -2e8), !0)
+ : !1;
+}
+const VC = ws ? 5e3 : -1;
+an.compositionstart = an.compositionupdate = (t) => {
+ if (!t.composing) {
+ t.domObserver.flush();
+ let { state: e } = t,
+ n = e.selection.$from;
+ if (
+ e.selection.empty &&
+ (e.storedMarks ||
+ (!n.textOffset &&
+ n.parentOffset &&
+ n.nodeBefore.marks.some(
+ (r) => r.type.spec.inclusive === !1
+ )))
+ )
+ (t.markCursor = t.state.storedMarks || n.marks()),
+ Ll(t, !0),
+ (t.markCursor = null);
+ else if (
+ (Ll(t),
+ Va &&
+ e.selection.empty &&
+ n.parentOffset &&
+ !n.textOffset &&
+ n.nodeBefore.marks.length)
+ ) {
+ let r = t.domSelectionRange();
+ for (
+ let i = r.focusNode, o = r.focusOffset;
+ i && i.nodeType == 1 && o != 0;
+
+ ) {
+ let s = o < 0 ? i.lastChild : i.childNodes[o - 1];
+ if (!s) break;
+ if (s.nodeType == 3) {
+ t.domSelection().collapse(s, s.nodeValue.length);
+ break;
+ } else (i = s), (o = -1);
+ }
+ }
+ t.input.composing = !0;
+ }
+ T0(t, VC);
+};
+an.compositionend = (t, e) => {
+ t.composing &&
+ ((t.input.composing = !1),
+ (t.input.compositionEndedAt = e.timeStamp),
+ (t.input.compositionPendingChanges = t.domObserver.pendingRecords()
+ .length
+ ? t.input.compositionID
+ : 0),
+ t.input.compositionPendingChanges &&
+ Promise.resolve().then(() => t.domObserver.flush()),
+ t.input.compositionID++,
+ T0(t, 20));
+};
+function T0(t, e) {
+ clearTimeout(t.input.composingTimeout),
+ e > -1 && (t.input.composingTimeout = setTimeout(() => Ll(t), e));
+}
+function WC(t) {
+ for (
+ t.composing &&
+ ((t.input.composing = !1), (t.input.compositionEndedAt = UC()));
+ t.input.compositionNodes.length > 0;
+
+ )
+ t.input.compositionNodes.pop().markParentsDirty();
+}
+function UC() {
+ let t = document.createEvent("Event");
+ return t.initEvent("event", !0, !0), t.timeStamp;
+}
+function Ll(t, e = !1) {
+ if (!(ws && t.domObserver.flushingSoon >= 0)) {
+ if (
+ (t.domObserver.forceFlush(),
+ WC(t),
+ e || (t.docView && t.docView.dirty))
+ ) {
+ let n = vC(t);
+ return (
+ n && !n.eq(t.state.selection)
+ ? t.dispatch(t.state.tr.setSelection(n))
+ : t.updateState(t.state),
+ !0
+ );
+ }
+ return !1;
+ }
+}
+function KC(t, e) {
+ if (!t.dom.parentNode) return;
+ let n = t.dom.parentNode.appendChild(document.createElement("div"));
+ n.appendChild(e),
+ (n.style.cssText = "position: fixed; left: -10000px; top: 10px");
+ let r = getSelection(),
+ i = document.createRange();
+ i.selectNodeContents(e),
+ t.dom.blur(),
+ r.removeAllRanges(),
+ r.addRange(i),
+ setTimeout(() => {
+ n.parentNode && n.parentNode.removeChild(n), t.focus();
+ }, 50);
+}
+const rs = (co && nf < 15) || (rf && yC < 604);
+jn.copy = an.cut = (t, e) => {
+ let n = e,
+ r = t.state.selection,
+ i = n.type == "cut";
+ if (r.empty) return;
+ let o = rs ? null : n.clipboardData,
+ s = r.content(),
+ { dom: l, text: a } = w0(t, s);
+ o
+ ? (n.preventDefault(),
+ o.clearData(),
+ o.setData("text/html", l.innerHTML),
+ o.setData("text/plain", a))
+ : KC(t, l),
+ i &&
+ t.dispatch(
+ t.state.tr
+ .deleteSelection()
+ .scrollIntoView()
+ .setMeta("uiEvent", "cut")
+ );
+};
+function qC(t) {
+ return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1
+ ? t.content.firstChild
+ : null;
+}
+function JC(t, e) {
+ if (!t.dom.parentNode) return;
+ let n = t.input.shiftKey || t.state.selection.$from.parent.type.spec.code,
+ r = t.dom.parentNode.appendChild(
+ document.createElement(n ? "textarea" : "div")
+ );
+ n || (r.contentEditable = "true"),
+ (r.style.cssText = "position: fixed; left: -10000px; top: 10px"),
+ r.focus();
+ let i = t.input.shiftKey && t.input.lastKeyCode != 45;
+ setTimeout(() => {
+ t.focus(),
+ r.parentNode && r.parentNode.removeChild(r),
+ n
+ ? Nc(t, r.value, null, i, e)
+ : Nc(t, r.textContent, r.innerHTML, i, e);
+ }, 50);
+}
+function Nc(t, e, n, r, i) {
+ let o = x0(t, e, n, r, t.state.selection.$from);
+ if (t.someProp("handlePaste", (a) => a(t, i, o || ie.empty))) return !0;
+ if (!o) return !1;
+ let s = qC(o),
+ l = s
+ ? t.state.tr.replaceSelectionWith(s, r)
+ : t.state.tr.replaceSelection(o);
+ return (
+ t.dispatch(
+ l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")
+ ),
+ !0
+ );
+}
+function O0(t) {
+ let e = t.getData("text/plain") || t.getData("Text");
+ if (e) return e;
+ let n = t.getData("text/uri-list");
+ return n ? n.replace(/\r?\n/g, " ") : "";
+}
+an.paste = (t, e) => {
+ let n = e;
+ if (t.composing && !ws) return;
+ let r = rs ? null : n.clipboardData,
+ i = t.input.shiftKey && t.input.lastKeyCode != 45;
+ r && Nc(t, O0(r), r.getData("text/html"), i, n)
+ ? n.preventDefault()
+ : JC(t, n);
+};
+class GC {
+ constructor(e, n, r) {
+ (this.slice = e), (this.move = n), (this.node = r);
+ }
+}
+const R0 = hn ? "altKey" : "ctrlKey";
+jn.dragstart = (t, e) => {
+ let n = e,
+ r = t.input.mouseDown;
+ if ((r && r.done(), !n.dataTransfer)) return;
+ let i = t.state.selection,
+ o = i.empty ? null : t.posAtCoords(Wa(n)),
+ s;
+ if (
+ !(o && o.pos >= i.from && o.pos <= (i instanceof ve ? i.to - 1 : i.to))
+ ) {
+ if (r && r.mightDrag) s = ve.create(t.state.doc, r.mightDrag.pos);
+ else if (n.target && n.target.nodeType == 1) {
+ let c = t.docView.nearestDesc(n.target, !0);
+ c &&
+ c.node.type.spec.draggable &&
+ c != t.docView &&
+ (s = ve.create(t.state.doc, c.posBefore));
+ }
+ }
+ let l = (s || t.state.selection).content(),
+ { dom: a, text: u } = w0(t, l);
+ n.dataTransfer.clearData(),
+ n.dataTransfer.setData(rs ? "Text" : "text/html", a.innerHTML),
+ (n.dataTransfer.effectAllowed = "copyMove"),
+ rs || n.dataTransfer.setData("text/plain", u),
+ (t.dragging = new GC(l, !n[R0], s));
+};
+jn.dragend = (t) => {
+ let e = t.dragging;
+ window.setTimeout(() => {
+ t.dragging == e && (t.dragging = null);
+ }, 50);
+};
+an.dragover = an.dragenter = (t, e) => e.preventDefault();
+an.drop = (t, e) => {
+ let n = e,
+ r = t.dragging;
+ if (((t.dragging = null), !n.dataTransfer)) return;
+ let i = t.posAtCoords(Wa(n));
+ if (!i) return;
+ let o = t.state.doc.resolve(i.pos),
+ s = r && r.slice;
+ s
+ ? t.someProp("transformPasted", (g) => {
+ s = g(s, t);
+ })
+ : (s = x0(
+ t,
+ O0(n.dataTransfer),
+ rs ? null : n.dataTransfer.getData("text/html"),
+ !1,
+ o
+ ));
+ let l = !!(r && !n[R0]);
+ if (t.someProp("handleDrop", (g) => g(t, n, s || ie.empty, l))) {
+ n.preventDefault();
+ return;
+ }
+ if (!s) return;
+ n.preventDefault();
+ let a = s ? r0(t.state.doc, o.pos, s) : o.pos;
+ a == null && (a = o.pos);
+ let u = t.state.tr;
+ if (l) {
+ let { node: g } = r;
+ g ? g.replace(u) : u.deleteSelection();
+ }
+ let c = u.mapping.map(a),
+ f = s.openStart == 0 && s.openEnd == 0 && s.content.childCount == 1,
+ h = u.doc;
+ if (
+ (f
+ ? u.replaceRangeWith(c, c, s.content.firstChild)
+ : u.replaceRange(c, c, s),
+ u.doc.eq(h))
+ )
+ return;
+ let p = u.doc.resolve(c);
+ if (
+ f &&
+ ve.isSelectable(s.content.firstChild) &&
+ p.nodeAfter &&
+ p.nodeAfter.sameMarkup(s.content.firstChild)
+ )
+ u.setSelection(new ve(p));
+ else {
+ let g = u.mapping.map(a);
+ u.mapping.maps[u.mapping.maps.length - 1].forEach(
+ (v, b, x, S) => (g = S)
+ ),
+ u.setSelection(v0(t, p, u.doc.resolve(g)));
+ }
+ t.focus(), t.dispatch(u.setMeta("uiEvent", "drop"));
+};
+jn.focus = (t) => {
+ (t.input.lastFocus = Date.now()),
+ t.focused ||
+ (t.domObserver.stop(),
+ t.dom.classList.add("ProseMirror-focused"),
+ t.domObserver.start(),
+ (t.focused = !0),
+ setTimeout(() => {
+ t.docView &&
+ t.hasFocus() &&
+ !t.domObserver.currentSelection.eq(t.domSelectionRange()) &&
+ sf(t);
+ }, 20));
+};
+jn.blur = (t, e) => {
+ let n = e;
+ t.focused &&
+ (t.domObserver.stop(),
+ t.dom.classList.remove("ProseMirror-focused"),
+ t.domObserver.start(),
+ n.relatedTarget &&
+ t.dom.contains(n.relatedTarget) &&
+ t.domObserver.currentSelection.clear(),
+ (t.focused = !1));
+};
+jn.beforeinput = (t, e) => {
+ if (Ci && ws && e.inputType == "deleteContentBackward") {
+ t.domObserver.flushSoon();
+ let { domChangeCount: r } = t.input;
+ setTimeout(() => {
+ if (
+ t.input.domChangeCount != r ||
+ (t.dom.blur(),
+ t.focus(),
+ t.someProp("handleKeyDown", (o) => o(t, p0(8, "Backspace"))))
+ )
+ return;
+ let { $cursor: i } = t.state.selection;
+ i &&
+ i.pos > 0 &&
+ t.dispatch(
+ t.state.tr.delete(i.pos - 1, i.pos).scrollIntoView()
+ );
+ }, 50);
+ }
+};
+for (let t in an) jn[t] = an[t];
+function is(t, e) {
+ if (t == e) return !0;
+ for (let n in t) if (t[n] !== e[n]) return !1;
+ for (let n in e) if (!(n in t)) return !1;
+ return !0;
+}
+class Dl {
+ constructor(e, n) {
+ (this.toDOM = e),
+ (this.spec = n || fi),
+ (this.side = this.spec.side || 0);
+ }
+ map(e, n, r, i) {
+ let { pos: o, deleted: s } = e.mapResult(
+ n.from + i,
+ this.side < 0 ? -1 : 1
+ );
+ return s ? null : new Xt(o - r, o - r, this);
+ }
+ valid() {
+ return !0;
+ }
+ eq(e) {
+ return (
+ this == e ||
+ (e instanceof Dl &&
+ ((this.spec.key && this.spec.key == e.spec.key) ||
+ (this.toDOM == e.toDOM && is(this.spec, e.spec))))
+ );
+ }
+ destroy(e) {
+ this.spec.destroy && this.spec.destroy(e);
+ }
+}
+class Pr {
+ constructor(e, n) {
+ (this.attrs = e), (this.spec = n || fi);
+ }
+ map(e, n, r, i) {
+ let o = e.map(n.from + i, this.spec.inclusiveStart ? -1 : 1) - r,
+ s = e.map(n.to + i, this.spec.inclusiveEnd ? 1 : -1) - r;
+ return o >= s ? null : new Xt(o, s, this);
+ }
+ valid(e, n) {
+ return n.from < n.to;
+ }
+ eq(e) {
+ return (
+ this == e ||
+ (e instanceof Pr &&
+ is(this.attrs, e.attrs) &&
+ is(this.spec, e.spec))
+ );
+ }
+ static is(e) {
+ return e.type instanceof Pr;
+ }
+ destroy() {}
+}
+class uf {
+ constructor(e, n) {
+ (this.attrs = e), (this.spec = n || fi);
+ }
+ map(e, n, r, i) {
+ let o = e.mapResult(n.from + i, 1);
+ if (o.deleted) return null;
+ let s = e.mapResult(n.to + i, -1);
+ return s.deleted || s.pos <= o.pos
+ ? null
+ : new Xt(o.pos - r, s.pos - r, this);
+ }
+ valid(e, n) {
+ let { index: r, offset: i } = e.content.findIndex(n.from),
+ o;
+ return (
+ i == n.from && !(o = e.child(r)).isText && i + o.nodeSize == n.to
+ );
+ }
+ eq(e) {
+ return (
+ this == e ||
+ (e instanceof uf &&
+ is(this.attrs, e.attrs) &&
+ is(this.spec, e.spec))
+ );
+ }
+ destroy() {}
+}
+class Xt {
+ constructor(e, n, r) {
+ (this.from = e), (this.to = n), (this.type = r);
+ }
+ copy(e, n) {
+ return new Xt(e, n, this.type);
+ }
+ eq(e, n = 0) {
+ return (
+ this.type.eq(e.type) &&
+ this.from + n == e.from &&
+ this.to + n == e.to
+ );
+ }
+ map(e, n, r) {
+ return this.type.map(e, this, n, r);
+ }
+ static widget(e, n, r) {
+ return new Xt(e, e, new Dl(n, r));
+ }
+ static inline(e, n, r, i) {
+ return new Xt(e, n, new Pr(r, i));
+ }
+ static node(e, n, r, i) {
+ return new Xt(e, n, new uf(r, i));
+ }
+ get spec() {
+ return this.type.spec;
+ }
+ get inline() {
+ return this.type instanceof Pr;
+ }
+ get widget() {
+ return this.type instanceof Dl;
+ }
+}
+const Pi = [],
+ fi = {};
+class st {
+ constructor(e, n) {
+ (this.local = e.length ? e : Pi), (this.children = n.length ? n : Pi);
+ }
+ static create(e, n) {
+ return n.length ? Il(n, e, 0, fi) : Jt;
+ }
+ find(e, n, r) {
+ let i = [];
+ return (
+ this.findInner(e == null ? 0 : e, n == null ? 1e9 : n, i, 0, r), i
+ );
+ }
+ findInner(e, n, r, i, o) {
+ for (let s = 0; s < this.local.length; s++) {
+ let l = this.local[s];
+ l.from <= n &&
+ l.to >= e &&
+ (!o || o(l.spec)) &&
+ r.push(l.copy(l.from + i, l.to + i));
+ }
+ for (let s = 0; s < this.children.length; s += 3)
+ if (this.children[s] < n && this.children[s + 1] > e) {
+ let l = this.children[s] + 1;
+ this.children[s + 2].findInner(e - l, n - l, r, i + l, o);
+ }
+ }
+ map(e, n, r) {
+ return this == Jt || e.maps.length == 0
+ ? this
+ : this.mapInner(e, n, 0, 0, r || fi);
+ }
+ mapInner(e, n, r, i, o) {
+ let s;
+ for (let l = 0; l < this.local.length; l++) {
+ let a = this.local[l].map(e, r, i);
+ a && a.type.valid(n, a)
+ ? (s || (s = [])).push(a)
+ : o.onRemove && o.onRemove(this.local[l].spec);
+ }
+ return this.children.length
+ ? YC(this.children, s || [], e, n, r, i, o)
+ : s
+ ? new st(s.sort(hi), Pi)
+ : Jt;
+ }
+ add(e, n) {
+ return n.length
+ ? this == Jt
+ ? st.create(e, n)
+ : this.addInner(e, n, 0)
+ : this;
+ }
+ addInner(e, n, r) {
+ let i,
+ o = 0;
+ e.forEach((l, a) => {
+ let u = a + r,
+ c;
+ if (!!(c = N0(n, l, u))) {
+ for (
+ i || (i = this.children.slice());
+ o < i.length && i[o] < a;
+
+ )
+ o += 3;
+ i[o] == a
+ ? (i[o + 2] = i[o + 2].addInner(l, c, u + 1))
+ : i.splice(o, 0, a, a + l.nodeSize, Il(c, l, u + 1, fi)),
+ (o += 3);
+ }
+ });
+ let s = P0(o ? j0(n) : n, -r);
+ for (let l = 0; l < s.length; l++)
+ s[l].type.valid(e, s[l]) || s.splice(l--, 1);
+ return new st(
+ s.length ? this.local.concat(s).sort(hi) : this.local,
+ i || this.children
+ );
+ }
+ remove(e) {
+ return e.length == 0 || this == Jt ? this : this.removeInner(e, 0);
+ }
+ removeInner(e, n) {
+ let r = this.children,
+ i = this.local;
+ for (let o = 0; o < r.length; o += 3) {
+ let s,
+ l = r[o] + n,
+ a = r[o + 1] + n;
+ for (let c = 0, f; c < e.length; c++)
+ (f = e[c]) &&
+ f.from > l &&
+ f.to < a &&
+ ((e[c] = null), (s || (s = [])).push(f));
+ if (!s) continue;
+ r == this.children && (r = this.children.slice());
+ let u = r[o + 2].removeInner(s, l + 1);
+ u != Jt ? (r[o + 2] = u) : (r.splice(o, 3), (o -= 3));
+ }
+ if (i.length) {
+ for (let o = 0, s; o < e.length; o++)
+ if ((s = e[o]))
+ for (let l = 0; l < i.length; l++)
+ i[l].eq(s, n) &&
+ (i == this.local && (i = this.local.slice()),
+ i.splice(l--, 1));
+ }
+ return r == this.children && i == this.local
+ ? this
+ : i.length || r.length
+ ? new st(i, r)
+ : Jt;
+ }
+ forChild(e, n) {
+ if (this == Jt) return this;
+ if (n.isLeaf) return st.empty;
+ let r, i;
+ for (let l = 0; l < this.children.length; l += 3)
+ if (this.children[l] >= e) {
+ this.children[l] == e && (r = this.children[l + 2]);
+ break;
+ }
+ let o = e + 1,
+ s = o + n.content.size;
+ for (let l = 0; l < this.local.length; l++) {
+ let a = this.local[l];
+ if (a.from < s && a.to > o && a.type instanceof Pr) {
+ let u = Math.max(o, a.from) - o,
+ c = Math.min(s, a.to) - o;
+ u < c && (i || (i = [])).push(a.copy(u, c));
+ }
+ }
+ if (i) {
+ let l = new st(i.sort(hi), Pi);
+ return r ? new ei([l, r]) : l;
+ }
+ return r || Jt;
+ }
+ eq(e) {
+ if (this == e) return !0;
+ if (
+ !(e instanceof st) ||
+ this.local.length != e.local.length ||
+ this.children.length != e.children.length
+ )
+ return !1;
+ for (let n = 0; n < this.local.length; n++)
+ if (!this.local[n].eq(e.local[n])) return !1;
+ for (let n = 0; n < this.children.length; n += 3)
+ if (
+ this.children[n] != e.children[n] ||
+ this.children[n + 1] != e.children[n + 1] ||
+ !this.children[n + 2].eq(e.children[n + 2])
+ )
+ return !1;
+ return !0;
+ }
+ locals(e) {
+ return cf(this.localsInner(e));
+ }
+ localsInner(e) {
+ if (this == Jt) return Pi;
+ if (e.inlineContent || !this.local.some(Pr.is)) return this.local;
+ let n = [];
+ for (let r = 0; r < this.local.length; r++)
+ this.local[r].type instanceof Pr || n.push(this.local[r]);
+ return n;
+ }
+}
+st.empty = new st([], []);
+st.removeOverlap = cf;
+const Jt = st.empty;
+class ei {
+ constructor(e) {
+ this.members = e;
+ }
+ map(e, n) {
+ const r = this.members.map((i) => i.map(e, n, fi));
+ return ei.from(r);
+ }
+ forChild(e, n) {
+ if (n.isLeaf) return st.empty;
+ let r = [];
+ for (let i = 0; i < this.members.length; i++) {
+ let o = this.members[i].forChild(e, n);
+ o != Jt &&
+ (o instanceof ei ? (r = r.concat(o.members)) : r.push(o));
+ }
+ return ei.from(r);
+ }
+ eq(e) {
+ if (!(e instanceof ei) || e.members.length != this.members.length)
+ return !1;
+ for (let n = 0; n < this.members.length; n++)
+ if (!this.members[n].eq(e.members[n])) return !1;
+ return !0;
+ }
+ locals(e) {
+ let n,
+ r = !0;
+ for (let i = 0; i < this.members.length; i++) {
+ let o = this.members[i].localsInner(e);
+ if (!!o.length)
+ if (!n) n = o;
+ else {
+ r && ((n = n.slice()), (r = !1));
+ for (let s = 0; s < o.length; s++) n.push(o[s]);
+ }
+ }
+ return n ? cf(r ? n : n.sort(hi)) : Pi;
+ }
+ static from(e) {
+ switch (e.length) {
+ case 0:
+ return Jt;
+ case 1:
+ return e[0];
+ default:
+ return new ei(
+ e.every((n) => n instanceof st)
+ ? e
+ : e.reduce(
+ (n, r) =>
+ n.concat(r instanceof st ? r : r.members),
+ []
+ )
+ );
+ }
+ }
+}
+function YC(t, e, n, r, i, o, s) {
+ let l = t.slice();
+ for (let u = 0, c = o; u < n.maps.length; u++) {
+ let f = 0;
+ n.maps[u].forEach((h, p, g, v) => {
+ let b = v - g - (p - h);
+ for (let x = 0; x < l.length; x += 3) {
+ let S = l[x + 1];
+ if (S < 0 || h > S + c - f) continue;
+ let T = l[x] + c - f;
+ p >= T
+ ? (l[x + 1] = h <= T ? -2 : -1)
+ : g >= i && b && ((l[x] += b), (l[x + 1] += b));
+ }
+ f += b;
+ }),
+ (c = n.maps[u].map(c, -1));
+ }
+ let a = !1;
+ for (let u = 0; u < l.length; u += 3)
+ if (l[u + 1] < 0) {
+ if (l[u + 1] == -2) {
+ (a = !0), (l[u + 1] = -1);
+ continue;
+ }
+ let c = n.map(t[u] + o),
+ f = c - i;
+ if (f < 0 || f >= r.content.size) {
+ a = !0;
+ continue;
+ }
+ let h = n.map(t[u + 1] + o, -1),
+ p = h - i,
+ { index: g, offset: v } = r.content.findIndex(f),
+ b = r.maybeChild(g);
+ if (b && v == f && v + b.nodeSize == p) {
+ let x = l[u + 2].mapInner(n, b, c + 1, t[u] + o + 1, s);
+ x != Jt
+ ? ((l[u] = f), (l[u + 1] = p), (l[u + 2] = x))
+ : ((l[u + 1] = -2), (a = !0));
+ } else a = !0;
+ }
+ if (a) {
+ let u = QC(l, t, e, n, i, o, s),
+ c = Il(u, r, 0, s);
+ e = c.local;
+ for (let f = 0; f < l.length; f += 3)
+ l[f + 1] < 0 && (l.splice(f, 3), (f -= 3));
+ for (let f = 0, h = 0; f < c.children.length; f += 3) {
+ let p = c.children[f];
+ for (; h < l.length && l[h] < p; ) h += 3;
+ l.splice(h, 0, c.children[f], c.children[f + 1], c.children[f + 2]);
+ }
+ }
+ return new st(e.sort(hi), l);
+}
+function P0(t, e) {
+ if (!e || !t.length) return t;
+ let n = [];
+ for (let r = 0; r < t.length; r++) {
+ let i = t[r];
+ n.push(new Xt(i.from + e, i.to + e, i.type));
+ }
+ return n;
+}
+function QC(t, e, n, r, i, o, s) {
+ function l(a, u) {
+ for (let c = 0; c < a.local.length; c++) {
+ let f = a.local[c].map(r, i, u);
+ f ? n.push(f) : s.onRemove && s.onRemove(a.local[c].spec);
+ }
+ for (let c = 0; c < a.children.length; c += 3)
+ l(a.children[c + 2], a.children[c] + u + 1);
+ }
+ for (let a = 0; a < t.length; a += 3)
+ t[a + 1] == -1 && l(t[a + 2], e[a] + o + 1);
+ return n;
+}
+function N0(t, e, n) {
+ if (e.isLeaf) return null;
+ let r = n + e.nodeSize,
+ i = null;
+ for (let o = 0, s; o < t.length; o++)
+ (s = t[o]) &&
+ s.from > n &&
+ s.to < r &&
+ ((i || (i = [])).push(s), (t[o] = null));
+ return i;
+}
+function j0(t) {
+ let e = [];
+ for (let n = 0; n < t.length; n++) t[n] != null && e.push(t[n]);
+ return e;
+}
+function Il(t, e, n, r) {
+ let i = [],
+ o = !1;
+ e.forEach((l, a) => {
+ let u = N0(t, l, a + n);
+ if (u) {
+ o = !0;
+ let c = Il(u, l, n + a + 1, r);
+ c != Jt && i.push(a, a + l.nodeSize, c);
+ }
+ });
+ let s = P0(o ? j0(t) : t, -n).sort(hi);
+ for (let l = 0; l < s.length; l++)
+ s[l].type.valid(e, s[l]) ||
+ (r.onRemove && r.onRemove(s[l].spec), s.splice(l--, 1));
+ return s.length || i.length ? new st(s, i) : Jt;
+}
+function hi(t, e) {
+ return t.from - e.from || t.to - e.to;
+}
+function cf(t) {
+ let e = t;
+ for (let n = 0; n < e.length - 1; n++) {
+ let r = e[n];
+ if (r.from != r.to)
+ for (let i = n + 1; i < e.length; i++) {
+ let o = e[i];
+ if (o.from == r.from) {
+ o.to != r.to &&
+ (e == t && (e = t.slice()),
+ (e[i] = o.copy(o.from, r.to)),
+ Pp(e, i + 1, o.copy(r.to, o.to)));
+ continue;
+ } else {
+ o.from < r.to &&
+ (e == t && (e = t.slice()),
+ (e[n] = r.copy(r.from, o.from)),
+ Pp(e, i, r.copy(o.from, r.to)));
+ break;
+ }
+ }
+ }
+ return e;
+}
+function Pp(t, e, n) {
+ for (; e < t.length && hi(n, t[e]) > 0; ) e++;
+ t.splice(e, 0, n);
+}
+const xR = co && nf <= 11;
+var Lr = {
+ 8: "Backspace",
+ 9: "Tab",
+ 10: "Enter",
+ 12: "NumLock",
+ 13: "Enter",
+ 16: "Shift",
+ 17: "Control",
+ 18: "Alt",
+ 20: "CapsLock",
+ 27: "Escape",
+ 32: " ",
+ 33: "PageUp",
+ 34: "PageDown",
+ 35: "End",
+ 36: "Home",
+ 37: "ArrowLeft",
+ 38: "ArrowUp",
+ 39: "ArrowRight",
+ 40: "ArrowDown",
+ 44: "PrintScreen",
+ 45: "Insert",
+ 46: "Delete",
+ 59: ";",
+ 61: "=",
+ 91: "Meta",
+ 92: "Meta",
+ 106: "*",
+ 107: "+",
+ 108: ",",
+ 109: "-",
+ 110: ".",
+ 111: "/",
+ 144: "NumLock",
+ 145: "ScrollLock",
+ 160: "Shift",
+ 161: "Shift",
+ 162: "Control",
+ 163: "Control",
+ 164: "Alt",
+ 165: "Alt",
+ 173: "-",
+ 186: ";",
+ 187: "=",
+ 188: ",",
+ 189: "-",
+ 190: ".",
+ 191: "/",
+ 192: "`",
+ 219: "[",
+ 220: "\\",
+ 221: "]",
+ 222: "'",
+ },
+ Bl = {
+ 48: ")",
+ 49: "!",
+ 50: "@",
+ 51: "#",
+ 52: "$",
+ 53: "%",
+ 54: "^",
+ 55: "&",
+ 56: "*",
+ 57: "(",
+ 59: ":",
+ 61: "+",
+ 173: "_",
+ 186: ":",
+ 187: "+",
+ 188: "<",
+ 189: "_",
+ 190: ">",
+ 191: "?",
+ 192: "~",
+ 219: "{",
+ 220: "|",
+ 221: "}",
+ 222: '"',
+ },
+ XC = typeof navigator != "undefined" && /Mac/.test(navigator.platform),
+ ZC =
+ typeof navigator != "undefined" &&
+ /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(
+ navigator.userAgent
+ );
+for (var Lt = 0; Lt < 10; Lt++) Lr[48 + Lt] = Lr[96 + Lt] = String(Lt);
+for (var Lt = 1; Lt <= 24; Lt++) Lr[Lt + 111] = "F" + Lt;
+for (var Lt = 65; Lt <= 90; Lt++)
+ (Lr[Lt] = String.fromCharCode(Lt + 32)), (Bl[Lt] = String.fromCharCode(Lt));
+for (var Au in Lr) Bl.hasOwnProperty(Au) || (Bl[Au] = Lr[Au]);
+function eS(t) {
+ var e =
+ (XC && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey) ||
+ (ZC && t.shiftKey && t.key && t.key.length == 1) ||
+ t.key == "Unidentified",
+ n =
+ (!e && t.key) ||
+ (t.shiftKey ? Bl : Lr)[t.keyCode] ||
+ t.key ||
+ "Unidentified";
+ return (
+ n == "Esc" && (n = "Escape"),
+ n == "Del" && (n = "Delete"),
+ n == "Left" && (n = "ArrowLeft"),
+ n == "Up" && (n = "ArrowUp"),
+ n == "Right" && (n = "ArrowRight"),
+ n == "Down" && (n = "ArrowDown"),
+ n
+ );
+}
+const tS =
+ typeof navigator != "undefined"
+ ? /Mac|iP(hone|[oa]d)/.test(navigator.platform)
+ : !1;
+function nS(t) {
+ let e = t.split(/-(?!$)/),
+ n = e[e.length - 1];
+ n == "Space" && (n = " ");
+ let r, i, o, s;
+ for (let l = 0; l < e.length - 1; l++) {
+ let a = e[l];
+ if (/^(cmd|meta|m)$/i.test(a)) s = !0;
+ else if (/^a(lt)?$/i.test(a)) r = !0;
+ else if (/^(c|ctrl|control)$/i.test(a)) i = !0;
+ else if (/^s(hift)?$/i.test(a)) o = !0;
+ else if (/^mod$/i.test(a)) tS ? (s = !0) : (i = !0);
+ else throw new Error("Unrecognized modifier name: " + a);
+ }
+ return (
+ r && (n = "Alt-" + n),
+ i && (n = "Ctrl-" + n),
+ s && (n = "Meta-" + n),
+ o && (n = "Shift-" + n),
+ n
+ );
+}
+function rS(t) {
+ let e = Object.create(null);
+ for (let n in t) e[nS(n)] = t[n];
+ return e;
+}
+function Tu(t, e, n = !0) {
+ return (
+ e.altKey && (t = "Alt-" + t),
+ e.ctrlKey && (t = "Ctrl-" + t),
+ e.metaKey && (t = "Meta-" + t),
+ n && e.shiftKey && (t = "Shift-" + t),
+ t
+ );
+}
+function L0(t) {
+ let e = rS(t);
+ return function (n, r) {
+ let i = eS(r),
+ o,
+ s = e[Tu(i, r)];
+ if (s && s(n.state, n.dispatch, n)) return !0;
+ if (i.length == 1 && i != " ") {
+ if (r.shiftKey) {
+ let l = e[Tu(i, r, !1)];
+ if (l && l(n.state, n.dispatch, n)) return !0;
+ }
+ if (
+ (r.shiftKey ||
+ r.altKey ||
+ r.metaKey ||
+ i.charCodeAt(0) > 127) &&
+ (o = Lr[r.keyCode]) &&
+ o != i
+ ) {
+ let l = e[Tu(o, r)];
+ if (l && l(n.state, n.dispatch, n)) return !0;
+ }
+ }
+ return !1;
+ };
+}
+const iS = (t, e) =>
+ t.selection.empty
+ ? !1
+ : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
+function oS(t, e) {
+ let { $cursor: n } = t.selection;
+ return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0)
+ ? null
+ : n;
+}
+const sS = (t, e, n) => {
+ let r = oS(t, n);
+ if (!r) return !1;
+ let i = D0(r);
+ if (!i) {
+ let s = r.blockRange(),
+ l = s && uo(s);
+ return l == null ? !1 : (e && e(t.tr.lift(s, l).scrollIntoView()), !0);
+ }
+ let o = i.nodeBefore;
+ if (!o.type.spec.isolating && $0(t, i, e)) return !0;
+ if (r.parent.content.size == 0 && (no(o, "end") || ve.isSelectable(o))) {
+ let s = Zd(t.doc, r.before(), r.after(), ie.empty);
+ if (s && s.slice.size < s.to - s.from) {
+ if (e) {
+ let l = t.tr.step(s);
+ l.setSelection(
+ no(o, "end")
+ ? Se.findFrom(
+ l.doc.resolve(l.mapping.map(i.pos, -1)),
+ -1
+ )
+ : ve.create(l.doc, i.pos - o.nodeSize)
+ ),
+ e(l.scrollIntoView());
+ }
+ return !0;
+ }
+ }
+ return o.isAtom && i.depth == r.depth - 1
+ ? (e && e(t.tr.delete(i.pos - o.nodeSize, i.pos).scrollIntoView()), !0)
+ : !1;
+};
+function no(t, e, n = !1) {
+ for (let r = t; r; r = e == "start" ? r.firstChild : r.lastChild) {
+ if (r.isTextblock) return !0;
+ if (n && r.childCount != 1) return !1;
+ }
+ return !1;
+}
+const lS = (t, e, n) => {
+ let { $head: r, empty: i } = t.selection,
+ o = r;
+ if (!i) return !1;
+ if (r.parent.isTextblock) {
+ if (n ? !n.endOfTextblock("backward", t) : r.parentOffset > 0)
+ return !1;
+ o = D0(r);
+ }
+ let s = o && o.nodeBefore;
+ return !s || !ve.isSelectable(s)
+ ? !1
+ : (e &&
+ e(
+ t.tr
+ .setSelection(ve.create(t.doc, o.pos - s.nodeSize))
+ .scrollIntoView()
+ ),
+ !0);
+};
+function D0(t) {
+ if (!t.parent.type.spec.isolating)
+ for (let e = t.depth - 1; e >= 0; e--) {
+ if (t.index(e) > 0) return t.doc.resolve(t.before(e + 1));
+ if (t.node(e).type.spec.isolating) break;
+ }
+ return null;
+}
+function aS(t, e) {
+ let { $cursor: n } = t.selection;
+ return !n ||
+ (e
+ ? !e.endOfTextblock("forward", t)
+ : n.parentOffset < n.parent.content.size)
+ ? null
+ : n;
+}
+const uS = (t, e, n) => {
+ let r = aS(t, n);
+ if (!r) return !1;
+ let i = I0(r);
+ if (!i) return !1;
+ let o = i.nodeAfter;
+ if ($0(t, i, e)) return !0;
+ if (
+ r.parent.content.size == 0 &&
+ (no(o, "start") || ve.isSelectable(o))
+ ) {
+ let s = Zd(t.doc, r.before(), r.after(), ie.empty);
+ if (s && s.slice.size < s.to - s.from) {
+ if (e) {
+ let l = t.tr.step(s);
+ l.setSelection(
+ no(o, "start")
+ ? Se.findFrom(
+ l.doc.resolve(l.mapping.map(i.pos)),
+ 1
+ )
+ : ve.create(l.doc, l.mapping.map(i.pos))
+ ),
+ e(l.scrollIntoView());
+ }
+ return !0;
+ }
+ }
+ return o.isAtom && i.depth == r.depth - 1
+ ? (e && e(t.tr.delete(i.pos, i.pos + o.nodeSize).scrollIntoView()),
+ !0)
+ : !1;
+ },
+ cS = (t, e, n) => {
+ let { $head: r, empty: i } = t.selection,
+ o = r;
+ if (!i) return !1;
+ if (r.parent.isTextblock) {
+ if (
+ n
+ ? !n.endOfTextblock("forward", t)
+ : r.parentOffset < r.parent.content.size
+ )
+ return !1;
+ o = I0(r);
+ }
+ let s = o && o.nodeAfter;
+ return !s || !ve.isSelectable(s)
+ ? !1
+ : (e &&
+ e(
+ t.tr
+ .setSelection(ve.create(t.doc, o.pos))
+ .scrollIntoView()
+ ),
+ !0);
+ };
+function I0(t) {
+ if (!t.parent.type.spec.isolating)
+ for (let e = t.depth - 1; e >= 0; e--) {
+ let n = t.node(e);
+ if (t.index(e) + 1 < n.childCount)
+ return t.doc.resolve(t.after(e + 1));
+ if (n.type.spec.isolating) break;
+ }
+ return null;
+}
+const dS = (t, e) => {
+ let n = t.selection,
+ r = n instanceof ve,
+ i;
+ if (r) {
+ if (n.node.isTextblock || !$r(t.doc, n.from)) return !1;
+ i = n.from;
+ } else if (((i = Ha(t.doc, n.from, -1)), i == null)) return !1;
+ if (e) {
+ let o = t.tr.join(i);
+ r &&
+ o.setSelection(
+ ve.create(o.doc, i - t.doc.resolve(i).nodeBefore.nodeSize)
+ ),
+ e(o.scrollIntoView());
+ }
+ return !0;
+ },
+ fS = (t, e) => {
+ let n = t.selection,
+ r;
+ if (n instanceof ve) {
+ if (n.node.isTextblock || !$r(t.doc, n.to)) return !1;
+ r = n.to;
+ } else if (((r = Ha(t.doc, n.to, 1)), r == null)) return !1;
+ return e && e(t.tr.join(r).scrollIntoView()), !0;
+ },
+ hS = (t, e) => {
+ let { $from: n, $to: r } = t.selection,
+ i = n.blockRange(r),
+ o = i && uo(i);
+ return o == null ? !1 : (e && e(t.tr.lift(i, o).scrollIntoView()), !0);
+ },
+ pS = (t, e) => {
+ let { $head: n, $anchor: r } = t.selection;
+ return !n.parent.type.spec.code || !n.sameParent(r)
+ ? !1
+ : (e &&
+ e(
+ t.tr
+ .insertText(
+ `
+`
+ )
+ .scrollIntoView()
+ ),
+ !0);
+ };
+function B0(t) {
+ for (let e = 0; e < t.edgeCount; e++) {
+ let { type: n } = t.edge(e);
+ if (n.isTextblock && !n.hasRequiredAttrs()) return n;
+ }
+ return null;
+}
+const mS = (t, e) => {
+ let { $head: n, $anchor: r } = t.selection;
+ if (!n.parent.type.spec.code || !n.sameParent(r)) return !1;
+ let i = n.node(-1),
+ o = n.indexAfter(-1),
+ s = B0(i.contentMatchAt(o));
+ if (!s || !i.canReplaceWith(o, o, s)) return !1;
+ if (e) {
+ let l = n.after(),
+ a = t.tr.replaceWith(l, l, s.createAndFill());
+ a.setSelection(Se.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
+ }
+ return !0;
+ },
+ gS = (t, e) => {
+ let n = t.selection,
+ { $from: r, $to: i } = n;
+ if (n instanceof Rn || r.parent.inlineContent || i.parent.inlineContent)
+ return !1;
+ let o = B0(i.parent.contentMatchAt(i.indexAfter()));
+ if (!o || !o.isTextblock) return !1;
+ if (e) {
+ let s = (!r.parentOffset && i.index() < i.parent.childCount ? r : i)
+ .pos,
+ l = t.tr.insert(s, o.createAndFill());
+ l.setSelection(Ce.create(l.doc, s + 1)), e(l.scrollIntoView());
+ }
+ return !0;
+ },
+ yS = (t, e) => {
+ let { $cursor: n } = t.selection;
+ if (!n || n.parent.content.size) return !1;
+ if (n.depth > 1 && n.after() != n.end(-1)) {
+ let o = n.before();
+ if (zi(t.doc, o)) return e && e(t.tr.split(o).scrollIntoView()), !0;
+ }
+ let r = n.blockRange(),
+ i = r && uo(r);
+ return i == null ? !1 : (e && e(t.tr.lift(r, i).scrollIntoView()), !0);
+ },
+ vS = (t, e) => {
+ let { $from: n, to: r } = t.selection,
+ i,
+ o = n.sharedDepth(r);
+ return o == 0
+ ? !1
+ : ((i = n.before(o)),
+ e && e(t.tr.setSelection(ve.create(t.doc, i))),
+ !0);
+ };
+function bS(t, e, n) {
+ let r = e.nodeBefore,
+ i = e.nodeAfter,
+ o = e.index();
+ return !r || !i || !r.type.compatibleContent(i.type)
+ ? !1
+ : !r.content.size && e.parent.canReplace(o - 1, o)
+ ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0)
+ : !e.parent.canReplace(o, o + 1) || !(i.isTextblock || $r(t.doc, e.pos))
+ ? !1
+ : (n &&
+ n(
+ t.tr
+ .clearIncompatible(
+ e.pos,
+ r.type,
+ r.contentMatchAt(r.childCount)
+ )
+ .join(e.pos)
+ .scrollIntoView()
+ ),
+ !0);
+}
+function $0(t, e, n) {
+ let r = e.nodeBefore,
+ i = e.nodeAfter,
+ o,
+ s;
+ if (r.type.spec.isolating || i.type.spec.isolating) return !1;
+ if (bS(t, e, n)) return !0;
+ let l = e.parent.canReplace(e.index(), e.index() + 1);
+ if (
+ l &&
+ (o = (s = r.contentMatchAt(r.childCount)).findWrapping(i.type)) &&
+ s.matchType(o[0] || i.type).validEnd
+ ) {
+ if (n) {
+ let f = e.pos + i.nodeSize,
+ h = Y.empty;
+ for (let v = o.length - 1; v >= 0; v--)
+ h = Y.from(o[v].create(null, h));
+ h = Y.from(r.copy(h));
+ let p = t.tr.step(
+ new Pt(
+ e.pos - 1,
+ f,
+ e.pos,
+ f,
+ new ie(h, 1, 0),
+ o.length,
+ !0
+ )
+ ),
+ g = f + 2 * o.length;
+ $r(p.doc, g) && p.join(g), n(p.scrollIntoView());
+ }
+ return !0;
+ }
+ let a = Se.findFrom(e, 1),
+ u = a && a.$from.blockRange(a.$to),
+ c = u && uo(u);
+ if (c != null && c >= e.depth)
+ return n && n(t.tr.lift(u, c).scrollIntoView()), !0;
+ if (l && no(i, "start", !0) && no(r, "end")) {
+ let f = r,
+ h = [];
+ for (; h.push(f), !f.isTextblock; ) f = f.lastChild;
+ let p = i,
+ g = 1;
+ for (; !p.isTextblock; p = p.firstChild) g++;
+ if (f.canReplace(f.childCount, f.childCount, p.content)) {
+ if (n) {
+ let v = Y.empty;
+ for (let x = h.length - 1; x >= 0; x--)
+ v = Y.from(h[x].copy(v));
+ let b = t.tr.step(
+ new Pt(
+ e.pos - h.length,
+ e.pos + i.nodeSize,
+ e.pos + g,
+ e.pos + i.nodeSize - g,
+ new ie(v, h.length, 0),
+ 0,
+ !0
+ )
+ );
+ n(b.scrollIntoView());
+ }
+ return !0;
+ }
+ }
+ return !1;
+}
+function z0(t) {
+ return function (e, n) {
+ let r = e.selection,
+ i = t < 0 ? r.$from : r.$to,
+ o = i.depth;
+ for (; i.node(o).isInline; ) {
+ if (!o) return !1;
+ o--;
+ }
+ return i.node(o).isTextblock
+ ? (n &&
+ n(
+ e.tr.setSelection(
+ Ce.create(e.doc, t < 0 ? i.start(o) : i.end(o))
+ )
+ ),
+ !0)
+ : !1;
+ };
+}
+const wS = z0(-1),
+ xS = z0(1);
+function kS(t, e = null) {
+ return function (n, r) {
+ let { $from: i, $to: o } = n.selection,
+ s = i.blockRange(o),
+ l = s && Xd(s, t, e);
+ return l ? (r && r(n.tr.wrap(s, l).scrollIntoView()), !0) : !1;
+ };
+}
+function Np(t, e = null) {
+ return function (n, r) {
+ let i = !1;
+ for (let o = 0; o < n.selection.ranges.length && !i; o++) {
+ let {
+ $from: { pos: s },
+ $to: { pos: l },
+ } = n.selection.ranges[o];
+ n.doc.nodesBetween(s, l, (a, u) => {
+ if (i) return !1;
+ if (!(!a.isTextblock || a.hasMarkup(t, e)))
+ if (a.type == t) i = !0;
+ else {
+ let c = n.doc.resolve(u),
+ f = c.index();
+ i = c.parent.canReplaceWith(f, f + 1, t);
+ }
+ });
+ }
+ if (!i) return !1;
+ if (r) {
+ let o = n.tr;
+ for (let s = 0; s < n.selection.ranges.length; s++) {
+ let {
+ $from: { pos: l },
+ $to: { pos: a },
+ } = n.selection.ranges[s];
+ o.setBlockType(l, a, t, e);
+ }
+ r(o.scrollIntoView());
+ }
+ return !0;
+ };
+}
+typeof navigator != "undefined"
+ ? /Mac|iP(hone|[oa]d)/.test(navigator.platform)
+ : typeof os != "undefined" && os.platform && os.platform() == "darwin";
+function CS(t, e = null) {
+ return function (n, r) {
+ let { $from: i, $to: o } = n.selection,
+ s = i.blockRange(o),
+ l = !1,
+ a = s;
+ if (!s) return !1;
+ if (
+ s.depth >= 2 &&
+ i.node(s.depth - 1).type.compatibleContent(t) &&
+ s.startIndex == 0
+ ) {
+ if (i.index(s.depth - 1) == 0) return !1;
+ let c = n.doc.resolve(s.start - 2);
+ (a = new Tl(c, c, s.depth)),
+ s.endIndex < s.parent.childCount &&
+ (s = new Tl(i, n.doc.resolve(o.end(s.depth)), s.depth)),
+ (l = !0);
+ }
+ let u = Xd(a, t, e, s);
+ return u ? (r && r(SS(n.tr, s, u, l, t).scrollIntoView()), !0) : !1;
+ };
+}
+function SS(t, e, n, r, i) {
+ let o = Y.empty;
+ for (let c = n.length - 1; c >= 0; c--)
+ o = Y.from(n[c].type.create(n[c].attrs, o));
+ t.step(
+ new Pt(
+ e.start - (r ? 2 : 0),
+ e.end,
+ e.start,
+ e.end,
+ new ie(o, 0, 0),
+ n.length,
+ !0
+ )
+ );
+ let s = 0;
+ for (let c = 0; c < n.length; c++) n[c].type == i && (s = c + 1);
+ let l = n.length - s,
+ a = e.start + n.length - (r ? 2 : 0),
+ u = e.parent;
+ for (let c = e.startIndex, f = e.endIndex, h = !0; c < f; c++, h = !1)
+ !h && zi(t.doc, a, l) && (t.split(a, l), (a += 2 * l)),
+ (a += u.child(c).nodeSize);
+ return t;
+}
+function _S(t) {
+ return function (e, n) {
+ let { $from: r, $to: i } = e.selection,
+ o = r.blockRange(
+ i,
+ (s) => s.childCount > 0 && s.firstChild.type == t
+ );
+ return o
+ ? n
+ ? r.node(o.depth - 1).type == t
+ ? MS(e, n, t, o)
+ : ES(e, n, o)
+ : !0
+ : !1;
+ };
+}
+function MS(t, e, n, r) {
+ let i = t.tr,
+ o = r.end,
+ s = r.$to.end(r.depth);
+ o < s &&
+ (i.step(
+ new Pt(
+ o - 1,
+ s,
+ o,
+ s,
+ new ie(Y.from(n.create(null, r.parent.copy())), 1, 0),
+ 1,
+ !0
+ )
+ ),
+ (r = new Tl(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth)));
+ const l = uo(r);
+ if (l == null) return !1;
+ i.lift(r, l);
+ let a = i.mapping.map(o, -1) - 1;
+ return $r(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
+}
+function ES(t, e, n) {
+ let r = t.tr,
+ i = n.parent;
+ for (let p = n.end, g = n.endIndex - 1, v = n.startIndex; g > v; g--)
+ (p -= i.child(g).nodeSize), r.delete(p - 1, p + 1);
+ let o = r.doc.resolve(n.start),
+ s = o.nodeAfter;
+ if (r.mapping.map(n.end) != n.start + o.nodeAfter.nodeSize) return !1;
+ let l = n.startIndex == 0,
+ a = n.endIndex == i.childCount,
+ u = o.node(-1),
+ c = o.index(-1);
+ if (
+ !u.canReplace(
+ c + (l ? 0 : 1),
+ c + 1,
+ s.content.append(a ? Y.empty : Y.from(i))
+ )
+ )
+ return !1;
+ let f = o.pos,
+ h = f + s.nodeSize;
+ return (
+ r.step(
+ new Pt(
+ f - (l ? 1 : 0),
+ h + (a ? 1 : 0),
+ f + 1,
+ h - 1,
+ new ie(
+ (l ? Y.empty : Y.from(i.copy(Y.empty))).append(
+ a ? Y.empty : Y.from(i.copy(Y.empty))
+ ),
+ l ? 0 : 1,
+ a ? 0 : 1
+ ),
+ l ? 0 : 1
+ )
+ ),
+ e(r.scrollIntoView()),
+ !0
+ );
+}
+function AS(t) {
+ return function (e, n) {
+ let { $from: r, $to: i } = e.selection,
+ o = r.blockRange(
+ i,
+ (u) => u.childCount > 0 && u.firstChild.type == t
+ );
+ if (!o) return !1;
+ let s = o.startIndex;
+ if (s == 0) return !1;
+ let l = o.parent,
+ a = l.child(s - 1);
+ if (a.type != t) return !1;
+ if (n) {
+ let u = a.lastChild && a.lastChild.type == l.type,
+ c = Y.from(u ? t.create() : null),
+ f = new ie(
+ Y.from(t.create(null, Y.from(l.type.create(null, c)))),
+ u ? 3 : 1,
+ 0
+ ),
+ h = o.start,
+ p = o.end;
+ n(
+ e.tr
+ .step(new Pt(h - (u ? 3 : 1), p, h, p, f, 1, !0))
+ .scrollIntoView()
+ );
+ }
+ return !0;
+ };
+}
+function H0(t) {
+ const { state: e, transaction: n } = t;
+ let { selection: r } = n,
+ { doc: i } = n,
+ { storedMarks: o } = n;
+ return be(W({}, e), {
+ apply: e.apply.bind(e),
+ applyTransaction: e.applyTransaction.bind(e),
+ filterTransaction: e.filterTransaction,
+ plugins: e.plugins,
+ schema: e.schema,
+ reconfigure: e.reconfigure.bind(e),
+ toJSON: e.toJSON.bind(e),
+ get storedMarks() {
+ return o;
+ },
+ get selection() {
+ return r;
+ },
+ get doc() {
+ return i;
+ },
+ get tr() {
+ return (r = n.selection), (i = n.doc), (o = n.storedMarks), n;
+ },
+ });
+}
+class TS {
+ constructor(e) {
+ (this.editor = e.editor),
+ (this.rawCommands = this.editor.extensionManager.commands),
+ (this.customState = e.state);
+ }
+ get hasCustomState() {
+ return !!this.customState;
+ }
+ get state() {
+ return this.customState || this.editor.state;
+ }
+ get commands() {
+ const { rawCommands: e, editor: n, state: r } = this,
+ { view: i } = n,
+ { tr: o } = r,
+ s = this.buildProps(o);
+ return Object.fromEntries(
+ Object.entries(e).map(([l, a]) => [
+ l,
+ (...c) => {
+ const f = a(...c)(s);
+ return (
+ !o.getMeta("preventDispatch") &&
+ !this.hasCustomState &&
+ i.dispatch(o),
+ f
+ );
+ },
+ ])
+ );
+ }
+ get chain() {
+ return () => this.createChain();
+ }
+ get can() {
+ return () => this.createCan();
+ }
+ createChain(e, n = !0) {
+ const { rawCommands: r, editor: i, state: o } = this,
+ { view: s } = i,
+ l = [],
+ a = !!e,
+ u = e || o.tr,
+ c = () => (
+ !a &&
+ n &&
+ !u.getMeta("preventDispatch") &&
+ !this.hasCustomState &&
+ s.dispatch(u),
+ l.every((h) => h === !0)
+ ),
+ f = be(
+ W(
+ {},
+ Object.fromEntries(
+ Object.entries(r).map(([h, p]) => [
+ h,
+ (...v) => {
+ const b = this.buildProps(u, n),
+ x = p(...v)(b);
+ return l.push(x), f;
+ },
+ ])
+ )
+ ),
+ { run: c }
+ );
+ return f;
+ }
+ createCan(e) {
+ const { rawCommands: n, state: r } = this,
+ i = !1,
+ o = e || r.tr,
+ s = this.buildProps(o, i),
+ l = Object.fromEntries(
+ Object.entries(n).map(([a, u]) => [
+ a,
+ (...c) => u(...c)(be(W({}, s), { dispatch: void 0 })),
+ ])
+ );
+ return be(W({}, l), { chain: () => this.createChain(o, i) });
+ }
+ buildProps(e, n = !0) {
+ const { rawCommands: r, editor: i, state: o } = this,
+ { view: s } = i,
+ l = {
+ tr: e,
+ editor: i,
+ view: s,
+ state: H0({ state: o, transaction: e }),
+ dispatch: n ? () => {} : void 0,
+ chain: () => this.createChain(e, n),
+ can: () => this.createCan(e),
+ get commands() {
+ return Object.fromEntries(
+ Object.entries(r).map(([a, u]) => [
+ a,
+ (...c) => u(...c)(l),
+ ])
+ );
+ },
+ };
+ return l;
+ }
+}
+function bt(t, e, n) {
+ return t.config[e] === void 0 && t.parent
+ ? bt(t.parent, e, n)
+ : typeof t.config[e] == "function"
+ ? t.config[e].bind(
+ be(W({}, n), { parent: t.parent ? bt(t.parent, e, n) : null })
+ )
+ : t.config[e];
+}
+function OS(t) {
+ const e = t.filter((i) => i.type === "extension"),
+ n = t.filter((i) => i.type === "node"),
+ r = t.filter((i) => i.type === "mark");
+ return { baseExtensions: e, nodeExtensions: n, markExtensions: r };
+}
+function $t(t, e) {
+ if (typeof t == "string") {
+ if (!e.nodes[t])
+ throw Error(
+ `There is no node type named '${t}'. Maybe you forgot to add the extension?`
+ );
+ return e.nodes[t];
+ }
+ return t;
+}
+function et(...t) {
+ return t
+ .filter((e) => !!e)
+ .reduce((e, n) => {
+ const r = W({}, e);
+ return (
+ Object.entries(n).forEach(([i, o]) => {
+ if (!r[i]) {
+ r[i] = o;
+ return;
+ }
+ if (i === "class") {
+ const l = o ? o.split(" ") : [],
+ a = r[i] ? r[i].split(" ") : [],
+ u = l.filter((c) => !a.includes(c));
+ r[i] = [...a, ...u].join(" ");
+ } else
+ i === "style"
+ ? (r[i] = [r[i], o].join("; "))
+ : (r[i] = o);
+ }),
+ r
+ );
+ }, {});
+}
+function RS(t) {
+ return typeof t == "function";
+}
+function lt(t, e = void 0, ...n) {
+ return RS(t) ? (e ? t.bind(e)(...n) : t(...n)) : t;
+}
+function PS(t) {
+ return Object.prototype.toString.call(t) === "[object RegExp]";
+}
+class xs {
+ constructor(e) {
+ (this.find = e.find), (this.handler = e.handler);
+ }
+}
+class NS {
+ constructor(e) {
+ (this.find = e.find), (this.handler = e.handler);
+ }
+}
+function jS(t) {
+ return Object.prototype.toString.call(t).slice(8, -1);
+}
+function Ou(t) {
+ return jS(t) !== "Object"
+ ? !1
+ : t.constructor === Object &&
+ Object.getPrototypeOf(t) === Object.prototype;
+}
+function Ua(t, e) {
+ const n = W({}, t);
+ return (
+ Ou(t) &&
+ Ou(e) &&
+ Object.keys(e).forEach((r) => {
+ Ou(e[r])
+ ? r in t
+ ? (n[r] = Ua(t[r], e[r]))
+ : Object.assign(n, { [r]: e[r] })
+ : Object.assign(n, { [r]: e[r] });
+ }),
+ n
+ );
+}
+class Et {
+ constructor(e = {}) {
+ (this.type = "extension"),
+ (this.name = "extension"),
+ (this.parent = null),
+ (this.child = null),
+ (this.config = { name: this.name, defaultOptions: {} }),
+ (this.config = W(W({}, this.config), e)),
+ (this.name = this.config.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`
+ ),
+ (this.options = this.config.defaultOptions),
+ this.config.addOptions &&
+ (this.options = lt(
+ bt(this, "addOptions", { name: this.name })
+ )),
+ (this.storage =
+ lt(
+ bt(this, "addStorage", {
+ name: this.name,
+ options: this.options,
+ })
+ ) || {});
+ }
+ static create(e = {}) {
+ return new Et(e);
+ }
+ configure(e = {}) {
+ const n = this.extend();
+ return (
+ (n.options = Ua(this.options, e)),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+ extend(e = {}) {
+ const n = new Et(e);
+ return (
+ (n.parent = this),
+ (this.child = n),
+ (n.name = e.name ? e.name : n.parent.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`
+ ),
+ (n.options = lt(bt(n, "addOptions", { name: n.name }))),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+}
+function LS(t, e, n) {
+ const { from: r, to: i } = e,
+ {
+ blockSeparator: o = `
+
+`,
+ textSerializers: s = {},
+ } = n || {};
+ let l = "",
+ a = !0;
+ return (
+ t.nodesBetween(r, i, (u, c, f, h) => {
+ var p;
+ const g = s == null ? void 0 : s[u.type.name];
+ g
+ ? (u.isBlock && !a && ((l += o), (a = !0)),
+ f &&
+ (l += g({
+ node: u,
+ pos: c,
+ parent: f,
+ index: h,
+ range: e,
+ })))
+ : u.isText
+ ? ((l +=
+ (p = u == null ? void 0 : u.text) === null ||
+ p === void 0
+ ? void 0
+ : p.slice(Math.max(r, c) - c, i - c)),
+ (a = !1))
+ : u.isBlock && !a && ((l += o), (a = !0));
+ }),
+ l
+ );
+}
+function DS(t) {
+ return Object.fromEntries(
+ Object.entries(t.nodes)
+ .filter(([, e]) => e.spec.toText)
+ .map(([e, n]) => [e, n.spec.toText])
+ );
+}
+const kR = Et.create({
+ name: "clipboardTextSerializer",
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("clipboardTextSerializer"),
+ props: {
+ clipboardTextSerializer: () => {
+ const { editor: t } = this,
+ { state: e, schema: n } = t,
+ { doc: r, selection: i } = e,
+ { ranges: o } = i,
+ s = Math.min(...o.map((c) => c.$from.pos)),
+ l = Math.max(...o.map((c) => c.$to.pos)),
+ a = DS(n);
+ return LS(
+ r,
+ { from: s, to: l },
+ { textSerializers: a }
+ );
+ },
+ },
+ }),
+ ];
+ },
+ }),
+ IS =
+ () =>
+ ({ editor: t, view: e }) => (
+ requestAnimationFrame(() => {
+ var n;
+ t.isDestroyed ||
+ (e.dom.blur(),
+ (n = window == null ? void 0 : window.getSelection()) ===
+ null ||
+ n === void 0 ||
+ n.removeAllRanges());
+ }),
+ !0
+ ),
+ BS =
+ (t = !1) =>
+ ({ commands: e }) =>
+ e.setContent("", t),
+ $S =
+ () =>
+ ({ state: t, tr: e, dispatch: n }) => {
+ const { selection: r } = e,
+ { ranges: i } = r;
+ return (
+ n &&
+ i.forEach(({ $from: o, $to: s }) => {
+ t.doc.nodesBetween(o.pos, s.pos, (l, a) => {
+ if (l.type.isText) return;
+ const { doc: u, mapping: c } = e,
+ f = u.resolve(c.map(a)),
+ h = u.resolve(c.map(a + l.nodeSize)),
+ p = f.blockRange(h);
+ if (!p) return;
+ const g = uo(p);
+ if (l.type.isTextblock) {
+ const { defaultType: v } =
+ f.parent.contentMatchAt(f.index());
+ e.setNodeMarkup(p.start, v);
+ }
+ (g || g === 0) && e.lift(p, g);
+ });
+ }),
+ !0
+ );
+ },
+ zS = (t) => (e) => t(e),
+ HS =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ gS(t, e),
+ FS =
+ (t, e) =>
+ ({ editor: n, tr: r }) => {
+ const { state: i } = n,
+ o = i.doc.slice(t.from, t.to);
+ r.deleteRange(t.from, t.to);
+ const s = r.mapping.map(e);
+ return (
+ r.insert(s, o.content),
+ r.setSelection(new Ce(r.doc.resolve(s - 1))),
+ !0
+ );
+ },
+ VS =
+ () =>
+ ({ tr: t, dispatch: e }) => {
+ const { selection: n } = t,
+ r = n.$anchor.node();
+ if (r.content.size > 0) return !1;
+ const i = t.selection.$anchor;
+ for (let o = i.depth; o > 0; o -= 1)
+ if (i.node(o).type === r.type) {
+ if (e) {
+ const l = i.before(o),
+ a = i.after(o);
+ t.delete(l, a).scrollIntoView();
+ }
+ return !0;
+ }
+ return !1;
+ },
+ WS =
+ (t) =>
+ ({ tr: e, state: n, dispatch: r }) => {
+ const i = $t(t, n.schema),
+ o = e.selection.$anchor;
+ for (let s = o.depth; s > 0; s -= 1)
+ if (o.node(s).type === i) {
+ if (r) {
+ const a = o.before(s),
+ u = o.after(s);
+ e.delete(a, u).scrollIntoView();
+ }
+ return !0;
+ }
+ return !1;
+ },
+ US =
+ (t) =>
+ ({ tr: e, dispatch: n }) => {
+ const { from: r, to: i } = t;
+ return n && e.delete(r, i), !0;
+ },
+ KS =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ iS(t, e),
+ qS =
+ () =>
+ ({ commands: t }) =>
+ t.keyboardShortcut("Enter"),
+ JS =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ mS(t, e);
+function $l(t, e, n = { strict: !0 }) {
+ const r = Object.keys(e);
+ return r.length
+ ? r.every((i) =>
+ n.strict
+ ? e[i] === t[i]
+ : PS(e[i])
+ ? e[i].test(t[i])
+ : e[i] === t[i]
+ )
+ : !0;
+}
+function jc(t, e, n = {}) {
+ return t.find((r) => r.type === e && $l(r.attrs, n));
+}
+function GS(t, e, n = {}) {
+ return !!jc(t, e, n);
+}
+function df(t, e, n = {}) {
+ if (!t || !e) return;
+ let r = t.parent.childAfter(t.parentOffset);
+ if (
+ (t.parentOffset === r.offset &&
+ r.offset !== 0 &&
+ (r = t.parent.childBefore(t.parentOffset)),
+ !r.node)
+ )
+ return;
+ const i = jc([...r.node.marks], e, n);
+ if (!i) return;
+ let o = r.index,
+ s = t.start() + r.offset,
+ l = o + 1,
+ a = s + r.node.nodeSize;
+ for (
+ jc([...r.node.marks], e, n);
+ o > 0 && i.isInSet(t.parent.child(o - 1).marks);
+
+ )
+ (o -= 1), (s -= t.parent.child(o).nodeSize);
+ for (; l < t.parent.childCount && GS([...t.parent.child(l).marks], e, n); )
+ (a += t.parent.child(l).nodeSize), (l += 1);
+ return { from: s, to: a };
+}
+function Hr(t, e) {
+ if (typeof t == "string") {
+ if (!e.marks[t])
+ throw Error(
+ `There is no mark type named '${t}'. Maybe you forgot to add the extension?`
+ );
+ return e.marks[t];
+ }
+ return t;
+}
+const YS =
+ (t, e = {}) =>
+ ({ tr: n, state: r, dispatch: i }) => {
+ const o = Hr(t, r.schema),
+ { doc: s, selection: l } = n,
+ { $from: a, from: u, to: c } = l;
+ if (i) {
+ const f = df(a, o, e);
+ if (f && f.from <= u && f.to >= c) {
+ const h = Ce.create(s, f.from, f.to);
+ n.setSelection(h);
+ }
+ }
+ return !0;
+ },
+ QS = (t) => (e) => {
+ const n = typeof t == "function" ? t(e) : t;
+ for (let r = 0; r < n.length; r += 1) if (n[r](e)) return !0;
+ return !1;
+ };
+function ff(t) {
+ return t instanceof Ce;
+}
+function ir(t = 0, e = 0, n = 0) {
+ return Math.min(Math.max(t, e), n);
+}
+function XS(t, e = null) {
+ if (!e) return null;
+ const n = Se.atStart(t),
+ r = Se.atEnd(t);
+ if (e === "start" || e === !0) return n;
+ if (e === "end") return r;
+ const i = n.from,
+ o = r.to;
+ return e === "all"
+ ? Ce.create(t, ir(0, i, o), ir(t.content.size, i, o))
+ : Ce.create(t, ir(e, i, o), ir(e, i, o));
+}
+function hf() {
+ return (
+ [
+ "iPad Simulator",
+ "iPhone Simulator",
+ "iPod Simulator",
+ "iPad",
+ "iPhone",
+ "iPod",
+ ].includes(navigator.platform) ||
+ (navigator.userAgent.includes("Mac") && "ontouchend" in document)
+ );
+}
+const ZS =
+ (t = null, e = {}) =>
+ ({ editor: n, view: r, tr: i, dispatch: o }) => {
+ e = W({ scrollIntoView: !0 }, e);
+ const s = () => {
+ hf() && r.dom.focus(),
+ requestAnimationFrame(() => {
+ n.isDestroyed ||
+ (r.focus(),
+ e != null &&
+ e.scrollIntoView &&
+ n.commands.scrollIntoView());
+ });
+ };
+ if ((r.hasFocus() && t === null) || t === !1) return !0;
+ if (o && t === null && !ff(n.state.selection)) return s(), !0;
+ const l = XS(i.doc, t) || n.state.selection,
+ a = n.state.selection.eq(l);
+ return (
+ o &&
+ (a || i.setSelection(l),
+ a && i.storedMarks && i.setStoredMarks(i.storedMarks),
+ s()),
+ !0
+ );
+ },
+ e_ = (t, e) => (n) => t.every((r, i) => e(r, be(W({}, n), { index: i }))),
+ t_ =
+ (t, e) =>
+ ({ tr: n, commands: r }) =>
+ r.insertContentAt(
+ { from: n.selection.from, to: n.selection.to },
+ t,
+ e
+ );
+function jp(t) {
+ const e = `${t}`;
+ return new window.DOMParser().parseFromString(e, "text/html").body;
+}
+function zl(t, e, n) {
+ if (
+ ((n = W({ slice: !0, parseOptions: {} }, n)),
+ typeof t == "object" && t !== null)
+ )
+ try {
+ return Array.isArray(t) && t.length > 0
+ ? Y.fromArray(t.map((r) => e.nodeFromJSON(r)))
+ : e.nodeFromJSON(t);
+ } catch (r) {
+ return (
+ console.warn(
+ "[tiptap warn]: Invalid content.",
+ "Passed value:",
+ t,
+ "Error:",
+ r
+ ),
+ zl("", e, n)
+ );
+ }
+ if (typeof t == "string") {
+ const r = ts.fromSchema(e);
+ return n.slice
+ ? r.parseSlice(jp(t), n.parseOptions).content
+ : r.parse(jp(t), n.parseOptions);
+ }
+ return zl("", e, n);
+}
+function n_(t, e, n) {
+ const r = t.steps.length - 1;
+ if (r < e) return;
+ const i = t.steps[r];
+ if (!(i instanceof jt || i instanceof Pt)) return;
+ const o = t.mapping.maps[r];
+ let s = 0;
+ o.forEach((l, a, u, c) => {
+ s === 0 && (s = c);
+ }),
+ t.setSelection(Se.near(t.doc.resolve(s), n));
+}
+const r_ = (t) => t.toString().startsWith("<"),
+ i_ =
+ (t, e, n) =>
+ ({ tr: r, dispatch: i, editor: o }) => {
+ if (i) {
+ n = W({ parseOptions: {}, updateSelection: !0 }, n);
+ const s = zl(e, o.schema, {
+ parseOptions: W(
+ { preserveWhitespace: "full" },
+ n.parseOptions
+ ),
+ });
+ if (s.toString() === "<>") return !0;
+ let { from: l, to: a } =
+ typeof t == "number"
+ ? { from: t, to: t }
+ : { from: t.from, to: t.to },
+ u = !0,
+ c = !0;
+ if (
+ ((r_(s) ? s : [s]).forEach((h) => {
+ h.check(),
+ (u = u ? h.isText && h.marks.length === 0 : !1),
+ (c = c ? h.isBlock : !1);
+ }),
+ l === a && c)
+ ) {
+ const { parent: h } = r.doc.resolve(l);
+ h.isTextblock &&
+ !h.type.spec.code &&
+ !h.childCount &&
+ ((l -= 1), (a += 1));
+ }
+ u
+ ? Array.isArray(e)
+ ? r.insertText(
+ e.map((h) => h.text || "").join(""),
+ l,
+ a
+ )
+ : typeof e == "object" && !!e && !!e.text
+ ? r.insertText(e.text, l, a)
+ : r.insertText(e, l, a)
+ : r.replaceWith(l, a, s),
+ n.updateSelection && n_(r, r.steps.length - 1, -1);
+ }
+ return !0;
+ },
+ o_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ dS(t, e),
+ s_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ fS(t, e),
+ l_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ sS(t, e),
+ a_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ uS(t, e),
+ u_ =
+ () =>
+ ({ tr: t, state: e, dispatch: n }) => {
+ try {
+ const r = Ha(e.doc, e.selection.$from.pos, -1);
+ return r == null ? !1 : (t.join(r, 2), n && n(t), !0);
+ } catch (r) {
+ return !1;
+ }
+ },
+ c_ =
+ () =>
+ ({ state: t, dispatch: e, tr: n }) => {
+ try {
+ const r = Ha(t.doc, t.selection.$from.pos, 1);
+ return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
+ } catch (r) {
+ return !1;
+ }
+ };
+function pf() {
+ return typeof navigator != "undefined"
+ ? /Mac/.test(navigator.platform)
+ : !1;
+}
+function d_(t) {
+ const e = t.split(/-(?!$)/);
+ let n = e[e.length - 1];
+ n === "Space" && (n = " ");
+ let r, i, o, s;
+ for (let l = 0; l < e.length - 1; l += 1) {
+ const a = e[l];
+ if (/^(cmd|meta|m)$/i.test(a)) s = !0;
+ else if (/^a(lt)?$/i.test(a)) r = !0;
+ else if (/^(c|ctrl|control)$/i.test(a)) i = !0;
+ else if (/^s(hift)?$/i.test(a)) o = !0;
+ else if (/^mod$/i.test(a)) hf() || pf() ? (s = !0) : (i = !0);
+ else throw new Error(`Unrecognized modifier name: ${a}`);
+ }
+ return (
+ r && (n = `Alt-${n}`),
+ i && (n = `Ctrl-${n}`),
+ s && (n = `Meta-${n}`),
+ o && (n = `Shift-${n}`),
+ n
+ );
+}
+const f_ =
+ (t) =>
+ ({ editor: e, view: n, tr: r, dispatch: i }) => {
+ const o = d_(t).split(/-(?!$)/),
+ s = o.find((u) => !["Alt", "Ctrl", "Meta", "Shift"].includes(u)),
+ l = new KeyboardEvent("keydown", {
+ key: s === "Space" ? " " : s,
+ altKey: o.includes("Alt"),
+ ctrlKey: o.includes("Ctrl"),
+ metaKey: o.includes("Meta"),
+ shiftKey: o.includes("Shift"),
+ bubbles: !0,
+ cancelable: !0,
+ }),
+ a = e.captureTransaction(() => {
+ n.someProp("handleKeyDown", (u) => u(n, l));
+ });
+ return (
+ a == null ||
+ a.steps.forEach((u) => {
+ const c = u.map(r.mapping);
+ c && i && r.maybeStep(c);
+ }),
+ !0
+ );
+ };
+function mf(t, e, n = {}) {
+ const { from: r, to: i, empty: o } = t.selection,
+ s = e ? $t(e, t.schema) : null,
+ l = [];
+ t.doc.nodesBetween(r, i, (f, h) => {
+ if (f.isText) return;
+ const p = Math.max(r, h),
+ g = Math.min(i, h + f.nodeSize);
+ l.push({ node: f, from: p, to: g });
+ });
+ const a = i - r,
+ u = l
+ .filter((f) => (s ? s.name === f.node.type.name : !0))
+ .filter((f) => $l(f.node.attrs, n, { strict: !1 }));
+ return o ? !!u.length : u.reduce((f, h) => f + h.to - h.from, 0) >= a;
+}
+const h_ =
+ (t, e = {}) =>
+ ({ state: n, dispatch: r }) => {
+ const i = $t(t, n.schema);
+ return mf(n, i, e) ? hS(n, r) : !1;
+ },
+ p_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ yS(t, e),
+ m_ =
+ (t) =>
+ ({ state: e, dispatch: n }) => {
+ const r = $t(t, e.schema);
+ return _S(r)(e, n);
+ },
+ g_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ pS(t, e);
+function gf(t, e) {
+ return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
+}
+function Lp(t, e) {
+ const n = typeof e == "string" ? [e] : e;
+ return Object.keys(t).reduce(
+ (r, i) => (n.includes(i) || (r[i] = t[i]), r),
+ {}
+ );
+}
+const y_ =
+ (t, e) =>
+ ({ tr: n, state: r, dispatch: i }) => {
+ let o = null,
+ s = null;
+ const l = gf(typeof t == "string" ? t : t.name, r.schema);
+ return l
+ ? (l === "node" && (o = $t(t, r.schema)),
+ l === "mark" && (s = Hr(t, r.schema)),
+ i &&
+ n.selection.ranges.forEach((a) => {
+ r.doc.nodesBetween(
+ a.$from.pos,
+ a.$to.pos,
+ (u, c) => {
+ o &&
+ o === u.type &&
+ n.setNodeMarkup(
+ c,
+ void 0,
+ Lp(u.attrs, e)
+ ),
+ s &&
+ u.marks.length &&
+ u.marks.forEach((f) => {
+ s === f.type &&
+ n.addMark(
+ c,
+ c + u.nodeSize,
+ s.create(Lp(f.attrs, e))
+ );
+ });
+ }
+ );
+ }),
+ !0)
+ : !1;
+ },
+ v_ =
+ () =>
+ ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0),
+ b_ =
+ () =>
+ ({ tr: t, commands: e }) =>
+ e.setTextSelection({ from: 0, to: t.doc.content.size }),
+ w_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ lS(t, e),
+ x_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ cS(t, e),
+ k_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ vS(t, e),
+ C_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ xS(t, e),
+ S_ =
+ () =>
+ ({ state: t, dispatch: e }) =>
+ wS(t, e);
+function __(t, e, n = {}) {
+ return zl(t, e, { slice: !1, parseOptions: n });
+}
+const M_ =
+ (t, e = !1, n = {}) =>
+ ({ tr: r, editor: i, dispatch: o }) => {
+ const { doc: s } = r,
+ l = __(t, i.schema, n);
+ return (
+ o &&
+ r
+ .replaceWith(0, s.content.size, l)
+ .setMeta("preventUpdate", !e),
+ !0
+ );
+ };
+function ks(t, e) {
+ const n = Hr(e, t.schema),
+ { from: r, to: i, empty: o } = t.selection,
+ s = [];
+ o
+ ? (t.storedMarks && s.push(...t.storedMarks),
+ s.push(...t.selection.$head.marks()))
+ : t.doc.nodesBetween(r, i, (a) => {
+ s.push(...a.marks);
+ });
+ const l = s.find((a) => a.type.name === n.name);
+ return l ? W({}, l.attrs) : {};
+}
+function E_(t, e) {
+ const n = new a0(t);
+ return (
+ e.forEach((r) => {
+ r.steps.forEach((i) => {
+ n.step(i);
+ });
+ }),
+ n
+ );
+}
+function A_(t) {
+ for (let e = 0; e < t.edgeCount; e += 1) {
+ const { type: n } = t.edge(e);
+ if (n.isTextblock && !n.hasRequiredAttrs()) return n;
+ }
+ return null;
+}
+function T_(t, e, n) {
+ const r = [];
+ return (
+ t.nodesBetween(e.from, e.to, (i, o) => {
+ n(i) && r.push({ node: i, pos: o });
+ }),
+ r
+ );
+}
+function F0(t, e) {
+ for (let n = t.depth; n > 0; n -= 1) {
+ const r = t.node(n);
+ if (e(r))
+ return {
+ pos: n > 0 ? t.before(n) : 0,
+ start: t.start(n),
+ depth: n,
+ node: r,
+ };
+ }
+}
+function yf(t) {
+ return (e) => F0(e.$from, t);
+}
+function O_(t, e) {
+ const n = $t(e, t.schema),
+ { from: r, to: i } = t.selection,
+ o = [];
+ t.doc.nodesBetween(r, i, (l) => {
+ o.push(l);
+ });
+ const s = o.reverse().find((l) => l.type.name === n.name);
+ return s ? W({}, s.attrs) : {};
+}
+function R_(t, e) {
+ const n = gf(typeof e == "string" ? e : e.name, t.schema);
+ return n === "node" ? O_(t, e) : n === "mark" ? ks(t, e) : {};
+}
+function P_(t, e = JSON.stringify) {
+ const n = {};
+ return t.filter((r) => {
+ const i = e(r);
+ return Object.prototype.hasOwnProperty.call(n, i) ? !1 : (n[i] = !0);
+ });
+}
+function N_(t) {
+ const e = P_(t);
+ return e.length === 1
+ ? e
+ : e.filter(
+ (n, r) =>
+ !e
+ .filter((o, s) => s !== r)
+ .some(
+ (o) =>
+ n.oldRange.from >= o.oldRange.from &&
+ n.oldRange.to <= o.oldRange.to &&
+ n.newRange.from >= o.newRange.from &&
+ n.newRange.to <= o.newRange.to
+ )
+ );
+}
+function j_(t) {
+ const { mapping: e, steps: n } = t,
+ r = [];
+ return (
+ e.maps.forEach((i, o) => {
+ const s = [];
+ if (i.ranges.length)
+ i.forEach((l, a) => {
+ s.push({ from: l, to: a });
+ });
+ else {
+ const { from: l, to: a } = n[o];
+ if (l === void 0 || a === void 0) return;
+ s.push({ from: l, to: a });
+ }
+ s.forEach(({ from: l, to: a }) => {
+ const u = e.slice(o).map(l, -1),
+ c = e.slice(o).map(a),
+ f = e.invert().map(u, -1),
+ h = e.invert().map(c);
+ r.push({
+ oldRange: { from: f, to: h },
+ newRange: { from: u, to: c },
+ });
+ });
+ }),
+ N_(r)
+ );
+}
+function vf(t, e, n) {
+ const r = [];
+ return (
+ t === e
+ ? n
+ .resolve(t)
+ .marks()
+ .forEach((i) => {
+ const o = n.resolve(t - 1),
+ s = df(o, i.type);
+ !s || r.push(W({ mark: i }, s));
+ })
+ : n.nodesBetween(t, e, (i, o) => {
+ r.push(
+ ...i.marks.map((s) => ({
+ from: o,
+ to: o + i.nodeSize,
+ mark: s,
+ }))
+ );
+ }),
+ r
+ );
+}
+function al(t, e, n) {
+ return Object.fromEntries(
+ Object.entries(n).filter(([r]) => {
+ const i = t.find((o) => o.type === e && o.name === r);
+ return i ? i.attribute.keepOnSplit : !1;
+ })
+ );
+}
+function L_(t, e, n = {}) {
+ const { empty: r, ranges: i } = t.selection,
+ o = e ? Hr(e, t.schema) : null;
+ if (r)
+ return !!(t.storedMarks || t.selection.$from.marks())
+ .filter((f) => (o ? o.name === f.type.name : !0))
+ .find((f) => $l(f.attrs, n, { strict: !1 }));
+ let s = 0;
+ const l = [];
+ if (
+ (i.forEach(({ $from: f, $to: h }) => {
+ const p = f.pos,
+ g = h.pos;
+ t.doc.nodesBetween(p, g, (v, b) => {
+ if (!v.isText && !v.marks.length) return;
+ const x = Math.max(p, b),
+ S = Math.min(g, b + v.nodeSize),
+ T = S - x;
+ (s += T),
+ l.push(
+ ...v.marks.map((d) => ({ mark: d, from: x, to: S }))
+ );
+ });
+ }),
+ s === 0)
+ )
+ return !1;
+ const a = l
+ .filter((f) => (o ? o.name === f.mark.type.name : !0))
+ .filter((f) => $l(f.mark.attrs, n, { strict: !1 }))
+ .reduce((f, h) => f + h.to - h.from, 0),
+ u = l
+ .filter((f) =>
+ o ? f.mark.type !== o && f.mark.type.excludes(o) : !0
+ )
+ .reduce((f, h) => f + h.to - h.from, 0);
+ return (a > 0 ? a + u : a) >= s;
+}
+function Dp(t, e) {
+ const { nodeExtensions: n } = OS(e),
+ r = n.find((s) => s.name === t);
+ if (!r) return !1;
+ const i = { name: r.name, options: r.options, storage: r.storage },
+ o = lt(bt(r, "group", i));
+ return typeof o != "string" ? !1 : o.split(" ").includes("list");
+}
+function D_(t) {
+ return t instanceof ve;
+}
+function V0(t, e, n) {
+ const i = t.state.doc.content.size,
+ o = ir(e, 0, i),
+ s = ir(n, 0, i),
+ l = t.coordsAtPos(o),
+ a = t.coordsAtPos(s, -1),
+ u = Math.min(l.top, a.top),
+ c = Math.max(l.bottom, a.bottom),
+ f = Math.min(l.left, a.left),
+ h = Math.max(l.right, a.right),
+ p = h - f,
+ g = c - u,
+ x = {
+ top: u,
+ bottom: c,
+ left: f,
+ right: h,
+ width: p,
+ height: g,
+ x: f,
+ y: u,
+ };
+ return be(W({}, x), { toJSON: () => x });
+}
+function I_(t, e, n) {
+ var r;
+ const { selection: i } = e;
+ let o = null;
+ if ((ff(i) && (o = i.$cursor), o)) {
+ const l = (r = t.storedMarks) !== null && r !== void 0 ? r : o.marks();
+ return !!n.isInSet(l) || !l.some((a) => a.type.excludes(n));
+ }
+ const { ranges: s } = i;
+ return s.some(({ $from: l, $to: a }) => {
+ let u =
+ l.depth === 0
+ ? t.doc.inlineContent && t.doc.type.allowsMarkType(n)
+ : !1;
+ return (
+ t.doc.nodesBetween(l.pos, a.pos, (c, f, h) => {
+ if (u) return !1;
+ if (c.isInline) {
+ const p = !h || h.type.allowsMarkType(n),
+ g =
+ !!n.isInSet(c.marks) ||
+ !c.marks.some((v) => v.type.excludes(n));
+ u = p && g;
+ }
+ return !u;
+ }),
+ u
+ );
+ });
+}
+const B_ =
+ (t, e = {}) =>
+ ({ tr: n, state: r, dispatch: i }) => {
+ const { selection: o } = n,
+ { empty: s, ranges: l } = o,
+ a = Hr(t, r.schema);
+ if (i)
+ if (s) {
+ const u = ks(r, a);
+ n.addStoredMark(a.create(W(W({}, u), e)));
+ } else
+ l.forEach((u) => {
+ const c = u.$from.pos,
+ f = u.$to.pos;
+ r.doc.nodesBetween(c, f, (h, p) => {
+ const g = Math.max(p, c),
+ v = Math.min(p + h.nodeSize, f);
+ h.marks.find((x) => x.type === a)
+ ? h.marks.forEach((x) => {
+ a === x.type &&
+ n.addMark(
+ g,
+ v,
+ a.create(W(W({}, x.attrs), e))
+ );
+ })
+ : n.addMark(g, v, a.create(e));
+ });
+ });
+ return I_(r, n, a);
+ },
+ $_ =
+ (t, e) =>
+ ({ tr: n }) => (n.setMeta(t, e), !0),
+ z_ =
+ (t, e = {}) =>
+ ({ state: n, dispatch: r, chain: i }) => {
+ const o = $t(t, n.schema);
+ return o.isTextblock
+ ? i()
+ .command(({ commands: s }) =>
+ Np(o, e)(n) ? !0 : s.clearNodes()
+ )
+ .command(({ state: s }) => Np(o, e)(s, r))
+ .run()
+ : (console.warn(
+ '[tiptap warn]: Currently "setNode()" only supports text block nodes.'
+ ),
+ !1);
+ },
+ H_ =
+ (t) =>
+ ({ tr: e, dispatch: n }) => {
+ if (n) {
+ const { doc: r } = e,
+ i = ir(t, 0, r.content.size),
+ o = ve.create(r, i);
+ e.setSelection(o);
+ }
+ return !0;
+ },
+ F_ =
+ (t) =>
+ ({ tr: e, dispatch: n }) => {
+ if (n) {
+ const { doc: r } = e,
+ { from: i, to: o } =
+ typeof t == "number" ? { from: t, to: t } : t,
+ s = Ce.atStart(r).from,
+ l = Ce.atEnd(r).to,
+ a = ir(i, s, l),
+ u = ir(o, s, l),
+ c = Ce.create(r, a, u);
+ e.setSelection(c);
+ }
+ return !0;
+ },
+ V_ =
+ (t) =>
+ ({ state: e, dispatch: n }) => {
+ const r = $t(t, e.schema);
+ return AS(r)(e, n);
+ };
+function Ip(t, e) {
+ const n =
+ t.storedMarks ||
+ (t.selection.$to.parentOffset && t.selection.$from.marks());
+ if (n) {
+ const r = n.filter((i) =>
+ e == null ? void 0 : e.includes(i.type.name)
+ );
+ t.tr.ensureMarks(r);
+ }
+}
+const W_ =
+ ({ keepMarks: t = !0 } = {}) =>
+ ({ tr: e, state: n, dispatch: r, editor: i }) => {
+ const { selection: o, doc: s } = e,
+ { $from: l, $to: a } = o,
+ u = i.extensionManager.attributes,
+ c = al(u, l.node().type.name, l.node().attrs);
+ if (o instanceof ve && o.node.isBlock)
+ return !l.parentOffset || !zi(s, l.pos)
+ ? !1
+ : (r &&
+ (t && Ip(n, i.extensionManager.splittableMarks),
+ e.split(l.pos).scrollIntoView()),
+ !0);
+ if (!l.parent.isBlock) return !1;
+ if (r) {
+ const f = a.parentOffset === a.parent.content.size;
+ o instanceof Ce && e.deleteSelection();
+ const h =
+ l.depth === 0
+ ? void 0
+ : A_(l.node(-1).contentMatchAt(l.indexAfter(-1)));
+ let p = f && h ? [{ type: h, attrs: c }] : void 0,
+ g = zi(e.doc, e.mapping.map(l.pos), 1, p);
+ if (
+ (!p &&
+ !g &&
+ zi(
+ e.doc,
+ e.mapping.map(l.pos),
+ 1,
+ h ? [{ type: h }] : void 0
+ ) &&
+ ((g = !0), (p = h ? [{ type: h, attrs: c }] : void 0)),
+ g &&
+ (e.split(e.mapping.map(l.pos), 1, p),
+ h && !f && !l.parentOffset && l.parent.type !== h))
+ ) {
+ const v = e.mapping.map(l.before()),
+ b = e.doc.resolve(v);
+ l.node(-1).canReplaceWith(b.index(), b.index() + 1, h) &&
+ e.setNodeMarkup(e.mapping.map(l.before()), h);
+ }
+ t && Ip(n, i.extensionManager.splittableMarks),
+ e.scrollIntoView();
+ }
+ return !0;
+ },
+ U_ =
+ (t) =>
+ ({ tr: e, state: n, dispatch: r, editor: i }) => {
+ var o;
+ const s = $t(t, n.schema),
+ { $from: l, $to: a } = n.selection,
+ u = n.selection.node;
+ if ((u && u.isBlock) || l.depth < 2 || !l.sameParent(a)) return !1;
+ const c = l.node(-1);
+ if (c.type !== s) return !1;
+ const f = i.extensionManager.attributes;
+ if (
+ l.parent.content.size === 0 &&
+ l.node(-1).childCount === l.indexAfter(-1)
+ ) {
+ if (
+ l.depth === 2 ||
+ l.node(-3).type !== s ||
+ l.index(-2) !== l.node(-2).childCount - 1
+ )
+ return !1;
+ if (r) {
+ let b = Y.empty;
+ const x = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
+ for (let w = l.depth - x; w >= l.depth - 3; w -= 1)
+ b = Y.from(l.node(w).copy(b));
+ const S =
+ l.indexAfter(-1) < l.node(-2).childCount
+ ? 1
+ : l.indexAfter(-2) < l.node(-3).childCount
+ ? 2
+ : 3,
+ T = al(f, l.node().type.name, l.node().attrs),
+ d =
+ ((o = s.contentMatch.defaultType) === null ||
+ o === void 0
+ ? void 0
+ : o.createAndFill(T)) || void 0;
+ b = b.append(Y.from(s.createAndFill(null, d) || void 0));
+ const y = l.before(l.depth - (x - 1));
+ e.replace(y, l.after(-S), new ie(b, 4 - x, 0));
+ let m = -1;
+ e.doc.nodesBetween(y, e.doc.content.size, (w, k) => {
+ if (m > -1) return !1;
+ w.isTextblock && w.content.size === 0 && (m = k + 1);
+ }),
+ m > -1 && e.setSelection(Ce.near(e.doc.resolve(m))),
+ e.scrollIntoView();
+ }
+ return !0;
+ }
+ const h =
+ a.pos === l.end() ? c.contentMatchAt(0).defaultType : null,
+ p = al(f, c.type.name, c.attrs),
+ g = al(f, l.node().type.name, l.node().attrs);
+ e.delete(l.pos, a.pos);
+ const v = h
+ ? [
+ { type: s, attrs: p },
+ { type: h, attrs: g },
+ ]
+ : [{ type: s, attrs: p }];
+ if (!zi(e.doc, l.pos, 2)) return !1;
+ if (r) {
+ const { selection: b, storedMarks: x } = n,
+ { splittableMarks: S } = i.extensionManager,
+ T = x || (b.$to.parentOffset && b.$from.marks());
+ if ((e.split(l.pos, 2, v).scrollIntoView(), !T || !r))
+ return !0;
+ const d = T.filter((y) => S.includes(y.type.name));
+ e.ensureMarks(d);
+ }
+ return !0;
+ },
+ Ru = (t, e) => {
+ const n = yf((s) => s.type === e)(t.selection);
+ if (!n) return !0;
+ const r = t.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
+ if (r === void 0) return !0;
+ const i = t.doc.nodeAt(r);
+ return (
+ n.node.type === (i == null ? void 0 : i.type) &&
+ $r(t.doc, n.pos) &&
+ t.join(n.pos),
+ !0
+ );
+ },
+ Pu = (t, e) => {
+ const n = yf((s) => s.type === e)(t.selection);
+ if (!n) return !0;
+ const r = t.doc.resolve(n.start).after(n.depth);
+ if (r === void 0) return !0;
+ const i = t.doc.nodeAt(r);
+ return (
+ n.node.type === (i == null ? void 0 : i.type) &&
+ $r(t.doc, r) &&
+ t.join(r),
+ !0
+ );
+ },
+ K_ =
+ (t, e, n, r = {}) =>
+ ({
+ editor: i,
+ tr: o,
+ state: s,
+ dispatch: l,
+ chain: a,
+ commands: u,
+ can: c,
+ }) => {
+ const { extensions: f, splittableMarks: h } = i.extensionManager,
+ p = $t(t, s.schema),
+ g = $t(e, s.schema),
+ { selection: v, storedMarks: b } = s,
+ { $from: x, $to: S } = v,
+ T = x.blockRange(S),
+ d = b || (v.$to.parentOffset && v.$from.marks());
+ if (!T) return !1;
+ const y = yf((m) => Dp(m.type.name, f))(v);
+ if (T.depth >= 1 && y && T.depth - y.depth <= 1) {
+ if (y.node.type === p) return u.liftListItem(g);
+ if (
+ Dp(y.node.type.name, f) &&
+ p.validContent(y.node.content) &&
+ l
+ )
+ return a()
+ .command(() => (o.setNodeMarkup(y.pos, p), !0))
+ .command(() => Ru(o, p))
+ .command(() => Pu(o, p))
+ .run();
+ }
+ return !n || !d || !l
+ ? a()
+ .command(() =>
+ c().wrapInList(p, r) ? !0 : u.clearNodes()
+ )
+ .wrapInList(p, r)
+ .command(() => Ru(o, p))
+ .command(() => Pu(o, p))
+ .run()
+ : a()
+ .command(() => {
+ const m = c().wrapInList(p, r),
+ w = d.filter((k) => h.includes(k.type.name));
+ return o.ensureMarks(w), m ? !0 : u.clearNodes();
+ })
+ .wrapInList(p, r)
+ .command(() => Ru(o, p))
+ .command(() => Pu(o, p))
+ .run();
+ },
+ q_ =
+ (t, e = {}, n = {}) =>
+ ({ state: r, commands: i }) => {
+ const { extendEmptyMarkRange: o = !1 } = n,
+ s = Hr(t, r.schema);
+ return L_(r, s, e)
+ ? i.unsetMark(s, { extendEmptyMarkRange: o })
+ : i.setMark(s, e);
+ },
+ J_ =
+ (t, e, n = {}) =>
+ ({ state: r, commands: i }) => {
+ const o = $t(t, r.schema),
+ s = $t(e, r.schema);
+ return mf(r, o, n) ? i.setNode(s) : i.setNode(o, n);
+ },
+ G_ =
+ (t, e = {}) =>
+ ({ state: n, commands: r }) => {
+ const i = $t(t, n.schema);
+ return mf(n, i, e) ? r.lift(i) : r.wrapIn(i, e);
+ },
+ Y_ =
+ () =>
+ ({ state: t, dispatch: e }) => {
+ const n = t.plugins;
+ for (let r = 0; r < n.length; r += 1) {
+ const i = n[r];
+ let o;
+ if (i.spec.isInputRules && (o = i.getState(t))) {
+ if (e) {
+ const s = t.tr,
+ l = o.transform;
+ for (let a = l.steps.length - 1; a >= 0; a -= 1)
+ s.step(l.steps[a].invert(l.docs[a]));
+ if (o.text) {
+ const a = s.doc.resolve(o.from).marks();
+ s.replaceWith(
+ o.from,
+ o.to,
+ t.schema.text(o.text, a)
+ );
+ } else s.delete(o.from, o.to);
+ }
+ return !0;
+ }
+ }
+ return !1;
+ },
+ Q_ =
+ () =>
+ ({ tr: t, dispatch: e }) => {
+ const { selection: n } = t,
+ { empty: r, ranges: i } = n;
+ return (
+ r ||
+ (e &&
+ i.forEach((o) => {
+ t.removeMark(o.$from.pos, o.$to.pos);
+ })),
+ !0
+ );
+ },
+ X_ =
+ (t, e = {}) =>
+ ({ tr: n, state: r, dispatch: i }) => {
+ var o;
+ const { extendEmptyMarkRange: s = !1 } = e,
+ { selection: l } = n,
+ a = Hr(t, r.schema),
+ { $from: u, empty: c, ranges: f } = l;
+ if (!i) return !0;
+ if (c && s) {
+ let { from: h, to: p } = l;
+ const g =
+ (o = u.marks().find((b) => b.type === a)) === null ||
+ o === void 0
+ ? void 0
+ : o.attrs,
+ v = df(u, a, g);
+ v && ((h = v.from), (p = v.to)), n.removeMark(h, p, a);
+ } else
+ f.forEach((h) => {
+ n.removeMark(h.$from.pos, h.$to.pos, a);
+ });
+ return n.removeStoredMark(a), !0;
+ },
+ Z_ =
+ (t, e = {}) =>
+ ({ tr: n, state: r, dispatch: i }) => {
+ let o = null,
+ s = null;
+ const l = gf(typeof t == "string" ? t : t.name, r.schema);
+ return l
+ ? (l === "node" && (o = $t(t, r.schema)),
+ l === "mark" && (s = Hr(t, r.schema)),
+ i &&
+ n.selection.ranges.forEach((a) => {
+ const u = a.$from.pos,
+ c = a.$to.pos;
+ r.doc.nodesBetween(u, c, (f, h) => {
+ o &&
+ o === f.type &&
+ n.setNodeMarkup(
+ h,
+ void 0,
+ W(W({}, f.attrs), e)
+ ),
+ s &&
+ f.marks.length &&
+ f.marks.forEach((p) => {
+ if (s === p.type) {
+ const g = Math.max(h, u),
+ v = Math.min(
+ h + f.nodeSize,
+ c
+ );
+ n.addMark(
+ g,
+ v,
+ s.create(
+ W(W({}, p.attrs), e)
+ )
+ );
+ }
+ });
+ });
+ }),
+ !0)
+ : !1;
+ },
+ eM =
+ (t, e = {}) =>
+ ({ state: n, dispatch: r }) => {
+ const i = $t(t, n.schema);
+ return kS(i, e)(n, r);
+ },
+ tM =
+ (t, e = {}) =>
+ ({ state: n, dispatch: r }) => {
+ const i = $t(t, n.schema);
+ return CS(i, e)(n, r);
+ };
+var nM = Object.freeze({
+ __proto__: null,
+ blur: IS,
+ clearContent: BS,
+ clearNodes: $S,
+ command: zS,
+ createParagraphNear: HS,
+ cut: FS,
+ deleteCurrentNode: VS,
+ deleteNode: WS,
+ deleteRange: US,
+ deleteSelection: KS,
+ enter: qS,
+ exitCode: JS,
+ extendMarkRange: YS,
+ first: QS,
+ focus: ZS,
+ forEach: e_,
+ insertContent: t_,
+ insertContentAt: i_,
+ joinUp: o_,
+ joinDown: s_,
+ joinBackward: l_,
+ joinForward: a_,
+ joinItemBackward: u_,
+ joinItemForward: c_,
+ keyboardShortcut: f_,
+ lift: h_,
+ liftEmptyBlock: p_,
+ liftListItem: m_,
+ newlineInCode: g_,
+ resetAttributes: y_,
+ scrollIntoView: v_,
+ selectAll: b_,
+ selectNodeBackward: w_,
+ selectNodeForward: x_,
+ selectParentNode: k_,
+ selectTextblockEnd: C_,
+ selectTextblockStart: S_,
+ setContent: M_,
+ setMark: B_,
+ setMeta: $_,
+ setNode: z_,
+ setNodeSelection: H_,
+ setTextSelection: F_,
+ sinkListItem: V_,
+ splitBlock: W_,
+ splitListItem: U_,
+ toggleList: K_,
+ toggleMark: q_,
+ toggleNode: J_,
+ toggleWrap: G_,
+ undoInputRule: Y_,
+ unsetAllMarks: Q_,
+ unsetMark: X_,
+ updateAttributes: Z_,
+ wrapIn: eM,
+ wrapInList: tM,
+});
+const CR = Et.create({
+ name: "commands",
+ addCommands() {
+ return W({}, nM);
+ },
+ }),
+ SR = Et.create({
+ name: "editable",
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("editable"),
+ props: { editable: () => this.editor.options.editable },
+ }),
+ ];
+ },
+ }),
+ _R = Et.create({
+ name: "focusEvents",
+ addProseMirrorPlugins() {
+ const { editor: t } = this;
+ return [
+ new Tt({
+ key: new Ot("focusEvents"),
+ props: {
+ handleDOMEvents: {
+ focus: (e, n) => {
+ t.isFocused = !0;
+ const r = t.state.tr
+ .setMeta("focus", { event: n })
+ .setMeta("addToHistory", !1);
+ return e.dispatch(r), !1;
+ },
+ blur: (e, n) => {
+ t.isFocused = !1;
+ const r = t.state.tr
+ .setMeta("blur", { event: n })
+ .setMeta("addToHistory", !1);
+ return e.dispatch(r), !1;
+ },
+ },
+ },
+ }),
+ ];
+ },
+ }),
+ MR = Et.create({
+ name: "keymap",
+ addKeyboardShortcuts() {
+ const t = () =>
+ this.editor.commands.first(({ commands: s }) => [
+ () => s.undoInputRule(),
+ () =>
+ s.command(({ tr: l }) => {
+ const { selection: a, doc: u } = l,
+ { empty: c, $anchor: f } = a,
+ { pos: h, parent: p } = f,
+ g = f.parent.isTextblock
+ ? l.doc.resolve(h - 1)
+ : f,
+ v = g.parent.type.spec.isolating,
+ b = f.pos - f.parentOffset,
+ x =
+ v && g.parent.childCount === 1
+ ? b === f.pos
+ : Se.atStart(u).from === h;
+ return !c ||
+ !x ||
+ !p.type.isTextblock ||
+ p.textContent.length
+ ? !1
+ : s.clearNodes();
+ }),
+ () => s.deleteSelection(),
+ () => s.joinBackward(),
+ () => s.selectNodeBackward(),
+ ]),
+ e = () =>
+ this.editor.commands.first(({ commands: s }) => [
+ () => s.deleteSelection(),
+ () => s.deleteCurrentNode(),
+ () => s.joinForward(),
+ () => s.selectNodeForward(),
+ ]),
+ r = {
+ Enter: () =>
+ this.editor.commands.first(({ commands: s }) => [
+ () => s.newlineInCode(),
+ () => s.createParagraphNear(),
+ () => s.liftEmptyBlock(),
+ () => s.splitBlock(),
+ ]),
+ "Mod-Enter": () => this.editor.commands.exitCode(),
+ Backspace: t,
+ "Mod-Backspace": t,
+ "Shift-Backspace": t,
+ Delete: e,
+ "Mod-Delete": e,
+ "Mod-a": () => this.editor.commands.selectAll(),
+ },
+ i = W({}, r),
+ o = be(W({}, r), {
+ "Ctrl-h": t,
+ "Alt-Backspace": t,
+ "Ctrl-d": e,
+ "Ctrl-Alt-Backspace": e,
+ "Alt-Delete": e,
+ "Alt-d": e,
+ "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
+ "Ctrl-e": () => this.editor.commands.selectTextblockEnd(),
+ });
+ return hf() || pf() ? o : i;
+ },
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("clearDocument"),
+ appendTransaction: (t, e, n) => {
+ if (!(t.some((g) => g.docChanged) && !e.doc.eq(n.doc)))
+ return;
+ const { empty: i, from: o, to: s } = e.selection,
+ l = Se.atStart(e.doc).from,
+ a = Se.atEnd(e.doc).to;
+ if (
+ i ||
+ !(o === l && s === a) ||
+ !(
+ n.doc.textBetween(
+ 0,
+ n.doc.content.size,
+ " ",
+ " "
+ ).length === 0
+ )
+ )
+ return;
+ const f = n.tr,
+ h = H0({ state: n, transaction: f }),
+ { commands: p } = new TS({
+ editor: this.editor,
+ state: h,
+ });
+ if ((p.clearNodes(), !!f.steps.length)) return f;
+ },
+ }),
+ ];
+ },
+ }),
+ ER = Et.create({
+ name: "tabindex",
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("tabindex"),
+ props: {
+ attributes: this.editor.isEditable
+ ? { tabindex: "0" }
+ : {},
+ },
+ }),
+ ];
+ },
+ });
+function bi(t) {
+ return new xs({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r }) => {
+ const i = lt(t.getAttributes, void 0, r);
+ if (i === !1 || i === null) return null;
+ const { tr: o } = e,
+ s = r[r.length - 1],
+ l = r[0];
+ if (s) {
+ const a = l.search(/\S/),
+ u = n.from + l.indexOf(s),
+ c = u + s.length;
+ if (
+ vf(n.from, n.to, e.doc)
+ .filter((p) =>
+ p.mark.type.excluded.find(
+ (v) => v === t.type && v !== p.mark.type
+ )
+ )
+ .filter((p) => p.to > u).length
+ )
+ return null;
+ c < n.to && o.delete(c, n.to),
+ u > n.from && o.delete(n.from + a, u);
+ const h = n.from + a + s.length;
+ o.addMark(n.from + a, h, t.type.create(i || {})),
+ o.removeStoredMark(t.type);
+ }
+ },
+ });
+}
+function W0(t) {
+ return new xs({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r }) => {
+ const i = lt(t.getAttributes, void 0, r) || {},
+ { tr: o } = e,
+ s = n.from;
+ let l = n.to;
+ const a = t.type.create(i);
+ if (r[1]) {
+ const u = r[0].lastIndexOf(r[1]);
+ let c = s + u;
+ c > l ? (c = l) : (l = c + r[1].length);
+ const f = r[0][r[0].length - 1];
+ o.insertText(f, s + r[0].length - 1), o.replaceWith(c, l, a);
+ } else
+ r[0] &&
+ o
+ .insert(s - 1, t.type.create(i))
+ .delete(o.mapping.map(s), o.mapping.map(l));
+ o.scrollIntoView();
+ },
+ });
+}
+function Lc(t) {
+ return new xs({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r }) => {
+ const i = e.doc.resolve(n.from),
+ o = lt(t.getAttributes, void 0, r) || {};
+ if (
+ !i
+ .node(-1)
+ .canReplaceWith(i.index(-1), i.indexAfter(-1), t.type)
+ )
+ return null;
+ e.tr.delete(n.from, n.to).setBlockType(n.from, n.from, t.type, o);
+ },
+ });
+}
+function mt(t) {
+ return new xs({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r }) => {
+ let i = t.replace,
+ o = n.from;
+ const s = n.to;
+ if (r[1]) {
+ const l = r[0].lastIndexOf(r[1]);
+ (i += r[0].slice(l + r[1].length)), (o += l);
+ const a = o - s;
+ a > 0 && ((i = r[0].slice(l - a, l) + i), (o = s));
+ }
+ e.tr.insertText(i, o, s);
+ },
+ });
+}
+function ss(t) {
+ return new xs({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r, chain: i }) => {
+ const o = lt(t.getAttributes, void 0, r) || {},
+ s = e.tr.delete(n.from, n.to),
+ a = s.doc.resolve(n.from).blockRange(),
+ u = a && Xd(a, t.type, o);
+ if (!u) return null;
+ if ((s.wrap(a, u), t.keepMarks && t.editor)) {
+ const { selection: f, storedMarks: h } = e,
+ { splittableMarks: p } = t.editor.extensionManager,
+ g = h || (f.$to.parentOffset && f.$from.marks());
+ if (g) {
+ const v = g.filter((b) => p.includes(b.type.name));
+ s.ensureMarks(v);
+ }
+ }
+ if (t.keepAttributes) {
+ const f =
+ t.type.name === "bulletList" ||
+ t.type.name === "orderedList"
+ ? "listItem"
+ : "taskList";
+ i().updateAttributes(f, o).run();
+ }
+ const c = s.doc.resolve(n.from - 1).nodeBefore;
+ c &&
+ c.type === t.type &&
+ $r(s.doc, n.from - 1) &&
+ (!t.joinPredicate || t.joinPredicate(r, c)) &&
+ s.join(n.from - 1);
+ },
+ });
+}
+class Cn {
+ constructor(e = {}) {
+ (this.type = "mark"),
+ (this.name = "mark"),
+ (this.parent = null),
+ (this.child = null),
+ (this.config = { name: this.name, defaultOptions: {} }),
+ (this.config = W(W({}, this.config), e)),
+ (this.name = this.config.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`
+ ),
+ (this.options = this.config.defaultOptions),
+ this.config.addOptions &&
+ (this.options = lt(
+ bt(this, "addOptions", { name: this.name })
+ )),
+ (this.storage =
+ lt(
+ bt(this, "addStorage", {
+ name: this.name,
+ options: this.options,
+ })
+ ) || {});
+ }
+ static create(e = {}) {
+ return new Cn(e);
+ }
+ configure(e = {}) {
+ const n = this.extend();
+ return (
+ (n.options = Ua(this.options, e)),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+ extend(e = {}) {
+ const n = new Cn(e);
+ return (
+ (n.parent = this),
+ (this.child = n),
+ (n.name = e.name ? e.name : n.parent.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`
+ ),
+ (n.options = lt(bt(n, "addOptions", { name: n.name }))),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+ static handleExit({ editor: e, mark: n }) {
+ const { tr: r } = e.state,
+ i = e.state.selection.$from;
+ if (i.pos === i.end()) {
+ const s = i.marks();
+ if (!!!s.find((u) => (u == null ? void 0 : u.type.name) === n.name))
+ return !1;
+ const a = s.find(
+ (u) => (u == null ? void 0 : u.type.name) === n.name
+ );
+ return (
+ a && r.removeStoredMark(a),
+ r.insertText(" ", i.pos),
+ e.view.dispatch(r),
+ !0
+ );
+ }
+ return !1;
+ }
+}
+class ut {
+ constructor(e = {}) {
+ (this.type = "node"),
+ (this.name = "node"),
+ (this.parent = null),
+ (this.child = null),
+ (this.config = { name: this.name, defaultOptions: {} }),
+ (this.config = W(W({}, this.config), e)),
+ (this.name = this.config.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`
+ ),
+ (this.options = this.config.defaultOptions),
+ this.config.addOptions &&
+ (this.options = lt(
+ bt(this, "addOptions", { name: this.name })
+ )),
+ (this.storage =
+ lt(
+ bt(this, "addStorage", {
+ name: this.name,
+ options: this.options,
+ })
+ ) || {});
+ }
+ static create(e = {}) {
+ return new ut(e);
+ }
+ configure(e = {}) {
+ const n = this.extend();
+ return (
+ (n.options = Ua(this.options, e)),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+ extend(e = {}) {
+ const n = new ut(e);
+ return (
+ (n.parent = this),
+ (this.child = n),
+ (n.name = e.name ? e.name : n.parent.name),
+ e.defaultOptions &&
+ console.warn(
+ `[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`
+ ),
+ (n.options = lt(bt(n, "addOptions", { name: n.name }))),
+ (n.storage = lt(
+ bt(n, "addStorage", { name: n.name, options: n.options })
+ )),
+ n
+ );
+ }
+}
+function Dr(t) {
+ return new NS({
+ find: t.find,
+ handler: ({ state: e, range: n, match: r, pasteEvent: i }) => {
+ const o = lt(t.getAttributes, void 0, r, i);
+ if (o === !1 || o === null) return null;
+ const { tr: s } = e,
+ l = r[r.length - 1],
+ a = r[0];
+ let u = n.to;
+ if (l) {
+ const c = a.search(/\S/),
+ f = n.from + a.indexOf(l),
+ h = f + l.length;
+ if (
+ vf(n.from, n.to, e.doc)
+ .filter((g) =>
+ g.mark.type.excluded.find(
+ (b) => b === t.type && b !== g.mark.type
+ )
+ )
+ .filter((g) => g.to > f).length
+ )
+ return null;
+ h < n.to && s.delete(h, n.to),
+ f > n.from && s.delete(n.from + c, f),
+ (u = n.from + c + l.length),
+ s.addMark(n.from + c, u, t.type.create(o || {})),
+ s.removeStoredMark(t.type);
+ }
+ },
+ });
+}
+function rM(t) {
+ return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
+}
+var iM = "tippy-box",
+ U0 = "tippy-content",
+ oM = "tippy-backdrop",
+ K0 = "tippy-arrow",
+ q0 = "tippy-svg-arrow",
+ Gr = { passive: !0, capture: !0 },
+ J0 = function () {
+ return document.body;
+ };
+function Nu(t, e, n) {
+ if (Array.isArray(t)) {
+ var r = t[e];
+ return r == null ? (Array.isArray(n) ? n[e] : n) : r;
+ }
+ return t;
+}
+function bf(t, e) {
+ var n = {}.toString.call(t);
+ return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
+}
+function G0(t, e) {
+ return typeof t == "function" ? t.apply(void 0, e) : t;
+}
+function Bp(t, e) {
+ if (e === 0) return t;
+ var n;
+ return function (r) {
+ clearTimeout(n),
+ (n = setTimeout(function () {
+ t(r);
+ }, e));
+ };
+}
+function sM(t) {
+ return t.split(/\s+/).filter(Boolean);
+}
+function Ni(t) {
+ return [].concat(t);
+}
+function $p(t, e) {
+ t.indexOf(e) === -1 && t.push(e);
+}
+function lM(t) {
+ return t.filter(function (e, n) {
+ return t.indexOf(e) === n;
+ });
+}
+function aM(t) {
+ return t.split("-")[0];
+}
+function Hl(t) {
+ return [].slice.call(t);
+}
+function zp(t) {
+ return Object.keys(t).reduce(function (e, n) {
+ return t[n] !== void 0 && (e[n] = t[n]), e;
+ }, {});
+}
+function zo() {
+ return document.createElement("div");
+}
+function Ka(t) {
+ return ["Element", "Fragment"].some(function (e) {
+ return bf(t, e);
+ });
+}
+function uM(t) {
+ return bf(t, "NodeList");
+}
+function cM(t) {
+ return bf(t, "MouseEvent");
+}
+function dM(t) {
+ return !!(t && t._tippy && t._tippy.reference === t);
+}
+function fM(t) {
+ return Ka(t)
+ ? [t]
+ : uM(t)
+ ? Hl(t)
+ : Array.isArray(t)
+ ? t
+ : Hl(document.querySelectorAll(t));
+}
+function ju(t, e) {
+ t.forEach(function (n) {
+ n && (n.style.transitionDuration = e + "ms");
+ });
+}
+function Hp(t, e) {
+ t.forEach(function (n) {
+ n && n.setAttribute("data-state", e);
+ });
+}
+function hM(t) {
+ var e,
+ n = Ni(t),
+ r = n[0];
+ return r != null && (e = r.ownerDocument) != null && e.body
+ ? r.ownerDocument
+ : document;
+}
+function pM(t, e) {
+ var n = e.clientX,
+ r = e.clientY;
+ return t.every(function (i) {
+ var o = i.popperRect,
+ s = i.popperState,
+ l = i.props,
+ a = l.interactiveBorder,
+ u = aM(s.placement),
+ c = s.modifiersData.offset;
+ if (!c) return !0;
+ var f = u === "bottom" ? c.top.y : 0,
+ h = u === "top" ? c.bottom.y : 0,
+ p = u === "right" ? c.left.x : 0,
+ g = u === "left" ? c.right.x : 0,
+ v = o.top - r + f > a,
+ b = r - o.bottom - h > a,
+ x = o.left - n + p > a,
+ S = n - o.right - g > a;
+ return v || b || x || S;
+ });
+}
+function Lu(t, e, n) {
+ var r = e + "EventListener";
+ ["transitionend", "webkitTransitionEnd"].forEach(function (i) {
+ t[r](i, n);
+ });
+}
+function Fp(t, e) {
+ for (var n = e; n; ) {
+ var r;
+ if (t.contains(n)) return !0;
+ n =
+ n.getRootNode == null || (r = n.getRootNode()) == null
+ ? void 0
+ : r.host;
+ }
+ return !1;
+}
+var Fn = { isTouch: !1 },
+ Vp = 0;
+function mM() {
+ Fn.isTouch ||
+ ((Fn.isTouch = !0),
+ window.performance && document.addEventListener("mousemove", Y0));
+}
+function Y0() {
+ var t = performance.now();
+ t - Vp < 20 &&
+ ((Fn.isTouch = !1), document.removeEventListener("mousemove", Y0)),
+ (Vp = t);
+}
+function gM() {
+ var t = document.activeElement;
+ if (dM(t)) {
+ var e = t._tippy;
+ t.blur && !e.state.isVisible && t.blur();
+ }
+}
+function yM() {
+ document.addEventListener("touchstart", mM, Gr),
+ window.addEventListener("blur", gM);
+}
+var vM = typeof window != "undefined" && typeof document != "undefined",
+ bM = vM ? !!window.msCrypto : !1,
+ wM = {
+ animateFill: !1,
+ followCursor: !1,
+ inlinePositioning: !1,
+ sticky: !1,
+ },
+ xM = {
+ allowHTML: !1,
+ animation: "fade",
+ arrow: !0,
+ content: "",
+ inertia: !1,
+ maxWidth: 350,
+ role: "tooltip",
+ theme: "",
+ zIndex: 9999,
+ },
+ Tn = Object.assign(
+ {
+ appendTo: J0,
+ aria: { content: "auto", expanded: "auto" },
+ delay: 0,
+ duration: [300, 250],
+ getReferenceClientRect: null,
+ hideOnClick: !0,
+ ignoreAttributes: !1,
+ interactive: !1,
+ interactiveBorder: 2,
+ interactiveDebounce: 0,
+ moveTransition: "",
+ offset: [0, 10],
+ onAfterUpdate: function () {},
+ onBeforeUpdate: function () {},
+ onCreate: function () {},
+ onDestroy: function () {},
+ onHidden: function () {},
+ onHide: function () {},
+ onMount: function () {},
+ onShow: function () {},
+ onShown: function () {},
+ onTrigger: function () {},
+ onUntrigger: function () {},
+ onClickOutside: function () {},
+ placement: "top",
+ plugins: [],
+ popperOptions: {},
+ render: null,
+ showOnCreate: !1,
+ touch: !0,
+ trigger: "mouseenter focus",
+ triggerTarget: null,
+ },
+ wM,
+ xM
+ ),
+ kM = Object.keys(Tn),
+ CM = function (e) {
+ var n = Object.keys(e);
+ n.forEach(function (r) {
+ Tn[r] = e[r];
+ });
+ };
+function Q0(t) {
+ var e = t.plugins || [],
+ n = e.reduce(function (r, i) {
+ var o = i.name,
+ s = i.defaultValue;
+ if (o) {
+ var l;
+ r[o] = t[o] !== void 0 ? t[o] : (l = Tn[o]) != null ? l : s;
+ }
+ return r;
+ }, {});
+ return Object.assign({}, t, n);
+}
+function SM(t, e) {
+ var n = e ? Object.keys(Q0(Object.assign({}, Tn, { plugins: e }))) : kM,
+ r = n.reduce(function (i, o) {
+ var s = (t.getAttribute("data-tippy-" + o) || "").trim();
+ if (!s) return i;
+ if (o === "content") i[o] = s;
+ else
+ try {
+ i[o] = JSON.parse(s);
+ } catch (l) {
+ i[o] = s;
+ }
+ return i;
+ }, {});
+ return r;
+}
+function Wp(t, e) {
+ var n = Object.assign(
+ {},
+ e,
+ { content: G0(e.content, [t]) },
+ e.ignoreAttributes ? {} : SM(t, e.plugins)
+ );
+ return (
+ (n.aria = Object.assign({}, Tn.aria, n.aria)),
+ (n.aria = {
+ expanded:
+ n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
+ content:
+ n.aria.content === "auto"
+ ? e.interactive
+ ? null
+ : "describedby"
+ : n.aria.content,
+ }),
+ n
+ );
+}
+var _M = function () {
+ return "innerHTML";
+};
+function Dc(t, e) {
+ t[_M()] = e;
+}
+function Up(t) {
+ var e = zo();
+ return (
+ t === !0
+ ? (e.className = K0)
+ : ((e.className = q0), Ka(t) ? e.appendChild(t) : Dc(e, t)),
+ e
+ );
+}
+function Kp(t, e) {
+ Ka(e.content)
+ ? (Dc(t, ""), t.appendChild(e.content))
+ : typeof e.content != "function" &&
+ (e.allowHTML ? Dc(t, e.content) : (t.textContent = e.content));
+}
+function Ic(t) {
+ var e = t.firstElementChild,
+ n = Hl(e.children);
+ return {
+ box: e,
+ content: n.find(function (r) {
+ return r.classList.contains(U0);
+ }),
+ arrow: n.find(function (r) {
+ return r.classList.contains(K0) || r.classList.contains(q0);
+ }),
+ backdrop: n.find(function (r) {
+ return r.classList.contains(oM);
+ }),
+ };
+}
+function X0(t) {
+ var e = zo(),
+ n = zo();
+ (n.className = iM),
+ n.setAttribute("data-state", "hidden"),
+ n.setAttribute("tabindex", "-1");
+ var r = zo();
+ (r.className = U0),
+ r.setAttribute("data-state", "hidden"),
+ Kp(r, t.props),
+ e.appendChild(n),
+ n.appendChild(r),
+ i(t.props, t.props);
+ function i(o, s) {
+ var l = Ic(e),
+ a = l.box,
+ u = l.content,
+ c = l.arrow;
+ s.theme
+ ? a.setAttribute("data-theme", s.theme)
+ : a.removeAttribute("data-theme"),
+ typeof s.animation == "string"
+ ? a.setAttribute("data-animation", s.animation)
+ : a.removeAttribute("data-animation"),
+ s.inertia
+ ? a.setAttribute("data-inertia", "")
+ : a.removeAttribute("data-inertia"),
+ (a.style.maxWidth =
+ typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth),
+ s.role ? a.setAttribute("role", s.role) : a.removeAttribute("role"),
+ (o.content !== s.content || o.allowHTML !== s.allowHTML) &&
+ Kp(u, t.props),
+ s.arrow
+ ? c
+ ? o.arrow !== s.arrow &&
+ (a.removeChild(c), a.appendChild(Up(s.arrow)))
+ : a.appendChild(Up(s.arrow))
+ : c && a.removeChild(c);
+ }
+ return { popper: e, onUpdate: i };
+}
+X0.$$tippy = !0;
+var MM = 1,
+ Ws = [],
+ Du = [];
+function EM(t, e) {
+ var n = Wp(t, Object.assign({}, Tn, Q0(zp(e)))),
+ r,
+ i,
+ o,
+ s = !1,
+ l = !1,
+ a = !1,
+ u = !1,
+ c,
+ f,
+ h,
+ p = [],
+ g = Bp(j, n.interactiveDebounce),
+ v,
+ b = MM++,
+ x = null,
+ S = lM(n.plugins),
+ T = {
+ isEnabled: !0,
+ isVisible: !1,
+ isDestroyed: !1,
+ isMounted: !1,
+ isShown: !1,
+ },
+ d = {
+ id: b,
+ reference: t,
+ popper: zo(),
+ popperInstance: x,
+ props: n,
+ state: T,
+ plugins: S,
+ clearDelayTimeouts: Oe,
+ setProps: Je,
+ setContent: Fe,
+ show: ct,
+ hide: nn,
+ hideWithInteractivity: ur,
+ enable: pe,
+ disable: ke,
+ unmount: Cs,
+ destroy: Fr,
+ };
+ if (!n.render) return d;
+ var y = n.render(d),
+ m = y.popper,
+ w = y.onUpdate;
+ m.setAttribute("data-tippy-root", ""),
+ (m.id = "tippy-" + d.id),
+ (d.popper = m),
+ (t._tippy = d),
+ (m._tippy = d);
+ var k = S.map(function (F) {
+ return F.fn(d);
+ }),
+ _ = t.hasAttribute("aria-expanded");
+ return (
+ Pe(),
+ ae(),
+ N(),
+ D("onCreate", [d]),
+ n.showOnCreate && he(),
+ m.addEventListener("mouseenter", function () {
+ d.props.interactive && d.state.isVisible && d.clearDelayTimeouts();
+ }),
+ m.addEventListener("mouseleave", function () {
+ d.props.interactive &&
+ d.props.trigger.indexOf("mouseenter") >= 0 &&
+ L().addEventListener("mousemove", g);
+ }),
+ d
+ );
+ function C() {
+ var F = d.props.touch;
+ return Array.isArray(F) ? F : [F, 0];
+ }
+ function E() {
+ return C()[0] === "hold";
+ }
+ function R() {
+ var F;
+ return !!((F = d.props.render) != null && F.$$tippy);
+ }
+ function P() {
+ return v || t;
+ }
+ function L() {
+ var F = P().parentNode;
+ return F ? hM(F) : document;
+ }
+ function I() {
+ return Ic(m);
+ }
+ function M(F) {
+ return (d.state.isMounted && !d.state.isVisible) ||
+ Fn.isTouch ||
+ (c && c.type === "focus")
+ ? 0
+ : Nu(d.props.delay, F ? 0 : 1, Tn.delay);
+ }
+ function N(F) {
+ F === void 0 && (F = !1),
+ (m.style.pointerEvents = d.props.interactive && !F ? "" : "none"),
+ (m.style.zIndex = "" + d.props.zIndex);
+ }
+ function D(F, le, ge) {
+ if (
+ (ge === void 0 && (ge = !0),
+ k.forEach(function (Ve) {
+ Ve[F] && Ve[F].apply(Ve, le);
+ }),
+ ge)
+ ) {
+ var Ke;
+ (Ke = d.props)[F].apply(Ke, le);
+ }
+ }
+ function K() {
+ var F = d.props.aria;
+ if (!!F.content) {
+ var le = "aria-" + F.content,
+ ge = m.id,
+ Ke = Ni(d.props.triggerTarget || t);
+ Ke.forEach(function (Ve) {
+ var Ut = Ve.getAttribute(le);
+ if (d.state.isVisible)
+ Ve.setAttribute(le, Ut ? Ut + " " + ge : ge);
+ else {
+ var un = Ut && Ut.replace(ge, "").trim();
+ un ? Ve.setAttribute(le, un) : Ve.removeAttribute(le);
+ }
+ });
+ }
+ }
+ function ae() {
+ if (!(_ || !d.props.aria.expanded)) {
+ var F = Ni(d.props.triggerTarget || t);
+ F.forEach(function (le) {
+ d.props.interactive
+ ? le.setAttribute(
+ "aria-expanded",
+ d.state.isVisible && le === P() ? "true" : "false"
+ )
+ : le.removeAttribute("aria-expanded");
+ });
+ }
+ }
+ function Q() {
+ L().removeEventListener("mousemove", g),
+ (Ws = Ws.filter(function (F) {
+ return F !== g;
+ }));
+ }
+ function me(F) {
+ if (!(Fn.isTouch && (a || F.type === "mousedown"))) {
+ var le = (F.composedPath && F.composedPath()[0]) || F.target;
+ if (!(d.props.interactive && Fp(m, le))) {
+ if (
+ Ni(d.props.triggerTarget || t).some(function (ge) {
+ return Fp(ge, le);
+ })
+ ) {
+ if (
+ Fn.isTouch ||
+ (d.state.isVisible &&
+ d.props.trigger.indexOf("click") >= 0)
+ )
+ return;
+ } else D("onClickOutside", [d, F]);
+ d.props.hideOnClick === !0 &&
+ (d.clearDelayTimeouts(),
+ d.hide(),
+ (l = !0),
+ setTimeout(function () {
+ l = !1;
+ }),
+ d.state.isMounted || Ae());
+ }
+ }
+ }
+ function je() {
+ a = !0;
+ }
+ function Le() {
+ a = !1;
+ }
+ function Re() {
+ var F = L();
+ F.addEventListener("mousedown", me, !0),
+ F.addEventListener("touchend", me, Gr),
+ F.addEventListener("touchstart", Le, Gr),
+ F.addEventListener("touchmove", je, Gr);
+ }
+ function Ae() {
+ var F = L();
+ F.removeEventListener("mousedown", me, !0),
+ F.removeEventListener("touchend", me, Gr),
+ F.removeEventListener("touchstart", Le, Gr),
+ F.removeEventListener("touchmove", je, Gr);
+ }
+ function z(F, le) {
+ ee(F, function () {
+ !d.state.isVisible &&
+ m.parentNode &&
+ m.parentNode.contains(m) &&
+ le();
+ });
+ }
+ function X(F, le) {
+ ee(F, le);
+ }
+ function ee(F, le) {
+ var ge = I().box;
+ function Ke(Ve) {
+ Ve.target === ge && (Lu(ge, "remove", Ke), le());
+ }
+ if (F === 0) return le();
+ Lu(ge, "remove", f), Lu(ge, "add", Ke), (f = Ke);
+ }
+ function ue(F, le, ge) {
+ ge === void 0 && (ge = !1);
+ var Ke = Ni(d.props.triggerTarget || t);
+ Ke.forEach(function (Ve) {
+ Ve.addEventListener(F, le, ge),
+ p.push({ node: Ve, eventType: F, handler: le, options: ge });
+ });
+ }
+ function Pe() {
+ E() &&
+ (ue("touchstart", O, { passive: !0 }),
+ ue("touchend", H, { passive: !0 })),
+ sM(d.props.trigger).forEach(function (F) {
+ if (F !== "manual")
+ switch ((ue(F, O), F)) {
+ case "mouseenter":
+ ue("mouseleave", H);
+ break;
+ case "focus":
+ ue(bM ? "focusout" : "blur", V);
+ break;
+ case "focusin":
+ ue("focusout", V);
+ break;
+ }
+ });
+ }
+ function A() {
+ p.forEach(function (F) {
+ var le = F.node,
+ ge = F.eventType,
+ Ke = F.handler,
+ Ve = F.options;
+ le.removeEventListener(ge, Ke, Ve);
+ }),
+ (p = []);
+ }
+ function O(F) {
+ var le,
+ ge = !1;
+ if (!(!d.state.isEnabled || q(F) || l)) {
+ var Ke = ((le = c) == null ? void 0 : le.type) === "focus";
+ (c = F),
+ (v = F.currentTarget),
+ ae(),
+ !d.state.isVisible &&
+ cM(F) &&
+ Ws.forEach(function (Ve) {
+ return Ve(F);
+ }),
+ F.type === "click" &&
+ (d.props.trigger.indexOf("mouseenter") < 0 || s) &&
+ d.props.hideOnClick !== !1 &&
+ d.state.isVisible
+ ? (ge = !0)
+ : he(F),
+ F.type === "click" && (s = !ge),
+ ge && !Ke && ce(F);
+ }
+ }
+ function j(F) {
+ var le = F.target,
+ ge = P().contains(le) || m.contains(le);
+ if (!(F.type === "mousemove" && ge)) {
+ var Ke = J()
+ .concat(m)
+ .map(function (Ve) {
+ var Ut,
+ un = Ve._tippy,
+ _i =
+ (Ut = un.popperInstance) == null
+ ? void 0
+ : Ut.state;
+ return _i
+ ? {
+ popperRect: Ve.getBoundingClientRect(),
+ popperState: _i,
+ props: n,
+ }
+ : null;
+ })
+ .filter(Boolean);
+ pM(Ke, F) && (Q(), ce(F));
+ }
+ }
+ function H(F) {
+ var le = q(F) || (d.props.trigger.indexOf("click") >= 0 && s);
+ if (!le) {
+ if (d.props.interactive) {
+ d.hideWithInteractivity(F);
+ return;
+ }
+ ce(F);
+ }
+ }
+ function V(F) {
+ (d.props.trigger.indexOf("focusin") < 0 && F.target !== P()) ||
+ (d.props.interactive &&
+ F.relatedTarget &&
+ m.contains(F.relatedTarget)) ||
+ ce(F);
+ }
+ function q(F) {
+ return Fn.isTouch ? E() !== F.type.indexOf("touch") >= 0 : !1;
+ }
+ function se() {
+ Z();
+ var F = d.props,
+ le = F.popperOptions,
+ ge = F.placement,
+ Ke = F.offset,
+ Ve = F.getReferenceClientRect,
+ Ut = F.moveTransition,
+ un = R() ? Ic(m).arrow : null,
+ _i = Ve
+ ? {
+ getBoundingClientRect: Ve,
+ contextElement: Ve.contextElement || P(),
+ }
+ : t,
+ zf = {
+ name: "$$tippy",
+ enabled: !0,
+ phase: "beforeWrite",
+ requires: ["computeStyles"],
+ fn: function (Ss) {
+ var Mi = Ss.state;
+ if (R()) {
+ var By = I(),
+ Qa = By.box;
+ ["placement", "reference-hidden", "escaped"].forEach(
+ function (_s) {
+ _s === "placement"
+ ? Qa.setAttribute(
+ "data-placement",
+ Mi.placement
+ )
+ : Mi.attributes.popper["data-popper-" + _s]
+ ? Qa.setAttribute("data-" + _s, "")
+ : Qa.removeAttribute("data-" + _s);
+ }
+ ),
+ (Mi.attributes.popper = {});
+ }
+ },
+ },
+ Vr = [
+ { name: "offset", options: { offset: Ke } },
+ {
+ name: "preventOverflow",
+ options: {
+ padding: { top: 2, bottom: 2, left: 5, right: 5 },
+ },
+ },
+ { name: "flip", options: { padding: 5 } },
+ { name: "computeStyles", options: { adaptive: !Ut } },
+ zf,
+ ];
+ R() &&
+ un &&
+ Vr.push({ name: "arrow", options: { element: un, padding: 3 } }),
+ Vr.push.apply(Vr, (le == null ? void 0 : le.modifiers) || []),
+ (d.popperInstance = L1(
+ _i,
+ m,
+ Object.assign({}, le, {
+ placement: ge,
+ onFirstUpdate: h,
+ modifiers: Vr,
+ })
+ ));
+ }
+ function Z() {
+ d.popperInstance &&
+ (d.popperInstance.destroy(), (d.popperInstance = null));
+ }
+ function te() {
+ var F = d.props.appendTo,
+ le,
+ ge = P();
+ (d.props.interactive && F === J0) || F === "parent"
+ ? (le = ge.parentNode)
+ : (le = G0(F, [ge])),
+ le.contains(m) || le.appendChild(m),
+ (d.state.isMounted = !0),
+ se();
+ }
+ function J() {
+ return Hl(m.querySelectorAll("[data-tippy-root]"));
+ }
+ function he(F) {
+ d.clearDelayTimeouts(), F && D("onTrigger", [d, F]), Re();
+ var le = M(!0),
+ ge = C(),
+ Ke = ge[0],
+ Ve = ge[1];
+ Fn.isTouch && Ke === "hold" && Ve && (le = Ve),
+ le
+ ? (r = setTimeout(function () {
+ d.show();
+ }, le))
+ : d.show();
+ }
+ function ce(F) {
+ if (
+ (d.clearDelayTimeouts(),
+ D("onUntrigger", [d, F]),
+ !d.state.isVisible)
+ ) {
+ Ae();
+ return;
+ }
+ if (
+ !(
+ d.props.trigger.indexOf("mouseenter") >= 0 &&
+ d.props.trigger.indexOf("click") >= 0 &&
+ ["mouseleave", "mousemove"].indexOf(F.type) >= 0 &&
+ s
+ )
+ ) {
+ var le = M(!1);
+ le
+ ? (i = setTimeout(function () {
+ d.state.isVisible && d.hide();
+ }, le))
+ : (o = requestAnimationFrame(function () {
+ d.hide();
+ }));
+ }
+ }
+ function pe() {
+ d.state.isEnabled = !0;
+ }
+ function ke() {
+ d.hide(), (d.state.isEnabled = !1);
+ }
+ function Oe() {
+ clearTimeout(r), clearTimeout(i), cancelAnimationFrame(o);
+ }
+ function Je(F) {
+ if (!d.state.isDestroyed) {
+ D("onBeforeUpdate", [d, F]), A();
+ var le = d.props,
+ ge = Wp(
+ t,
+ Object.assign({}, le, zp(F), { ignoreAttributes: !0 })
+ );
+ (d.props = ge),
+ Pe(),
+ le.interactiveDebounce !== ge.interactiveDebounce &&
+ (Q(), (g = Bp(j, ge.interactiveDebounce))),
+ le.triggerTarget && !ge.triggerTarget
+ ? Ni(le.triggerTarget).forEach(function (Ke) {
+ Ke.removeAttribute("aria-expanded");
+ })
+ : ge.triggerTarget && t.removeAttribute("aria-expanded"),
+ ae(),
+ N(),
+ w && w(le, ge),
+ d.popperInstance &&
+ (se(),
+ J().forEach(function (Ke) {
+ requestAnimationFrame(
+ Ke._tippy.popperInstance.forceUpdate
+ );
+ })),
+ D("onAfterUpdate", [d, F]);
+ }
+ }
+ function Fe(F) {
+ d.setProps({ content: F });
+ }
+ function ct() {
+ var F = d.state.isVisible,
+ le = d.state.isDestroyed,
+ ge = !d.state.isEnabled,
+ Ke = Fn.isTouch && !d.props.touch,
+ Ve = Nu(d.props.duration, 0, Tn.duration);
+ if (
+ !(F || le || ge || Ke) &&
+ !P().hasAttribute("disabled") &&
+ (D("onShow", [d], !1), d.props.onShow(d) !== !1)
+ ) {
+ if (
+ ((d.state.isVisible = !0),
+ R() && (m.style.visibility = "visible"),
+ N(),
+ Re(),
+ d.state.isMounted || (m.style.transition = "none"),
+ R())
+ ) {
+ var Ut = I(),
+ un = Ut.box,
+ _i = Ut.content;
+ ju([un, _i], 0);
+ }
+ (h = function () {
+ var Vr;
+ if (!(!d.state.isVisible || u)) {
+ if (
+ ((u = !0),
+ m.offsetHeight,
+ (m.style.transition = d.props.moveTransition),
+ R() && d.props.animation)
+ ) {
+ var Ya = I(),
+ Ss = Ya.box,
+ Mi = Ya.content;
+ ju([Ss, Mi], Ve), Hp([Ss, Mi], "visible");
+ }
+ K(),
+ ae(),
+ $p(Du, d),
+ (Vr = d.popperInstance) == null || Vr.forceUpdate(),
+ D("onMount", [d]),
+ d.props.animation &&
+ R() &&
+ X(Ve, function () {
+ (d.state.isShown = !0), D("onShown", [d]);
+ });
+ }
+ }),
+ te();
+ }
+ }
+ function nn() {
+ var F = !d.state.isVisible,
+ le = d.state.isDestroyed,
+ ge = !d.state.isEnabled,
+ Ke = Nu(d.props.duration, 1, Tn.duration);
+ if (
+ !(F || le || ge) &&
+ (D("onHide", [d], !1), d.props.onHide(d) !== !1)
+ ) {
+ if (
+ ((d.state.isVisible = !1),
+ (d.state.isShown = !1),
+ (u = !1),
+ (s = !1),
+ R() && (m.style.visibility = "hidden"),
+ Q(),
+ Ae(),
+ N(!0),
+ R())
+ ) {
+ var Ve = I(),
+ Ut = Ve.box,
+ un = Ve.content;
+ d.props.animation && (ju([Ut, un], Ke), Hp([Ut, un], "hidden"));
+ }
+ K(),
+ ae(),
+ d.props.animation ? R() && z(Ke, d.unmount) : d.unmount();
+ }
+ }
+ function ur(F) {
+ L().addEventListener("mousemove", g), $p(Ws, g), g(F);
+ }
+ function Cs() {
+ d.state.isVisible && d.hide(),
+ d.state.isMounted &&
+ (Z(),
+ J().forEach(function (F) {
+ F._tippy.unmount();
+ }),
+ m.parentNode && m.parentNode.removeChild(m),
+ (Du = Du.filter(function (F) {
+ return F !== d;
+ })),
+ (d.state.isMounted = !1),
+ D("onHidden", [d]));
+ }
+ function Fr() {
+ d.state.isDestroyed ||
+ (d.clearDelayTimeouts(),
+ d.unmount(),
+ A(),
+ delete t._tippy,
+ (d.state.isDestroyed = !0),
+ D("onDestroy", [d]));
+ }
+}
+function fo(t, e) {
+ e === void 0 && (e = {});
+ var n = Tn.plugins.concat(e.plugins || []);
+ yM();
+ var r = Object.assign({}, e, { plugins: n }),
+ i = fM(t),
+ o = i.reduce(function (s, l) {
+ var a = l && EM(l, r);
+ return a && s.push(a), s;
+ }, []);
+ return Ka(t) ? o[0] : o;
+}
+fo.defaultProps = Tn;
+fo.setDefaultProps = CM;
+fo.currentInput = Fn;
+Object.assign({}, E1, {
+ effect: function (e) {
+ var n = e.state,
+ r = {
+ popper: {
+ position: n.options.strategy,
+ left: "0",
+ top: "0",
+ margin: "0",
+ },
+ arrow: { position: "absolute" },
+ reference: {},
+ };
+ Object.assign(n.elements.popper.style, r.popper),
+ (n.styles = r),
+ n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
+ },
+});
+fo.setDefaultProps({ render: X0 });
+class AM {
+ constructor({
+ editor: e,
+ element: n,
+ view: r,
+ tippyOptions: i = {},
+ updateDelay: o = 250,
+ shouldShow: s,
+ }) {
+ (this.preventHide = !1),
+ (this.shouldShow = ({ view: l, state: a, from: u, to: c }) => {
+ const { doc: f, selection: h } = a,
+ { empty: p } = h,
+ g = !f.textBetween(u, c).length && ff(a.selection),
+ v = this.element.contains(document.activeElement);
+ return !(
+ !(l.hasFocus() || v) ||
+ p ||
+ g ||
+ !this.editor.isEditable
+ );
+ }),
+ (this.mousedownHandler = () => {
+ this.preventHide = !0;
+ }),
+ (this.dragstartHandler = () => {
+ this.hide();
+ }),
+ (this.focusHandler = () => {
+ setTimeout(() => this.update(this.editor.view));
+ }),
+ (this.blurHandler = ({ event: l }) => {
+ var a;
+ if (this.preventHide) {
+ this.preventHide = !1;
+ return;
+ }
+ ((l == null ? void 0 : l.relatedTarget) &&
+ ((a = this.element.parentNode) === null || a === void 0
+ ? void 0
+ : a.contains(l.relatedTarget))) ||
+ this.hide();
+ }),
+ (this.tippyBlurHandler = (l) => {
+ this.blurHandler({ event: l });
+ }),
+ (this.handleDebouncedUpdate = (l, a) => {
+ const u = !(a != null && a.selection.eq(l.state.selection)),
+ c = !(a != null && a.doc.eq(l.state.doc));
+ (!u && !c) ||
+ (this.updateDebounceTimer &&
+ clearTimeout(this.updateDebounceTimer),
+ (this.updateDebounceTimer = window.setTimeout(() => {
+ this.updateHandler(l, u, c, a);
+ }, this.updateDelay)));
+ }),
+ (this.updateHandler = (l, a, u, c) => {
+ var f, h, p;
+ const { state: g, composing: v } = l,
+ { selection: b } = g;
+ if (v || (!a && !u)) return;
+ this.createTooltip();
+ const { ranges: S } = b,
+ T = Math.min(...S.map((m) => m.$from.pos)),
+ d = Math.max(...S.map((m) => m.$to.pos));
+ if (
+ !((f = this.shouldShow) === null || f === void 0
+ ? void 0
+ : f.call(this, {
+ editor: this.editor,
+ view: l,
+ state: g,
+ oldState: c,
+ from: T,
+ to: d,
+ }))
+ ) {
+ this.hide();
+ return;
+ }
+ (h = this.tippy) === null ||
+ h === void 0 ||
+ h.setProps({
+ getReferenceClientRect:
+ ((p = this.tippyOptions) === null || p === void 0
+ ? void 0
+ : p.getReferenceClientRect) ||
+ (() => {
+ if (D_(g.selection)) {
+ let m = l.nodeDOM(T);
+ const w = m.dataset.nodeViewWrapper
+ ? m
+ : m.querySelector(
+ "[data-node-view-wrapper]"
+ );
+ if ((w && (m = w.firstChild), m))
+ return m.getBoundingClientRect();
+ }
+ return V0(l, T, d);
+ }),
+ }),
+ this.show();
+ }),
+ (this.editor = e),
+ (this.element = n),
+ (this.view = r),
+ (this.updateDelay = o),
+ s && (this.shouldShow = s),
+ this.element.addEventListener("mousedown", this.mousedownHandler, {
+ capture: !0,
+ }),
+ this.view.dom.addEventListener("dragstart", this.dragstartHandler),
+ this.editor.on("focus", this.focusHandler),
+ this.editor.on("blur", this.blurHandler),
+ (this.tippyOptions = i),
+ this.element.remove(),
+ (this.element.style.visibility = "visible");
+ }
+ createTooltip() {
+ const { element: e } = this.editor.options,
+ n = !!e.parentElement;
+ this.tippy ||
+ !n ||
+ ((this.tippy = fo(
+ e,
+ W(
+ {
+ duration: 0,
+ getReferenceClientRect: null,
+ content: this.element,
+ interactive: !0,
+ trigger: "manual",
+ placement: "top",
+ hideOnClick: "toggle",
+ },
+ this.tippyOptions
+ )
+ )),
+ this.tippy.popper.firstChild &&
+ this.tippy.popper.firstChild.addEventListener(
+ "blur",
+ this.tippyBlurHandler
+ ));
+ }
+ update(e, n) {
+ const { state: r } = e,
+ i = r.selection.$from.pos !== r.selection.$to.pos;
+ if (this.updateDelay > 0 && i) {
+ this.handleDebouncedUpdate(e, n);
+ return;
+ }
+ const o = !(n != null && n.selection.eq(e.state.selection)),
+ s = !(n != null && n.doc.eq(e.state.doc));
+ this.updateHandler(e, o, s, n);
+ }
+ show() {
+ var e;
+ (e = this.tippy) === null || e === void 0 || e.show();
+ }
+ hide() {
+ var e;
+ (e = this.tippy) === null || e === void 0 || e.hide();
+ }
+ destroy() {
+ var e, n;
+ !((e = this.tippy) === null || e === void 0) &&
+ e.popper.firstChild &&
+ this.tippy.popper.firstChild.removeEventListener(
+ "blur",
+ this.tippyBlurHandler
+ ),
+ (n = this.tippy) === null || n === void 0 || n.destroy(),
+ this.element.removeEventListener(
+ "mousedown",
+ this.mousedownHandler,
+ { capture: !0 }
+ ),
+ this.view.dom.removeEventListener(
+ "dragstart",
+ this.dragstartHandler
+ ),
+ this.editor.off("focus", this.focusHandler),
+ this.editor.off("blur", this.blurHandler);
+ }
+}
+const Z0 = (t) =>
+ new Tt({
+ key: typeof t.pluginKey == "string" ? new Ot(t.pluginKey) : t.pluginKey,
+ view: (e) => new AM(W({ view: e }, t)),
+ });
+Et.create({
+ name: "bubbleMenu",
+ addOptions() {
+ return {
+ element: null,
+ tippyOptions: {},
+ pluginKey: "bubbleMenu",
+ updateDelay: void 0,
+ shouldShow: null,
+ };
+ },
+ addProseMirrorPlugins() {
+ return this.options.element
+ ? [
+ Z0({
+ pluginKey: this.options.pluginKey,
+ editor: this.editor,
+ element: this.options.element,
+ tippyOptions: this.options.tippyOptions,
+ updateDelay: this.options.updateDelay,
+ shouldShow: this.options.shouldShow,
+ }),
+ ]
+ : [];
+ },
+});
+class TM {
+ constructor({
+ editor: e,
+ element: n,
+ view: r,
+ tippyOptions: i = {},
+ shouldShow: o,
+ }) {
+ (this.preventHide = !1),
+ (this.shouldShow = ({ view: s, state: l }) => {
+ const { selection: a } = l,
+ { $anchor: u, empty: c } = a,
+ f = u.depth === 1,
+ h =
+ u.parent.isTextblock &&
+ !u.parent.type.spec.code &&
+ !u.parent.textContent;
+ return !(
+ !s.hasFocus() ||
+ !c ||
+ !f ||
+ !h ||
+ !this.editor.isEditable
+ );
+ }),
+ (this.mousedownHandler = () => {
+ this.preventHide = !0;
+ }),
+ (this.focusHandler = () => {
+ setTimeout(() => this.update(this.editor.view));
+ }),
+ (this.blurHandler = ({ event: s }) => {
+ var l;
+ if (this.preventHide) {
+ this.preventHide = !1;
+ return;
+ }
+ ((s == null ? void 0 : s.relatedTarget) &&
+ ((l = this.element.parentNode) === null || l === void 0
+ ? void 0
+ : l.contains(s.relatedTarget))) ||
+ this.hide();
+ }),
+ (this.tippyBlurHandler = (s) => {
+ this.blurHandler({ event: s });
+ }),
+ (this.editor = e),
+ (this.element = n),
+ (this.view = r),
+ o && (this.shouldShow = o),
+ this.element.addEventListener("mousedown", this.mousedownHandler, {
+ capture: !0,
+ }),
+ this.editor.on("focus", this.focusHandler),
+ this.editor.on("blur", this.blurHandler),
+ (this.tippyOptions = i),
+ this.element.remove(),
+ (this.element.style.visibility = "visible");
+ }
+ createTooltip() {
+ const { element: e } = this.editor.options,
+ n = !!e.parentElement;
+ this.tippy ||
+ !n ||
+ ((this.tippy = fo(
+ e,
+ W(
+ {
+ duration: 0,
+ getReferenceClientRect: null,
+ content: this.element,
+ interactive: !0,
+ trigger: "manual",
+ placement: "right",
+ hideOnClick: "toggle",
+ },
+ this.tippyOptions
+ )
+ )),
+ this.tippy.popper.firstChild &&
+ this.tippy.popper.firstChild.addEventListener(
+ "blur",
+ this.tippyBlurHandler
+ ));
+ }
+ update(e, n) {
+ var r, i, o;
+ const { state: s } = e,
+ { doc: l, selection: a } = s,
+ { from: u, to: c } = a;
+ if (n && n.doc.eq(l) && n.selection.eq(a)) return;
+ if (
+ (this.createTooltip(),
+ !((r = this.shouldShow) === null || r === void 0
+ ? void 0
+ : r.call(this, {
+ editor: this.editor,
+ view: e,
+ state: s,
+ oldState: n,
+ })))
+ ) {
+ this.hide();
+ return;
+ }
+ (i = this.tippy) === null ||
+ i === void 0 ||
+ i.setProps({
+ getReferenceClientRect:
+ ((o = this.tippyOptions) === null || o === void 0
+ ? void 0
+ : o.getReferenceClientRect) || (() => V0(e, u, c)),
+ }),
+ this.show();
+ }
+ show() {
+ var e;
+ (e = this.tippy) === null || e === void 0 || e.show();
+ }
+ hide() {
+ var e;
+ (e = this.tippy) === null || e === void 0 || e.hide();
+ }
+ destroy() {
+ var e, n;
+ !((e = this.tippy) === null || e === void 0) &&
+ e.popper.firstChild &&
+ this.tippy.popper.firstChild.removeEventListener(
+ "blur",
+ this.tippyBlurHandler
+ ),
+ (n = this.tippy) === null || n === void 0 || n.destroy(),
+ this.element.removeEventListener(
+ "mousedown",
+ this.mousedownHandler,
+ { capture: !0 }
+ ),
+ this.editor.off("focus", this.focusHandler),
+ this.editor.off("blur", this.blurHandler);
+ }
+}
+const ey = (t) =>
+ new Tt({
+ key: typeof t.pluginKey == "string" ? new Ot(t.pluginKey) : t.pluginKey,
+ view: (e) => new TM(W({ view: e }, t)),
+ });
+Et.create({
+ name: "floatingMenu",
+ addOptions() {
+ return {
+ element: null,
+ tippyOptions: {},
+ pluginKey: "floatingMenu",
+ shouldShow: null,
+ };
+ },
+ addProseMirrorPlugins() {
+ return this.options.element
+ ? [
+ ey({
+ pluginKey: this.options.pluginKey,
+ editor: this.editor,
+ element: this.options.element,
+ tippyOptions: this.options.tippyOptions,
+ shouldShow: this.options.shouldShow,
+ }),
+ ]
+ : [];
+ },
+});
+const AR = xe({
+ name: "BubbleMenu",
+ props: {
+ pluginKey: { type: [String, Object], default: "bubbleMenu" },
+ editor: { type: Object, required: !0 },
+ updateDelay: { type: Number, default: void 0 },
+ tippyOptions: { type: Object, default: () => ({}) },
+ shouldShow: { type: Function, default: null },
+ },
+ setup(t, { slots: e }) {
+ const n = oe(null);
+ return (
+ Ye(() => {
+ const {
+ updateDelay: r,
+ editor: i,
+ pluginKey: o,
+ shouldShow: s,
+ tippyOptions: l,
+ } = t;
+ i.registerPlugin(
+ Z0({
+ updateDelay: r,
+ editor: i,
+ element: n.value,
+ pluginKey: o,
+ shouldShow: s,
+ tippyOptions: l,
+ })
+ );
+ }),
+ fs(() => {
+ const { pluginKey: r, editor: i } = t;
+ i.unregisterPlugin(r);
+ }),
+ () => {
+ var r;
+ return ze(
+ "div",
+ { ref: n },
+ (r = e.default) === null || r === void 0
+ ? void 0
+ : r.call(e)
+ );
+ }
+ );
+ },
+});
+const TR = xe({
+ name: "EditorContent",
+ props: { editor: { default: null, type: Object } },
+ setup(t) {
+ const e = oe(),
+ n = ps();
+ return (
+ Mt(() => {
+ const r = t.editor;
+ r &&
+ r.options.element &&
+ e.value &&
+ Ct(() => {
+ if (!e.value || !r.options.element.firstChild)
+ return;
+ const i = ne(e.value);
+ e.value.append(...r.options.element.childNodes),
+ (r.contentComponent = n.ctx._),
+ r.setOptions({ element: i }),
+ r.createNodeViews();
+ });
+ }),
+ fs(() => {
+ const r = t.editor;
+ if (
+ !r ||
+ (r.isDestroyed || r.view.setProps({ nodeViews: {} }),
+ (r.contentComponent = null),
+ !r.options.element.firstChild)
+ )
+ return;
+ const i = document.createElement("div");
+ i.append(...r.options.element.childNodes),
+ r.setOptions({ element: i });
+ }),
+ { rootEl: e }
+ );
+ },
+ render() {
+ const t = [];
+ return (
+ this.editor &&
+ this.editor.vueRenderers.forEach((e) => {
+ const n = ze(
+ xd,
+ { to: e.teleportElement, key: e.id },
+ ze(e.component, W({ ref: e.id }, e.props))
+ );
+ t.push(n);
+ }),
+ ze(
+ "div",
+ {
+ ref: (e) => {
+ this.rootEl = e;
+ },
+ },
+ ...t
+ )
+ );
+ },
+ }),
+ OR = xe({
+ name: "FloatingMenu",
+ props: {
+ pluginKey: { type: null, default: "floatingMenu" },
+ editor: { type: Object, required: !0 },
+ tippyOptions: { type: Object, default: () => ({}) },
+ shouldShow: { type: Function, default: null },
+ },
+ setup(t, { slots: e }) {
+ const n = oe(null);
+ return (
+ Ye(() => {
+ const {
+ pluginKey: r,
+ editor: i,
+ tippyOptions: o,
+ shouldShow: s,
+ } = t;
+ i.registerPlugin(
+ ey({
+ pluginKey: r,
+ editor: i,
+ element: n.value,
+ tippyOptions: o,
+ shouldShow: s,
+ })
+ );
+ }),
+ fs(() => {
+ const { pluginKey: r, editor: i } = t;
+ i.unregisterPlugin(r);
+ }),
+ () => {
+ var r;
+ return ze(
+ "div",
+ { ref: n },
+ (r = e.default) === null || r === void 0
+ ? void 0
+ : r.call(e)
+ );
+ }
+ );
+ },
+ });
+xe({
+ name: "NodeViewContent",
+ props: { as: { type: String, default: "div" } },
+ render() {
+ return ze(this.as, {
+ style: { whiteSpace: "pre-wrap" },
+ "data-node-view-content": "",
+ });
+ },
+});
+xe({
+ name: "NodeViewWrapper",
+ props: { as: { type: String, default: "div" } },
+ inject: ["onDragStart", "decorationClasses"],
+ render() {
+ var t, e;
+ return ze(
+ this.as,
+ {
+ class: this.decorationClasses,
+ style: { whiteSpace: "normal" },
+ "data-node-view-wrapper": "",
+ onDragstart: this.onDragStart,
+ },
+ (e = (t = this.$slots).default) === null || e === void 0
+ ? void 0
+ : e.call(t)
+ );
+ },
+});
+const OM = /^\s*>\s$/,
+ RM = ut.create({
+ name: "blockquote",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ content: "block+",
+ group: "block",
+ defining: !0,
+ parseHTML() {
+ return [{ tag: "blockquote" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["blockquote", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setBlockquote:
+ () =>
+ ({ commands: t }) =>
+ t.wrapIn(this.name),
+ toggleBlockquote:
+ () =>
+ ({ commands: t }) =>
+ t.toggleWrap(this.name),
+ unsetBlockquote:
+ () =>
+ ({ commands: t }) =>
+ t.lift(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
+ };
+ },
+ addInputRules() {
+ return [ss({ find: OM, type: this.type })];
+ },
+ }),
+ PM = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,
+ NM = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,
+ jM = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,
+ LM = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,
+ DM = Cn.create({
+ name: "bold",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ { tag: "strong" },
+ {
+ tag: "b",
+ getAttrs: (t) => t.style.fontWeight !== "normal" && null,
+ },
+ {
+ style: "font-weight",
+ getAttrs: (t) =>
+ /^(bold(er)?|[5-9]\d{2,})$/.test(t) && null,
+ },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["strong", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setBold:
+ () =>
+ ({ commands: t }) =>
+ t.setMark(this.name),
+ toggleBold:
+ () =>
+ ({ commands: t }) =>
+ t.toggleMark(this.name),
+ unsetBold:
+ () =>
+ ({ commands: t }) =>
+ t.unsetMark(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-b": () => this.editor.commands.toggleBold(),
+ "Mod-B": () => this.editor.commands.toggleBold(),
+ };
+ },
+ addInputRules() {
+ return [
+ bi({ find: PM, type: this.type }),
+ bi({ find: jM, type: this.type }),
+ ];
+ },
+ addPasteRules() {
+ return [
+ Dr({ find: NM, type: this.type }),
+ Dr({ find: LM, type: this.type }),
+ ];
+ },
+ }),
+ IM = ut.create({
+ name: "listItem",
+ addOptions() {
+ return {
+ HTMLAttributes: {},
+ bulletListTypeName: "bulletList",
+ orderedListTypeName: "orderedList",
+ };
+ },
+ content: "paragraph block*",
+ defining: !0,
+ parseHTML() {
+ return [{ tag: "li" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["li", et(this.options.HTMLAttributes, t), 0];
+ },
+ addKeyboardShortcuts() {
+ return {
+ Enter: () => this.editor.commands.splitListItem(this.name),
+ Tab: () => this.editor.commands.sinkListItem(this.name),
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name),
+ };
+ },
+ }),
+ qp = Cn.create({
+ name: "textStyle",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ {
+ tag: "span",
+ getAttrs: (t) => (t.hasAttribute("style") ? {} : !1),
+ },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["span", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ removeEmptyTextStyle:
+ () =>
+ ({ state: t, commands: e }) => {
+ const n = ks(t, this.type);
+ return Object.entries(n).some(([, i]) => !!i)
+ ? !0
+ : e.unsetMark(this.name);
+ },
+ };
+ },
+ }),
+ Jp = /^\s*([-+*])\s$/,
+ BM = ut.create({
+ name: "bulletList",
+ addOptions() {
+ return {
+ itemTypeName: "listItem",
+ HTMLAttributes: {},
+ keepMarks: !1,
+ keepAttributes: !1,
+ };
+ },
+ group: "block list",
+ content() {
+ return `${this.options.itemTypeName}+`;
+ },
+ parseHTML() {
+ return [{ tag: "ul" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["ul", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ toggleBulletList:
+ () =>
+ ({ commands: t, chain: e }) =>
+ this.options.keepAttributes
+ ? e()
+ .toggleList(
+ this.name,
+ this.options.itemTypeName,
+ this.options.keepMarks
+ )
+ .updateAttributes(
+ IM.name,
+ this.editor.getAttributes(qp.name)
+ )
+ .run()
+ : t.toggleList(
+ this.name,
+ this.options.itemTypeName,
+ this.options.keepMarks
+ ),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Shift-8": () => this.editor.commands.toggleBulletList(),
+ };
+ },
+ addInputRules() {
+ let t = ss({ find: Jp, type: this.type });
+ return (
+ (this.options.keepMarks || this.options.keepAttributes) &&
+ (t = ss({
+ find: Jp,
+ type: this.type,
+ keepMarks: this.options.keepMarks,
+ keepAttributes: this.options.keepAttributes,
+ getAttributes: () => this.editor.getAttributes(qp.name),
+ editor: this.editor,
+ })),
+ [t]
+ );
+ },
+ }),
+ $M = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,
+ zM = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,
+ HM = Cn.create({
+ name: "code",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ excludes: "_",
+ code: !0,
+ exitable: !0,
+ parseHTML() {
+ return [{ tag: "code" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["code", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setCode:
+ () =>
+ ({ commands: t }) =>
+ t.setMark(this.name),
+ toggleCode:
+ () =>
+ ({ commands: t }) =>
+ t.toggleMark(this.name),
+ unsetCode:
+ () =>
+ ({ commands: t }) =>
+ t.unsetMark(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return { "Mod-e": () => this.editor.commands.toggleCode() };
+ },
+ addInputRules() {
+ return [bi({ find: $M, type: this.type })];
+ },
+ addPasteRules() {
+ return [Dr({ find: zM, type: this.type })];
+ },
+ }),
+ FM = /^```([a-z]+)?[\s\n]$/,
+ VM = /^~~~([a-z]+)?[\s\n]$/,
+ WM = ut.create({
+ name: "codeBlock",
+ addOptions() {
+ return {
+ languageClassPrefix: "language-",
+ exitOnTripleEnter: !0,
+ exitOnArrowDown: !0,
+ HTMLAttributes: {},
+ };
+ },
+ content: "text*",
+ marks: "",
+ group: "block",
+ code: !0,
+ defining: !0,
+ addAttributes() {
+ return {
+ language: {
+ default: null,
+ parseHTML: (t) => {
+ var e;
+ const { languageClassPrefix: n } = this.options,
+ o = [
+ ...(((e = t.firstElementChild) === null ||
+ e === void 0
+ ? void 0
+ : e.classList) || []),
+ ]
+ .filter((s) => s.startsWith(n))
+ .map((s) => s.replace(n, ""))[0];
+ return o || null;
+ },
+ rendered: !1,
+ },
+ };
+ },
+ parseHTML() {
+ return [{ tag: "pre", preserveWhitespace: "full" }];
+ },
+ renderHTML({ node: t, HTMLAttributes: e }) {
+ return [
+ "pre",
+ et(this.options.HTMLAttributes, e),
+ [
+ "code",
+ {
+ class: t.attrs.language
+ ? this.options.languageClassPrefix +
+ t.attrs.language
+ : null,
+ },
+ 0,
+ ],
+ ];
+ },
+ addCommands() {
+ return {
+ setCodeBlock:
+ (t) =>
+ ({ commands: e }) =>
+ e.setNode(this.name, t),
+ toggleCodeBlock:
+ (t) =>
+ ({ commands: e }) =>
+ e.toggleNode(this.name, "paragraph", t),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(),
+ Backspace: () => {
+ const { empty: t, $anchor: e } =
+ this.editor.state.selection,
+ n = e.pos === 1;
+ return !t || e.parent.type.name !== this.name
+ ? !1
+ : n || !e.parent.textContent.length
+ ? this.editor.commands.clearNodes()
+ : !1;
+ },
+ Enter: ({ editor: t }) => {
+ if (!this.options.exitOnTripleEnter) return !1;
+ const { state: e } = t,
+ { selection: n } = e,
+ { $from: r, empty: i } = n;
+ if (!i || r.parent.type !== this.type) return !1;
+ const o = r.parentOffset === r.parent.nodeSize - 2,
+ s = r.parent.textContent.endsWith(`
+
+`);
+ return !o || !s
+ ? !1
+ : t
+ .chain()
+ .command(
+ ({ tr: l }) => (
+ l.delete(r.pos - 2, r.pos), !0
+ )
+ )
+ .exitCode()
+ .run();
+ },
+ ArrowDown: ({ editor: t }) => {
+ if (!this.options.exitOnArrowDown) return !1;
+ const { state: e } = t,
+ { selection: n, doc: r } = e,
+ { $from: i, empty: o } = n;
+ if (
+ !o ||
+ i.parent.type !== this.type ||
+ !(i.parentOffset === i.parent.nodeSize - 2)
+ )
+ return !1;
+ const l = i.after();
+ return l === void 0 || r.nodeAt(l)
+ ? !1
+ : t.commands.exitCode();
+ },
+ };
+ },
+ addInputRules() {
+ return [
+ Lc({
+ find: FM,
+ type: this.type,
+ getAttributes: (t) => ({ language: t[1] }),
+ }),
+ Lc({
+ find: VM,
+ type: this.type,
+ getAttributes: (t) => ({ language: t[1] }),
+ }),
+ ];
+ },
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("codeBlockVSCodeHandler"),
+ props: {
+ handlePaste: (t, e) => {
+ if (
+ !e.clipboardData ||
+ this.editor.isActive(this.type.name)
+ )
+ return !1;
+ const n = e.clipboardData.getData("text/plain"),
+ r =
+ e.clipboardData.getData(
+ "vscode-editor-data"
+ ),
+ i = r ? JSON.parse(r) : void 0,
+ o = i == null ? void 0 : i.mode;
+ if (!n || !o) return !1;
+ const { tr: s } = t.state;
+ return (
+ s.replaceSelectionWith(
+ this.type.create({ language: o })
+ ),
+ s.setSelection(
+ Ce.near(
+ s.doc.resolve(
+ Math.max(0, s.selection.from - 2)
+ )
+ )
+ ),
+ s.insertText(
+ n.replace(
+ /\r\n?/g,
+ `
+`
+ )
+ ),
+ s.setMeta("paste", !0),
+ t.dispatch(s),
+ !0
+ );
+ },
+ },
+ }),
+ ];
+ },
+ }),
+ UM = ut.create({ name: "doc", topNode: !0, content: "block+" });
+function KM(t = {}) {
+ return new Tt({
+ view(e) {
+ return new qM(e, t);
+ },
+ });
+}
+class qM {
+ constructor(e, n) {
+ var r;
+ (this.editorView = e),
+ (this.cursorPos = null),
+ (this.element = null),
+ (this.timeout = -1),
+ (this.width = (r = n.width) !== null && r !== void 0 ? r : 1),
+ (this.color = n.color === !1 ? void 0 : n.color || "black"),
+ (this.class = n.class),
+ (this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(
+ (i) => {
+ let o = (s) => {
+ this[i](s);
+ };
+ return (
+ e.dom.addEventListener(i, o), { name: i, handler: o }
+ );
+ }
+ ));
+ }
+ destroy() {
+ this.handlers.forEach(({ name: e, handler: n }) =>
+ this.editorView.dom.removeEventListener(e, n)
+ );
+ }
+ update(e, n) {
+ this.cursorPos != null &&
+ n.doc != e.state.doc &&
+ (this.cursorPos > e.state.doc.content.size
+ ? this.setCursor(null)
+ : this.updateOverlay());
+ }
+ setCursor(e) {
+ e != this.cursorPos &&
+ ((this.cursorPos = e),
+ e == null
+ ? (this.element.parentNode.removeChild(this.element),
+ (this.element = null))
+ : this.updateOverlay());
+ }
+ updateOverlay() {
+ let e = this.editorView.state.doc.resolve(this.cursorPos),
+ n = !e.parent.inlineContent,
+ r;
+ if (n) {
+ let l = e.nodeBefore,
+ a = e.nodeAfter;
+ if (l || a) {
+ let u = this.editorView.nodeDOM(
+ this.cursorPos - (l ? l.nodeSize : 0)
+ );
+ if (u) {
+ let c = u.getBoundingClientRect(),
+ f = l ? c.bottom : c.top;
+ l &&
+ a &&
+ (f =
+ (f +
+ this.editorView
+ .nodeDOM(this.cursorPos)
+ .getBoundingClientRect().top) /
+ 2),
+ (r = {
+ left: c.left,
+ right: c.right,
+ top: f - this.width / 2,
+ bottom: f + this.width / 2,
+ });
+ }
+ }
+ }
+ if (!r) {
+ let l = this.editorView.coordsAtPos(this.cursorPos);
+ r = {
+ left: l.left - this.width / 2,
+ right: l.left + this.width / 2,
+ top: l.top,
+ bottom: l.bottom,
+ };
+ }
+ let i = this.editorView.dom.offsetParent;
+ this.element ||
+ ((this.element = i.appendChild(document.createElement("div"))),
+ this.class && (this.element.className = this.class),
+ (this.element.style.cssText =
+ "position: absolute; z-index: 50; pointer-events: none;"),
+ this.color && (this.element.style.backgroundColor = this.color)),
+ this.element.classList.toggle("prosemirror-dropcursor-block", n),
+ this.element.classList.toggle("prosemirror-dropcursor-inline", !n);
+ let o, s;
+ if (
+ !i ||
+ (i == document.body && getComputedStyle(i).position == "static")
+ )
+ (o = -pageXOffset), (s = -pageYOffset);
+ else {
+ let l = i.getBoundingClientRect();
+ (o = l.left - i.scrollLeft), (s = l.top - i.scrollTop);
+ }
+ (this.element.style.left = r.left - o + "px"),
+ (this.element.style.top = r.top - s + "px"),
+ (this.element.style.width = r.right - r.left + "px"),
+ (this.element.style.height = r.bottom - r.top + "px");
+ }
+ scheduleRemoval(e) {
+ clearTimeout(this.timeout),
+ (this.timeout = setTimeout(() => this.setCursor(null), e));
+ }
+ dragover(e) {
+ if (!this.editorView.editable) return;
+ let n = this.editorView.posAtCoords({
+ left: e.clientX,
+ top: e.clientY,
+ }),
+ r =
+ n &&
+ n.inside >= 0 &&
+ this.editorView.state.doc.nodeAt(n.inside),
+ i = r && r.type.spec.disableDropCursor,
+ o = typeof i == "function" ? i(this.editorView, n, e) : i;
+ if (n && !o) {
+ let s = n.pos;
+ if (this.editorView.dragging && this.editorView.dragging.slice) {
+ let l = r0(
+ this.editorView.state.doc,
+ s,
+ this.editorView.dragging.slice
+ );
+ l != null && (s = l);
+ }
+ this.setCursor(s), this.scheduleRemoval(5e3);
+ }
+ }
+ dragend() {
+ this.scheduleRemoval(20);
+ }
+ drop() {
+ this.scheduleRemoval(20);
+ }
+ dragleave(e) {
+ (e.target == this.editorView.dom ||
+ !this.editorView.dom.contains(e.relatedTarget)) &&
+ this.setCursor(null);
+ }
+}
+const JM = Et.create({
+ name: "dropCursor",
+ addOptions() {
+ return { color: "currentColor", width: 1, class: void 0 };
+ },
+ addProseMirrorPlugins() {
+ return [KM(this.options)];
+ },
+});
+class ht extends Se {
+ constructor(e) {
+ super(e, e);
+ }
+ map(e, n) {
+ let r = e.resolve(n.map(this.head));
+ return ht.valid(r) ? new ht(r) : Se.near(r);
+ }
+ content() {
+ return ie.empty;
+ }
+ eq(e) {
+ return e instanceof ht && e.head == this.head;
+ }
+ toJSON() {
+ return { type: "gapcursor", pos: this.head };
+ }
+ static fromJSON(e, n) {
+ if (typeof n.pos != "number")
+ throw new RangeError("Invalid input for GapCursor.fromJSON");
+ return new ht(e.resolve(n.pos));
+ }
+ getBookmark() {
+ return new wf(this.anchor);
+ }
+ static valid(e) {
+ let n = e.parent;
+ if (n.isTextblock || !GM(e) || !YM(e)) return !1;
+ let r = n.type.spec.allowGapCursor;
+ if (r != null) return r;
+ let i = n.contentMatchAt(e.index()).defaultType;
+ return i && i.isTextblock;
+ }
+ static findGapCursorFrom(e, n, r = !1) {
+ e: for (;;) {
+ if (!r && ht.valid(e)) return e;
+ let i = e.pos,
+ o = null;
+ for (let s = e.depth; ; s--) {
+ let l = e.node(s);
+ if (n > 0 ? e.indexAfter(s) < l.childCount : e.index(s) > 0) {
+ o = l.child(n > 0 ? e.indexAfter(s) : e.index(s) - 1);
+ break;
+ } else if (s == 0) return null;
+ i += n;
+ let a = e.doc.resolve(i);
+ if (ht.valid(a)) return a;
+ }
+ for (;;) {
+ let s = n > 0 ? o.firstChild : o.lastChild;
+ if (!s) {
+ if (o.isAtom && !o.isText && !ve.isSelectable(o)) {
+ (e = e.doc.resolve(i + o.nodeSize * n)), (r = !1);
+ continue e;
+ }
+ break;
+ }
+ (o = s), (i += n);
+ let l = e.doc.resolve(i);
+ if (ht.valid(l)) return l;
+ }
+ return null;
+ }
+ }
+}
+ht.prototype.visible = !1;
+ht.findFrom = ht.findGapCursorFrom;
+Se.jsonID("gapcursor", ht);
+class wf {
+ constructor(e) {
+ this.pos = e;
+ }
+ map(e) {
+ return new wf(e.map(this.pos));
+ }
+ resolve(e) {
+ let n = e.resolve(this.pos);
+ return ht.valid(n) ? new ht(n) : Se.near(n);
+ }
+}
+function GM(t) {
+ for (let e = t.depth; e >= 0; e--) {
+ let n = t.index(e),
+ r = t.node(e);
+ if (n == 0) {
+ if (r.type.spec.isolating) return !0;
+ continue;
+ }
+ for (let i = r.child(n - 1); ; i = i.lastChild) {
+ if (
+ (i.childCount == 0 && !i.inlineContent) ||
+ i.isAtom ||
+ i.type.spec.isolating
+ )
+ return !0;
+ if (i.inlineContent) return !1;
+ }
+ }
+ return !0;
+}
+function YM(t) {
+ for (let e = t.depth; e >= 0; e--) {
+ let n = t.indexAfter(e),
+ r = t.node(e);
+ if (n == r.childCount) {
+ if (r.type.spec.isolating) return !0;
+ continue;
+ }
+ for (let i = r.child(n); ; i = i.firstChild) {
+ if (
+ (i.childCount == 0 && !i.inlineContent) ||
+ i.isAtom ||
+ i.type.spec.isolating
+ )
+ return !0;
+ if (i.inlineContent) return !1;
+ }
+ }
+ return !0;
+}
+function QM() {
+ return new Tt({
+ props: {
+ decorations: tE,
+ createSelectionBetween(t, e, n) {
+ return e.pos == n.pos && ht.valid(n) ? new ht(n) : null;
+ },
+ handleClick: ZM,
+ handleKeyDown: XM,
+ handleDOMEvents: { beforeinput: eE },
+ },
+ });
+}
+const XM = L0({
+ ArrowLeft: Us("horiz", -1),
+ ArrowRight: Us("horiz", 1),
+ ArrowUp: Us("vert", -1),
+ ArrowDown: Us("vert", 1),
+});
+function Us(t, e) {
+ const n = t == "vert" ? (e > 0 ? "down" : "up") : e > 0 ? "right" : "left";
+ return function (r, i, o) {
+ let s = r.selection,
+ l = e > 0 ? s.$to : s.$from,
+ a = s.empty;
+ if (s instanceof Ce) {
+ if (!o.endOfTextblock(n) || l.depth == 0) return !1;
+ (a = !1), (l = r.doc.resolve(e > 0 ? l.after() : l.before()));
+ }
+ let u = ht.findGapCursorFrom(l, e, a);
+ return u ? (i && i(r.tr.setSelection(new ht(u))), !0) : !1;
+ };
+}
+function ZM(t, e, n) {
+ if (!t || !t.editable) return !1;
+ let r = t.state.doc.resolve(e);
+ if (!ht.valid(r)) return !1;
+ let i = t.posAtCoords({ left: n.clientX, top: n.clientY });
+ return i && i.inside > -1 && ve.isSelectable(t.state.doc.nodeAt(i.inside))
+ ? !1
+ : (t.dispatch(t.state.tr.setSelection(new ht(r))), !0);
+}
+function eE(t, e) {
+ if (
+ e.inputType != "insertCompositionText" ||
+ !(t.state.selection instanceof ht)
+ )
+ return !1;
+ let { $from: n } = t.state.selection,
+ r = n.parent
+ .contentMatchAt(n.index())
+ .findWrapping(t.state.schema.nodes.text);
+ if (!r) return !1;
+ let i = Y.empty;
+ for (let s = r.length - 1; s >= 0; s--)
+ i = Y.from(r[s].createAndFill(null, i));
+ let o = t.state.tr.replace(n.pos, n.pos, new ie(i, 0, 0));
+ return o.setSelection(Ce.near(o.doc.resolve(n.pos + 1))), t.dispatch(o), !1;
+}
+function tE(t) {
+ if (!(t.selection instanceof ht)) return null;
+ let e = document.createElement("div");
+ return (
+ (e.className = "ProseMirror-gapcursor"),
+ st.create(t.doc, [Xt.widget(t.selection.head, e, { key: "gapcursor" })])
+ );
+}
+const nE = Et.create({
+ name: "gapCursor",
+ addProseMirrorPlugins() {
+ return [QM()];
+ },
+ extendNodeSchema(t) {
+ var e;
+ const n = { name: t.name, options: t.options, storage: t.storage };
+ return {
+ allowGapCursor:
+ (e = lt(bt(t, "allowGapCursor", n))) !== null &&
+ e !== void 0
+ ? e
+ : null,
+ };
+ },
+ }),
+ rE = ut.create({
+ name: "hardBreak",
+ addOptions() {
+ return { keepMarks: !0, HTMLAttributes: {} };
+ },
+ inline: !0,
+ group: "inline",
+ selectable: !1,
+ parseHTML() {
+ return [{ tag: "br" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["br", et(this.options.HTMLAttributes, t)];
+ },
+ renderText() {
+ return `
+`;
+ },
+ addCommands() {
+ return {
+ setHardBreak:
+ () =>
+ ({ commands: t, chain: e, state: n, editor: r }) =>
+ t.first([
+ () => t.exitCode(),
+ () =>
+ t.command(() => {
+ const { selection: i, storedMarks: o } = n;
+ if (i.$from.parent.type.spec.isolating)
+ return !1;
+ const { keepMarks: s } = this.options,
+ { splittableMarks: l } =
+ r.extensionManager,
+ a =
+ o ||
+ (i.$to.parentOffset &&
+ i.$from.marks());
+ return e()
+ .insertContent({ type: this.name })
+ .command(({ tr: u, dispatch: c }) => {
+ if (c && a && s) {
+ const f = a.filter((h) =>
+ l.includes(h.type.name)
+ );
+ u.ensureMarks(f);
+ }
+ return !0;
+ })
+ .run();
+ }),
+ ]),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Enter": () => this.editor.commands.setHardBreak(),
+ "Shift-Enter": () => this.editor.commands.setHardBreak(),
+ };
+ },
+ }),
+ iE = ut.create({
+ name: "heading",
+ addOptions() {
+ return { levels: [1, 2, 3, 4, 5, 6], HTMLAttributes: {} };
+ },
+ content: "inline*",
+ group: "block",
+ defining: !0,
+ addAttributes() {
+ return { level: { default: 1, rendered: !1 } };
+ },
+ parseHTML() {
+ return this.options.levels.map((t) => ({
+ tag: `h${t}`,
+ attrs: { level: t },
+ }));
+ },
+ renderHTML({ node: t, HTMLAttributes: e }) {
+ return [
+ `h${
+ this.options.levels.includes(t.attrs.level)
+ ? t.attrs.level
+ : this.options.levels[0]
+ }`,
+ et(this.options.HTMLAttributes, e),
+ 0,
+ ];
+ },
+ addCommands() {
+ return {
+ setHeading:
+ (t) =>
+ ({ commands: e }) =>
+ this.options.levels.includes(t.level)
+ ? e.setNode(this.name, t)
+ : !1,
+ toggleHeading:
+ (t) =>
+ ({ commands: e }) =>
+ this.options.levels.includes(t.level)
+ ? e.toggleNode(this.name, "paragraph", t)
+ : !1,
+ };
+ },
+ addKeyboardShortcuts() {
+ return this.options.levels.reduce(
+ (t, e) =>
+ be(W({}, t), {
+ [`Mod-Alt-${e}`]: () =>
+ this.editor.commands.toggleHeading({ level: e }),
+ }),
+ {}
+ );
+ },
+ addInputRules() {
+ return this.options.levels.map((t) =>
+ Lc({
+ find: new RegExp(`^(#{1,${t}})\\s$`),
+ type: this.type,
+ getAttributes: { level: t },
+ })
+ );
+ },
+ });
+var Fl = 200,
+ Nt = function () {};
+Nt.prototype.append = function (e) {
+ return e.length
+ ? ((e = Nt.from(e)),
+ (!this.length && e) ||
+ (e.length < Fl && this.leafAppend(e)) ||
+ (this.length < Fl && e.leafPrepend(this)) ||
+ this.appendInner(e))
+ : this;
+};
+Nt.prototype.prepend = function (e) {
+ return e.length ? Nt.from(e).append(this) : this;
+};
+Nt.prototype.appendInner = function (e) {
+ return new oE(this, e);
+};
+Nt.prototype.slice = function (e, n) {
+ return (
+ e === void 0 && (e = 0),
+ n === void 0 && (n = this.length),
+ e >= n
+ ? Nt.empty
+ : this.sliceInner(Math.max(0, e), Math.min(this.length, n))
+ );
+};
+Nt.prototype.get = function (e) {
+ if (!(e < 0 || e >= this.length)) return this.getInner(e);
+};
+Nt.prototype.forEach = function (e, n, r) {
+ n === void 0 && (n = 0),
+ r === void 0 && (r = this.length),
+ n <= r
+ ? this.forEachInner(e, n, r, 0)
+ : this.forEachInvertedInner(e, n, r, 0);
+};
+Nt.prototype.map = function (e, n, r) {
+ n === void 0 && (n = 0), r === void 0 && (r = this.length);
+ var i = [];
+ return (
+ this.forEach(
+ function (o, s) {
+ return i.push(e(o, s));
+ },
+ n,
+ r
+ ),
+ i
+ );
+};
+Nt.from = function (e) {
+ return e instanceof Nt ? e : e && e.length ? new ty(e) : Nt.empty;
+};
+var ty = (function (t) {
+ function e(r) {
+ t.call(this), (this.values = r);
+ }
+ t && (e.__proto__ = t),
+ (e.prototype = Object.create(t && t.prototype)),
+ (e.prototype.constructor = e);
+ var n = { length: { configurable: !0 }, depth: { configurable: !0 } };
+ return (
+ (e.prototype.flatten = function () {
+ return this.values;
+ }),
+ (e.prototype.sliceInner = function (i, o) {
+ return i == 0 && o == this.length
+ ? this
+ : new e(this.values.slice(i, o));
+ }),
+ (e.prototype.getInner = function (i) {
+ return this.values[i];
+ }),
+ (e.prototype.forEachInner = function (i, o, s, l) {
+ for (var a = o; a < s; a++)
+ if (i(this.values[a], l + a) === !1) return !1;
+ }),
+ (e.prototype.forEachInvertedInner = function (i, o, s, l) {
+ for (var a = o - 1; a >= s; a--)
+ if (i(this.values[a], l + a) === !1) return !1;
+ }),
+ (e.prototype.leafAppend = function (i) {
+ if (this.length + i.length <= Fl)
+ return new e(this.values.concat(i.flatten()));
+ }),
+ (e.prototype.leafPrepend = function (i) {
+ if (this.length + i.length <= Fl)
+ return new e(i.flatten().concat(this.values));
+ }),
+ (n.length.get = function () {
+ return this.values.length;
+ }),
+ (n.depth.get = function () {
+ return 0;
+ }),
+ Object.defineProperties(e.prototype, n),
+ e
+ );
+})(Nt);
+Nt.empty = new ty([]);
+var oE = (function (t) {
+ function e(n, r) {
+ t.call(this),
+ (this.left = n),
+ (this.right = r),
+ (this.length = n.length + r.length),
+ (this.depth = Math.max(n.depth, r.depth) + 1);
+ }
+ return (
+ t && (e.__proto__ = t),
+ (e.prototype = Object.create(t && t.prototype)),
+ (e.prototype.constructor = e),
+ (e.prototype.flatten = function () {
+ return this.left.flatten().concat(this.right.flatten());
+ }),
+ (e.prototype.getInner = function (r) {
+ return r < this.left.length
+ ? this.left.get(r)
+ : this.right.get(r - this.left.length);
+ }),
+ (e.prototype.forEachInner = function (r, i, o, s) {
+ var l = this.left.length;
+ if (
+ (i < l &&
+ this.left.forEachInner(r, i, Math.min(o, l), s) === !1) ||
+ (o > l &&
+ this.right.forEachInner(
+ r,
+ Math.max(i - l, 0),
+ Math.min(this.length, o) - l,
+ s + l
+ ) === !1)
+ )
+ return !1;
+ }),
+ (e.prototype.forEachInvertedInner = function (r, i, o, s) {
+ var l = this.left.length;
+ if (
+ (i > l &&
+ this.right.forEachInvertedInner(
+ r,
+ i - l,
+ Math.max(o, l) - l,
+ s + l
+ ) === !1) ||
+ (o < l &&
+ this.left.forEachInvertedInner(r, Math.min(i, l), o, s) ===
+ !1)
+ )
+ return !1;
+ }),
+ (e.prototype.sliceInner = function (r, i) {
+ if (r == 0 && i == this.length) return this;
+ var o = this.left.length;
+ return i <= o
+ ? this.left.slice(r, i)
+ : r >= o
+ ? this.right.slice(r - o, i - o)
+ : this.left.slice(r, o).append(this.right.slice(0, i - o));
+ }),
+ (e.prototype.leafAppend = function (r) {
+ var i = this.right.leafAppend(r);
+ if (i) return new e(this.left, i);
+ }),
+ (e.prototype.leafPrepend = function (r) {
+ var i = this.left.leafPrepend(r);
+ if (i) return new e(i, this.right);
+ }),
+ (e.prototype.appendInner = function (r) {
+ return this.left.depth >= Math.max(this.right.depth, r.depth) + 1
+ ? new e(this.left, new e(this.right, r))
+ : new e(this, r);
+ }),
+ e
+ );
+})(Nt);
+const sE = 500;
+class En {
+ constructor(e, n) {
+ (this.items = e), (this.eventCount = n);
+ }
+ popEvent(e, n) {
+ if (this.eventCount == 0) return null;
+ let r = this.items.length;
+ for (; ; r--)
+ if (this.items.get(r - 1).selection) {
+ --r;
+ break;
+ }
+ let i, o;
+ n && ((i = this.remapping(r, this.items.length)), (o = i.maps.length));
+ let s = e.tr,
+ l,
+ a,
+ u = [],
+ c = [];
+ return (
+ this.items.forEach(
+ (f, h) => {
+ if (!f.step) {
+ i ||
+ ((i = this.remapping(r, h + 1)),
+ (o = i.maps.length)),
+ o--,
+ c.push(f);
+ return;
+ }
+ if (i) {
+ c.push(new In(f.map));
+ let p = f.step.map(i.slice(o)),
+ g;
+ p &&
+ s.maybeStep(p).doc &&
+ ((g = s.mapping.maps[s.mapping.maps.length - 1]),
+ u.push(
+ new In(g, void 0, void 0, u.length + c.length)
+ )),
+ o--,
+ g && i.appendMap(g, o);
+ } else s.maybeStep(f.step);
+ if (f.selection)
+ return (
+ (l = i ? f.selection.map(i.slice(o)) : f.selection),
+ (a = new En(
+ this.items
+ .slice(0, r)
+ .append(c.reverse().concat(u)),
+ this.eventCount - 1
+ )),
+ !1
+ );
+ },
+ this.items.length,
+ 0
+ ),
+ { remaining: a, transform: s, selection: l }
+ );
+ }
+ addTransform(e, n, r, i) {
+ let o = [],
+ s = this.eventCount,
+ l = this.items,
+ a = !i && l.length ? l.get(l.length - 1) : null;
+ for (let c = 0; c < e.steps.length; c++) {
+ let f = e.steps[c].invert(e.docs[c]),
+ h = new In(e.mapping.maps[c], f, n),
+ p;
+ (p = a && a.merge(h)) &&
+ ((h = p), c ? o.pop() : (l = l.slice(0, l.length - 1))),
+ o.push(h),
+ n && (s++, (n = void 0)),
+ i || (a = h);
+ }
+ let u = s - r.depth;
+ return u > aE && ((l = lE(l, u)), (s -= u)), new En(l.append(o), s);
+ }
+ remapping(e, n) {
+ let r = new $i();
+ return (
+ this.items.forEach(
+ (i, o) => {
+ let s =
+ i.mirrorOffset != null && o - i.mirrorOffset >= e
+ ? r.maps.length - i.mirrorOffset
+ : void 0;
+ r.appendMap(i.map, s);
+ },
+ e,
+ n
+ ),
+ r
+ );
+ }
+ addMaps(e) {
+ return this.eventCount == 0
+ ? this
+ : new En(
+ this.items.append(e.map((n) => new In(n))),
+ this.eventCount
+ );
+ }
+ rebased(e, n) {
+ if (!this.eventCount) return this;
+ let r = [],
+ i = Math.max(0, this.items.length - n),
+ o = e.mapping,
+ s = e.steps.length,
+ l = this.eventCount;
+ this.items.forEach((h) => {
+ h.selection && l--;
+ }, i);
+ let a = n;
+ this.items.forEach((h) => {
+ let p = o.getMirror(--a);
+ if (p == null) return;
+ s = Math.min(s, p);
+ let g = o.maps[p];
+ if (h.step) {
+ let v = e.steps[p].invert(e.docs[p]),
+ b = h.selection && h.selection.map(o.slice(a + 1, p));
+ b && l++, r.push(new In(g, v, b));
+ } else r.push(new In(g));
+ }, i);
+ let u = [];
+ for (let h = n; h < s; h++) u.push(new In(o.maps[h]));
+ let c = this.items.slice(0, i).append(u).append(r),
+ f = new En(c, l);
+ return (
+ f.emptyItemCount() > sE &&
+ (f = f.compress(this.items.length - r.length)),
+ f
+ );
+ }
+ emptyItemCount() {
+ let e = 0;
+ return (
+ this.items.forEach((n) => {
+ n.step || e++;
+ }),
+ e
+ );
+ }
+ compress(e = this.items.length) {
+ let n = this.remapping(0, e),
+ r = n.maps.length,
+ i = [],
+ o = 0;
+ return (
+ this.items.forEach(
+ (s, l) => {
+ if (l >= e) i.push(s), s.selection && o++;
+ else if (s.step) {
+ let a = s.step.map(n.slice(r)),
+ u = a && a.getMap();
+ if ((r--, u && n.appendMap(u, r), a)) {
+ let c = s.selection && s.selection.map(n.slice(r));
+ c && o++;
+ let f = new In(u.invert(), a, c),
+ h,
+ p = i.length - 1;
+ (h = i.length && i[p].merge(f))
+ ? (i[p] = h)
+ : i.push(f);
+ }
+ } else s.map && r--;
+ },
+ this.items.length,
+ 0
+ ),
+ new En(Nt.from(i.reverse()), o)
+ );
+ }
+}
+En.empty = new En(Nt.empty, 0);
+function lE(t, e) {
+ let n;
+ return (
+ t.forEach((r, i) => {
+ if (r.selection && e-- == 0) return (n = i), !1;
+ }),
+ t.slice(n)
+ );
+}
+class In {
+ constructor(e, n, r, i) {
+ (this.map = e),
+ (this.step = n),
+ (this.selection = r),
+ (this.mirrorOffset = i);
+ }
+ merge(e) {
+ if (this.step && e.step && !e.selection) {
+ let n = e.step.merge(this.step);
+ if (n) return new In(n.getMap().invert(), n, this.selection);
+ }
+ }
+}
+class wr {
+ constructor(e, n, r, i, o) {
+ (this.done = e),
+ (this.undone = n),
+ (this.prevRanges = r),
+ (this.prevTime = i),
+ (this.prevComposition = o);
+ }
+}
+const aE = 20;
+function uE(t, e, n, r) {
+ let i = n.getMeta(Nr),
+ o;
+ if (i) return i.historyState;
+ n.getMeta(dE) && (t = new wr(t.done, t.undone, null, 0, -1));
+ let s = n.getMeta("appendedTransaction");
+ if (n.steps.length == 0) return t;
+ if (s && s.getMeta(Nr))
+ return s.getMeta(Nr).redo
+ ? new wr(
+ t.done.addTransform(n, void 0, r, ul(e)),
+ t.undone,
+ Gp(n.mapping.maps[n.steps.length - 1]),
+ t.prevTime,
+ t.prevComposition
+ )
+ : new wr(
+ t.done,
+ t.undone.addTransform(n, void 0, r, ul(e)),
+ null,
+ t.prevTime,
+ t.prevComposition
+ );
+ if (
+ n.getMeta("addToHistory") !== !1 &&
+ !(s && s.getMeta("addToHistory") === !1)
+ ) {
+ let l = n.getMeta("composition"),
+ a =
+ t.prevTime == 0 ||
+ (!s &&
+ t.prevComposition != l &&
+ (t.prevTime < (n.time || 0) - r.newGroupDelay ||
+ !cE(n, t.prevRanges))),
+ u = s
+ ? Iu(t.prevRanges, n.mapping)
+ : Gp(n.mapping.maps[n.steps.length - 1]);
+ return new wr(
+ t.done.addTransform(
+ n,
+ a ? e.selection.getBookmark() : void 0,
+ r,
+ ul(e)
+ ),
+ En.empty,
+ u,
+ n.time,
+ l == null ? t.prevComposition : l
+ );
+ } else
+ return (o = n.getMeta("rebased"))
+ ? new wr(
+ t.done.rebased(n, o),
+ t.undone.rebased(n, o),
+ Iu(t.prevRanges, n.mapping),
+ t.prevTime,
+ t.prevComposition
+ )
+ : new wr(
+ t.done.addMaps(n.mapping.maps),
+ t.undone.addMaps(n.mapping.maps),
+ Iu(t.prevRanges, n.mapping),
+ t.prevTime,
+ t.prevComposition
+ );
+}
+function cE(t, e) {
+ if (!e) return !1;
+ if (!t.docChanged) return !0;
+ let n = !1;
+ return (
+ t.mapping.maps[0].forEach((r, i) => {
+ for (let o = 0; o < e.length; o += 2)
+ r <= e[o + 1] && i >= e[o] && (n = !0);
+ }),
+ n
+ );
+}
+function Gp(t) {
+ let e = [];
+ return t.forEach((n, r, i, o) => e.push(i, o)), e;
+}
+function Iu(t, e) {
+ if (!t) return null;
+ let n = [];
+ for (let r = 0; r < t.length; r += 2) {
+ let i = e.map(t[r], 1),
+ o = e.map(t[r + 1], -1);
+ i <= o && n.push(i, o);
+ }
+ return n;
+}
+function ny(t, e, n, r) {
+ let i = ul(e),
+ o = Nr.get(e).spec.config,
+ s = (r ? t.undone : t.done).popEvent(e, i);
+ if (!s) return;
+ let l = s.selection.resolve(s.transform.doc),
+ a = (r ? t.done : t.undone).addTransform(
+ s.transform,
+ e.selection.getBookmark(),
+ o,
+ i
+ ),
+ u = new wr(r ? a : s.remaining, r ? s.remaining : a, null, 0, -1);
+ n(
+ s.transform
+ .setSelection(l)
+ .setMeta(Nr, { redo: r, historyState: u })
+ .scrollIntoView()
+ );
+}
+let Bu = !1,
+ Yp = null;
+function ul(t) {
+ let e = t.plugins;
+ if (Yp != e) {
+ (Bu = !1), (Yp = e);
+ for (let n = 0; n < e.length; n++)
+ if (e[n].spec.historyPreserveItems) {
+ Bu = !0;
+ break;
+ }
+ }
+ return Bu;
+}
+const Nr = new Ot("history"),
+ dE = new Ot("closeHistory");
+function fE(t = {}) {
+ return (
+ (t = { depth: t.depth || 100, newGroupDelay: t.newGroupDelay || 500 }),
+ new Tt({
+ key: Nr,
+ state: {
+ init() {
+ return new wr(En.empty, En.empty, null, 0, -1);
+ },
+ apply(e, n, r) {
+ return uE(n, r, e, t);
+ },
+ },
+ config: t,
+ props: {
+ handleDOMEvents: {
+ beforeinput(e, n) {
+ let r = n.inputType,
+ i =
+ r == "historyUndo"
+ ? ry
+ : r == "historyRedo"
+ ? iy
+ : null;
+ return i
+ ? (n.preventDefault(), i(e.state, e.dispatch))
+ : !1;
+ },
+ },
+ },
+ })
+ );
+}
+const ry = (t, e) => {
+ let n = Nr.getState(t);
+ return !n || n.done.eventCount == 0 ? !1 : (e && ny(n, t, e, !1), !0);
+ },
+ iy = (t, e) => {
+ let n = Nr.getState(t);
+ return !n || n.undone.eventCount == 0 ? !1 : (e && ny(n, t, e, !0), !0);
+ },
+ hE = Et.create({
+ name: "history",
+ addOptions() {
+ return { depth: 100, newGroupDelay: 500 };
+ },
+ addCommands() {
+ return {
+ undo:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ ry(t, e),
+ redo:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ iy(t, e),
+ };
+ },
+ addProseMirrorPlugins() {
+ return [fE(this.options)];
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-z": () => this.editor.commands.undo(),
+ "Mod-Z": () => this.editor.commands.undo(),
+ "Mod-y": () => this.editor.commands.redo(),
+ "Mod-Y": () => this.editor.commands.redo(),
+ "Shift-Mod-z": () => this.editor.commands.redo(),
+ "Shift-Mod-Z": () => this.editor.commands.redo(),
+ "Mod-\u044F": () => this.editor.commands.undo(),
+ "Shift-Mod-\u044F": () => this.editor.commands.redo(),
+ };
+ },
+ }),
+ pE = ut.create({
+ name: "horizontalRule",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ group: "block",
+ parseHTML() {
+ return [{ tag: "hr" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["hr", et(this.options.HTMLAttributes, t)];
+ },
+ addCommands() {
+ return {
+ setHorizontalRule:
+ () =>
+ ({ chain: t, state: e }) => {
+ const { $to: n } = e.selection,
+ r = t();
+ return (
+ n.parentOffset === 0
+ ? r.insertContentAt(Math.max(n.pos - 2, 0), {
+ type: this.name,
+ })
+ : r.insertContent({ type: this.name }),
+ r
+ .command(({ tr: i, dispatch: o }) => {
+ var s;
+ if (o) {
+ const { $to: l } = i.selection,
+ a = l.end();
+ if (l.nodeAfter)
+ l.nodeAfter.isTextblock
+ ? i.setSelection(
+ Ce.create(
+ i.doc,
+ l.pos + 1
+ )
+ )
+ : l.nodeAfter.isBlock
+ ? i.setSelection(
+ ve.create(i.doc, l.pos)
+ )
+ : i.setSelection(
+ Ce.create(i.doc, l.pos)
+ );
+ else {
+ const u =
+ (s =
+ l.parent.type.contentMatch
+ .defaultType) ===
+ null || s === void 0
+ ? void 0
+ : s.create();
+ u &&
+ (i.insert(a, u),
+ i.setSelection(
+ Ce.create(i.doc, a + 1)
+ ));
+ }
+ i.scrollIntoView();
+ }
+ return !0;
+ })
+ .run()
+ );
+ },
+ };
+ },
+ addInputRules() {
+ return [
+ W0({ find: /^(?:---|—-|___\s|\*\*\*\s)$/, type: this.type }),
+ ];
+ },
+ }),
+ mE = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,
+ gE = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,
+ yE = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,
+ vE = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,
+ bE = Cn.create({
+ name: "italic",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ { tag: "em" },
+ {
+ tag: "i",
+ getAttrs: (t) => t.style.fontStyle !== "normal" && null,
+ },
+ { style: "font-style=italic" },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["em", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setItalic:
+ () =>
+ ({ commands: t }) =>
+ t.setMark(this.name),
+ toggleItalic:
+ () =>
+ ({ commands: t }) =>
+ t.toggleMark(this.name),
+ unsetItalic:
+ () =>
+ ({ commands: t }) =>
+ t.unsetMark(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-i": () => this.editor.commands.toggleItalic(),
+ "Mod-I": () => this.editor.commands.toggleItalic(),
+ };
+ },
+ addInputRules() {
+ return [
+ bi({ find: mE, type: this.type }),
+ bi({ find: yE, type: this.type }),
+ ];
+ },
+ addPasteRules() {
+ return [
+ Dr({ find: gE, type: this.type }),
+ Dr({ find: vE, type: this.type }),
+ ];
+ },
+ }),
+ wE = ut.create({
+ name: "listItem",
+ addOptions() {
+ return {
+ HTMLAttributes: {},
+ bulletListTypeName: "bulletList",
+ orderedListTypeName: "orderedList",
+ };
+ },
+ content: "paragraph block*",
+ defining: !0,
+ parseHTML() {
+ return [{ tag: "li" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["li", et(this.options.HTMLAttributes, t), 0];
+ },
+ addKeyboardShortcuts() {
+ return {
+ Enter: () => this.editor.commands.splitListItem(this.name),
+ Tab: () => this.editor.commands.sinkListItem(this.name),
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name),
+ };
+ },
+ }),
+ xE = ut.create({
+ name: "listItem",
+ addOptions() {
+ return {
+ HTMLAttributes: {},
+ bulletListTypeName: "bulletList",
+ orderedListTypeName: "orderedList",
+ };
+ },
+ content: "paragraph block*",
+ defining: !0,
+ parseHTML() {
+ return [{ tag: "li" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["li", et(this.options.HTMLAttributes, t), 0];
+ },
+ addKeyboardShortcuts() {
+ return {
+ Enter: () => this.editor.commands.splitListItem(this.name),
+ Tab: () => this.editor.commands.sinkListItem(this.name),
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name),
+ };
+ },
+ }),
+ Qp = Cn.create({
+ name: "textStyle",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ {
+ tag: "span",
+ getAttrs: (t) => (t.hasAttribute("style") ? {} : !1),
+ },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["span", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ removeEmptyTextStyle:
+ () =>
+ ({ state: t, commands: e }) => {
+ const n = ks(t, this.type);
+ return Object.entries(n).some(([, i]) => !!i)
+ ? !0
+ : e.unsetMark(this.name);
+ },
+ };
+ },
+ }),
+ Xp = /^(\d+)\.\s$/,
+ kE = ut.create({
+ name: "orderedList",
+ addOptions() {
+ return {
+ itemTypeName: "listItem",
+ HTMLAttributes: {},
+ keepMarks: !1,
+ keepAttributes: !1,
+ };
+ },
+ group: "block list",
+ content() {
+ return `${this.options.itemTypeName}+`;
+ },
+ addAttributes() {
+ return {
+ start: {
+ default: 1,
+ parseHTML: (t) =>
+ t.hasAttribute("start")
+ ? parseInt(t.getAttribute("start") || "", 10)
+ : 1,
+ },
+ };
+ },
+ parseHTML() {
+ return [{ tag: "ol" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ const r = t,
+ { start: e } = r,
+ n = Qe(r, ["start"]);
+ return e === 1
+ ? ["ol", et(this.options.HTMLAttributes, n), 0]
+ : ["ol", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ toggleOrderedList:
+ () =>
+ ({ commands: t, chain: e }) =>
+ this.options.keepAttributes
+ ? e()
+ .toggleList(
+ this.name,
+ this.options.itemTypeName,
+ this.options.keepMarks
+ )
+ .updateAttributes(
+ xE.name,
+ this.editor.getAttributes(Qp.name)
+ )
+ .run()
+ : t.toggleList(
+ this.name,
+ this.options.itemTypeName,
+ this.options.keepMarks
+ ),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Shift-7": () => this.editor.commands.toggleOrderedList(),
+ };
+ },
+ addInputRules() {
+ let t = ss({
+ find: Xp,
+ type: this.type,
+ getAttributes: (e) => ({ start: +e[1] }),
+ joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1],
+ });
+ return (
+ (this.options.keepMarks || this.options.keepAttributes) &&
+ (t = ss({
+ find: Xp,
+ type: this.type,
+ keepMarks: this.options.keepMarks,
+ keepAttributes: this.options.keepAttributes,
+ getAttributes: (e) =>
+ W(
+ { start: +e[1] },
+ this.editor.getAttributes(Qp.name)
+ ),
+ joinPredicate: (e, n) =>
+ n.childCount + n.attrs.start === +e[1],
+ editor: this.editor,
+ })),
+ [t]
+ );
+ },
+ }),
+ CE = ut.create({
+ name: "paragraph",
+ priority: 1e3,
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ group: "block",
+ content: "inline*",
+ parseHTML() {
+ return [{ tag: "p" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["p", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setParagraph:
+ () =>
+ ({ commands: t }) =>
+ t.setNode(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
+ },
+ }),
+ SE = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,
+ _E = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,
+ ME = Cn.create({
+ name: "strike",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ { tag: "s" },
+ { tag: "del" },
+ { tag: "strike" },
+ {
+ style: "text-decoration",
+ consuming: !1,
+ getAttrs: (t) => (t.includes("line-through") ? {} : !1),
+ },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["s", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setStrike:
+ () =>
+ ({ commands: t }) =>
+ t.setMark(this.name),
+ toggleStrike:
+ () =>
+ ({ commands: t }) =>
+ t.toggleMark(this.name),
+ unsetStrike:
+ () =>
+ ({ commands: t }) =>
+ t.unsetMark(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ const t = {};
+ return (
+ pf()
+ ? (t["Mod-Shift-s"] = () =>
+ this.editor.commands.toggleStrike())
+ : (t["Ctrl-Shift-s"] = () =>
+ this.editor.commands.toggleStrike()),
+ t
+ );
+ },
+ addInputRules() {
+ return [bi({ find: SE, type: this.type })];
+ },
+ addPasteRules() {
+ return [Dr({ find: _E, type: this.type })];
+ },
+ }),
+ EE = ut.create({ name: "text", group: "inline" }),
+ RR = Et.create({
+ name: "starterKit",
+ addExtensions() {
+ var t, e, n, r, i, o, s, l, a, u, c, f, h, p, g, v, b, x;
+ const S = [];
+ return (
+ this.options.blockquote !== !1 &&
+ S.push(
+ RM.configure(
+ (t = this.options) === null || t === void 0
+ ? void 0
+ : t.blockquote
+ )
+ ),
+ this.options.bold !== !1 &&
+ S.push(
+ DM.configure(
+ (e = this.options) === null || e === void 0
+ ? void 0
+ : e.bold
+ )
+ ),
+ this.options.bulletList !== !1 &&
+ S.push(
+ BM.configure(
+ (n = this.options) === null || n === void 0
+ ? void 0
+ : n.bulletList
+ )
+ ),
+ this.options.code !== !1 &&
+ S.push(
+ HM.configure(
+ (r = this.options) === null || r === void 0
+ ? void 0
+ : r.code
+ )
+ ),
+ this.options.codeBlock !== !1 &&
+ S.push(
+ WM.configure(
+ (i = this.options) === null || i === void 0
+ ? void 0
+ : i.codeBlock
+ )
+ ),
+ this.options.document !== !1 &&
+ S.push(
+ UM.configure(
+ (o = this.options) === null || o === void 0
+ ? void 0
+ : o.document
+ )
+ ),
+ this.options.dropcursor !== !1 &&
+ S.push(
+ JM.configure(
+ (s = this.options) === null || s === void 0
+ ? void 0
+ : s.dropcursor
+ )
+ ),
+ this.options.gapcursor !== !1 &&
+ S.push(
+ nE.configure(
+ (l = this.options) === null || l === void 0
+ ? void 0
+ : l.gapcursor
+ )
+ ),
+ this.options.hardBreak !== !1 &&
+ S.push(
+ rE.configure(
+ (a = this.options) === null || a === void 0
+ ? void 0
+ : a.hardBreak
+ )
+ ),
+ this.options.heading !== !1 &&
+ S.push(
+ iE.configure(
+ (u = this.options) === null || u === void 0
+ ? void 0
+ : u.heading
+ )
+ ),
+ this.options.history !== !1 &&
+ S.push(
+ hE.configure(
+ (c = this.options) === null || c === void 0
+ ? void 0
+ : c.history
+ )
+ ),
+ this.options.horizontalRule !== !1 &&
+ S.push(
+ pE.configure(
+ (f = this.options) === null || f === void 0
+ ? void 0
+ : f.horizontalRule
+ )
+ ),
+ this.options.italic !== !1 &&
+ S.push(
+ bE.configure(
+ (h = this.options) === null || h === void 0
+ ? void 0
+ : h.italic
+ )
+ ),
+ this.options.listItem !== !1 &&
+ S.push(
+ wE.configure(
+ (p = this.options) === null || p === void 0
+ ? void 0
+ : p.listItem
+ )
+ ),
+ this.options.orderedList !== !1 &&
+ S.push(
+ kE.configure(
+ (g = this.options) === null || g === void 0
+ ? void 0
+ : g.orderedList
+ )
+ ),
+ this.options.paragraph !== !1 &&
+ S.push(
+ CE.configure(
+ (v = this.options) === null || v === void 0
+ ? void 0
+ : v.paragraph
+ )
+ ),
+ this.options.strike !== !1 &&
+ S.push(
+ ME.configure(
+ (b = this.options) === null || b === void 0
+ ? void 0
+ : b.strike
+ )
+ ),
+ this.options.text !== !1 &&
+ S.push(
+ EE.configure(
+ (x = this.options) === null || x === void 0
+ ? void 0
+ : x.text
+ )
+ ),
+ S
+ );
+ },
+ }),
+ PR = Et.create({
+ name: "placeholder",
+ addOptions() {
+ return {
+ emptyEditorClass: "is-editor-empty",
+ emptyNodeClass: "is-empty",
+ placeholder: "Write something \u2026",
+ showOnlyWhenEditable: !0,
+ showOnlyCurrent: !0,
+ includeChildren: !1,
+ };
+ },
+ addProseMirrorPlugins() {
+ return [
+ new Tt({
+ key: new Ot("placeholder"),
+ props: {
+ decorations: ({ doc: t, selection: e }) => {
+ const n =
+ this.editor.isEditable ||
+ !this.options.showOnlyWhenEditable,
+ { anchor: r } = e,
+ i = [];
+ if (!n) return null;
+ const o = t.type.createAndFill(),
+ s =
+ (o == null ? void 0 : o.sameMarkup(t)) &&
+ o.content.findDiffStart(t.content) === null;
+ return (
+ t.descendants((l, a) => {
+ const u = r >= a && r <= a + l.nodeSize,
+ c = !l.isLeaf && !l.childCount;
+ if (
+ (u || !this.options.showOnlyCurrent) &&
+ c
+ ) {
+ const f = [this.options.emptyNodeClass];
+ s &&
+ f.push(
+ this.options.emptyEditorClass
+ );
+ const h = Xt.node(a, a + l.nodeSize, {
+ class: f.join(" "),
+ "data-placeholder":
+ typeof this.options
+ .placeholder == "function"
+ ? this.options.placeholder({
+ editor: this.editor,
+ node: l,
+ pos: a,
+ hasAnchor: u,
+ })
+ : this.options.placeholder,
+ });
+ i.push(h);
+ }
+ return this.options.includeChildren;
+ }),
+ st.create(t, i)
+ );
+ },
+ },
+ }),
+ ];
+ },
+ }),
+ NR = Et.create({
+ name: "textAlign",
+ addOptions() {
+ return {
+ types: [],
+ alignments: ["left", "center", "right", "justify"],
+ defaultAlignment: "left",
+ };
+ },
+ addGlobalAttributes() {
+ return [
+ {
+ types: this.options.types,
+ attributes: {
+ textAlign: {
+ default: this.options.defaultAlignment,
+ parseHTML: (t) =>
+ t.style.textAlign ||
+ this.options.defaultAlignment,
+ renderHTML: (t) =>
+ t.textAlign === this.options.defaultAlignment
+ ? {}
+ : { style: `text-align: ${t.textAlign}` },
+ },
+ },
+ },
+ ];
+ },
+ addCommands() {
+ return {
+ setTextAlign:
+ (t) =>
+ ({ commands: e }) =>
+ this.options.alignments.includes(t)
+ ? this.options.types.every((n) =>
+ e.updateAttributes(n, { textAlign: t })
+ )
+ : !1,
+ unsetTextAlign:
+ () =>
+ ({ commands: t }) =>
+ this.options.types.every((e) =>
+ t.resetAttributes(e, "textAlign")
+ ),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Shift-l": () => this.editor.commands.setTextAlign("left"),
+ "Mod-Shift-e": () =>
+ this.editor.commands.setTextAlign("center"),
+ "Mod-Shift-r": () => this.editor.commands.setTextAlign("right"),
+ "Mod-Shift-j": () =>
+ this.editor.commands.setTextAlign("justify"),
+ };
+ },
+ });
+var Bc, $c;
+if (typeof WeakMap != "undefined") {
+ let t = new WeakMap();
+ (Bc = (e) => t.get(e)), ($c = (e, n) => (t.set(e, n), n));
+} else {
+ const t = [];
+ let n = 0;
+ (Bc = (r) => {
+ for (let i = 0; i < t.length; i += 2) if (t[i] == r) return t[i + 1];
+ }),
+ ($c = (r, i) => (n == 10 && (n = 0), (t[n++] = r), (t[n++] = i)));
+}
+var pt = class {
+ constructor(t, e, n, r) {
+ (this.width = t),
+ (this.height = e),
+ (this.map = n),
+ (this.problems = r);
+ }
+ findCell(t) {
+ for (let e = 0; e < this.map.length; e++) {
+ const n = this.map[e];
+ if (n != t) continue;
+ const r = e % this.width,
+ i = (e / this.width) | 0;
+ let o = r + 1,
+ s = i + 1;
+ for (let l = 1; o < this.width && this.map[e + l] == n; l++) o++;
+ for (
+ let l = 1;
+ s < this.height && this.map[e + this.width * l] == n;
+ l++
+ )
+ s++;
+ return { left: r, top: i, right: o, bottom: s };
+ }
+ throw new RangeError(`No cell with offset ${t} found`);
+ }
+ colCount(t) {
+ for (let e = 0; e < this.map.length; e++)
+ if (this.map[e] == t) return e % this.width;
+ throw new RangeError(`No cell with offset ${t} found`);
+ }
+ nextCell(t, e, n) {
+ const { left: r, right: i, top: o, bottom: s } = this.findCell(t);
+ return e == "horiz"
+ ? (n < 0 ? r == 0 : i == this.width)
+ ? null
+ : this.map[o * this.width + (n < 0 ? r - 1 : i)]
+ : (n < 0 ? o == 0 : s == this.height)
+ ? null
+ : this.map[r + this.width * (n < 0 ? o - 1 : s)];
+ }
+ rectBetween(t, e) {
+ const { left: n, right: r, top: i, bottom: o } = this.findCell(t),
+ { left: s, right: l, top: a, bottom: u } = this.findCell(e);
+ return {
+ left: Math.min(n, s),
+ top: Math.min(i, a),
+ right: Math.max(r, l),
+ bottom: Math.max(o, u),
+ };
+ }
+ cellsInRect(t) {
+ const e = [],
+ n = {};
+ for (let r = t.top; r < t.bottom; r++)
+ for (let i = t.left; i < t.right; i++) {
+ const o = r * this.width + i,
+ s = this.map[o];
+ n[s] ||
+ ((n[s] = !0),
+ !(
+ (i == t.left && i && this.map[o - 1] == s) ||
+ (r == t.top && r && this.map[o - this.width] == s)
+ ) && e.push(s));
+ }
+ return e;
+ }
+ positionAt(t, e, n) {
+ for (let r = 0, i = 0; ; r++) {
+ const o = i + n.child(r).nodeSize;
+ if (r == t) {
+ let s = e + t * this.width;
+ const l = (t + 1) * this.width;
+ for (; s < l && this.map[s] < i; ) s++;
+ return s == l ? o - 1 : this.map[s];
+ }
+ i = o;
+ }
+ }
+ static get(t) {
+ return Bc(t) || $c(t, AE(t));
+ }
+};
+function AE(t) {
+ if (t.type.spec.tableRole != "table")
+ throw new RangeError("Not a table node: " + t.type.name);
+ const e = TE(t),
+ n = t.childCount,
+ r = [];
+ let i = 0,
+ o = null;
+ const s = [];
+ for (let u = 0, c = e * n; u < c; u++) r[u] = 0;
+ for (let u = 0, c = 0; u < n; u++) {
+ const f = t.child(u);
+ c++;
+ for (let g = 0; ; g++) {
+ for (; i < r.length && r[i] != 0; ) i++;
+ if (g == f.childCount) break;
+ const v = f.child(g),
+ { colspan: b, rowspan: x, colwidth: S } = v.attrs;
+ for (let T = 0; T < x; T++) {
+ if (T + u >= n) {
+ (o || (o = [])).push({
+ type: "overlong_rowspan",
+ pos: c,
+ n: x - T,
+ });
+ break;
+ }
+ const d = i + T * e;
+ for (let y = 0; y < b; y++) {
+ r[d + y] == 0
+ ? (r[d + y] = c)
+ : (o || (o = [])).push({
+ type: "collision",
+ row: u,
+ pos: c,
+ n: b - y,
+ });
+ const m = S && S[y];
+ if (m) {
+ const w = ((d + y) % e) * 2,
+ k = s[w];
+ k == null || (k != m && s[w + 1] == 1)
+ ? ((s[w] = m), (s[w + 1] = 1))
+ : k == m && s[w + 1]++;
+ }
+ }
+ }
+ (i += b), (c += v.nodeSize);
+ }
+ const h = (u + 1) * e;
+ let p = 0;
+ for (; i < h; ) r[i++] == 0 && p++;
+ p && (o || (o = [])).push({ type: "missing", row: u, n: p }), c++;
+ }
+ const l = new pt(e, n, r, o);
+ let a = !1;
+ for (let u = 0; !a && u < s.length; u += 2)
+ s[u] != null && s[u + 1] < n && (a = !0);
+ return a && OE(l, s, t), l;
+}
+function TE(t) {
+ let e = -1,
+ n = !1;
+ for (let r = 0; r < t.childCount; r++) {
+ const i = t.child(r);
+ let o = 0;
+ if (n)
+ for (let s = 0; s < r; s++) {
+ const l = t.child(s);
+ for (let a = 0; a < l.childCount; a++) {
+ const u = l.child(a);
+ s + u.attrs.rowspan > r && (o += u.attrs.colspan);
+ }
+ }
+ for (let s = 0; s < i.childCount; s++) {
+ const l = i.child(s);
+ (o += l.attrs.colspan), l.attrs.rowspan > 1 && (n = !0);
+ }
+ e == -1 ? (e = o) : e != o && (e = Math.max(e, o));
+ }
+ return e;
+}
+function OE(t, e, n) {
+ t.problems || (t.problems = []);
+ const r = {};
+ for (let i = 0; i < t.map.length; i++) {
+ const o = t.map[i];
+ if (r[o]) continue;
+ r[o] = !0;
+ const s = n.nodeAt(o);
+ if (!s) throw new RangeError(`No cell with offset ${o} found`);
+ let l = null;
+ const a = s.attrs;
+ for (let u = 0; u < a.colspan; u++) {
+ const c = (i + u) % t.width,
+ f = e[c * 2];
+ f != null &&
+ (!a.colwidth || a.colwidth[u] != f) &&
+ ((l || (l = RE(a)))[u] = f);
+ }
+ l &&
+ t.problems.unshift({
+ type: "colwidth mismatch",
+ pos: o,
+ colwidth: l,
+ });
+ }
+}
+function RE(t) {
+ if (t.colwidth) return t.colwidth.slice();
+ const e = [];
+ for (let n = 0; n < t.colspan; n++) e.push(0);
+ return e;
+}
+function Vt(t) {
+ let e = t.cached.tableNodeTypes;
+ if (!e) {
+ e = t.cached.tableNodeTypes = {};
+ for (const n in t.nodes) {
+ const r = t.nodes[n],
+ i = r.spec.tableRole;
+ i && (e[i] = r);
+ }
+ }
+ return e;
+}
+var kr = new Ot("selectingCells");
+function ho(t) {
+ for (let e = t.depth - 1; e > 0; e--)
+ if (t.node(e).type.spec.tableRole == "row")
+ return t.node(0).resolve(t.before(e + 1));
+ return null;
+}
+function PE(t) {
+ for (let e = t.depth; e > 0; e--) {
+ const n = t.node(e).type.spec.tableRole;
+ if (n === "cell" || n === "header_cell") return t.node(e);
+ }
+ return null;
+}
+function Ln(t) {
+ const e = t.selection.$head;
+ for (let n = e.depth; n > 0; n--)
+ if (e.node(n).type.spec.tableRole == "row") return !0;
+ return !1;
+}
+function qa(t) {
+ const e = t.selection;
+ if ("$anchorCell" in e && e.$anchorCell)
+ return e.$anchorCell.pos > e.$headCell.pos
+ ? e.$anchorCell
+ : e.$headCell;
+ if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
+ return e.$anchor;
+ const n = ho(e.$head) || NE(e.$head);
+ if (n) return n;
+ throw new RangeError(`No cell found around position ${e.head}`);
+}
+function NE(t) {
+ for (let e = t.nodeAfter, n = t.pos; e; e = e.firstChild, n++) {
+ const r = e.type.spec.tableRole;
+ if (r == "cell" || r == "header_cell") return t.doc.resolve(n);
+ }
+ for (let e = t.nodeBefore, n = t.pos; e; e = e.lastChild, n--) {
+ const r = e.type.spec.tableRole;
+ if (r == "cell" || r == "header_cell")
+ return t.doc.resolve(n - e.nodeSize);
+ }
+}
+function zc(t) {
+ return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
+}
+function jE(t) {
+ return t.node(0).resolve(t.pos + t.nodeAfter.nodeSize);
+}
+function xf(t, e) {
+ return t.depth == e.depth && t.pos >= e.start(-1) && t.pos <= e.end(-1);
+}
+function oy(t, e, n) {
+ const r = t.node(-1),
+ i = pt.get(r),
+ o = t.start(-1),
+ s = i.nextCell(t.pos - o, e, n);
+ return s == null ? null : t.node(0).resolve(o + s);
+}
+function wi(t, e, n = 1) {
+ const r = be(W({}, t), { colspan: t.colspan - n });
+ return (
+ r.colwidth &&
+ ((r.colwidth = r.colwidth.slice()),
+ r.colwidth.splice(e, n),
+ r.colwidth.some((i) => i > 0) || (r.colwidth = null)),
+ r
+ );
+}
+function sy(t, e, n = 1) {
+ const r = be(W({}, t), { colspan: t.colspan + n });
+ if (r.colwidth) {
+ r.colwidth = r.colwidth.slice();
+ for (let i = 0; i < n; i++) r.colwidth.splice(e, 0, 0);
+ }
+ return r;
+}
+function LE(t, e, n) {
+ const r = Vt(e.type.schema).header_cell;
+ for (let i = 0; i < t.height; i++)
+ if (e.nodeAt(t.map[n + i * t.width]).type != r) return !1;
+ return !0;
+}
+var nt = class tr extends Se {
+ constructor(e, n = e) {
+ const r = e.node(-1),
+ i = pt.get(r),
+ o = e.start(-1),
+ s = i.rectBetween(e.pos - o, n.pos - o),
+ l = e.node(0),
+ a = i.cellsInRect(s).filter((c) => c != n.pos - o);
+ a.unshift(n.pos - o);
+ const u = a.map((c) => {
+ const f = r.nodeAt(c);
+ if (!f) throw RangeError(`No cell with offset ${c} found`);
+ const h = o + c + 1;
+ return new u0(l.resolve(h), l.resolve(h + f.content.size));
+ });
+ super(u[0].$from, u[0].$to, u),
+ (this.$anchorCell = e),
+ (this.$headCell = n);
+ }
+ map(e, n) {
+ const r = e.resolve(n.map(this.$anchorCell.pos)),
+ i = e.resolve(n.map(this.$headCell.pos));
+ if (zc(r) && zc(i) && xf(r, i)) {
+ const o = this.$anchorCell.node(-1) != r.node(-1);
+ return o && this.isRowSelection()
+ ? tr.rowSelection(r, i)
+ : o && this.isColSelection()
+ ? tr.colSelection(r, i)
+ : new tr(r, i);
+ }
+ return Ce.between(r, i);
+ }
+ content() {
+ const e = this.$anchorCell.node(-1),
+ n = pt.get(e),
+ r = this.$anchorCell.start(-1),
+ i = n.rectBetween(this.$anchorCell.pos - r, this.$headCell.pos - r),
+ o = {},
+ s = [];
+ for (let a = i.top; a < i.bottom; a++) {
+ const u = [];
+ for (
+ let c = a * n.width + i.left, f = i.left;
+ f < i.right;
+ f++, c++
+ ) {
+ const h = n.map[c];
+ if (o[h]) continue;
+ o[h] = !0;
+ const p = n.findCell(h);
+ let g = e.nodeAt(h);
+ if (!g) throw RangeError(`No cell with offset ${h} found`);
+ const v = i.left - p.left,
+ b = p.right - i.right;
+ if (v > 0 || b > 0) {
+ let x = g.attrs;
+ if (
+ (v > 0 && (x = wi(x, 0, v)),
+ b > 0 && (x = wi(x, x.colspan - b, b)),
+ p.left < i.left)
+ ) {
+ if (((g = g.type.createAndFill(x)), !g))
+ throw RangeError(
+ `Could not create cell with attrs ${JSON.stringify(
+ x
+ )}`
+ );
+ } else g = g.type.create(x, g.content);
+ }
+ if (p.top < i.top || p.bottom > i.bottom) {
+ const x = be(W({}, g.attrs), {
+ rowspan:
+ Math.min(p.bottom, i.bottom) -
+ Math.max(p.top, i.top),
+ });
+ p.top < i.top
+ ? (g = g.type.createAndFill(x))
+ : (g = g.type.create(x, g.content));
+ }
+ u.push(g);
+ }
+ s.push(e.child(a).copy(Y.from(u)));
+ }
+ const l = this.isColSelection() && this.isRowSelection() ? e : s;
+ return new ie(Y.from(l), 1, 1);
+ }
+ replace(e, n = ie.empty) {
+ const r = e.steps.length,
+ i = this.ranges;
+ for (let s = 0; s < i.length; s++) {
+ const { $from: l, $to: a } = i[s],
+ u = e.mapping.slice(r);
+ e.replace(u.map(l.pos), u.map(a.pos), s ? ie.empty : n);
+ }
+ const o = Se.findFrom(
+ e.doc.resolve(e.mapping.slice(r).map(this.to)),
+ -1
+ );
+ o && e.setSelection(o);
+ }
+ replaceWith(e, n) {
+ this.replace(e, new ie(Y.from(n), 0, 0));
+ }
+ forEachCell(e) {
+ const n = this.$anchorCell.node(-1),
+ r = pt.get(n),
+ i = this.$anchorCell.start(-1),
+ o = r.cellsInRect(
+ r.rectBetween(this.$anchorCell.pos - i, this.$headCell.pos - i)
+ );
+ for (let s = 0; s < o.length; s++) e(n.nodeAt(o[s]), i + o[s]);
+ }
+ isColSelection() {
+ const e = this.$anchorCell.index(-1),
+ n = this.$headCell.index(-1);
+ if (Math.min(e, n) > 0) return !1;
+ const r = e + this.$anchorCell.nodeAfter.attrs.rowspan,
+ i = n + this.$headCell.nodeAfter.attrs.rowspan;
+ return Math.max(r, i) == this.$headCell.node(-1).childCount;
+ }
+ static colSelection(e, n = e) {
+ const r = e.node(-1),
+ i = pt.get(r),
+ o = e.start(-1),
+ s = i.findCell(e.pos - o),
+ l = i.findCell(n.pos - o),
+ a = e.node(0);
+ return (
+ s.top <= l.top
+ ? (s.top > 0 && (e = a.resolve(o + i.map[s.left])),
+ l.bottom < i.height &&
+ (n = a.resolve(
+ o + i.map[i.width * (i.height - 1) + l.right - 1]
+ )))
+ : (l.top > 0 && (n = a.resolve(o + i.map[l.left])),
+ s.bottom < i.height &&
+ (e = a.resolve(
+ o + i.map[i.width * (i.height - 1) + s.right - 1]
+ ))),
+ new tr(e, n)
+ );
+ }
+ isRowSelection() {
+ const e = this.$anchorCell.node(-1),
+ n = pt.get(e),
+ r = this.$anchorCell.start(-1),
+ i = n.colCount(this.$anchorCell.pos - r),
+ o = n.colCount(this.$headCell.pos - r);
+ if (Math.min(i, o) > 0) return !1;
+ const s = i + this.$anchorCell.nodeAfter.attrs.colspan,
+ l = o + this.$headCell.nodeAfter.attrs.colspan;
+ return Math.max(s, l) == n.width;
+ }
+ eq(e) {
+ return (
+ e instanceof tr &&
+ e.$anchorCell.pos == this.$anchorCell.pos &&
+ e.$headCell.pos == this.$headCell.pos
+ );
+ }
+ static rowSelection(e, n = e) {
+ const r = e.node(-1),
+ i = pt.get(r),
+ o = e.start(-1),
+ s = i.findCell(e.pos - o),
+ l = i.findCell(n.pos - o),
+ a = e.node(0);
+ return (
+ s.left <= l.left
+ ? (s.left > 0 && (e = a.resolve(o + i.map[s.top * i.width])),
+ l.right < i.width &&
+ (n = a.resolve(o + i.map[i.width * (l.top + 1) - 1])))
+ : (l.left > 0 && (n = a.resolve(o + i.map[l.top * i.width])),
+ s.right < i.width &&
+ (e = a.resolve(o + i.map[i.width * (s.top + 1) - 1]))),
+ new tr(e, n)
+ );
+ }
+ toJSON() {
+ return {
+ type: "cell",
+ anchor: this.$anchorCell.pos,
+ head: this.$headCell.pos,
+ };
+ }
+ static fromJSON(e, n) {
+ return new tr(e.resolve(n.anchor), e.resolve(n.head));
+ }
+ static create(e, n, r = n) {
+ return new tr(e.resolve(n), e.resolve(r));
+ }
+ getBookmark() {
+ return new DE(this.$anchorCell.pos, this.$headCell.pos);
+ }
+};
+nt.prototype.visible = !1;
+Se.jsonID("cell", nt);
+var DE = class ly {
+ constructor(e, n) {
+ (this.anchor = e), (this.head = n);
+ }
+ map(e) {
+ return new ly(e.map(this.anchor), e.map(this.head));
+ }
+ resolve(e) {
+ const n = e.resolve(this.anchor),
+ r = e.resolve(this.head);
+ return n.parent.type.spec.tableRole == "row" &&
+ r.parent.type.spec.tableRole == "row" &&
+ n.index() < n.parent.childCount &&
+ r.index() < r.parent.childCount &&
+ xf(n, r)
+ ? new nt(n, r)
+ : Se.near(r, 1);
+ }
+};
+function IE(t) {
+ if (!(t.selection instanceof nt)) return null;
+ const e = [];
+ return (
+ t.selection.forEachCell((n, r) => {
+ e.push(Xt.node(r, r + n.nodeSize, { class: "selectedCell" }));
+ }),
+ st.create(t.doc, e)
+ );
+}
+function BE({ $from: t, $to: e }) {
+ if (t.pos == e.pos || t.pos < t.pos - 6) return !1;
+ let n = t.pos,
+ r = e.pos,
+ i = t.depth;
+ for (; i >= 0 && !(t.after(i + 1) < t.end(i)); i--, n++);
+ for (let o = e.depth; o >= 0 && !(e.before(o + 1) > e.start(o)); o--, r--);
+ return n == r && /row|table/.test(t.node(i).type.spec.tableRole);
+}
+function $E({ $from: t, $to: e }) {
+ let n, r;
+ for (let i = t.depth; i > 0; i--) {
+ const o = t.node(i);
+ if (
+ o.type.spec.tableRole === "cell" ||
+ o.type.spec.tableRole === "header_cell"
+ ) {
+ n = o;
+ break;
+ }
+ }
+ for (let i = e.depth; i > 0; i--) {
+ const o = e.node(i);
+ if (
+ o.type.spec.tableRole === "cell" ||
+ o.type.spec.tableRole === "header_cell"
+ ) {
+ r = o;
+ break;
+ }
+ }
+ return n !== r && e.parentOffset === 0;
+}
+function zE(t, e, n) {
+ const r = (e || t).selection,
+ i = (e || t).doc;
+ let o, s;
+ if (r instanceof ve && (s = r.node.type.spec.tableRole)) {
+ if (s == "cell" || s == "header_cell") o = nt.create(i, r.from);
+ else if (s == "row") {
+ const l = i.resolve(r.from + 1);
+ o = nt.rowSelection(l, l);
+ } else if (!n) {
+ const l = pt.get(r.node),
+ a = r.from + 1,
+ u = a + l.map[l.width * l.height - 1];
+ o = nt.create(i, a + 1, u);
+ }
+ } else
+ r instanceof Ce && BE(r)
+ ? (o = Ce.create(i, r.from))
+ : r instanceof Ce &&
+ $E(r) &&
+ (o = Ce.create(i, r.$from.start(), r.$from.end()));
+ return o && (e || (e = t.tr)).setSelection(o), e;
+}
+var HE = new Ot("fix-tables");
+function ay(t, e, n, r) {
+ const i = t.childCount,
+ o = e.childCount;
+ e: for (let s = 0, l = 0; s < o; s++) {
+ const a = e.child(s);
+ for (let u = l, c = Math.min(i, s + 3); u < c; u++)
+ if (t.child(u) == a) {
+ (l = u + 1), (n += a.nodeSize);
+ continue e;
+ }
+ r(a, n),
+ l < i && t.child(l).sameMarkup(a)
+ ? ay(t.child(l), a, n + 1, r)
+ : a.nodesBetween(0, a.content.size, r, n + 1),
+ (n += a.nodeSize);
+ }
+}
+function uy(t, e) {
+ let n;
+ const r = (i, o) => {
+ i.type.spec.tableRole == "table" && (n = FE(t, i, o, n));
+ };
+ return (
+ e ? e.doc != t.doc && ay(e.doc, t.doc, 0, r) : t.doc.descendants(r), n
+ );
+}
+function FE(t, e, n, r) {
+ const i = pt.get(e);
+ if (!i.problems) return r;
+ r || (r = t.tr);
+ const o = [];
+ for (let a = 0; a < i.height; a++) o.push(0);
+ for (let a = 0; a < i.problems.length; a++) {
+ const u = i.problems[a];
+ if (u.type == "collision") {
+ const c = e.nodeAt(u.pos);
+ if (!c) continue;
+ const f = c.attrs;
+ for (let h = 0; h < f.rowspan; h++) o[u.row + h] += u.n;
+ r.setNodeMarkup(
+ r.mapping.map(n + 1 + u.pos),
+ null,
+ wi(f, f.colspan - u.n, u.n)
+ );
+ } else if (u.type == "missing") o[u.row] += u.n;
+ else if (u.type == "overlong_rowspan") {
+ const c = e.nodeAt(u.pos);
+ if (!c) continue;
+ r.setNodeMarkup(
+ r.mapping.map(n + 1 + u.pos),
+ null,
+ be(W({}, c.attrs), { rowspan: c.attrs.rowspan - u.n })
+ );
+ } else if (u.type == "colwidth mismatch") {
+ const c = e.nodeAt(u.pos);
+ if (!c) continue;
+ r.setNodeMarkup(
+ r.mapping.map(n + 1 + u.pos),
+ null,
+ be(W({}, c.attrs), { colwidth: u.colwidth })
+ );
+ }
+ }
+ let s, l;
+ for (let a = 0; a < o.length; a++) o[a] && (s == null && (s = a), (l = a));
+ for (let a = 0, u = n + 1; a < i.height; a++) {
+ const c = e.child(a),
+ f = u + c.nodeSize,
+ h = o[a];
+ if (h > 0) {
+ let p = "cell";
+ c.firstChild && (p = c.firstChild.type.spec.tableRole);
+ const g = [];
+ for (let b = 0; b < h; b++) {
+ const x = Vt(t.schema)[p].createAndFill();
+ x && g.push(x);
+ }
+ const v = (a == 0 || s == a - 1) && l == a ? u + 1 : f - 1;
+ r.insert(r.mapping.map(v), g);
+ }
+ u = f;
+ }
+ return r.setMeta(HE, { fixTables: !0 });
+}
+function VE(t) {
+ if (!t.size) return null;
+ let { content: e, openStart: n, openEnd: r } = t;
+ for (
+ ;
+ e.childCount == 1 &&
+ ((n > 0 && r > 0) || e.child(0).type.spec.tableRole == "table");
+
+ )
+ n--, r--, (e = e.child(0).content);
+ const i = e.child(0),
+ o = i.type.spec.tableRole,
+ s = i.type.schema,
+ l = [];
+ if (o == "row")
+ for (let a = 0; a < e.childCount; a++) {
+ let u = e.child(a).content;
+ const c = a ? 0 : Math.max(0, n - 1),
+ f = a < e.childCount - 1 ? 0 : Math.max(0, r - 1);
+ (c || f) && (u = Hc(Vt(s).row, new ie(u, c, f)).content), l.push(u);
+ }
+ else if (o == "cell" || o == "header_cell")
+ l.push(n || r ? Hc(Vt(s).row, new ie(e, n, r)).content : e);
+ else return null;
+ return WE(s, l);
+}
+function WE(t, e) {
+ const n = [];
+ for (let i = 0; i < e.length; i++) {
+ const o = e[i];
+ for (let s = o.childCount - 1; s >= 0; s--) {
+ const { rowspan: l, colspan: a } = o.child(s).attrs;
+ for (let u = i; u < i + l; u++) n[u] = (n[u] || 0) + a;
+ }
+ }
+ let r = 0;
+ for (let i = 0; i < n.length; i++) r = Math.max(r, n[i]);
+ for (let i = 0; i < n.length; i++)
+ if ((i >= e.length && e.push(Y.empty), n[i] < r)) {
+ const o = Vt(t).cell.createAndFill(),
+ s = [];
+ for (let l = n[i]; l < r; l++) s.push(o);
+ e[i] = e[i].append(Y.from(s));
+ }
+ return { height: e.length, width: r, rows: e };
+}
+function Hc(t, e) {
+ const n = t.createAndFill();
+ return new a0(n).replace(0, n.content.size, e).doc;
+}
+function UE({ width: t, height: e, rows: n }, r, i) {
+ if (t != r) {
+ const o = [],
+ s = [];
+ for (let l = 0; l < n.length; l++) {
+ const a = n[l],
+ u = [];
+ for (let c = o[l] || 0, f = 0; c < r; f++) {
+ let h = a.child(f % a.childCount);
+ c + h.attrs.colspan > r &&
+ (h = h.type.createChecked(
+ wi(h.attrs, h.attrs.colspan, c + h.attrs.colspan - r),
+ h.content
+ )),
+ u.push(h),
+ (c += h.attrs.colspan);
+ for (let p = 1; p < h.attrs.rowspan; p++)
+ o[l + p] = (o[l + p] || 0) + h.attrs.colspan;
+ }
+ s.push(Y.from(u));
+ }
+ (n = s), (t = r);
+ }
+ if (e != i) {
+ const o = [];
+ for (let s = 0, l = 0; s < i; s++, l++) {
+ const a = [],
+ u = n[l % e];
+ for (let c = 0; c < u.childCount; c++) {
+ let f = u.child(c);
+ s + f.attrs.rowspan > i &&
+ (f = f.type.create(
+ be(W({}, f.attrs), {
+ rowspan: Math.max(1, i - f.attrs.rowspan),
+ }),
+ f.content
+ )),
+ a.push(f);
+ }
+ o.push(Y.from(a));
+ }
+ (n = o), (e = i);
+ }
+ return { width: t, height: e, rows: n };
+}
+function KE(t, e, n, r, i, o, s) {
+ const l = t.doc.type.schema,
+ a = Vt(l);
+ let u, c;
+ if (i > e.width)
+ for (let f = 0, h = 0; f < e.height; f++) {
+ const p = n.child(f);
+ h += p.nodeSize;
+ const g = [];
+ let v;
+ p.lastChild == null || p.lastChild.type == a.cell
+ ? (v = u || (u = a.cell.createAndFill()))
+ : (v = c || (c = a.header_cell.createAndFill()));
+ for (let b = e.width; b < i; b++) g.push(v);
+ t.insert(t.mapping.slice(s).map(h - 1 + r), g);
+ }
+ if (o > e.height) {
+ const f = [];
+ for (
+ let g = 0, v = (e.height - 1) * e.width;
+ g < Math.max(e.width, i);
+ g++
+ ) {
+ const b =
+ g >= e.width
+ ? !1
+ : n.nodeAt(e.map[v + g]).type == a.header_cell;
+ f.push(
+ b
+ ? c || (c = a.header_cell.createAndFill())
+ : u || (u = a.cell.createAndFill())
+ );
+ }
+ const h = a.row.create(null, Y.from(f)),
+ p = [];
+ for (let g = e.height; g < o; g++) p.push(h);
+ t.insert(t.mapping.slice(s).map(r + n.nodeSize - 2), p);
+ }
+ return !!(u || c);
+}
+function Zp(t, e, n, r, i, o, s, l) {
+ if (s == 0 || s == e.height) return !1;
+ let a = !1;
+ for (let u = i; u < o; u++) {
+ const c = s * e.width + u,
+ f = e.map[c];
+ if (e.map[c - e.width] == f) {
+ a = !0;
+ const h = n.nodeAt(f),
+ { top: p, left: g } = e.findCell(f);
+ t.setNodeMarkup(
+ t.mapping.slice(l).map(f + r),
+ null,
+ be(W({}, h.attrs), { rowspan: s - p })
+ ),
+ t.insert(
+ t.mapping.slice(l).map(e.positionAt(s, g, n)),
+ h.type.createAndFill(
+ be(W({}, h.attrs), { rowspan: p + h.attrs.rowspan - s })
+ )
+ ),
+ (u += h.attrs.colspan - 1);
+ }
+ }
+ return a;
+}
+function em(t, e, n, r, i, o, s, l) {
+ if (s == 0 || s == e.width) return !1;
+ let a = !1;
+ for (let u = i; u < o; u++) {
+ const c = u * e.width + s,
+ f = e.map[c];
+ if (e.map[c - 1] == f) {
+ a = !0;
+ const h = n.nodeAt(f),
+ p = e.colCount(f),
+ g = t.mapping.slice(l).map(f + r);
+ t.setNodeMarkup(
+ g,
+ null,
+ wi(h.attrs, s - p, h.attrs.colspan - (s - p))
+ ),
+ t.insert(
+ g + h.nodeSize,
+ h.type.createAndFill(wi(h.attrs, 0, s - p))
+ ),
+ (u += h.attrs.rowspan - 1);
+ }
+ }
+ return a;
+}
+function tm(t, e, n, r, i) {
+ let o = n ? t.doc.nodeAt(n - 1) : t.doc;
+ if (!o) throw new Error("No table found");
+ let s = pt.get(o);
+ const { top: l, left: a } = r,
+ u = a + i.width,
+ c = l + i.height,
+ f = t.tr;
+ let h = 0;
+ function p() {
+ if (((o = n ? f.doc.nodeAt(n - 1) : f.doc), !o))
+ throw new Error("No table found");
+ (s = pt.get(o)), (h = f.mapping.maps.length);
+ }
+ KE(f, s, o, n, u, c, h) && p(),
+ Zp(f, s, o, n, a, u, l, h) && p(),
+ Zp(f, s, o, n, a, u, c, h) && p(),
+ em(f, s, o, n, l, c, a, h) && p(),
+ em(f, s, o, n, l, c, u, h) && p();
+ for (let g = l; g < c; g++) {
+ const v = s.positionAt(g, a, o),
+ b = s.positionAt(g, u, o);
+ f.replace(
+ f.mapping.slice(h).map(v + n),
+ f.mapping.slice(h).map(b + n),
+ new ie(i.rows[g - l], 0, 0)
+ );
+ }
+ p(),
+ f.setSelection(
+ new nt(
+ f.doc.resolve(n + s.positionAt(l, a, o)),
+ f.doc.resolve(n + s.positionAt(c - 1, u - 1, o))
+ )
+ ),
+ e(f);
+}
+var qE = L0({
+ ArrowLeft: Ks("horiz", -1),
+ ArrowRight: Ks("horiz", 1),
+ ArrowUp: Ks("vert", -1),
+ ArrowDown: Ks("vert", 1),
+ "Shift-ArrowLeft": qs("horiz", -1),
+ "Shift-ArrowRight": qs("horiz", 1),
+ "Shift-ArrowUp": qs("vert", -1),
+ "Shift-ArrowDown": qs("vert", 1),
+ Backspace: Js,
+ "Mod-Backspace": Js,
+ Delete: Js,
+ "Mod-Delete": Js,
+});
+function cl(t, e, n) {
+ return n.eq(t.selection)
+ ? !1
+ : (e && e(t.tr.setSelection(n).scrollIntoView()), !0);
+}
+function Ks(t, e) {
+ return (n, r, i) => {
+ if (!i) return !1;
+ const o = n.selection;
+ if (o instanceof nt) return cl(n, r, Se.near(o.$headCell, e));
+ if (t != "horiz" && !o.empty) return !1;
+ const s = cy(i, t, e);
+ if (s == null) return !1;
+ if (t == "horiz")
+ return cl(n, r, Se.near(n.doc.resolve(o.head + e), e));
+ {
+ const l = n.doc.resolve(s),
+ a = oy(l, t, e);
+ let u;
+ return (
+ a
+ ? (u = Se.near(a, 1))
+ : e < 0
+ ? (u = Se.near(n.doc.resolve(l.before(-1)), -1))
+ : (u = Se.near(n.doc.resolve(l.after(-1)), 1)),
+ cl(n, r, u)
+ );
+ }
+ };
+}
+function qs(t, e) {
+ return (n, r, i) => {
+ if (!i) return !1;
+ const o = n.selection;
+ let s;
+ if (o instanceof nt) s = o;
+ else {
+ const a = cy(i, t, e);
+ if (a == null) return !1;
+ s = new nt(n.doc.resolve(a));
+ }
+ const l = oy(s.$headCell, t, e);
+ return l ? cl(n, r, new nt(s.$anchorCell, l)) : !1;
+ };
+}
+function Js(t, e) {
+ const n = t.selection;
+ if (!(n instanceof nt)) return !1;
+ if (e) {
+ const r = t.tr,
+ i = Vt(t.schema).cell.createAndFill().content;
+ n.forEachCell((o, s) => {
+ o.content.eq(i) ||
+ r.replace(
+ r.mapping.map(s + 1),
+ r.mapping.map(s + o.nodeSize - 1),
+ new ie(i, 0, 0)
+ );
+ }),
+ r.docChanged && e(r);
+ }
+ return !0;
+}
+function JE(t, e) {
+ const n = t.state.doc,
+ r = ho(n.resolve(e));
+ return r ? (t.dispatch(t.state.tr.setSelection(new nt(r))), !0) : !1;
+}
+function GE(t, e, n) {
+ if (!Ln(t.state)) return !1;
+ let r = VE(n);
+ const i = t.state.selection;
+ if (i instanceof nt) {
+ r ||
+ (r = {
+ width: 1,
+ height: 1,
+ rows: [Y.from(Hc(Vt(t.state.schema).cell, n))],
+ });
+ const o = i.$anchorCell.node(-1),
+ s = i.$anchorCell.start(-1),
+ l = pt
+ .get(o)
+ .rectBetween(i.$anchorCell.pos - s, i.$headCell.pos - s);
+ return (
+ (r = UE(r, l.right - l.left, l.bottom - l.top)),
+ tm(t.state, t.dispatch, s, l, r),
+ !0
+ );
+ } else if (r) {
+ const o = qa(t.state),
+ s = o.start(-1);
+ return (
+ tm(
+ t.state,
+ t.dispatch,
+ s,
+ pt.get(o.node(-1)).findCell(o.pos - s),
+ r
+ ),
+ !0
+ );
+ } else return !1;
+}
+function YE(t, e) {
+ var n;
+ if (e.ctrlKey || e.metaKey) return;
+ const r = nm(t, e.target);
+ let i;
+ if (e.shiftKey && t.state.selection instanceof nt)
+ o(t.state.selection.$anchorCell, e), e.preventDefault();
+ else if (
+ e.shiftKey &&
+ r &&
+ (i = ho(t.state.selection.$anchor)) != null &&
+ ((n = $u(t, e)) == null ? void 0 : n.pos) != i.pos
+ )
+ o(i, e), e.preventDefault();
+ else if (!r) return;
+ function o(a, u) {
+ let c = $u(t, u);
+ const f = kr.getState(t.state) == null;
+ if (!c || !xf(a, c))
+ if (f) c = a;
+ else return;
+ const h = new nt(a, c);
+ if (f || !t.state.selection.eq(h)) {
+ const p = t.state.tr.setSelection(h);
+ f && p.setMeta(kr, a.pos), t.dispatch(p);
+ }
+ }
+ function s() {
+ t.root.removeEventListener("mouseup", s),
+ t.root.removeEventListener("dragstart", s),
+ t.root.removeEventListener("mousemove", l),
+ kr.getState(t.state) != null &&
+ t.dispatch(t.state.tr.setMeta(kr, -1));
+ }
+ function l(a) {
+ const u = a,
+ c = kr.getState(t.state);
+ let f;
+ if (c != null) f = t.state.doc.resolve(c);
+ else if (nm(t, u.target) != r && ((f = $u(t, e)), !f)) return s();
+ f && o(f, u);
+ }
+ t.root.addEventListener("mouseup", s),
+ t.root.addEventListener("dragstart", s),
+ t.root.addEventListener("mousemove", l);
+}
+function cy(t, e, n) {
+ if (!(t.state.selection instanceof Ce)) return null;
+ const { $head: r } = t.state.selection;
+ for (let i = r.depth - 1; i >= 0; i--) {
+ const o = r.node(i);
+ if (
+ (n < 0 ? r.index(i) : r.indexAfter(i)) != (n < 0 ? 0 : o.childCount)
+ )
+ return null;
+ if (
+ o.type.spec.tableRole == "cell" ||
+ o.type.spec.tableRole == "header_cell"
+ ) {
+ const l = r.before(i),
+ a =
+ e == "vert"
+ ? n > 0
+ ? "down"
+ : "up"
+ : n > 0
+ ? "right"
+ : "left";
+ return t.endOfTextblock(a) ? l : null;
+ }
+ }
+ return null;
+}
+function nm(t, e) {
+ for (; e && e != t.dom; e = e.parentNode)
+ if (e.nodeName == "TD" || e.nodeName == "TH") return e;
+ return null;
+}
+function $u(t, e) {
+ const n = t.posAtCoords({ left: e.clientX, top: e.clientY });
+ return n && n ? ho(t.state.doc.resolve(n.pos)) : null;
+}
+var QE = class {
+ constructor(t, e) {
+ (this.node = t),
+ (this.cellMinWidth = e),
+ (this.dom = document.createElement("div")),
+ (this.dom.className = "tableWrapper"),
+ (this.table = this.dom.appendChild(
+ document.createElement("table")
+ )),
+ (this.colgroup = this.table.appendChild(
+ document.createElement("colgroup")
+ )),
+ Fc(t, this.colgroup, this.table, e),
+ (this.contentDOM = this.table.appendChild(
+ document.createElement("tbody")
+ ));
+ }
+ update(t) {
+ return t.type != this.node.type
+ ? !1
+ : ((this.node = t),
+ Fc(t, this.colgroup, this.table, this.cellMinWidth),
+ !0);
+ }
+ ignoreMutation(t) {
+ return (
+ t.type == "attributes" &&
+ (t.target == this.table || this.colgroup.contains(t.target))
+ );
+ }
+};
+function Fc(t, e, n, r, i, o) {
+ var s;
+ let l = 0,
+ a = !0,
+ u = e.firstChild;
+ const c = t.firstChild;
+ if (!!c) {
+ for (let f = 0, h = 0; f < c.childCount; f++) {
+ const { colspan: p, colwidth: g } = c.child(f).attrs;
+ for (let v = 0; v < p; v++, h++) {
+ const b = i == h ? o : g && g[v],
+ x = b ? b + "px" : "";
+ (l += b || r),
+ b || (a = !1),
+ u
+ ? (u.style.width != x && (u.style.width = x),
+ (u = u.nextSibling))
+ : (e.appendChild(
+ document.createElement("col")
+ ).style.width = x);
+ }
+ }
+ for (; u; ) {
+ const f = u.nextSibling;
+ (s = u.parentNode) == null || s.removeChild(u), (u = f);
+ }
+ a
+ ? ((n.style.width = l + "px"), (n.style.minWidth = ""))
+ : ((n.style.width = ""), (n.style.minWidth = l + "px"));
+ }
+}
+var mn = new Ot("tableColumnResizing");
+function XE({
+ handleWidth: t = 5,
+ cellMinWidth: e = 25,
+ View: n = QE,
+ lastColumnResizable: r = !0,
+} = {}) {
+ const i = new Tt({
+ key: mn,
+ state: {
+ init(o, s) {
+ return (
+ (i.spec.props.nodeViews[Vt(s.schema).table.name] = (l, a) =>
+ new n(l, e, a)),
+ new ZE(-1, !1)
+ );
+ },
+ apply(o, s) {
+ return s.apply(o);
+ },
+ },
+ props: {
+ attributes: (o) => {
+ const s = mn.getState(o);
+ return s && s.activeHandle > -1
+ ? { class: "resize-cursor" }
+ : {};
+ },
+ handleDOMEvents: {
+ mousemove: (o, s) => {
+ e4(o, s, t, e, r);
+ },
+ mouseleave: (o) => {
+ t4(o);
+ },
+ mousedown: (o, s) => {
+ n4(o, s, e);
+ },
+ },
+ decorations: (o) => {
+ const s = mn.getState(o);
+ if (s && s.activeHandle > -1) return a4(o, s.activeHandle);
+ },
+ nodeViews: {},
+ },
+ });
+ return i;
+}
+var ZE = class dl {
+ constructor(e, n) {
+ (this.activeHandle = e), (this.dragging = n);
+ }
+ apply(e) {
+ const n = this,
+ r = e.getMeta(mn);
+ if (r && r.setHandle != null) return new dl(r.setHandle, !1);
+ if (r && r.setDragging !== void 0)
+ return new dl(n.activeHandle, r.setDragging);
+ if (n.activeHandle > -1 && e.docChanged) {
+ let i = e.mapping.map(n.activeHandle, -1);
+ return zc(e.doc.resolve(i)) || (i = -1), new dl(i, n.dragging);
+ }
+ return n;
+ }
+};
+function e4(t, e, n, r, i) {
+ const o = mn.getState(t.state);
+ if (!!o && !o.dragging) {
+ const s = i4(e.target);
+ let l = -1;
+ if (s) {
+ const { left: a, right: u } = s.getBoundingClientRect();
+ e.clientX - a <= n
+ ? (l = rm(t, e, "left", n))
+ : u - e.clientX <= n && (l = rm(t, e, "right", n));
+ }
+ if (l != o.activeHandle) {
+ if (!i && l !== -1) {
+ const a = t.state.doc.resolve(l),
+ u = a.node(-1),
+ c = pt.get(u),
+ f = a.start(-1);
+ if (
+ c.colCount(a.pos - f) + a.nodeAfter.attrs.colspan - 1 ==
+ c.width - 1
+ )
+ return;
+ }
+ dy(t, l);
+ }
+ }
+}
+function t4(t) {
+ const e = mn.getState(t.state);
+ e && e.activeHandle > -1 && !e.dragging && dy(t, -1);
+}
+function n4(t, e, n) {
+ const r = mn.getState(t.state);
+ if (!r || r.activeHandle == -1 || r.dragging) return !1;
+ const i = t.state.doc.nodeAt(r.activeHandle),
+ o = r4(t, r.activeHandle, i.attrs);
+ t.dispatch(
+ t.state.tr.setMeta(mn, {
+ setDragging: { startX: e.clientX, startWidth: o },
+ })
+ );
+ function s(a) {
+ window.removeEventListener("mouseup", s),
+ window.removeEventListener("mousemove", l);
+ const u = mn.getState(t.state);
+ u != null &&
+ u.dragging &&
+ (o4(t, u.activeHandle, im(u.dragging, a, n)),
+ t.dispatch(t.state.tr.setMeta(mn, { setDragging: null })));
+ }
+ function l(a) {
+ if (!a.which) return s(a);
+ const u = mn.getState(t.state);
+ if (!!u && u.dragging) {
+ const c = im(u.dragging, a, n);
+ s4(t, u.activeHandle, c, n);
+ }
+ }
+ return (
+ window.addEventListener("mouseup", s),
+ window.addEventListener("mousemove", l),
+ e.preventDefault(),
+ !0
+ );
+}
+function r4(t, e, { colspan: n, colwidth: r }) {
+ const i = r && r[r.length - 1];
+ if (i) return i;
+ const o = t.domAtPos(e);
+ let l = o.node.childNodes[o.offset].offsetWidth,
+ a = n;
+ if (r) for (let u = 0; u < n; u++) r[u] && ((l -= r[u]), a--);
+ return l / a;
+}
+function i4(t) {
+ for (; t && t.nodeName != "TD" && t.nodeName != "TH"; )
+ t =
+ t.classList && t.classList.contains("ProseMirror")
+ ? null
+ : t.parentNode;
+ return t;
+}
+function rm(t, e, n, r) {
+ const i = n == "right" ? -r : r,
+ o = t.posAtCoords({ left: e.clientX + i, top: e.clientY });
+ if (!o) return -1;
+ const { pos: s } = o,
+ l = ho(t.state.doc.resolve(s));
+ if (!l) return -1;
+ if (n == "right") return l.pos;
+ const a = pt.get(l.node(-1)),
+ u = l.start(-1),
+ c = a.map.indexOf(l.pos - u);
+ return c % a.width == 0 ? -1 : u + a.map[c - 1];
+}
+function im(t, e, n) {
+ const r = e.clientX - t.startX;
+ return Math.max(n, t.startWidth + r);
+}
+function dy(t, e) {
+ t.dispatch(t.state.tr.setMeta(mn, { setHandle: e }));
+}
+function o4(t, e, n) {
+ const r = t.state.doc.resolve(e),
+ i = r.node(-1),
+ o = pt.get(i),
+ s = r.start(-1),
+ l = o.colCount(r.pos - s) + r.nodeAfter.attrs.colspan - 1,
+ a = t.state.tr;
+ for (let u = 0; u < o.height; u++) {
+ const c = u * o.width + l;
+ if (u && o.map[c] == o.map[c - o.width]) continue;
+ const f = o.map[c],
+ h = i.nodeAt(f).attrs,
+ p = h.colspan == 1 ? 0 : l - o.colCount(f);
+ if (h.colwidth && h.colwidth[p] == n) continue;
+ const g = h.colwidth ? h.colwidth.slice() : l4(h.colspan);
+ (g[p] = n), a.setNodeMarkup(s + f, null, be(W({}, h), { colwidth: g }));
+ }
+ a.docChanged && t.dispatch(a);
+}
+function s4(t, e, n, r) {
+ const i = t.state.doc.resolve(e),
+ o = i.node(-1),
+ s = i.start(-1),
+ l = pt.get(o).colCount(i.pos - s) + i.nodeAfter.attrs.colspan - 1;
+ let a = t.domAtPos(i.start(-1)).node;
+ for (; a && a.nodeName != "TABLE"; ) a = a.parentNode;
+ !a || Fc(o, a.firstChild, a, r, l, n);
+}
+function l4(t) {
+ return Array(t).fill(0);
+}
+function a4(t, e) {
+ const n = [],
+ r = t.doc.resolve(e),
+ i = r.node(-1);
+ if (!i) return st.empty;
+ const o = pt.get(i),
+ s = r.start(-1),
+ l = o.colCount(r.pos - s) + r.nodeAfter.attrs.colspan;
+ for (let a = 0; a < o.height; a++) {
+ const u = l + a * o.width - 1;
+ if (
+ (l == o.width || o.map[u] != o.map[u + 1]) &&
+ (a == 0 || o.map[u] != o.map[u - o.width])
+ ) {
+ const c = o.map[u],
+ f = s + c + i.nodeAt(c).nodeSize - 1,
+ h = document.createElement("div");
+ (h.className = "column-resize-handle"), n.push(Xt.widget(f, h));
+ }
+ }
+ return st.create(t.doc, n);
+}
+function Zn(t) {
+ const e = t.selection,
+ n = qa(t),
+ r = n.node(-1),
+ i = n.start(-1),
+ o = pt.get(r),
+ s =
+ e instanceof nt
+ ? o.rectBetween(e.$anchorCell.pos - i, e.$headCell.pos - i)
+ : o.findCell(n.pos - i);
+ return be(W({}, s), { tableStart: i, map: o, table: r });
+}
+function fy(t, { map: e, tableStart: n, table: r }, i) {
+ let o = i > 0 ? -1 : 0;
+ LE(e, r, i + o) && (o = i == 0 || i == e.width ? null : 0);
+ for (let s = 0; s < e.height; s++) {
+ const l = s * e.width + i;
+ if (i > 0 && i < e.width && e.map[l - 1] == e.map[l]) {
+ const a = e.map[l],
+ u = r.nodeAt(a);
+ t.setNodeMarkup(
+ t.mapping.map(n + a),
+ null,
+ sy(u.attrs, i - e.colCount(a))
+ ),
+ (s += u.attrs.rowspan - 1);
+ } else {
+ const a =
+ o == null
+ ? Vt(r.type.schema).cell
+ : r.nodeAt(e.map[l + o]).type,
+ u = e.positionAt(s, i, r);
+ t.insert(t.mapping.map(n + u), a.createAndFill());
+ }
+ }
+ return t;
+}
+function u4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t);
+ e(fy(t.tr, n, n.left));
+ }
+ return !0;
+}
+function c4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t);
+ e(fy(t.tr, n, n.right));
+ }
+ return !0;
+}
+function d4(t, { map: e, table: n, tableStart: r }, i) {
+ const o = t.mapping.maps.length;
+ for (let s = 0; s < e.height; ) {
+ const l = s * e.width + i,
+ a = e.map[l],
+ u = n.nodeAt(a),
+ c = u.attrs;
+ if (
+ (i > 0 && e.map[l - 1] == a) ||
+ (i < e.width - 1 && e.map[l + 1] == a)
+ )
+ t.setNodeMarkup(
+ t.mapping.slice(o).map(r + a),
+ null,
+ wi(c, i - e.colCount(a))
+ );
+ else {
+ const f = t.mapping.slice(o).map(r + a);
+ t.delete(f, f + u.nodeSize);
+ }
+ s += c.rowspan;
+ }
+}
+function f4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t),
+ r = t.tr;
+ if (n.left == 0 && n.right == n.map.width) return !1;
+ for (let i = n.right - 1; d4(r, n, i), i != n.left; i--) {
+ const o = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
+ if (!o) throw RangeError("No table found");
+ (n.table = o), (n.map = pt.get(o));
+ }
+ e(r);
+ }
+ return !0;
+}
+function h4(t, e, n) {
+ var r;
+ const i = Vt(e.type.schema).header_cell;
+ for (let o = 0; o < t.width; o++)
+ if (
+ ((r = e.nodeAt(t.map[o + n * t.width])) == null
+ ? void 0
+ : r.type) != i
+ )
+ return !1;
+ return !0;
+}
+function hy(t, { map: e, tableStart: n, table: r }, i) {
+ var o;
+ let s = n;
+ for (let u = 0; u < i; u++) s += r.child(u).nodeSize;
+ const l = [];
+ let a = i > 0 ? -1 : 0;
+ h4(e, r, i + a) && (a = i == 0 || i == e.height ? null : 0);
+ for (let u = 0, c = e.width * i; u < e.width; u++, c++)
+ if (i > 0 && i < e.height && e.map[c] == e.map[c - e.width]) {
+ const f = e.map[c],
+ h = r.nodeAt(f).attrs;
+ t.setNodeMarkup(
+ n + f,
+ null,
+ be(W({}, h), { rowspan: h.rowspan + 1 })
+ ),
+ (u += h.colspan - 1);
+ } else {
+ const f =
+ a == null
+ ? Vt(r.type.schema).cell
+ : (o = r.nodeAt(e.map[c + a * e.width])) == null
+ ? void 0
+ : o.type,
+ h = f == null ? void 0 : f.createAndFill();
+ h && l.push(h);
+ }
+ return t.insert(s, Vt(r.type.schema).row.create(null, l)), t;
+}
+function p4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t);
+ e(hy(t.tr, n, n.top));
+ }
+ return !0;
+}
+function m4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t);
+ e(hy(t.tr, n, n.bottom));
+ }
+ return !0;
+}
+function g4(t, { map: e, table: n, tableStart: r }, i) {
+ let o = 0;
+ for (let u = 0; u < i; u++) o += n.child(u).nodeSize;
+ const s = o + n.child(i).nodeSize,
+ l = t.mapping.maps.length;
+ t.delete(o + r, s + r);
+ const a = new Set();
+ for (let u = 0, c = i * e.width; u < e.width; u++, c++) {
+ const f = e.map[c];
+ if (!a.has(f)) {
+ if ((a.add(f), i > 0 && f == e.map[c - e.width])) {
+ const h = n.nodeAt(f).attrs;
+ t.setNodeMarkup(
+ t.mapping.slice(l).map(f + r),
+ null,
+ be(W({}, h), { rowspan: h.rowspan - 1 })
+ ),
+ (u += h.colspan - 1);
+ } else if (i < e.height && f == e.map[c + e.width]) {
+ const h = n.nodeAt(f),
+ p = h.attrs,
+ g = h.type.create(
+ be(W({}, p), { rowspan: h.attrs.rowspan - 1 }),
+ h.content
+ ),
+ v = e.positionAt(i + 1, u, n);
+ t.insert(t.mapping.slice(l).map(r + v), g),
+ (u += p.colspan - 1);
+ }
+ }
+ }
+}
+function y4(t, e) {
+ if (!Ln(t)) return !1;
+ if (e) {
+ const n = Zn(t),
+ r = t.tr;
+ if (n.top == 0 && n.bottom == n.map.height) return !1;
+ for (let i = n.bottom - 1; g4(r, n, i), i != n.top; i--) {
+ const o = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
+ if (!o) throw RangeError("No table found");
+ (n.table = o), (n.map = pt.get(n.table));
+ }
+ e(r);
+ }
+ return !0;
+}
+function om(t) {
+ const e = t.content;
+ return (
+ e.childCount == 1 &&
+ e.child(0).isTextblock &&
+ e.child(0).childCount == 0
+ );
+}
+function v4({ width: t, height: e, map: n }, r) {
+ let i = r.top * t + r.left,
+ o = i,
+ s = (r.bottom - 1) * t + r.left,
+ l = i + (r.right - r.left - 1);
+ for (let a = r.top; a < r.bottom; a++) {
+ if (
+ (r.left > 0 && n[o] == n[o - 1]) ||
+ (r.right < t && n[l] == n[l + 1])
+ )
+ return !0;
+ (o += t), (l += t);
+ }
+ for (let a = r.left; a < r.right; a++) {
+ if (
+ (r.top > 0 && n[i] == n[i - t]) ||
+ (r.bottom < e && n[s] == n[s + t])
+ )
+ return !0;
+ i++, s++;
+ }
+ return !1;
+}
+function sm(t, e) {
+ const n = t.selection;
+ if (!(n instanceof nt) || n.$anchorCell.pos == n.$headCell.pos) return !1;
+ const r = Zn(t),
+ { map: i } = r;
+ if (v4(i, r)) return !1;
+ if (e) {
+ const o = t.tr,
+ s = {};
+ let l = Y.empty,
+ a,
+ u;
+ for (let c = r.top; c < r.bottom; c++)
+ for (let f = r.left; f < r.right; f++) {
+ const h = i.map[c * i.width + f],
+ p = r.table.nodeAt(h);
+ if (!(s[h] || !p))
+ if (((s[h] = !0), a == null)) (a = h), (u = p);
+ else {
+ om(p) || (l = l.append(p.content));
+ const g = o.mapping.map(h + r.tableStart);
+ o.delete(g, g + p.nodeSize);
+ }
+ }
+ if (a == null || u == null) return !0;
+ if (
+ (o.setNodeMarkup(
+ a + r.tableStart,
+ null,
+ be(
+ W(
+ {},
+ sy(
+ u.attrs,
+ u.attrs.colspan,
+ r.right - r.left - u.attrs.colspan
+ )
+ ),
+ { rowspan: r.bottom - r.top }
+ )
+ ),
+ l.size)
+ ) {
+ const c = a + 1 + u.content.size,
+ f = om(u) ? a + 1 : c;
+ o.replaceWith(f + r.tableStart, c + r.tableStart, l);
+ }
+ o.setSelection(new nt(o.doc.resolve(a + r.tableStart))), e(o);
+ }
+ return !0;
+}
+function lm(t, e) {
+ const n = Vt(t.schema);
+ return b4(({ node: r }) => n[r.type.spec.tableRole])(t, e);
+}
+function b4(t) {
+ return (e, n) => {
+ var r;
+ const i = e.selection;
+ let o, s;
+ if (i instanceof nt) {
+ if (i.$anchorCell.pos != i.$headCell.pos) return !1;
+ (o = i.$anchorCell.nodeAfter), (s = i.$anchorCell.pos);
+ } else {
+ if (((o = PE(i.$from)), !o)) return !1;
+ s = (r = ho(i.$from)) == null ? void 0 : r.pos;
+ }
+ if (
+ o == null ||
+ s == null ||
+ (o.attrs.colspan == 1 && o.attrs.rowspan == 1)
+ )
+ return !1;
+ if (n) {
+ let l = o.attrs;
+ const a = [],
+ u = l.colwidth;
+ l.rowspan > 1 && (l = be(W({}, l), { rowspan: 1 })),
+ l.colspan > 1 && (l = be(W({}, l), { colspan: 1 }));
+ const c = Zn(e),
+ f = e.tr;
+ for (let p = 0; p < c.right - c.left; p++)
+ a.push(
+ u
+ ? be(W({}, l), { colwidth: u && u[p] ? [u[p]] : null })
+ : l
+ );
+ let h;
+ for (let p = c.top; p < c.bottom; p++) {
+ let g = c.map.positionAt(p, c.left, c.table);
+ p == c.top && (g += o.nodeSize);
+ for (let v = c.left, b = 0; v < c.right; v++, b++)
+ (v == c.left && p == c.top) ||
+ f.insert(
+ (h = f.mapping.map(g + c.tableStart, 1)),
+ t({ node: o, row: p, col: v }).createAndFill(a[b])
+ );
+ }
+ f.setNodeMarkup(s, t({ node: o, row: c.top, col: c.left }), a[0]),
+ i instanceof nt &&
+ f.setSelection(
+ new nt(
+ f.doc.resolve(i.$anchorCell.pos),
+ h ? f.doc.resolve(h) : void 0
+ )
+ ),
+ n(f);
+ }
+ return !0;
+ };
+}
+function w4(t, e) {
+ return function (n, r) {
+ if (!Ln(n)) return !1;
+ const i = qa(n);
+ if (i.nodeAfter.attrs[t] === e) return !1;
+ if (r) {
+ const o = n.tr;
+ n.selection instanceof nt
+ ? n.selection.forEachCell((s, l) => {
+ s.attrs[t] !== e &&
+ o.setNodeMarkup(
+ l,
+ null,
+ be(W({}, s.attrs), { [t]: e })
+ );
+ })
+ : o.setNodeMarkup(
+ i.pos,
+ null,
+ be(W({}, i.nodeAfter.attrs), { [t]: e })
+ ),
+ r(o);
+ }
+ return !0;
+ };
+}
+function x4(t) {
+ return function (e, n) {
+ if (!Ln(e)) return !1;
+ if (n) {
+ const r = Vt(e.schema),
+ i = Zn(e),
+ o = e.tr,
+ s = i.map.cellsInRect(
+ t == "column"
+ ? {
+ left: i.left,
+ top: 0,
+ right: i.right,
+ bottom: i.map.height,
+ }
+ : t == "row"
+ ? {
+ left: 0,
+ top: i.top,
+ right: i.map.width,
+ bottom: i.bottom,
+ }
+ : i
+ ),
+ l = s.map((a) => i.table.nodeAt(a));
+ for (let a = 0; a < s.length; a++)
+ l[a].type == r.header_cell &&
+ o.setNodeMarkup(i.tableStart + s[a], r.cell, l[a].attrs);
+ if (o.steps.length == 0)
+ for (let a = 0; a < s.length; a++)
+ o.setNodeMarkup(
+ i.tableStart + s[a],
+ r.header_cell,
+ l[a].attrs
+ );
+ n(o);
+ }
+ return !0;
+ };
+}
+function am(t, e, n) {
+ const r = e.map.cellsInRect({
+ left: 0,
+ top: 0,
+ right: t == "row" ? e.map.width : 1,
+ bottom: t == "column" ? e.map.height : 1,
+ });
+ for (let i = 0; i < r.length; i++) {
+ const o = e.table.nodeAt(r[i]);
+ if (o && o.type !== n.header_cell) return !1;
+ }
+ return !0;
+}
+function ls(t, e) {
+ return (
+ (e = e || { useDeprecatedLogic: !1 }),
+ e.useDeprecatedLogic
+ ? x4(t)
+ : function (n, r) {
+ if (!Ln(n)) return !1;
+ if (r) {
+ const i = Vt(n.schema),
+ o = Zn(n),
+ s = n.tr,
+ l = am("row", o, i),
+ a = am("column", o, i),
+ c = (t === "column" ? l : t === "row" ? a : !1)
+ ? 1
+ : 0,
+ f =
+ t == "column"
+ ? {
+ left: 0,
+ top: c,
+ right: 1,
+ bottom: o.map.height,
+ }
+ : t == "row"
+ ? {
+ left: c,
+ top: 0,
+ right: o.map.width,
+ bottom: 1,
+ }
+ : o,
+ h =
+ t == "column"
+ ? a
+ ? i.cell
+ : i.header_cell
+ : t == "row"
+ ? l
+ ? i.cell
+ : i.header_cell
+ : i.cell;
+ o.map.cellsInRect(f).forEach((p) => {
+ const g = p + o.tableStart,
+ v = s.doc.nodeAt(g);
+ v && s.setNodeMarkup(g, h, v.attrs);
+ }),
+ r(s);
+ }
+ return !0;
+ }
+ );
+}
+ls("row", { useDeprecatedLogic: !0 });
+ls("column", { useDeprecatedLogic: !0 });
+var k4 = ls("cell", { useDeprecatedLogic: !0 });
+function C4(t, e) {
+ if (e < 0) {
+ const n = t.nodeBefore;
+ if (n) return t.pos - n.nodeSize;
+ for (let r = t.index(-1) - 1, i = t.before(); r >= 0; r--) {
+ const o = t.node(-1).child(r),
+ s = o.lastChild;
+ if (s) return i - 1 - s.nodeSize;
+ i -= o.nodeSize;
+ }
+ } else {
+ if (t.index() < t.parent.childCount - 1)
+ return t.pos + t.nodeAfter.nodeSize;
+ const n = t.node(-1);
+ for (let r = t.indexAfter(-1), i = t.after(); r < n.childCount; r++) {
+ const o = n.child(r);
+ if (o.childCount) return i + 1;
+ i += o.nodeSize;
+ }
+ }
+ return null;
+}
+function um(t) {
+ return function (e, n) {
+ if (!Ln(e)) return !1;
+ const r = C4(qa(e), t);
+ if (r == null) return !1;
+ if (n) {
+ const i = e.doc.resolve(r);
+ n(e.tr.setSelection(Ce.between(i, jE(i))).scrollIntoView());
+ }
+ return !0;
+ };
+}
+function S4(t, e) {
+ const n = t.selection.$anchor;
+ for (let r = n.depth; r > 0; r--)
+ if (n.node(r).type.spec.tableRole == "table")
+ return (
+ e && e(t.tr.delete(n.before(r), n.after(r)).scrollIntoView()),
+ !0
+ );
+ return !1;
+}
+function _4({ allowTableNodeSelection: t = !1 } = {}) {
+ return new Tt({
+ key: kr,
+ state: {
+ init() {
+ return null;
+ },
+ apply(e, n) {
+ const r = e.getMeta(kr);
+ if (r != null) return r == -1 ? null : r;
+ if (n == null || !e.docChanged) return n;
+ const { deleted: i, pos: o } = e.mapping.mapResult(n);
+ return i ? null : o;
+ },
+ },
+ props: {
+ decorations: IE,
+ handleDOMEvents: { mousedown: YE },
+ createSelectionBetween(e) {
+ return kr.getState(e.state) != null ? e.state.selection : null;
+ },
+ handleTripleClick: JE,
+ handleKeyDown: qE,
+ handlePaste: GE,
+ },
+ appendTransaction(e, n, r) {
+ return zE(r, uy(r, n), t);
+ },
+ });
+}
+function cm(t, e, n, r, i, o) {
+ let s = 0,
+ l = !0,
+ a = e.firstChild;
+ const u = t.firstChild;
+ for (let c = 0, f = 0; c < u.childCount; c += 1) {
+ const { colspan: h, colwidth: p } = u.child(c).attrs;
+ for (let g = 0; g < h; g += 1, f += 1) {
+ const v = i === f ? o : p && p[g],
+ b = v ? `${v}px` : "";
+ (s += v || r),
+ v || (l = !1),
+ a
+ ? (a.style.width !== b && (a.style.width = b),
+ (a = a.nextSibling))
+ : (e.appendChild(
+ document.createElement("col")
+ ).style.width = b);
+ }
+ }
+ for (; a; ) {
+ const c = a.nextSibling;
+ a.parentNode.removeChild(a), (a = c);
+ }
+ l
+ ? ((n.style.width = `${s}px`), (n.style.minWidth = ""))
+ : ((n.style.width = ""), (n.style.minWidth = `${s}px`));
+}
+class M4 {
+ constructor(e, n) {
+ (this.node = e),
+ (this.cellMinWidth = n),
+ (this.dom = document.createElement("div")),
+ (this.dom.className = "tableWrapper"),
+ (this.table = this.dom.appendChild(
+ document.createElement("table")
+ )),
+ (this.colgroup = this.table.appendChild(
+ document.createElement("colgroup")
+ )),
+ cm(e, this.colgroup, this.table, n),
+ (this.contentDOM = this.table.appendChild(
+ document.createElement("tbody")
+ ));
+ }
+ update(e) {
+ return e.type !== this.node.type
+ ? !1
+ : ((this.node = e),
+ cm(e, this.colgroup, this.table, this.cellMinWidth),
+ !0);
+ }
+ ignoreMutation(e) {
+ return (
+ e.type === "attributes" &&
+ (e.target === this.table || this.colgroup.contains(e.target))
+ );
+ }
+}
+function dm(t, e) {
+ return e ? t.createChecked(null, e) : t.createAndFill();
+}
+function E4(t) {
+ if (t.cached.tableNodeTypes) return t.cached.tableNodeTypes;
+ const e = {};
+ return (
+ Object.keys(t.nodes).forEach((n) => {
+ const r = t.nodes[n];
+ r.spec.tableRole && (e[r.spec.tableRole] = r);
+ }),
+ (t.cached.tableNodeTypes = e),
+ e
+ );
+}
+function A4(t, e, n, r, i) {
+ const o = E4(t),
+ s = [],
+ l = [];
+ for (let u = 0; u < n; u += 1) {
+ const c = dm(o.cell, i);
+ if ((c && l.push(c), r)) {
+ const f = dm(o.header_cell, i);
+ f && s.push(f);
+ }
+ }
+ const a = [];
+ for (let u = 0; u < e; u += 1)
+ a.push(o.row.createChecked(null, r && u === 0 ? s : l));
+ return o.table.createChecked(null, a);
+}
+function T4(t) {
+ return t instanceof nt;
+}
+const Gs = ({ editor: t }) => {
+ const { selection: e } = t.state;
+ if (!T4(e)) return !1;
+ let n = 0;
+ const r = F0(e.ranges[0].$from, (o) => o.type.name === "table");
+ return (
+ r == null ||
+ r.node.descendants((o) => {
+ if (o.type.name === "table") return !1;
+ ["tableCell", "tableHeader"].includes(o.type.name) &&
+ (n += 1);
+ }),
+ n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1
+ );
+ },
+ jR = ut.create({
+ name: "table",
+ addOptions() {
+ return {
+ HTMLAttributes: {},
+ resizable: !1,
+ handleWidth: 5,
+ cellMinWidth: 25,
+ View: M4,
+ lastColumnResizable: !0,
+ allowTableNodeSelection: !1,
+ };
+ },
+ content: "tableRow+",
+ tableRole: "table",
+ isolating: !0,
+ group: "block",
+ parseHTML() {
+ return [{ tag: "table" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["table", et(this.options.HTMLAttributes, t), ["tbody", 0]];
+ },
+ addCommands() {
+ return {
+ insertTable:
+ ({
+ rows: t = 3,
+ cols: e = 3,
+ withHeaderRow: n = !0,
+ } = {}) =>
+ ({ tr: r, dispatch: i, editor: o }) => {
+ const s = A4(o.schema, t, e, n);
+ if (i) {
+ const l = r.selection.anchor + 1;
+ r.replaceSelectionWith(s)
+ .scrollIntoView()
+ .setSelection(Ce.near(r.doc.resolve(l)));
+ }
+ return !0;
+ },
+ addColumnBefore:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ u4(t, e),
+ addColumnAfter:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ c4(t, e),
+ deleteColumn:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ f4(t, e),
+ addRowBefore:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ p4(t, e),
+ addRowAfter:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ m4(t, e),
+ deleteRow:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ y4(t, e),
+ deleteTable:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ S4(t, e),
+ mergeCells:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ sm(t, e),
+ splitCell:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ lm(t, e),
+ toggleHeaderColumn:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ ls("column")(t, e),
+ toggleHeaderRow:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ ls("row")(t, e),
+ toggleHeaderCell:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ k4(t, e),
+ mergeOrSplit:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ sm(t, e) ? !0 : lm(t, e),
+ setCellAttribute:
+ (t, e) =>
+ ({ state: n, dispatch: r }) =>
+ w4(t, e)(n, r),
+ goToNextCell:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ um(1)(t, e),
+ goToPreviousCell:
+ () =>
+ ({ state: t, dispatch: e }) =>
+ um(-1)(t, e),
+ fixTables:
+ () =>
+ ({ state: t, dispatch: e }) => (e && uy(t), !0),
+ setCellSelection:
+ (t) =>
+ ({ tr: e, dispatch: n }) => {
+ if (n) {
+ const r = nt.create(
+ e.doc,
+ t.anchorCell,
+ t.headCell
+ );
+ e.setSelection(r);
+ }
+ return !0;
+ },
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ Tab: () =>
+ this.editor.commands.goToNextCell()
+ ? !0
+ : this.editor.can().addRowAfter()
+ ? this.editor.chain().addRowAfter().goToNextCell().run()
+ : !1,
+ "Shift-Tab": () => this.editor.commands.goToPreviousCell(),
+ Backspace: Gs,
+ "Mod-Backspace": Gs,
+ Delete: Gs,
+ "Mod-Delete": Gs,
+ };
+ },
+ addProseMirrorPlugins() {
+ return [
+ ...(this.options.resizable && this.editor.isEditable
+ ? [
+ XE({
+ handleWidth: this.options.handleWidth,
+ cellMinWidth: this.options.cellMinWidth,
+ View: this.options.View,
+ lastColumnResizable:
+ this.options.lastColumnResizable,
+ }),
+ ]
+ : []),
+ _4({
+ allowTableNodeSelection:
+ this.options.allowTableNodeSelection,
+ }),
+ ];
+ },
+ extendNodeSchema(t) {
+ const e = { name: t.name, options: t.options, storage: t.storage };
+ return { tableRole: lt(bt(t, "tableRole", e)) };
+ },
+ }),
+ LR = ut.create({
+ name: "tableCell",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ content: "block+",
+ addAttributes() {
+ return {
+ colspan: { default: 1 },
+ rowspan: { default: 1 },
+ colwidth: {
+ default: null,
+ parseHTML: (t) => {
+ const e = t.getAttribute("colwidth");
+ return e ? [parseInt(e, 10)] : null;
+ },
+ },
+ };
+ },
+ tableRole: "cell",
+ isolating: !0,
+ parseHTML() {
+ return [{ tag: "td" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["td", et(this.options.HTMLAttributes, t), 0];
+ },
+ }),
+ DR = ut.create({
+ name: "tableHeader",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ content: "block+",
+ addAttributes() {
+ return {
+ colspan: { default: 1 },
+ rowspan: { default: 1 },
+ colwidth: {
+ default: null,
+ parseHTML: (t) => {
+ const e = t.getAttribute("colwidth");
+ return e ? [parseInt(e, 10)] : null;
+ },
+ },
+ };
+ },
+ tableRole: "header_cell",
+ isolating: !0,
+ parseHTML() {
+ return [{ tag: "th" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["th", et(this.options.HTMLAttributes, t), 0];
+ },
+ }),
+ IR = ut.create({
+ name: "tableRow",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ content: "(tableCell | tableHeader)*",
+ tableRole: "row",
+ parseHTML() {
+ return [{ tag: "tr" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["tr", et(this.options.HTMLAttributes, t), 0];
+ },
+ }),
+ fm = (t) =>
+ new Promise((e) => {
+ let n = new FileReader();
+ (n.onloadend = () => {
+ e(n.result);
+ }),
+ n.readAsDataURL(t);
+ }),
+ O4 = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,
+ BR = ut.create({
+ name: "image",
+ addOptions() {
+ return { inline: !1, HTMLAttributes: {} };
+ },
+ inline() {
+ return this.options.inline;
+ },
+ group() {
+ return this.options.inline ? "inline" : "block";
+ },
+ draggable: !0,
+ addAttributes() {
+ return {
+ src: { default: null },
+ alt: { default: null },
+ title: { default: null },
+ };
+ },
+ parseHTML() {
+ return [{ tag: "img[src]" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["img", et(this.options.HTMLAttributes, t)];
+ },
+ addCommands() {
+ return {
+ setImage:
+ (t) =>
+ ({ commands: e }) =>
+ e.insertContent({ type: this.name, attrs: t }),
+ };
+ },
+ addInputRules() {
+ return [
+ W0({
+ find: O4,
+ type: this.type,
+ getAttributes: (t) => {
+ const [, , e, n, r] = t;
+ return { src: n, alt: e, title: r };
+ },
+ }),
+ ];
+ },
+ addProseMirrorPlugins() {
+ return [R4()];
+ },
+ }),
+ R4 = () =>
+ new Tt({
+ props: {
+ handlePaste(t, e, n) {
+ var o;
+ const r = Array.from(
+ ((o = e.clipboardData) == null
+ ? void 0
+ : o.items) || []
+ ),
+ { schema: i } = t.state;
+ return (
+ r.forEach((s) => {
+ const l = s.getAsFile();
+ !l ||
+ (s.type.indexOf("image") === 0 &&
+ (e.preventDefault(),
+ fm(l).then((a) => {
+ const u = i.nodes.image.create({
+ src: a,
+ }),
+ c =
+ t.state.tr.replaceSelectionWith(
+ u
+ );
+ t.dispatch(c);
+ })));
+ }),
+ !1
+ );
+ },
+ handleDOMEvents: {
+ drop: (t, e) => {
+ var s, l;
+ if (
+ !(
+ e.dataTransfer &&
+ e.dataTransfer.files &&
+ e.dataTransfer.files.length
+ )
+ )
+ return !1;
+ const r = Array.from(
+ (l =
+ (s = e.dataTransfer) == null
+ ? void 0
+ : s.files) != null
+ ? l
+ : []
+ ).filter((a) => /image/i.test(a.type));
+ if (r.length === 0) return !1;
+ e.preventDefault();
+ const { schema: i } = t.state,
+ o = t.posAtCoords({
+ left: e.clientX,
+ top: e.clientY,
+ });
+ return o
+ ? (r.forEach((a) =>
+ cr(void 0, null, function* () {
+ fm(a).then((u) => {
+ const c = i.nodes.image.create({
+ src: u,
+ }),
+ f = t.state.tr.insert(o.pos, c);
+ t.dispatch(f);
+ });
+ })
+ ),
+ !0)
+ : !1;
+ },
+ },
+ },
+ }),
+ $R = ut.create({
+ name: "video",
+ group: "block",
+ selectable: !0,
+ draggable: !0,
+ atom: !0,
+ addAttributes() {
+ return { src: { default: null } };
+ },
+ parseHTML() {
+ return [{ tag: "video" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["video", et(t)];
+ },
+ addNodeView() {
+ return ({ editor: t, node: e }) => {
+ const n = document.createElement("div");
+ n.className =
+ "relative aspect-w-16 aspect-h-9" +
+ (t.isEditable ? " cursor-pointer" : "");
+ const r = document.createElement("video");
+ if (
+ (t.isEditable && (r.className = "pointer-events-none"),
+ (r.src = e.attrs.src),
+ !t.isEditable)
+ )
+ r.setAttribute("controls", "");
+ else {
+ let i = document.createElement("div");
+ (i.className =
+ "absolute top-0 right-0 text-xs m-2 bg-gray-800 text-white px-2 py-1 rounded-md"),
+ (i.innerHTML = "Video"),
+ n.append(i);
+ }
+ return n.append(r), { dom: n };
+ };
+ },
+ }),
+ P4 =
+ "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",
+ N4 =
+ "\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",
+ ro = (t, e) => {
+ for (const n in e) t[n] = e[n];
+ return t;
+ },
+ Vc = "numeric",
+ Wc = "ascii",
+ Uc = "alpha",
+ fl = "asciinumeric",
+ Ys = "alphanumeric",
+ Kc = "domain",
+ py = "emoji",
+ j4 = "scheme",
+ L4 = "slashscheme",
+ hm = "whitespace";
+function D4(t, e) {
+ return t in e || (e[t] = []), e[t];
+}
+function ii(t, e, n) {
+ e[Vc] && ((e[fl] = !0), (e[Ys] = !0)),
+ e[Wc] && ((e[fl] = !0), (e[Uc] = !0)),
+ e[fl] && (e[Ys] = !0),
+ e[Uc] && (e[Ys] = !0),
+ e[Ys] && (e[Kc] = !0),
+ e[py] && (e[Kc] = !0);
+ for (const r in e) {
+ const i = D4(r, n);
+ i.indexOf(t) < 0 && i.push(t);
+ }
+}
+function I4(t, e) {
+ const n = {};
+ for (const r in e) e[r].indexOf(t) >= 0 && (n[r] = !0);
+ return n;
+}
+function Yt(t) {
+ t === void 0 && (t = null),
+ (this.j = {}),
+ (this.jr = []),
+ (this.jd = null),
+ (this.t = t);
+}
+Yt.groups = {};
+Yt.prototype = {
+ accepts() {
+ return !!this.t;
+ },
+ go(t) {
+ const e = this,
+ n = e.j[t];
+ if (n) return n;
+ for (let r = 0; r < e.jr.length; r++) {
+ const i = e.jr[r][0],
+ o = e.jr[r][1];
+ if (o && i.test(t)) return o;
+ }
+ return e.jd;
+ },
+ has(t, e) {
+ return e === void 0 && (e = !1), e ? t in this.j : !!this.go(t);
+ },
+ ta(t, e, n, r) {
+ for (let i = 0; i < t.length; i++) this.tt(t[i], e, n, r);
+ },
+ tr(t, e, n, r) {
+ r = r || Yt.groups;
+ let i;
+ return (
+ e && e.j ? (i = e) : ((i = new Yt(e)), n && r && ii(e, n, r)),
+ this.jr.push([t, i]),
+ i
+ );
+ },
+ ts(t, e, n, r) {
+ let i = this;
+ const o = t.length;
+ if (!o) return i;
+ for (let s = 0; s < o - 1; s++) i = i.tt(t[s]);
+ return i.tt(t[o - 1], e, n, r);
+ },
+ tt(t, e, n, r) {
+ r = r || Yt.groups;
+ const i = this;
+ if (e && e.j) return (i.j[t] = e), e;
+ const o = e;
+ let s,
+ l = i.go(t);
+ if (
+ (l
+ ? ((s = new Yt()),
+ ro(s.j, l.j),
+ s.jr.push.apply(s.jr, l.jr),
+ (s.jd = l.jd),
+ (s.t = l.t))
+ : (s = new Yt()),
+ o)
+ ) {
+ if (r)
+ if (s.t && typeof s.t == "string") {
+ const a = ro(I4(s.t, r), n);
+ ii(o, a, r);
+ } else n && ii(o, n, r);
+ s.t = o;
+ }
+ return (i.j[t] = s), s;
+ },
+};
+const Ne = (t, e, n, r, i) => t.ta(e, n, r, i),
+ dn = (t, e, n, r, i) => t.tr(e, n, r, i),
+ pm = (t, e, n, r, i) => t.ts(e, n, r, i),
+ re = (t, e, n, r, i) => t.tt(e, n, r, i),
+ nr = "WORD",
+ qc = "UWORD",
+ as = "LOCALHOST",
+ Jc = "TLD",
+ Gc = "UTLD",
+ hl = "SCHEME",
+ ji = "SLASH_SCHEME",
+ kf = "NUM",
+ my = "WS",
+ Cf = "NL",
+ Ho = "OPENBRACE",
+ Fo = "CLOSEBRACE",
+ Vl = "OPENBRACKET",
+ Wl = "CLOSEBRACKET",
+ Ul = "OPENPAREN",
+ Kl = "CLOSEPAREN",
+ ql = "OPENANGLEBRACKET",
+ Jl = "CLOSEANGLEBRACKET",
+ Gl = "FULLWIDTHLEFTPAREN",
+ Yl = "FULLWIDTHRIGHTPAREN",
+ Ql = "LEFTCORNERBRACKET",
+ Xl = "RIGHTCORNERBRACKET",
+ Zl = "LEFTWHITECORNERBRACKET",
+ ea = "RIGHTWHITECORNERBRACKET",
+ ta = "FULLWIDTHLESSTHAN",
+ na = "FULLWIDTHGREATERTHAN",
+ ra = "AMPERSAND",
+ ia = "APOSTROPHE",
+ oa = "ASTERISK",
+ xr = "AT",
+ sa = "BACKSLASH",
+ la = "BACKTICK",
+ aa = "CARET",
+ Cr = "COLON",
+ Sf = "COMMA",
+ ua = "DOLLAR",
+ Bn = "DOT",
+ ca = "EQUALS",
+ _f = "EXCLAMATION",
+ $n = "HYPHEN",
+ da = "PERCENT",
+ fa = "PIPE",
+ ha = "PLUS",
+ pa = "POUND",
+ ma = "QUERY",
+ Mf = "QUOTE",
+ Ef = "SEMI",
+ zn = "SLASH",
+ Vo = "TILDE",
+ ga = "UNDERSCORE",
+ gy = "EMOJI",
+ ya = "SYM";
+var yy = Object.freeze({
+ __proto__: null,
+ WORD: nr,
+ UWORD: qc,
+ LOCALHOST: as,
+ TLD: Jc,
+ UTLD: Gc,
+ SCHEME: hl,
+ SLASH_SCHEME: ji,
+ NUM: kf,
+ WS: my,
+ NL: Cf,
+ OPENBRACE: Ho,
+ CLOSEBRACE: Fo,
+ OPENBRACKET: Vl,
+ CLOSEBRACKET: Wl,
+ OPENPAREN: Ul,
+ CLOSEPAREN: Kl,
+ OPENANGLEBRACKET: ql,
+ CLOSEANGLEBRACKET: Jl,
+ FULLWIDTHLEFTPAREN: Gl,
+ FULLWIDTHRIGHTPAREN: Yl,
+ LEFTCORNERBRACKET: Ql,
+ RIGHTCORNERBRACKET: Xl,
+ LEFTWHITECORNERBRACKET: Zl,
+ RIGHTWHITECORNERBRACKET: ea,
+ FULLWIDTHLESSTHAN: ta,
+ FULLWIDTHGREATERTHAN: na,
+ AMPERSAND: ra,
+ APOSTROPHE: ia,
+ ASTERISK: oa,
+ AT: xr,
+ BACKSLASH: sa,
+ BACKTICK: la,
+ CARET: aa,
+ COLON: Cr,
+ COMMA: Sf,
+ DOLLAR: ua,
+ DOT: Bn,
+ EQUALS: ca,
+ EXCLAMATION: _f,
+ HYPHEN: $n,
+ PERCENT: da,
+ PIPE: fa,
+ PLUS: ha,
+ POUND: pa,
+ QUERY: ma,
+ QUOTE: Mf,
+ SEMI: Ef,
+ SLASH: zn,
+ TILDE: Vo,
+ UNDERSCORE: ga,
+ EMOJI: gy,
+ SYM: ya,
+});
+const Ti = /[a-z]/,
+ zu = new RegExp("\\p{L}", "u"),
+ Hu = new RegExp("\\p{Emoji}", "u"),
+ Fu = /\d/,
+ mm = /\s/,
+ gm = `
+`,
+ B4 = "\uFE0F",
+ $4 = "\u200D";
+let Qs = null,
+ Xs = null;
+function z4(t) {
+ t === void 0 && (t = []);
+ const e = {};
+ Yt.groups = e;
+ const n = new Yt();
+ Qs == null && (Qs = ym(P4)),
+ Xs == null && (Xs = ym(N4)),
+ re(n, "'", ia),
+ re(n, "{", Ho),
+ re(n, "}", Fo),
+ re(n, "[", Vl),
+ re(n, "]", Wl),
+ re(n, "(", Ul),
+ re(n, ")", Kl),
+ re(n, "<", ql),
+ re(n, ">", Jl),
+ re(n, "\uFF08", Gl),
+ re(n, "\uFF09", Yl),
+ re(n, "\u300C", Ql),
+ re(n, "\u300D", Xl),
+ re(n, "\u300E", Zl),
+ re(n, "\u300F", ea),
+ re(n, "\uFF1C", ta),
+ re(n, "\uFF1E", na),
+ re(n, "&", ra),
+ re(n, "*", oa),
+ re(n, "@", xr),
+ re(n, "`", la),
+ re(n, "^", aa),
+ re(n, ":", Cr),
+ re(n, ",", Sf),
+ re(n, "$", ua),
+ re(n, ".", Bn),
+ re(n, "=", ca),
+ re(n, "!", _f),
+ re(n, "-", $n),
+ re(n, "%", da),
+ re(n, "|", fa),
+ re(n, "+", ha),
+ re(n, "#", pa),
+ re(n, "?", ma),
+ re(n, '"', Mf),
+ re(n, "/", zn),
+ re(n, ";", Ef),
+ re(n, "~", Vo),
+ re(n, "_", ga),
+ re(n, "\\", sa);
+ const r = dn(n, Fu, kf, { [Vc]: !0 });
+ dn(r, Fu, r);
+ const i = dn(n, Ti, nr, { [Wc]: !0 });
+ dn(i, Ti, i);
+ const o = dn(n, zu, qc, { [Uc]: !0 });
+ dn(o, Ti), dn(o, zu, o);
+ const s = dn(n, mm, my, { [hm]: !0 });
+ re(n, gm, Cf, { [hm]: !0 }), re(s, gm), dn(s, mm, s);
+ const l = dn(n, Hu, gy, { [py]: !0 });
+ dn(l, Hu, l), re(l, B4, l);
+ const a = re(l, $4);
+ dn(a, Hu, l);
+ const u = [[Ti, i]],
+ c = [
+ [Ti, null],
+ [zu, o],
+ ];
+ for (let f = 0; f < Qs.length; f++) mr(n, Qs[f], Jc, nr, u);
+ for (let f = 0; f < Xs.length; f++) mr(n, Xs[f], Gc, qc, c);
+ ii(Jc, { tld: !0, ascii: !0 }, e),
+ ii(Gc, { utld: !0, alpha: !0 }, e),
+ mr(n, "file", hl, nr, u),
+ mr(n, "mailto", hl, nr, u),
+ mr(n, "http", ji, nr, u),
+ mr(n, "https", ji, nr, u),
+ mr(n, "ftp", ji, nr, u),
+ mr(n, "ftps", ji, nr, u),
+ ii(hl, { scheme: !0, ascii: !0 }, e),
+ ii(ji, { slashscheme: !0, ascii: !0 }, e),
+ (t = t.sort((f, h) => (f[0] > h[0] ? 1 : -1)));
+ for (let f = 0; f < t.length; f++) {
+ const h = t[f][0],
+ g = t[f][1] ? { [j4]: !0 } : { [L4]: !0 };
+ h.indexOf("-") >= 0
+ ? (g[Kc] = !0)
+ : Ti.test(h)
+ ? Fu.test(h)
+ ? (g[fl] = !0)
+ : (g[Wc] = !0)
+ : (g[Vc] = !0),
+ pm(n, h, h, g);
+ }
+ return (
+ pm(n, "localhost", as, { ascii: !0 }),
+ (n.jd = new Yt(ya)),
+ { start: n, tokens: ro({ groups: e }, yy) }
+ );
+}
+function H4(t, e) {
+ const n = F4(e.replace(/[A-Z]/g, (l) => l.toLowerCase())),
+ r = n.length,
+ i = [];
+ let o = 0,
+ s = 0;
+ for (; s < r; ) {
+ let l = t,
+ a = null,
+ u = 0,
+ c = null,
+ f = -1,
+ h = -1;
+ for (; s < r && (a = l.go(n[s])); )
+ (l = a),
+ l.accepts()
+ ? ((f = 0), (h = 0), (c = l))
+ : f >= 0 && ((f += n[s].length), h++),
+ (u += n[s].length),
+ (o += n[s].length),
+ s++;
+ (o -= f),
+ (s -= h),
+ (u -= f),
+ i.push({ t: c.t, v: e.slice(o - u, o), s: o - u, e: o });
+ }
+ return i;
+}
+function F4(t) {
+ const e = [],
+ n = t.length;
+ let r = 0;
+ for (; r < n; ) {
+ let i = t.charCodeAt(r),
+ o,
+ s =
+ i < 55296 ||
+ i > 56319 ||
+ r + 1 === n ||
+ (o = t.charCodeAt(r + 1)) < 56320 ||
+ o > 57343
+ ? t[r]
+ : t.slice(r, r + 2);
+ e.push(s), (r += s.length);
+ }
+ return e;
+}
+function mr(t, e, n, r, i) {
+ let o;
+ const s = e.length;
+ for (let l = 0; l < s - 1; l++) {
+ const a = e[l];
+ t.j[a]
+ ? (o = t.j[a])
+ : ((o = new Yt(r)), (o.jr = i.slice()), (t.j[a] = o)),
+ (t = o);
+ }
+ return (o = new Yt(n)), (o.jr = i.slice()), (t.j[e[s - 1]] = o), o;
+}
+function ym(t) {
+ const e = [],
+ n = [];
+ let r = 0,
+ i = "0123456789";
+ for (; r < t.length; ) {
+ let o = 0;
+ for (; i.indexOf(t[r + o]) >= 0; ) o++;
+ if (o > 0) {
+ e.push(n.join(""));
+ for (let s = parseInt(t.substring(r, r + o), 10); s > 0; s--)
+ n.pop();
+ r += o;
+ } else n.push(t[r]), r++;
+ }
+ return e;
+}
+const us = {
+ defaultProtocol: "http",
+ events: null,
+ format: vm,
+ formatHref: vm,
+ nl2br: !1,
+ tagName: "a",
+ target: null,
+ rel: null,
+ validate: !0,
+ truncate: 1 / 0,
+ className: null,
+ attributes: null,
+ ignoreTags: [],
+ render: null,
+};
+function Af(t, e) {
+ e === void 0 && (e = null);
+ let n = ro({}, us);
+ t && (n = ro(n, t instanceof Af ? t.o : t));
+ const r = n.ignoreTags,
+ i = [];
+ for (let o = 0; o < r.length; o++) i.push(r[o].toUpperCase());
+ (this.o = n), e && (this.defaultRender = e), (this.ignoreTags = i);
+}
+Af.prototype = {
+ o: us,
+ ignoreTags: [],
+ defaultRender(t) {
+ return t;
+ },
+ check(t) {
+ return this.get("validate", t.toString(), t);
+ },
+ get(t, e, n) {
+ const r = e != null;
+ let i = this.o[t];
+ return (
+ i &&
+ (typeof i == "object"
+ ? ((i = n.t in i ? i[n.t] : us[t]),
+ typeof i == "function" && r && (i = i(e, n)))
+ : typeof i == "function" && r && (i = i(e, n.t, n)),
+ i)
+ );
+ },
+ getObj(t, e, n) {
+ let r = this.o[t];
+ return typeof r == "function" && e != null && (r = r(e, n.t, n)), r;
+ },
+ render(t) {
+ const e = t.render(this);
+ return (this.get("render", null, t) || this.defaultRender)(e, t.t, t);
+ },
+};
+function vm(t) {
+ return t;
+}
+function vy(t, e) {
+ (this.t = "token"), (this.v = t), (this.tk = e);
+}
+vy.prototype = {
+ isLink: !1,
+ toString() {
+ return this.v;
+ },
+ toHref(t) {
+ return this.toString();
+ },
+ toFormattedString(t) {
+ const e = this.toString(),
+ n = t.get("truncate", e, this),
+ r = t.get("format", e, this);
+ return n && r.length > n ? r.substring(0, n) + "\u2026" : r;
+ },
+ toFormattedHref(t) {
+ return t.get("formatHref", this.toHref(t.get("defaultProtocol")), this);
+ },
+ startIndex() {
+ return this.tk[0].s;
+ },
+ endIndex() {
+ return this.tk[this.tk.length - 1].e;
+ },
+ toObject(t) {
+ return (
+ t === void 0 && (t = us.defaultProtocol),
+ {
+ type: this.t,
+ value: this.toString(),
+ isLink: this.isLink,
+ href: this.toHref(t),
+ start: this.startIndex(),
+ end: this.endIndex(),
+ }
+ );
+ },
+ toFormattedObject(t) {
+ return {
+ type: this.t,
+ value: this.toFormattedString(t),
+ isLink: this.isLink,
+ href: this.toFormattedHref(t),
+ start: this.startIndex(),
+ end: this.endIndex(),
+ };
+ },
+ validate(t) {
+ return t.get("validate", this.toString(), this);
+ },
+ render(t) {
+ const e = this,
+ n = this.toHref(t.get("defaultProtocol")),
+ r = t.get("formatHref", n, this),
+ i = t.get("tagName", n, e),
+ o = this.toFormattedString(t),
+ s = {},
+ l = t.get("className", n, e),
+ a = t.get("target", n, e),
+ u = t.get("rel", n, e),
+ c = t.getObj("attributes", n, e),
+ f = t.getObj("events", n, e);
+ return (
+ (s.href = r),
+ l && (s.class = l),
+ a && (s.target = a),
+ u && (s.rel = u),
+ c && ro(s, c),
+ { tagName: i, attributes: s, content: o, eventListeners: f }
+ );
+ },
+};
+function Ja(t, e) {
+ class n extends vy {
+ constructor(i, o) {
+ super(i, o), (this.t = t);
+ }
+ }
+ for (const r in e) n.prototype[r] = e[r];
+ return (n.t = t), n;
+}
+const bm = Ja("email", {
+ isLink: !0,
+ toHref() {
+ return "mailto:" + this.toString();
+ },
+ }),
+ wm = Ja("text"),
+ V4 = Ja("nl"),
+ Zs = Ja("url", {
+ isLink: !0,
+ toHref(t) {
+ return (
+ t === void 0 && (t = us.defaultProtocol),
+ this.hasProtocol() ? this.v : `${t}://${this.v}`
+ );
+ },
+ hasProtocol() {
+ const t = this.tk;
+ return t.length >= 2 && t[0].t !== as && t[1].t === Cr;
+ },
+ }),
+ fn = (t) => new Yt(t);
+function W4(t) {
+ let { groups: e } = t;
+ const n = e.domain.concat([
+ ra,
+ oa,
+ xr,
+ sa,
+ la,
+ aa,
+ ua,
+ ca,
+ $n,
+ kf,
+ da,
+ fa,
+ ha,
+ pa,
+ zn,
+ ya,
+ Vo,
+ ga,
+ ]),
+ r = [
+ ia,
+ Cr,
+ Sf,
+ Bn,
+ _f,
+ ma,
+ Mf,
+ Ef,
+ ql,
+ Jl,
+ Ho,
+ Fo,
+ Wl,
+ Vl,
+ Ul,
+ Kl,
+ Gl,
+ Yl,
+ Ql,
+ Xl,
+ Zl,
+ ea,
+ ta,
+ na,
+ ],
+ i = [
+ ra,
+ ia,
+ oa,
+ sa,
+ la,
+ aa,
+ ua,
+ ca,
+ $n,
+ Ho,
+ Fo,
+ da,
+ fa,
+ ha,
+ pa,
+ ma,
+ zn,
+ ya,
+ Vo,
+ ga,
+ ],
+ o = fn(),
+ s = re(o, Vo);
+ Ne(s, i, s), Ne(s, e.domain, s);
+ const l = fn(),
+ a = fn(),
+ u = fn();
+ Ne(o, e.domain, l),
+ Ne(o, e.scheme, a),
+ Ne(o, e.slashscheme, u),
+ Ne(l, i, s),
+ Ne(l, e.domain, l);
+ const c = re(l, xr);
+ re(s, xr, c), re(a, xr, c), re(u, xr, c);
+ const f = re(s, Bn);
+ Ne(f, i, s), Ne(f, e.domain, s);
+ const h = fn();
+ Ne(c, e.domain, h), Ne(h, e.domain, h);
+ const p = re(h, Bn);
+ Ne(p, e.domain, h);
+ const g = fn(bm);
+ Ne(p, e.tld, g), Ne(p, e.utld, g), re(c, as, g);
+ const v = re(h, $n);
+ Ne(v, e.domain, h), Ne(g, e.domain, h), re(g, Bn, p), re(g, $n, v);
+ const b = re(g, Cr);
+ Ne(b, e.numeric, bm);
+ const x = re(l, $n),
+ S = re(l, Bn);
+ Ne(x, e.domain, l), Ne(S, i, s), Ne(S, e.domain, l);
+ const T = fn(Zs);
+ Ne(S, e.tld, T),
+ Ne(S, e.utld, T),
+ Ne(T, e.domain, l),
+ Ne(T, i, s),
+ re(T, Bn, S),
+ re(T, $n, x),
+ re(T, xr, c);
+ const d = re(T, Cr),
+ y = fn(Zs);
+ Ne(d, e.numeric, y);
+ const m = fn(Zs),
+ w = fn();
+ Ne(m, n, m),
+ Ne(m, r, w),
+ Ne(w, n, m),
+ Ne(w, r, w),
+ re(T, zn, m),
+ re(y, zn, m);
+ const k = re(a, Cr),
+ _ = re(u, Cr),
+ C = re(_, zn),
+ E = re(C, zn);
+ Ne(a, e.domain, l),
+ re(a, Bn, S),
+ re(a, $n, x),
+ Ne(u, e.domain, l),
+ re(u, Bn, S),
+ re(u, $n, x),
+ Ne(k, e.domain, m),
+ re(k, zn, m),
+ Ne(E, e.domain, m),
+ Ne(E, n, m),
+ re(E, zn, m);
+ const R = [
+ [Ho, Fo],
+ [Vl, Wl],
+ [Ul, Kl],
+ [ql, Jl],
+ [Gl, Yl],
+ [Ql, Xl],
+ [Zl, ea],
+ [ta, na],
+ ];
+ for (let P = 0; P < R.length; P++) {
+ const [L, I] = R[P],
+ M = re(m, L);
+ re(w, L, M), re(M, I, m);
+ const N = fn(Zs);
+ Ne(M, n, N);
+ const D = fn();
+ Ne(M, r),
+ Ne(N, n, N),
+ Ne(N, r, D),
+ Ne(D, n, N),
+ Ne(D, r, D),
+ re(N, I, m),
+ re(D, I, m);
+ }
+ return re(o, as, T), re(o, Cf, V4), { start: o, tokens: yy };
+}
+function U4(t, e, n) {
+ let r = n.length,
+ i = 0,
+ o = [],
+ s = [];
+ for (; i < r; ) {
+ let l = t,
+ a = null,
+ u = null,
+ c = 0,
+ f = null,
+ h = -1;
+ for (; i < r && !(a = l.go(n[i].t)); ) s.push(n[i++]);
+ for (; i < r && (u = a || l.go(n[i].t)); )
+ (a = null),
+ (l = u),
+ l.accepts() ? ((h = 0), (f = l)) : h >= 0 && h++,
+ i++,
+ c++;
+ if (h < 0) (i -= c), i < r && (s.push(n[i]), i++);
+ else {
+ s.length > 0 && (o.push(Vu(wm, e, s)), (s = [])),
+ (i -= h),
+ (c -= h);
+ const p = f.t,
+ g = n.slice(i - c, i);
+ o.push(Vu(p, e, g));
+ }
+ }
+ return s.length > 0 && o.push(Vu(wm, e, s)), o;
+}
+function Vu(t, e, n) {
+ const r = n[0].s,
+ i = n[n.length - 1].e,
+ o = e.slice(r, i);
+ return new t(o, n);
+}
+const K4 =
+ (typeof console != "undefined" && console && console.warn) ||
+ (() => {}),
+ q4 =
+ "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",
+ ot = {
+ scanner: null,
+ parser: null,
+ tokenQueue: [],
+ pluginQueue: [],
+ customSchemes: [],
+ initialized: !1,
+ };
+function J4() {
+ (Yt.groups = {}),
+ (ot.scanner = null),
+ (ot.parser = null),
+ (ot.tokenQueue = []),
+ (ot.pluginQueue = []),
+ (ot.customSchemes = []),
+ (ot.initialized = !1);
+}
+function xm(t, e) {
+ if (
+ (e === void 0 && (e = !1),
+ ot.initialized &&
+ K4(
+ `linkifyjs: already initialized - will not register custom scheme "${t}" ${q4}`
+ ),
+ !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))
+ )
+ throw new Error(`linkifyjs: incorrect scheme format.
+1. Must only contain digits, lowercase ASCII letters or "-"
+2. Cannot start or end with "-"
+3. "-" cannot repeat`);
+ ot.customSchemes.push([t, e]);
+}
+function G4() {
+ ot.scanner = z4(ot.customSchemes);
+ for (let t = 0; t < ot.tokenQueue.length; t++)
+ ot.tokenQueue[t][1]({ scanner: ot.scanner });
+ ot.parser = W4(ot.scanner.tokens);
+ for (let t = 0; t < ot.pluginQueue.length; t++)
+ ot.pluginQueue[t][1]({ scanner: ot.scanner, parser: ot.parser });
+ ot.initialized = !0;
+}
+function Y4(t) {
+ return (
+ ot.initialized || G4(), U4(ot.parser.start, t, H4(ot.scanner.start, t))
+ );
+}
+function Tf(t, e, n) {
+ if (
+ (e === void 0 && (e = null),
+ n === void 0 && (n = null),
+ e && typeof e == "object")
+ ) {
+ if (n)
+ throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);
+ (n = e), (e = null);
+ }
+ const r = new Af(n),
+ i = Y4(t),
+ o = [];
+ for (let s = 0; s < i.length; s++) {
+ const l = i[s];
+ l.isLink &&
+ (!e || l.t === e) &&
+ r.check(l) &&
+ o.push(l.toFormattedObject(r));
+ }
+ return o;
+}
+function Q4(t) {
+ return new Tt({
+ key: new Ot("autolink"),
+ appendTransaction: (e, n, r) => {
+ const i = e.some((u) => u.docChanged) && !n.doc.eq(r.doc),
+ o = e.some((u) => u.getMeta("preventAutolink"));
+ if (!i || o) return;
+ const { tr: s } = r,
+ l = E_(n.doc, [...e]);
+ if (
+ (j_(l).forEach(({ newRange: u }) => {
+ const c = T_(r.doc, u, (p) => p.isTextblock);
+ let f, h;
+ if (
+ (c.length > 1
+ ? ((f = c[0]),
+ (h = r.doc.textBetween(
+ f.pos,
+ f.pos + f.node.nodeSize,
+ void 0,
+ " "
+ )))
+ : c.length &&
+ r.doc
+ .textBetween(u.from, u.to, " ", " ")
+ .endsWith(" ") &&
+ ((f = c[0]),
+ (h = r.doc.textBetween(
+ f.pos,
+ u.to,
+ void 0,
+ " "
+ ))),
+ f && h)
+ ) {
+ const p = h.split(" ").filter((b) => b !== "");
+ if (p.length <= 0) return !1;
+ const g = p[p.length - 1],
+ v = f.pos + h.lastIndexOf(g);
+ if (!g) return !1;
+ Tf(g)
+ .filter((b) => b.isLink)
+ .map((b) =>
+ be(W({}, b), {
+ from: v + b.start + 1,
+ to: v + b.end + 1,
+ })
+ )
+ .filter((b) =>
+ r.schema.marks.code
+ ? !r.doc.rangeHasMark(
+ b.from,
+ b.to,
+ r.schema.marks.code
+ )
+ : !0
+ )
+ .filter((b) =>
+ t.validate ? t.validate(b.value) : !0
+ )
+ .forEach((b) => {
+ vf(b.from, b.to, r.doc).some(
+ (x) => x.mark.type === t.type
+ ) ||
+ s.addMark(
+ b.from,
+ b.to,
+ t.type.create({ href: b.href })
+ );
+ });
+ }
+ }),
+ !!s.steps.length)
+ )
+ return s;
+ },
+ });
+}
+function X4(t) {
+ return new Tt({
+ key: new Ot("handleClickLink"),
+ props: {
+ handleClick: (e, n, r) => {
+ var i, o;
+ if (r.button !== 0 || r.target.nodeName !== "A") return !1;
+ const l = R_(e.state, t.type.name),
+ a = r.target,
+ u =
+ (i = a == null ? void 0 : a.href) !== null &&
+ i !== void 0
+ ? i
+ : l.href,
+ c =
+ (o = a == null ? void 0 : a.target) !== null &&
+ o !== void 0
+ ? o
+ : l.target;
+ return a && u ? (e.editable && window.open(u, c), !0) : !1;
+ },
+ },
+ });
+}
+function Z4(t) {
+ return new Tt({
+ key: new Ot("handlePasteLink"),
+ props: {
+ handlePaste: (e, n, r) => {
+ var i;
+ const { state: o } = e,
+ { selection: s } = o,
+ { empty: l } = s;
+ if (l) return !1;
+ let a = "";
+ r.content.forEach((g) => {
+ a += g.textContent;
+ });
+ const u = Tf(a).find((g) => g.isLink && g.value === a);
+ if (!a || !u) return !1;
+ const c =
+ (i = n.clipboardData) === null || i === void 0
+ ? void 0
+ : i.getData("text/html"),
+ f = /href="([^"]*)"/,
+ h = c == null ? void 0 : c.match(f),
+ p = h ? h[1] : u.href;
+ return t.editor.commands.setMark(t.type, { href: p }), !0;
+ },
+ },
+ });
+}
+const zR = Cn.create({
+ name: "link",
+ priority: 1e3,
+ keepOnSplit: !1,
+ onCreate() {
+ this.options.protocols.forEach((t) => {
+ if (typeof t == "string") {
+ xm(t);
+ return;
+ }
+ xm(t.scheme, t.optionalSlashes);
+ });
+ },
+ onDestroy() {
+ J4();
+ },
+ inclusive() {
+ return this.options.autolink;
+ },
+ addOptions() {
+ return {
+ openOnClick: !0,
+ linkOnPaste: !0,
+ autolink: !0,
+ protocols: [],
+ HTMLAttributes: {
+ target: "_blank",
+ rel: "noopener noreferrer nofollow",
+ class: null,
+ },
+ validate: void 0,
+ };
+ },
+ addAttributes() {
+ return {
+ href: { default: null },
+ target: { default: this.options.HTMLAttributes.target },
+ rel: { default: this.options.HTMLAttributes.rel },
+ class: { default: this.options.HTMLAttributes.class },
+ };
+ },
+ parseHTML() {
+ return [{ tag: 'a[href]:not([href *= "javascript:" i])' }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["a", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setLink:
+ (t) =>
+ ({ chain: e }) =>
+ e()
+ .setMark(this.name, t)
+ .setMeta("preventAutolink", !0)
+ .run(),
+ toggleLink:
+ (t) =>
+ ({ chain: e }) =>
+ e()
+ .toggleMark(this.name, t, {
+ extendEmptyMarkRange: !0,
+ })
+ .setMeta("preventAutolink", !0)
+ .run(),
+ unsetLink:
+ () =>
+ ({ chain: t }) =>
+ t()
+ .unsetMark(this.name, { extendEmptyMarkRange: !0 })
+ .setMeta("preventAutolink", !0)
+ .run(),
+ };
+ },
+ addPasteRules() {
+ return [
+ Dr({
+ find: (t) =>
+ Tf(t)
+ .filter((e) =>
+ this.options.validate
+ ? this.options.validate(e.value)
+ : !0
+ )
+ .filter((e) => e.isLink)
+ .map((e) => ({
+ text: e.value,
+ index: e.start,
+ data: e,
+ })),
+ type: this.type,
+ getAttributes: (t, e) => {
+ var n, r;
+ const i =
+ (n = e == null ? void 0 : e.clipboardData) ===
+ null || n === void 0
+ ? void 0
+ : n.getData("text/html"),
+ o = /href="([^"]*)"/,
+ s = i == null ? void 0 : i.match(o);
+ return s
+ ? { href: s[1] }
+ : {
+ href:
+ (r = t.data) === null || r === void 0
+ ? void 0
+ : r.href,
+ };
+ },
+ }),
+ ];
+ },
+ addProseMirrorPlugins() {
+ const t = [];
+ return (
+ this.options.autolink &&
+ t.push(
+ Q4({ type: this.type, validate: this.options.validate })
+ ),
+ this.options.openOnClick && t.push(X4({ type: this.type })),
+ this.options.linkOnPaste &&
+ t.push(Z4({ editor: this.editor, type: this.type })),
+ t
+ );
+ },
+ }),
+ eA = (t) => mt({ find: /--$/, replace: t != null ? t : "\u2014" }),
+ tA = (t) => mt({ find: /\.\.\.$/, replace: t != null ? t : "\u2026" }),
+ nA = (t) =>
+ mt({
+ find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
+ replace: t != null ? t : "\u201C",
+ }),
+ rA = (t) => mt({ find: /"$/, replace: t != null ? t : "\u201D" }),
+ iA = (t) =>
+ mt({
+ find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
+ replace: t != null ? t : "\u2018",
+ }),
+ oA = (t) => mt({ find: /'$/, replace: t != null ? t : "\u2019" }),
+ sA = (t) => mt({ find: /<-$/, replace: t != null ? t : "\u2190" }),
+ lA = (t) => mt({ find: /->$/, replace: t != null ? t : "\u2192" }),
+ aA = (t) => mt({ find: /\(c\)$/, replace: t != null ? t : "\xA9" }),
+ uA = (t) => mt({ find: /\(tm\)$/, replace: t != null ? t : "\u2122" }),
+ cA = (t) => mt({ find: /\(sm\)$/, replace: t != null ? t : "\u2120" }),
+ dA = (t) => mt({ find: /\(r\)$/, replace: t != null ? t : "\xAE" }),
+ fA = (t) =>
+ mt({ find: /(?:^|\s)(1\/2)$/, replace: t != null ? t : "\xBD" }),
+ hA = (t) => mt({ find: /\+\/-$/, replace: t != null ? t : "\xB1" }),
+ pA = (t) => mt({ find: /!=$/, replace: t != null ? t : "\u2260" }),
+ mA = (t) => mt({ find: /<<$/, replace: t != null ? t : "\xAB" }),
+ gA = (t) => mt({ find: />>$/, replace: t != null ? t : "\xBB" }),
+ yA = (t) =>
+ mt({ find: /\d+\s?([*x])\s?\d+$/, replace: t != null ? t : "\xD7" }),
+ vA = (t) => mt({ find: /\^2$/, replace: t != null ? t : "\xB2" }),
+ bA = (t) => mt({ find: /\^3$/, replace: t != null ? t : "\xB3" }),
+ wA = (t) =>
+ mt({ find: /(?:^|\s)(1\/4)$/, replace: t != null ? t : "\xBC" }),
+ xA = (t) =>
+ mt({ find: /(?:^|\s)(3\/4)$/, replace: t != null ? t : "\xBE" }),
+ HR = Et.create({
+ name: "typography",
+ addInputRules() {
+ const t = [];
+ return (
+ this.options.emDash !== !1 && t.push(eA(this.options.emDash)),
+ this.options.ellipsis !== !1 &&
+ t.push(tA(this.options.ellipsis)),
+ this.options.openDoubleQuote !== !1 &&
+ t.push(nA(this.options.openDoubleQuote)),
+ this.options.closeDoubleQuote !== !1 &&
+ t.push(rA(this.options.closeDoubleQuote)),
+ this.options.openSingleQuote !== !1 &&
+ t.push(iA(this.options.openSingleQuote)),
+ this.options.closeSingleQuote !== !1 &&
+ t.push(oA(this.options.closeSingleQuote)),
+ this.options.leftArrow !== !1 &&
+ t.push(sA(this.options.leftArrow)),
+ this.options.rightArrow !== !1 &&
+ t.push(lA(this.options.rightArrow)),
+ this.options.copyright !== !1 &&
+ t.push(aA(this.options.copyright)),
+ this.options.trademark !== !1 &&
+ t.push(uA(this.options.trademark)),
+ this.options.servicemark !== !1 &&
+ t.push(cA(this.options.servicemark)),
+ this.options.registeredTrademark !== !1 &&
+ t.push(dA(this.options.registeredTrademark)),
+ this.options.oneHalf !== !1 && t.push(fA(this.options.oneHalf)),
+ this.options.plusMinus !== !1 &&
+ t.push(hA(this.options.plusMinus)),
+ this.options.notEqual !== !1 &&
+ t.push(pA(this.options.notEqual)),
+ this.options.laquo !== !1 && t.push(mA(this.options.laquo)),
+ this.options.raquo !== !1 && t.push(gA(this.options.raquo)),
+ this.options.multiplication !== !1 &&
+ t.push(yA(this.options.multiplication)),
+ this.options.superscriptTwo !== !1 &&
+ t.push(vA(this.options.superscriptTwo)),
+ this.options.superscriptThree !== !1 &&
+ t.push(bA(this.options.superscriptThree)),
+ this.options.oneQuarter !== !1 &&
+ t.push(wA(this.options.oneQuarter)),
+ this.options.threeQuarters !== !1 &&
+ t.push(xA(this.options.threeQuarters)),
+ t
+ );
+ },
+ }),
+ FR = Cn.create({
+ name: "textStyle",
+ addOptions() {
+ return { HTMLAttributes: {} };
+ },
+ parseHTML() {
+ return [
+ {
+ tag: "span",
+ getAttrs: (t) => (t.hasAttribute("style") ? {} : !1),
+ },
+ ];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["span", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ removeEmptyTextStyle:
+ () =>
+ ({ state: t, commands: e }) => {
+ const n = ks(t, this.type);
+ return Object.entries(n).some(([, i]) => !!i)
+ ? !0
+ : e.unsetMark(this.name);
+ },
+ };
+ },
+ }),
+ kA = /(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,
+ CA = /(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,
+ VR = Cn.create({
+ name: "highlight",
+ addOptions() {
+ return { multicolor: !1, HTMLAttributes: {} };
+ },
+ addAttributes() {
+ return this.options.multicolor
+ ? {
+ color: {
+ default: null,
+ parseHTML: (t) =>
+ t.getAttribute("data-color") ||
+ t.style.backgroundColor,
+ renderHTML: (t) =>
+ t.color
+ ? {
+ "data-color": t.color,
+ style: `background-color: ${t.color}; color: inherit`,
+ }
+ : {},
+ },
+ }
+ : {};
+ },
+ parseHTML() {
+ return [{ tag: "mark" }];
+ },
+ renderHTML({ HTMLAttributes: t }) {
+ return ["mark", et(this.options.HTMLAttributes, t), 0];
+ },
+ addCommands() {
+ return {
+ setHighlight:
+ (t) =>
+ ({ commands: e }) =>
+ e.setMark(this.name, t),
+ toggleHighlight:
+ (t) =>
+ ({ commands: e }) =>
+ e.toggleMark(this.name, t),
+ unsetHighlight:
+ () =>
+ ({ commands: t }) =>
+ t.unsetMark(this.name),
+ };
+ },
+ addKeyboardShortcuts() {
+ return {
+ "Mod-Shift-h": () => this.editor.commands.toggleHighlight(),
+ };
+ },
+ addInputRules() {
+ return [bi({ find: kA, type: this.type })];
+ },
+ addPasteRules() {
+ return [Dr({ find: CA, type: this.type })];
+ },
+ }),
+ WR = Et.create({
+ name: "color",
+ addOptions() {
+ return { types: ["textStyle"] };
+ },
+ addGlobalAttributes() {
+ return [
+ {
+ types: this.options.types,
+ attributes: {
+ color: {
+ default: null,
+ parseHTML: (t) => {
+ var e;
+ return (e = t.style.color) === null ||
+ e === void 0
+ ? void 0
+ : e.replace(/['"]+/g, "");
+ },
+ renderHTML: (t) =>
+ t.color ? { style: `color: ${t.color}` } : {},
+ },
+ },
+ },
+ ];
+ },
+ addCommands() {
+ return {
+ setColor:
+ (t) =>
+ ({ chain: e }) =>
+ e().setMark("textStyle", { color: t }).run(),
+ unsetColor:
+ () =>
+ ({ chain: t }) =>
+ t()
+ .setMark("textStyle", { color: null })
+ .removeEmptyTextStyle()
+ .run(),
+ };
+ },
+ });
+function SA(t) {
+ var e;
+ const {
+ char: n,
+ allowSpaces: r,
+ allowedPrefixes: i,
+ startOfLine: o,
+ $position: s,
+ } = t,
+ l = rM(n),
+ a = new RegExp(`\\s${l}$`),
+ u = o ? "^" : "",
+ c = r
+ ? new RegExp(`${u}${l}.*?(?=\\s${l}|$)`, "gm")
+ : new RegExp(`${u}(?:^)?${l}[^\\s${l}]*`, "gm"),
+ f =
+ ((e = s.nodeBefore) === null || e === void 0 ? void 0 : e.isText) &&
+ s.nodeBefore.text;
+ if (!f) return null;
+ const h = s.pos - f.length,
+ p = Array.from(f.matchAll(c)).pop();
+ if (!p || p.input === void 0 || p.index === void 0) return null;
+ const g = p.input.slice(Math.max(0, p.index - 1), p.index),
+ v = new RegExp(`^[${i == null ? void 0 : i.join("")}\0]?$`).test(g);
+ if (i !== null && !v) return null;
+ const b = h + p.index;
+ let x = b + p[0].length;
+ return (
+ r && a.test(f.slice(x - 1, x + 1)) && ((p[0] += " "), (x += 1)),
+ b < s.pos && x >= s.pos
+ ? {
+ range: { from: b, to: x },
+ query: p[0].slice(n.length),
+ text: p[0],
+ }
+ : null
+ );
+}
+const _A = new Ot("suggestion");
+function MA({
+ pluginKey: t = _A,
+ editor: e,
+ char: n = "@",
+ allowSpaces: r = !1,
+ allowedPrefixes: i = [" "],
+ startOfLine: o = !1,
+ decorationTag: s = "span",
+ decorationClass: l = "suggestion",
+ command: a = () => null,
+ items: u = () => [],
+ render: c = () => ({}),
+ allow: f = () => !0,
+}) {
+ let h;
+ const p = c == null ? void 0 : c(),
+ g = new Tt({
+ key: t,
+ view() {
+ return {
+ update: (v, b) =>
+ cr(this, null, function* () {
+ var x, S, T, d, y, m, w;
+ const k =
+ (x = this.key) === null || x === void 0
+ ? void 0
+ : x.getState(b),
+ _ =
+ (S = this.key) === null || S === void 0
+ ? void 0
+ : S.getState(v.state),
+ C =
+ k.active &&
+ _.active &&
+ k.range.from !== _.range.from,
+ E = !k.active && _.active,
+ R = k.active && !_.active,
+ P = !E && !R && k.query !== _.query,
+ L = E || C,
+ I = P && !C,
+ M = R || C;
+ if (!L && !I && !M) return;
+ const N = M && !L ? k : _,
+ D = v.dom.querySelector(
+ `[data-decoration-id="${N.decorationId}"]`
+ );
+ (h = {
+ editor: e,
+ range: N.range,
+ query: N.query,
+ text: N.text,
+ items: [],
+ command: (K) => {
+ a({ editor: e, range: N.range, props: K });
+ },
+ decorationNode: D,
+ clientRect: D
+ ? () => {
+ var K;
+ const { decorationId: ae } =
+ (K = this.key) === null ||
+ K === void 0
+ ? void 0
+ : K.getState(e.state),
+ Q = v.dom.querySelector(
+ `[data-decoration-id="${ae}"]`
+ );
+ return (
+ (Q == null
+ ? void 0
+ : Q.getBoundingClientRect()) ||
+ null
+ );
+ }
+ : null,
+ }),
+ L &&
+ ((T =
+ p == null
+ ? void 0
+ : p.onBeforeStart) === null ||
+ T === void 0 ||
+ T.call(p, h)),
+ I &&
+ ((d =
+ p == null
+ ? void 0
+ : p.onBeforeUpdate) === null ||
+ d === void 0 ||
+ d.call(p, h)),
+ (I || L) &&
+ (h.items = yield u({
+ editor: e,
+ query: N.query,
+ })),
+ M &&
+ ((y = p == null ? void 0 : p.onExit) ===
+ null ||
+ y === void 0 ||
+ y.call(p, h)),
+ I &&
+ ((m = p == null ? void 0 : p.onUpdate) ===
+ null ||
+ m === void 0 ||
+ m.call(p, h)),
+ L &&
+ ((w = p == null ? void 0 : p.onStart) ===
+ null ||
+ w === void 0 ||
+ w.call(p, h));
+ }),
+ destroy: () => {
+ var v;
+ !h ||
+ (v = p == null ? void 0 : p.onExit) === null ||
+ v === void 0 ||
+ v.call(p, h);
+ },
+ };
+ },
+ state: {
+ init() {
+ return {
+ active: !1,
+ range: { from: 0, to: 0 },
+ query: null,
+ text: null,
+ composing: !1,
+ };
+ },
+ apply(v, b, x, S) {
+ const { isEditable: T } = e,
+ { composing: d } = e.view,
+ { selection: y } = v,
+ { empty: m, from: w } = y,
+ k = W({}, b);
+ if (((k.composing = d), T && (m || e.view.composing))) {
+ (w < b.range.from || w > b.range.to) &&
+ !d &&
+ !b.composing &&
+ (k.active = !1);
+ const _ = SA({
+ char: n,
+ allowSpaces: r,
+ allowedPrefixes: i,
+ startOfLine: o,
+ $position: y.$from,
+ }),
+ C = `id_${Math.floor(Math.random() * 4294967295)}`;
+ _ && f({ editor: e, state: S, range: _.range })
+ ? ((k.active = !0),
+ (k.decorationId = b.decorationId
+ ? b.decorationId
+ : C),
+ (k.range = _.range),
+ (k.query = _.query),
+ (k.text = _.text))
+ : (k.active = !1);
+ } else k.active = !1;
+ return (
+ k.active ||
+ ((k.decorationId = null),
+ (k.range = { from: 0, to: 0 }),
+ (k.query = null),
+ (k.text = null)),
+ k
+ );
+ },
+ },
+ props: {
+ handleKeyDown(v, b) {
+ var x;
+ const { active: S, range: T } = g.getState(v.state);
+ return (
+ (S &&
+ ((x = p == null ? void 0 : p.onKeyDown) === null ||
+ x === void 0
+ ? void 0
+ : x.call(p, {
+ view: v,
+ event: b,
+ range: T,
+ }))) ||
+ !1
+ );
+ },
+ decorations(v) {
+ const {
+ active: b,
+ range: x,
+ decorationId: S,
+ } = g.getState(v);
+ return b
+ ? st.create(v.doc, [
+ Xt.inline(x.from, x.to, {
+ nodeName: s,
+ class: l,
+ "data-decoration-id": S,
+ }),
+ ])
+ : null;
+ },
+ },
+ });
+ return g;
+}
+const EA = new Ot("mention"),
+ UR = ut.create({
+ name: "mention",
+ addOptions() {
+ return {
+ HTMLAttributes: {},
+ renderLabel({ options: t, node: e }) {
+ var n;
+ return `${t.suggestion.char}${
+ (n = e.attrs.label) !== null && n !== void 0
+ ? n
+ : e.attrs.id
+ }`;
+ },
+ suggestion: {
+ char: "@",
+ pluginKey: EA,
+ command: ({ editor: t, range: e, props: n }) => {
+ var r, i;
+ const o = t.view.state.selection.$to.nodeAfter;
+ ((r = o == null ? void 0 : o.text) === null ||
+ r === void 0
+ ? void 0
+ : r.startsWith(" ")) && (e.to += 1),
+ t
+ .chain()
+ .focus()
+ .insertContentAt(e, [
+ { type: this.name, attrs: n },
+ { type: "text", text: " " },
+ ])
+ .run(),
+ (i = window.getSelection()) === null ||
+ i === void 0 ||
+ i.collapseToEnd();
+ },
+ allow: ({ state: t, range: e }) => {
+ const n = t.doc.resolve(e.from),
+ r = t.schema.nodes[this.name];
+ return !!n.parent.type.contentMatch.matchType(r);
+ },
+ },
+ };
+ },
+ group: "inline",
+ inline: !0,
+ selectable: !1,
+ atom: !0,
+ addAttributes() {
+ return {
+ id: {
+ default: null,
+ parseHTML: (t) => t.getAttribute("data-id"),
+ renderHTML: (t) => (t.id ? { "data-id": t.id } : {}),
+ },
+ label: {
+ default: null,
+ parseHTML: (t) => t.getAttribute("data-label"),
+ renderHTML: (t) =>
+ t.label ? { "data-label": t.label } : {},
+ },
+ };
+ },
+ parseHTML() {
+ return [{ tag: `span[data-type="${this.name}"]` }];
+ },
+ renderHTML({ node: t, HTMLAttributes: e }) {
+ return [
+ "span",
+ et({ "data-type": this.name }, this.options.HTMLAttributes, e),
+ this.options.renderLabel({ options: this.options, node: t }),
+ ];
+ },
+ renderText({ node: t }) {
+ return this.options.renderLabel({ options: this.options, node: t });
+ },
+ addKeyboardShortcuts() {
+ return {
+ Backspace: () =>
+ this.editor.commands.command(({ tr: t, state: e }) => {
+ let n = !1;
+ const { selection: r } = e,
+ { empty: i, anchor: o } = r;
+ return i
+ ? (e.doc.nodesBetween(o - 1, o, (s, l) => {
+ if (s.type.name === this.name)
+ return (
+ (n = !0),
+ t.insertText(
+ this.options.suggestion.char ||
+ "",
+ l,
+ l + s.nodeSize
+ ),
+ !1
+ );
+ }),
+ n)
+ : !1;
+ }),
+ };
+ },
+ addProseMirrorPlugins() {
+ return [MA(W({ editor: this.editor }, this.options.suggestion))];
+ },
+ });
+const AA = {},
+ TA = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ OA = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ RA = U(
+ "path",
+ {
+ d: "M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ PA = [OA, RA];
+function NA(t, e) {
+ return B(), G("svg", TA, PA);
+}
+const jA = Ue(AA, [["render", NA]]),
+ LA = {},
+ DA = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ IA = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ BA = U(
+ "path",
+ {
+ d: "M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ $A = [IA, BA];
+function zA(t, e) {
+ return B(), G("svg", DA, $A);
+}
+const HA = Ue(LA, [["render", zA]]),
+ FA = {},
+ VA = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ WA = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ UA = U(
+ "path",
+ {
+ d: "M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ KA = [WA, UA];
+function qA(t, e) {
+ return B(), G("svg", VA, KA);
+}
+const JA = Ue(FA, [["render", qA]]),
+ GA = {},
+ YA = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ QA = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ XA = U(
+ "path",
+ {
+ d: "M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ ZA = [QA, XA];
+function eT(t, e) {
+ return B(), G("svg", YA, ZA);
+}
+const tT = Ue(GA, [["render", eT]]),
+ nT = {},
+ rT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ iT = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ oT = U(
+ "path",
+ {
+ d: "M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ sT = [iT, oT];
+function lT(t, e) {
+ return B(), G("svg", rT, sT);
+}
+const aT = Ue(nT, [["render", lT]]),
+ uT = {},
+ cT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ dT = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ fT = U(
+ "path",
+ {
+ d: "M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ hT = [dT, fT];
+function pT(t, e) {
+ return B(), G("svg", cT, hT);
+}
+const mT = Ue(uT, [["render", pT]]),
+ gT = {},
+ yT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ vT = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ bT = U(
+ "path",
+ { d: "M13 6v15h-2V6H5V4h14v2z", fill: "currentColor" },
+ null,
+ -1
+ ),
+ wT = [vT, bT];
+function xT(t, e) {
+ return B(), G("svg", yT, wT);
+}
+const kT = Ue(gT, [["render", xT]]),
+ CT = {},
+ ST = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ _T = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ MT = U(
+ "path",
+ {
+ d: "M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ ET = [_T, MT];
+function AT(t, e) {
+ return B(), G("svg", ST, ET);
+}
+const TT = Ue(CT, [["render", AT]]),
+ OT = {},
+ RT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ PT = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ NT = U(
+ "path",
+ {
+ d: "M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ jT = [PT, NT];
+function LT(t, e) {
+ return B(), G("svg", RT, jT);
+}
+const DT = Ue(OT, [["render", LT]]),
+ IT = {},
+ BT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ $T = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ zT = U(
+ "path",
+ {
+ d: "M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ HT = [$T, zT];
+function FT(t, e) {
+ return B(), G("svg", BT, HT);
+}
+const VT = Ue(IT, [["render", FT]]),
+ WT = {},
+ UT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ KT = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ qT = U(
+ "path",
+ {
+ d: "M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ JT = [KT, qT];
+function GT(t, e) {
+ return B(), G("svg", UT, JT);
+}
+const YT = Ue(WT, [["render", GT]]),
+ QT = {},
+ XT = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ ZT = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ eO = U(
+ "path",
+ {
+ d: "M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ tO = [ZT, eO];
+function nO(t, e) {
+ return B(), G("svg", XT, tO);
+}
+const rO = Ue(QT, [["render", nO]]),
+ iO = {},
+ oO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ sO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ lO = U(
+ "path",
+ {
+ d: "M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ aO = [sO, lO];
+function uO(t, e) {
+ return B(), G("svg", oO, aO);
+}
+const cO = Ue(iO, [["render", uO]]),
+ dO = {},
+ fO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ hO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ pO = U(
+ "path",
+ {
+ d: "M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ mO = [hO, pO];
+function gO(t, e) {
+ return B(), G("svg", fO, mO);
+}
+const yO = Ue(dO, [["render", gO]]),
+ vO = {},
+ bO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ wO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ xO = U(
+ "path",
+ {
+ d: "M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ kO = [wO, xO];
+function CO(t, e) {
+ return B(), G("svg", bO, kO);
+}
+const SO = Ue(vO, [["render", CO]]),
+ _O = {},
+ MO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ EO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ AO = U(
+ "path",
+ {
+ d: "M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ TO = [EO, AO];
+function OO(t, e) {
+ return B(), G("svg", MO, TO);
+}
+const RO = Ue(_O, [["render", OO]]),
+ PO = {},
+ NO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ jO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ LO = U(
+ "path",
+ {
+ d: "M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ DO = [jO, LO];
+function IO(t, e) {
+ return B(), G("svg", NO, DO);
+}
+const BO = Ue(PO, [["render", IO]]),
+ $O = {},
+ zO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ HO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ FO = U(
+ "path",
+ {
+ d: "M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ VO = [HO, FO];
+function WO(t, e) {
+ return B(), G("svg", zO, VO);
+}
+const UO = Ue($O, [["render", WO]]),
+ KO = {},
+ qO = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ JO = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ GO = U(
+ "path",
+ {
+ d: "M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ YO = [JO, GO];
+function QO(t, e) {
+ return B(), G("svg", qO, YO);
+}
+const XO = Ue(KO, [["render", QO]]),
+ ZO = {},
+ e5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ t5 = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ n5 = U(
+ "path",
+ {
+ d: "M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ r5 = [t5, n5];
+function i5(t, e) {
+ return B(), G("svg", e5, r5);
+}
+const o5 = Ue(ZO, [["render", i5]]),
+ s5 = {},
+ l5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ a5 = U("path", { fill: "none", d: "M0 0H24V24H0z" }, null, -1),
+ u5 = U(
+ "path",
+ {
+ d: "M16 4c.552 0 1 .448 1 1v4.2l5.213-3.65c.226-.158.538-.103.697.124.058.084.09.184.09.286v12.08c0 .276-.224.5-.5.5-.103 0-.203-.032-.287-.09L17 14.8V19c0 .552-.448 1-1 1H2c-.552 0-1-.448-1-1V5c0-.552.448-1 1-1h14zm-1 2H3v12h12V6zM8 8h2v3h3v2H9.999L10 16H8l-.001-3H5v-2h3V8zm13 .841l-4 2.8v.718l4 2.8V8.84z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ c5 = [a5, u5];
+function d5(t, e) {
+ return B(), G("svg", l5, c5);
+}
+const f5 = Ue(s5, [["render", d5]]),
+ h5 = {},
+ p5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ m5 = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ g5 = U(
+ "path",
+ {
+ d: "M5.828 7l2.536 2.536L6.95 10.95 2 6l4.95-4.95 1.414 1.414L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H5.828z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ y5 = [m5, g5];
+function v5(t, e) {
+ return B(), G("svg", p5, y5);
+}
+const b5 = Ue(h5, [["render", v5]]),
+ w5 = {},
+ x5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ k5 = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ C5 = U(
+ "path",
+ {
+ d: "M18.172 7H11a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h7.172l-2.536-2.536L17.05 1.05 22 6l-4.95 4.95-1.414-1.414L18.172 7z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ S5 = [k5, C5];
+function _5(t, e) {
+ return B(), G("svg", x5, S5);
+}
+const M5 = Ue(w5, [["render", _5]]),
+ E5 = {},
+ A5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ T5 = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ O5 = U(
+ "path",
+ {
+ d: "M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ R5 = [T5, O5];
+function P5(t, e) {
+ return B(), G("svg", A5, R5);
+}
+const N5 = Ue(E5, [["render", P5]]),
+ j5 = {},
+ L5 = {
+ xmlns: "http://www.w3.org/2000/svg",
+ viewBox: "0 0 24 24",
+ width: "24",
+ height: "24",
+ },
+ D5 = U("path", { fill: "none", d: "M0 0h24v24H0z" }, null, -1),
+ I5 = U(
+ "path",
+ {
+ d: "M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z",
+ fill: "currentColor",
+ },
+ null,
+ -1
+ ),
+ B5 = [D5, I5];
+function $5(t, e) {
+ return B(), G("svg", L5, B5);
+}
+const z5 = Ue(j5, [["render", $5]]),
+ KR = {
+ Paragraph: {
+ label: "Paragraph",
+ icon: kT,
+ action: (t) => t.chain().focus().setParagraph().run(),
+ isActive: (t) => t.isActive("paragraph"),
+ },
+ "Heading 1": {
+ label: "Heading 1",
+ text: "H1",
+ icon: jA,
+ action: (t) => t.chain().focus().toggleHeading({ level: 1 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 1 }),
+ },
+ "Heading 2": {
+ label: "Heading 2",
+ text: "H2",
+ icon: HA,
+ action: (t) => t.chain().focus().toggleHeading({ level: 2 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 2 }),
+ },
+ "Heading 3": {
+ label: "Heading 3",
+ text: "H3",
+ icon: JA,
+ action: (t) => t.chain().focus().toggleHeading({ level: 3 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 3 }),
+ },
+ "Heading 4": {
+ label: "Heading 4",
+ text: "H4",
+ icon: tT,
+ action: (t) => t.chain().focus().toggleHeading({ level: 4 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 4 }),
+ },
+ "Heading 5": {
+ label: "Heading 5",
+ text: "H5",
+ icon: aT,
+ action: (t) => t.chain().focus().toggleHeading({ level: 5 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 5 }),
+ },
+ "Heading 6": {
+ label: "Heading 6",
+ text: "H6",
+ icon: mT,
+ action: (t) => t.chain().focus().toggleHeading({ level: 6 }).run(),
+ isActive: (t) => t.isActive("heading", { level: 6 }),
+ },
+ Bold: {
+ label: "Bold",
+ icon: TT,
+ action: (t) => t.chain().focus().toggleBold().run(),
+ isActive: (t) => t.isActive("bold"),
+ },
+ Italic: {
+ label: "Italic",
+ icon: DT,
+ action: (t) => t.chain().focus().toggleItalic().run(),
+ isActive: (t) => t.isActive("italic"),
+ },
+ Underline: {
+ label: "Underline",
+ icon: VT,
+ action: (t) => t.chain().focus().toggleUnderline().run(),
+ isActive: (t) => t.isActive("underline"),
+ },
+ "Bullet List": {
+ label: "Bullet List",
+ icon: RO,
+ action: (t) => t.chain().focus().toggleBulletList().run(),
+ isActive: (t) => t.isActive("bulletList"),
+ },
+ "Numbered List": {
+ label: "Numbered List",
+ icon: SO,
+ action: (t) => t.chain().focus().toggleOrderedList().run(),
+ isActive: (t) => t.isActive("orderedList"),
+ },
+ "Align Center": {
+ label: "Align Center",
+ icon: YT,
+ action: (t) => t.chain().focus().setTextAlign("center").run(),
+ isActive: (t) => t.isActive({ textAlign: "center" }),
+ },
+ "Align Left": {
+ label: "Align Left",
+ icon: rO,
+ action: (t) => t.chain().focus().setTextAlign("left").run(),
+ isActive: (t) => t.isActive({ textAlign: "left" }),
+ },
+ "Align Right": {
+ label: "Align Right",
+ icon: cO,
+ action: (t) => t.chain().focus().setTextAlign("right").run(),
+ isActive: (t) => t.isActive({ textAlign: "right" }),
+ },
+ FontColor: {
+ label: "Font Color",
+ icon: yO,
+ isActive: (t) => t.isActive("textStyle") || t.isActive("highlight"),
+ component: js(() =>
+ Ds(() => import("./FontColor.41d2871a.js"), [])
+ ),
+ },
+ Blockquote: {
+ label: "Blockquote",
+ icon: BO,
+ action: (t) => t.chain().focus().toggleBlockquote().run(),
+ isActive: (t) => t.isActive("blockquote"),
+ },
+ Code: {
+ label: "Code",
+ icon: UO,
+ action: (t) => t.chain().focus().toggleCodeBlock().run(),
+ isActive: (t) => t.isActive("codeBlock"),
+ },
+ "Horizontal Rule": {
+ label: "Horizontal Rule",
+ icon: N5,
+ action: (t) => t.chain().focus().setHorizontalRule().run(),
+ isActive: (t) => !1,
+ },
+ Link: {
+ label: "Link",
+ icon: XO,
+ isActive: (t) => t.isActive("link"),
+ component: js(() =>
+ Ds(() => import("./InsertLink.20429a64.js"), [])
+ ),
+ },
+ Image: {
+ label: "Image",
+ icon: o5,
+ isActive: (t) => !1,
+ component: js(() =>
+ Ds(() => import("./InsertImage.3828880c.js"), [])
+ ),
+ },
+ Video: {
+ label: "Video",
+ icon: f5,
+ isActive: (t) => !1,
+ component: js(() =>
+ Ds(() => import("./InsertVideo.d725d1a5.js"), [])
+ ),
+ },
+ Undo: {
+ label: "Undo",
+ icon: b5,
+ action: (t) => t.chain().focus().undo().run(),
+ isActive: (t) => !1,
+ },
+ Redo: {
+ label: "Redo",
+ icon: M5,
+ action: (t) => t.chain().focus().redo().run(),
+ isActive: (t) => !1,
+ },
+ InsertTable: {
+ label: "Insert Table",
+ icon: z5,
+ action: (t) =>
+ t
+ .chain()
+ .focus()
+ .insertTable({ rows: 3, cols: 3, withHeaderRow: !0 })
+ .run(),
+ isActive: (t) => !1,
+ },
+ AddColumnBefore: {
+ label: "Add Column Before",
+ action: (t) => t.chain().focus().addColumnBefore().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().addColumnBefore(),
+ },
+ AddColumnAfter: {
+ label: "Add Column After",
+ action: (t) => t.chain().focus().addColumnAfter().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().addColumnAfter(),
+ },
+ DeleteColumn: {
+ label: "Delete Column",
+ action: (t) => t.chain().focus().deleteColumn().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().deleteColumn(),
+ },
+ AddRowBefore: {
+ label: "Add Row Before",
+ action: (t) => t.chain().focus().addRowBefore().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().addRowBefore(),
+ },
+ AddRowAfter: {
+ label: "Add Row After",
+ action: (t) => t.chain().focus().addRowAfter().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().addRowAfter(),
+ },
+ DeleteRow: {
+ label: "Delete Row",
+ action: (t) => t.chain().focus().deleteRow().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().deleteRow(),
+ },
+ DeleteTable: {
+ label: "Delete Table",
+ action: (t) => t.chain().focus().deleteTable().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().deleteTable(),
+ },
+ MergeCells: {
+ label: "Merge Cells",
+ action: (t) => t.chain().focus().mergeCells().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().mergeCells(),
+ },
+ SplitCell: {
+ label: "Split Cell",
+ action: (t) => t.chain().focus().splitCell().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().splitCell(),
+ },
+ ToggleHeaderColumn: {
+ label: "Toggle Header Column",
+ action: (t) => t.chain().focus().toggleHeaderColumn().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().toggleHeaderColumn(),
+ },
+ ToggleHeaderRow: {
+ label: "Toggle Header Row",
+ action: (t) => t.chain().focus().toggleHeaderRow().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().toggleHeaderRow(),
+ },
+ ToggleHeaderCell: {
+ label: "Toggle Header Cell",
+ action: (t) => t.chain().focus().toggleHeaderCell().run(),
+ isActive: (t) => !1,
+ isDisabled: (t) => !t.can().toggleHeaderCell(),
+ },
+ Separator: { type: "separator" },
+ };
+var by = { exports: {} };
+(function (t) {
+ (function () {
+ function e(d) {
+ var y = {
+ omitExtraWLInCodeBlocks: {
+ defaultValue: !1,
+ describe:
+ "Omit the default extra whiteline added to code blocks",
+ type: "boolean",
+ },
+ noHeaderId: {
+ defaultValue: !1,
+ describe: "Turn on/off generated header id",
+ type: "boolean",
+ },
+ prefixHeaderId: {
+ defaultValue: !1,
+ describe:
+ "Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",
+ type: "string",
+ },
+ rawPrefixHeaderId: {
+ defaultValue: !1,
+ describe:
+ 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
+ type: "boolean",
+ },
+ ghCompatibleHeaderId: {
+ defaultValue: !1,
+ describe:
+ "Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",
+ type: "boolean",
+ },
+ rawHeaderId: {
+ defaultValue: !1,
+ describe: `Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,
+ type: "boolean",
+ },
+ headerLevelStart: {
+ defaultValue: !1,
+ describe: "The header blocks level start",
+ type: "integer",
+ },
+ parseImgDimensions: {
+ defaultValue: !1,
+ describe: "Turn on/off image dimension parsing",
+ type: "boolean",
+ },
+ simplifiedAutoLink: {
+ defaultValue: !1,
+ describe: "Turn on/off GFM autolink style",
+ type: "boolean",
+ },
+ excludeTrailingPunctuationFromURLs: {
+ defaultValue: !1,
+ describe:
+ "Excludes trailing punctuation from links generated with autoLinking",
+ type: "boolean",
+ },
+ literalMidWordUnderscores: {
+ defaultValue: !1,
+ describe:
+ "Parse midword underscores as literal underscores",
+ type: "boolean",
+ },
+ literalMidWordAsterisks: {
+ defaultValue: !1,
+ describe: "Parse midword asterisks as literal asterisks",
+ type: "boolean",
+ },
+ strikethrough: {
+ defaultValue: !1,
+ describe: "Turn on/off strikethrough support",
+ type: "boolean",
+ },
+ tables: {
+ defaultValue: !1,
+ describe: "Turn on/off tables support",
+ type: "boolean",
+ },
+ tablesHeaderId: {
+ defaultValue: !1,
+ describe: "Add an id to table headers",
+ type: "boolean",
+ },
+ ghCodeBlocks: {
+ defaultValue: !0,
+ describe: "Turn on/off GFM fenced code blocks support",
+ type: "boolean",
+ },
+ tasklists: {
+ defaultValue: !1,
+ describe: "Turn on/off GFM tasklist support",
+ type: "boolean",
+ },
+ smoothLivePreview: {
+ defaultValue: !1,
+ describe:
+ "Prevents weird effects in live previews due to incomplete input",
+ type: "boolean",
+ },
+ smartIndentationFix: {
+ defaultValue: !1,
+ describe: "Tries to smartly fix indentation in es6 strings",
+ type: "boolean",
+ },
+ disableForced4SpacesIndentedSublists: {
+ defaultValue: !1,
+ describe:
+ "Disables the requirement of indenting nested sublists by 4 spaces",
+ type: "boolean",
+ },
+ simpleLineBreaks: {
+ defaultValue: !1,
+ describe: "Parses simple line breaks as (GFM Style)",
+ type: "boolean",
+ },
+ requireSpaceBeforeHeadingText: {
+ defaultValue: !1,
+ describe:
+ "Makes adding a space between `#` and the header text mandatory (GFM Style)",
+ type: "boolean",
+ },
+ ghMentions: {
+ defaultValue: !1,
+ describe: "Enables github @mentions",
+ type: "boolean",
+ },
+ ghMentionsLink: {
+ defaultValue: "https://github.com/{u}",
+ describe:
+ "Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",
+ type: "string",
+ },
+ encodeEmails: {
+ defaultValue: !0,
+ describe:
+ "Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",
+ type: "boolean",
+ },
+ openLinksInNewWindow: {
+ defaultValue: !1,
+ describe: "Open all links in new windows",
+ type: "boolean",
+ },
+ backslashEscapesHTMLTags: {
+ defaultValue: !1,
+ describe:
+ "Support for HTML Tag escaping. ex:
[^\r]+?<\/pre>)/gm,
+ function (_, C) {
+ var E = C;
+ return (
+ (E = E.replace(/^ /gm, "\xA80")),
+ (E = E.replace(/¨0/g, "")),
+ E
+ );
+ }
+ )),
+ r.subParser("hashBlock")(
+ `
+` +
+ k +
+ `
+
`,
+ y,
+ m
+ )
+ );
+ })),
+ (d = m.converter._dispatch("blockQuotes.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("codeBlocks", function (d, y, m) {
+ (d = m.converter._dispatch("codeBlocks.before", d, y, m)),
+ (d += "\xA80");
+ var w =
+ /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
+ return (
+ (d = d.replace(w, function (k, _, C) {
+ var E = _,
+ R = C,
+ P = `
+`;
+ return (
+ (E = r.subParser("outdent")(E, y, m)),
+ (E = r.subParser("encodeCode")(E, y, m)),
+ (E = r.subParser("detab")(E, y, m)),
+ (E = E.replace(/^\n+/g, "")),
+ (E = E.replace(/\n+$/g, "")),
+ y.omitExtraWLInCodeBlocks && (P = ""),
+ (E = "
" + E + P + "
"),
+ r.subParser("hashBlock")(E, y, m) + R
+ );
+ })),
+ (d = d.replace(/¨0/, "")),
+ (d = m.converter._dispatch("codeBlocks.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("codeSpans", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("codeSpans.before", d, y, m)),
+ typeof d == "undefined" && (d = ""),
+ (d = d.replace(
+ /(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
+ function (w, k, _, C) {
+ var E = C;
+ return (
+ (E = E.replace(/^([ \t]*)/g, "")),
+ (E = E.replace(/[ \t]*$/g, "")),
+ (E = r.subParser("encodeCode")(E, y, m)),
+ (E = k + "" + E + ""),
+ (E = r.subParser("hashHTMLSpans")(E, y, m)),
+ E
+ );
+ }
+ )),
+ (d = m.converter._dispatch("codeSpans.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("completeHTMLDocument", function (d, y, m) {
+ if (!y.completeHTMLDocument) return d;
+ d = m.converter._dispatch(
+ "completeHTMLDocument.before",
+ d,
+ y,
+ m
+ );
+ var w = "html",
+ k = `
+`,
+ _ = "",
+ C = `
+`,
+ E = "",
+ R = "";
+ typeof m.metadata.parsed.doctype != "undefined" &&
+ ((k =
+ "
+`),
+ (w = m.metadata.parsed.doctype.toString().toLowerCase()),
+ (w === "html" || w === "html5") &&
+ (C = ''));
+ for (var P in m.metadata.parsed)
+ if (m.metadata.parsed.hasOwnProperty(P))
+ switch (P.toLowerCase()) {
+ case "doctype":
+ break;
+ case "title":
+ _ =
+ "" +
+ m.metadata.parsed.title +
+ `
+`;
+ break;
+ case "charset":
+ w === "html" || w === "html5"
+ ? (C =
+ '
+`)
+ : (C =
+ '
+`);
+ break;
+ case "language":
+ case "lang":
+ (E = ' lang="' + m.metadata.parsed[P] + '"'),
+ (R +=
+ '
+`);
+ break;
+ default:
+ R +=
+ '
+`;
+ }
+ return (
+ (d =
+ k +
+ "
+
+` +
+ _ +
+ C +
+ R +
+ `
+
+` +
+ d.trim() +
+ `
+
+`),
+ (d = m.converter._dispatch(
+ "completeHTMLDocument.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("detab", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("detab.before", d, y, m)),
+ (d = d.replace(/\t(?=\t)/g, " ")),
+ (d = d.replace(/\t/g, "\xA8A\xA8B")),
+ (d = d.replace(/¨B(.+?)¨A/g, function (w, k) {
+ for (
+ var _ = k, C = 4 - (_.length % 4), E = 0;
+ E < C;
+ E++
+ )
+ _ += " ";
+ return _;
+ })),
+ (d = d.replace(/¨A/g, " ")),
+ (d = d.replace(/¨B/g, "")),
+ (d = m.converter._dispatch("detab.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("ellipsis", function (d, y, m) {
+ return (
+ y.ellipsis &&
+ ((d = m.converter._dispatch(
+ "ellipsis.before",
+ d,
+ y,
+ m
+ )),
+ (d = d.replace(/\.\.\./g, "\u2026")),
+ (d = m.converter._dispatch("ellipsis.after", d, y, m))),
+ d
+ );
+ }),
+ r.subParser("emoji", function (d, y, m) {
+ if (!y.emoji) return d;
+ d = m.converter._dispatch("emoji.before", d, y, m);
+ var w = /:([\S]+?):/g;
+ return (
+ (d = d.replace(w, function (k, _) {
+ return r.helper.emojis.hasOwnProperty(_)
+ ? r.helper.emojis[_]
+ : k;
+ })),
+ (d = m.converter._dispatch("emoji.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("encodeAmpsAndAngles", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch(
+ "encodeAmpsAndAngles.before",
+ d,
+ y,
+ m
+ )),
+ (d = d.replace(
+ /&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,
+ "&"
+ )),
+ (d = d.replace(/<(?![a-z\/?$!])/gi, "<")),
+ (d = d.replace(//g, ">")),
+ (d = m.converter._dispatch(
+ "encodeAmpsAndAngles.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("encodeBackslashEscapes", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch(
+ "encodeBackslashEscapes.before",
+ d,
+ y,
+ m
+ )),
+ (d = d.replace(
+ /\\(\\)/g,
+ r.helper.escapeCharactersCallback
+ )),
+ (d = d.replace(
+ /\\([`*_{}\[\]()>#+.!~=|:-])/g,
+ r.helper.escapeCharactersCallback
+ )),
+ (d = m.converter._dispatch(
+ "encodeBackslashEscapes.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("encodeCode", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("encodeCode.before", d, y, m)),
+ (d = d
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(
+ /([*_{}\[\]\\=~-])/g,
+ r.helper.escapeCharactersCallback
+ )),
+ (d = m.converter._dispatch("encodeCode.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser(
+ "escapeSpecialCharsWithinTagAttributes",
+ function (d, y, m) {
+ d = m.converter._dispatch(
+ "escapeSpecialCharsWithinTagAttributes.before",
+ d,
+ y,
+ m
+ );
+ var w = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,
+ k = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;
+ return (
+ (d = d.replace(w, function (_) {
+ return _.replace(
+ /(.)<\/?code>(?=.)/g,
+ "$1`"
+ ).replace(
+ /([\\`*_~=|])/g,
+ r.helper.escapeCharactersCallback
+ );
+ })),
+ (d = d.replace(k, function (_) {
+ return _.replace(
+ /([\\`*_~=|])/g,
+ r.helper.escapeCharactersCallback
+ );
+ })),
+ (d = m.converter._dispatch(
+ "escapeSpecialCharsWithinTagAttributes.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }
+ ),
+ r.subParser("githubCodeBlocks", function (d, y, m) {
+ return y.ghCodeBlocks
+ ? ((d = m.converter._dispatch(
+ "githubCodeBlocks.before",
+ d,
+ y,
+ m
+ )),
+ (d += "\xA80"),
+ (d = d.replace(
+ /(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,
+ function (w, k, _, C) {
+ var E = y.omitExtraWLInCodeBlocks
+ ? ""
+ : `
+`;
+ return (
+ (C = r.subParser("encodeCode")(C, y, m)),
+ (C = r.subParser("detab")(C, y, m)),
+ (C = C.replace(/^\n+/g, "")),
+ (C = C.replace(/\n+$/g, "")),
+ (C =
+ "
" +
+ C +
+ E +
+ "
"),
+ (C = r.subParser("hashBlock")(C, y, m)),
+ `
+
+\xA8G` +
+ (m.ghCodeBlocks.push({
+ text: w,
+ codeblock: C,
+ }) -
+ 1) +
+ `G
+
+`
+ );
+ }
+ )),
+ (d = d.replace(/¨0/, "")),
+ m.converter._dispatch("githubCodeBlocks.after", d, y, m))
+ : d;
+ }),
+ r.subParser("hashBlock", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("hashBlock.before", d, y, m)),
+ (d = d.replace(/(^\n+|\n+$)/g, "")),
+ (d =
+ `
+
+\xA8K` +
+ (m.gHtmlBlocks.push(d) - 1) +
+ `K
+
+`),
+ (d = m.converter._dispatch("hashBlock.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("hashCodeTags", function (d, y, m) {
+ d = m.converter._dispatch("hashCodeTags.before", d, y, m);
+ var w = function (k, _, C, E) {
+ var R = C + r.subParser("encodeCode")(_, y, m) + E;
+ return "\xA8C" + (m.gHtmlSpans.push(R) - 1) + "C";
+ };
+ return (
+ (d = r.helper.replaceRecursiveRegExp(
+ d,
+ w,
+ "]*>",
+ "",
+ "gim"
+ )),
+ (d = m.converter._dispatch("hashCodeTags.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("hashElement", function (d, y, m) {
+ return function (w, k) {
+ var _ = k;
+ return (
+ (_ = _.replace(
+ /\n\n/g,
+ `
+`
+ )),
+ (_ = _.replace(/^\n/, "")),
+ (_ = _.replace(/\n+$/g, "")),
+ (_ =
+ `
+
+\xA8K` +
+ (m.gHtmlBlocks.push(_) - 1) +
+ `K
+
+`),
+ _
+ );
+ };
+ }),
+ r.subParser("hashHTMLBlocks", function (d, y, m) {
+ d = m.converter._dispatch("hashHTMLBlocks.before", d, y, m);
+ var w = [
+ "pre",
+ "div",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "blockquote",
+ "table",
+ "dl",
+ "ol",
+ "ul",
+ "script",
+ "noscript",
+ "form",
+ "fieldset",
+ "iframe",
+ "math",
+ "style",
+ "section",
+ "header",
+ "footer",
+ "nav",
+ "article",
+ "aside",
+ "address",
+ "audio",
+ "canvas",
+ "figure",
+ "hgroup",
+ "output",
+ "video",
+ "p",
+ ],
+ k = function (M, N, D, K) {
+ var ae = M;
+ return (
+ D.search(/\bmarkdown\b/) !== -1 &&
+ (ae = D + m.converter.makeHtml(N) + K),
+ `
+
+\xA8K` +
+ (m.gHtmlBlocks.push(ae) - 1) +
+ `K
+
+`
+ );
+ };
+ y.backslashEscapesHTMLTags &&
+ (d = d.replace(/\\<(\/?[^>]+?)>/g, function (M, N) {
+ return "<" + N + ">";
+ }));
+ for (var _ = 0; _ < w.length; ++_)
+ for (
+ var C,
+ E = new RegExp(
+ "^ {0,3}(<" + w[_] + "\\b[^>]*>)",
+ "im"
+ ),
+ R = "<" + w[_] + "\\b[^>]*>",
+ P = "" + w[_] + ">";
+ (C = r.helper.regexIndexOf(d, E)) !== -1;
+
+ ) {
+ var L = r.helper.splitAtIndex(d, C),
+ I = r.helper.replaceRecursiveRegExp(
+ L[1],
+ k,
+ R,
+ P,
+ "im"
+ );
+ if (I === L[1]) break;
+ d = L[0].concat(I);
+ }
+ return (
+ (d = d.replace(
+ /(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,
+ r.subParser("hashElement")(d, y, m)
+ )),
+ (d = r.helper.replaceRecursiveRegExp(
+ d,
+ function (M) {
+ return (
+ `
+
+\xA8K` +
+ (m.gHtmlBlocks.push(M) - 1) +
+ `K
+
+`
+ );
+ },
+ "^ {0,3}",
+ "gm"
+ )),
+ (d = d.replace(
+ /(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,
+ r.subParser("hashElement")(d, y, m)
+ )),
+ (d = m.converter._dispatch(
+ "hashHTMLBlocks.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("hashHTMLSpans", function (d, y, m) {
+ d = m.converter._dispatch("hashHTMLSpans.before", d, y, m);
+ function w(k) {
+ return "\xA8C" + (m.gHtmlSpans.push(k) - 1) + "C";
+ }
+ return (
+ (d = d.replace(/<[^>]+?\/>/gi, function (k) {
+ return w(k);
+ })),
+ (d = d.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (k) {
+ return w(k);
+ })),
+ (d = d.replace(
+ /<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,
+ function (k) {
+ return w(k);
+ }
+ )),
+ (d = d.replace(/<[^>]+?>/gi, function (k) {
+ return w(k);
+ })),
+ (d = m.converter._dispatch("hashHTMLSpans.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("unhashHTMLSpans", function (d, y, m) {
+ d = m.converter._dispatch("unhashHTMLSpans.before", d, y, m);
+ for (var w = 0; w < m.gHtmlSpans.length; ++w) {
+ for (var k = m.gHtmlSpans[w], _ = 0; /¨C(\d+)C/.test(k); ) {
+ var C = RegExp.$1;
+ if (
+ ((k = k.replace(
+ "\xA8C" + C + "C",
+ m.gHtmlSpans[C]
+ )),
+ _ === 10)
+ ) {
+ console.error(
+ "maximum nesting of 10 spans reached!!!"
+ );
+ break;
+ }
+ ++_;
+ }
+ d = d.replace("\xA8C" + w + "C", k);
+ }
+ return (
+ (d = m.converter._dispatch(
+ "unhashHTMLSpans.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("hashPreCodeTags", function (d, y, m) {
+ d = m.converter._dispatch("hashPreCodeTags.before", d, y, m);
+ var w = function (k, _, C, E) {
+ var R = C + r.subParser("encodeCode")(_, y, m) + E;
+ return (
+ `
+
+\xA8G` +
+ (m.ghCodeBlocks.push({ text: k, codeblock: R }) - 1) +
+ `G
+
+`
+ );
+ };
+ return (
+ (d = r.helper.replaceRecursiveRegExp(
+ d,
+ w,
+ "^ {0,3}
]*>\\s*]*>",
+ "^ {0,3}\\s*
",
+ "gim"
+ )),
+ (d = m.converter._dispatch(
+ "hashPreCodeTags.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("headers", function (d, y, m) {
+ d = m.converter._dispatch("headers.before", d, y, m);
+ var w = isNaN(parseInt(y.headerLevelStart))
+ ? 1
+ : parseInt(y.headerLevelStart),
+ k = y.smoothLivePreview
+ ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm
+ : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
+ _ = y.smoothLivePreview
+ ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm
+ : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
+ (d = d.replace(k, function (R, P) {
+ var L = r.subParser("spanGamut")(P, y, m),
+ I = y.noHeaderId ? "" : ' id="' + E(P) + '"',
+ M = w,
+ N = "" + L + "";
+ return r.subParser("hashBlock")(N, y, m);
+ })),
+ (d = d.replace(_, function (R, P) {
+ var L = r.subParser("spanGamut")(P, y, m),
+ I = y.noHeaderId ? "" : ' id="' + E(P) + '"',
+ M = w + 1,
+ N = "" + L + "";
+ return r.subParser("hashBlock")(N, y, m);
+ }));
+ var C = y.requireSpaceBeforeHeadingText
+ ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm
+ : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;
+ d = d.replace(C, function (R, P, L) {
+ var I = L;
+ y.customizedHeaderId &&
+ (I = L.replace(/\s?\{([^{]+?)}\s*$/, ""));
+ var M = r.subParser("spanGamut")(I, y, m),
+ N = y.noHeaderId ? "" : ' id="' + E(L) + '"',
+ D = w - 1 + P.length,
+ K = "" + M + "";
+ return r.subParser("hashBlock")(K, y, m);
+ });
+ function E(R) {
+ var P, L;
+ if (y.customizedHeaderId) {
+ var I = R.match(/\{([^{]+?)}\s*$/);
+ I && I[1] && (R = I[1]);
+ }
+ return (
+ (P = R),
+ r.helper.isString(y.prefixHeaderId)
+ ? (L = y.prefixHeaderId)
+ : y.prefixHeaderId === !0
+ ? (L = "section-")
+ : (L = ""),
+ y.rawPrefixHeaderId || (P = L + P),
+ y.ghCompatibleHeaderId
+ ? (P = P.replace(/ /g, "-")
+ .replace(/&/g, "")
+ .replace(/¨T/g, "")
+ .replace(/¨D/g, "")
+ .replace(
+ /[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,
+ ""
+ )
+ .toLowerCase())
+ : y.rawHeaderId
+ ? (P = P.replace(/ /g, "-")
+ .replace(/&/g, "&")
+ .replace(/¨T/g, "\xA8")
+ .replace(/¨D/g, "$")
+ .replace(/["']/g, "-")
+ .toLowerCase())
+ : (P = P.replace(/[^\w]/g, "").toLowerCase()),
+ y.rawPrefixHeaderId && (P = L + P),
+ m.hashLinkCounts[P]
+ ? (P = P + "-" + m.hashLinkCounts[P]++)
+ : (m.hashLinkCounts[P] = 1),
+ P
+ );
+ }
+ return (d = m.converter._dispatch("headers.after", d, y, m)), d;
+ }),
+ r.subParser("horizontalRule", function (d, y, m) {
+ d = m.converter._dispatch("horizontalRule.before", d, y, m);
+ var w = r.subParser("hashBlock")("", y, m);
+ return (
+ (d = d.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, w)),
+ (d = d.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, w)),
+ (d = d.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, w)),
+ (d = m.converter._dispatch(
+ "horizontalRule.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("images", function (d, y, m) {
+ d = m.converter._dispatch("images.before", d, y, m);
+ var w =
+ /!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
+ k =
+ /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,
+ _ =
+ /!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
+ C = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,
+ E = /!\[([^\[\]]+)]()()()()()/g;
+ function R(L, I, M, N, D, K, ae, Q) {
+ return (
+ (N = N.replace(/\s/g, "")), P(L, I, M, N, D, K, ae, Q)
+ );
+ }
+ function P(L, I, M, N, D, K, ae, Q) {
+ var me = m.gUrls,
+ je = m.gTitles,
+ Le = m.gDimensions;
+ if (
+ ((M = M.toLowerCase()),
+ Q || (Q = ""),
+ L.search(/\(\s*>? ?(['"].*['"])?\)$/m) > -1)
+ )
+ N = "";
+ else if (N === "" || N === null)
+ if (
+ ((M === "" || M === null) &&
+ (M = I.toLowerCase().replace(/ ?\n/g, " ")),
+ (N = "#" + M),
+ !r.helper.isUndefined(me[M]))
+ )
+ (N = me[M]),
+ r.helper.isUndefined(je[M]) || (Q = je[M]),
+ r.helper.isUndefined(Le[M]) ||
+ ((D = Le[M].width), (K = Le[M].height));
+ else return L;
+ (I = I.replace(/"/g, """).replace(
+ r.helper.regexes.asteriskDashAndColon,
+ r.helper.escapeCharactersCallback
+ )),
+ (N = N.replace(
+ r.helper.regexes.asteriskDashAndColon,
+ r.helper.escapeCharactersCallback
+ ));
+ var Re = '"),
+ Re
+ );
+ }
+ return (
+ (d = d.replace(C, P)),
+ (d = d.replace(_, R)),
+ (d = d.replace(k, P)),
+ (d = d.replace(w, P)),
+ (d = d.replace(E, P)),
+ (d = m.converter._dispatch("images.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("italicsAndBold", function (d, y, m) {
+ d = m.converter._dispatch("italicsAndBold.before", d, y, m);
+ function w(k, _, C) {
+ return _ + k + C;
+ }
+ return (
+ y.literalMidWordUnderscores
+ ? ((d = d.replace(
+ /\b___(\S[\s\S]*?)___\b/g,
+ function (k, _) {
+ return w(
+ _,
+ "",
+ ""
+ );
+ }
+ )),
+ (d = d.replace(
+ /\b__(\S[\s\S]*?)__\b/g,
+ function (k, _) {
+ return w(_, "", "");
+ }
+ )),
+ (d = d.replace(
+ /\b_(\S[\s\S]*?)_\b/g,
+ function (k, _) {
+ return w(_, "", "");
+ }
+ )))
+ : ((d = d.replace(
+ /___(\S[\s\S]*?)___/g,
+ function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ }
+ )),
+ (d = d.replace(/__(\S[\s\S]*?)__/g, function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ })),
+ (d = d.replace(
+ /_([^\s_][\s\S]*?)_/g,
+ function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ }
+ ))),
+ y.literalMidWordAsterisks
+ ? ((d = d.replace(
+ /([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,
+ function (k, _, C) {
+ return w(
+ C,
+ _ + "",
+ ""
+ );
+ }
+ )),
+ (d = d.replace(
+ /([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,
+ function (k, _, C) {
+ return w(C, _ + "", "");
+ }
+ )),
+ (d = d.replace(
+ /([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,
+ function (k, _, C) {
+ return w(C, _ + "", "");
+ }
+ )))
+ : ((d = d.replace(
+ /\*\*\*(\S[\s\S]*?)\*\*\*/g,
+ function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ }
+ )),
+ (d = d.replace(
+ /\*\*(\S[\s\S]*?)\*\*/g,
+ function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ }
+ )),
+ (d = d.replace(
+ /\*([^\s*][\s\S]*?)\*/g,
+ function (k, _) {
+ return /\S$/.test(_)
+ ? w(_, "", "")
+ : k;
+ }
+ ))),
+ (d = m.converter._dispatch(
+ "italicsAndBold.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("lists", function (d, y, m) {
+ function w(C, E) {
+ m.gListLevel++,
+ (C = C.replace(
+ /\n{2,}$/,
+ `
+`
+ )),
+ (C += "\xA80");
+ var R =
+ /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,
+ P = /\n[ \t]*\n(?!¨0)/.test(C);
+ return (
+ y.disableForced4SpacesIndentedSublists &&
+ (R =
+ /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),
+ (C = C.replace(R, function (L, I, M, N, D, K, ae) {
+ ae = ae && ae.trim() !== "";
+ var Q = r.subParser("outdent")(D, y, m),
+ me = "";
+ return (
+ K &&
+ y.tasklists &&
+ ((me =
+ ' class="task-list-item" style="list-style-type: none;"'),
+ (Q = Q.replace(
+ /^[ \t]*\[(x|X| )?]/m,
+ function () {
+ var je =
+ '"),
+ je
+ );
+ }
+ ))),
+ (Q = Q.replace(
+ /^([-*+]|\d\.)[ \t]+[\S\n ]*/g,
+ function (je) {
+ return "\xA8A" + je;
+ }
+ )),
+ I || Q.search(/\n{2,}/) > -1
+ ? ((Q = r.subParser("githubCodeBlocks")(
+ Q,
+ y,
+ m
+ )),
+ (Q = r.subParser("blockGamut")(Q, y, m)))
+ : ((Q = r.subParser("lists")(Q, y, m)),
+ (Q = Q.replace(/\n$/, "")),
+ (Q = r.subParser("hashHTMLBlocks")(
+ Q,
+ y,
+ m
+ )),
+ (Q = Q.replace(
+ /\n\n+/g,
+ `
+
+`
+ )),
+ P
+ ? (Q = r.subParser("paragraphs")(
+ Q,
+ y,
+ m
+ ))
+ : (Q = r.subParser("spanGamut")(
+ Q,
+ y,
+ m
+ ))),
+ (Q = Q.replace("\xA8A", "")),
+ (Q =
+ "
" +
+ Q +
+ `
+`),
+ Q
+ );
+ })),
+ (C = C.replace(/¨0/g, "")),
+ m.gListLevel--,
+ E && (C = C.replace(/\s+$/, "")),
+ C
+ );
+ }
+ function k(C, E) {
+ if (E === "ol") {
+ var R = C.match(/^ *(\d+)\./);
+ if (R && R[1] !== "1") return ' start="' + R[1] + '"';
+ }
+ return "";
+ }
+ function _(C, E, R) {
+ var P = y.disableForced4SpacesIndentedSublists
+ ? /^ ?\d+\.[ \t]/gm
+ : /^ {0,3}\d+\.[ \t]/gm,
+ L = y.disableForced4SpacesIndentedSublists
+ ? /^ ?[*+-][ \t]/gm
+ : /^ {0,3}[*+-][ \t]/gm,
+ I = E === "ul" ? P : L,
+ M = "";
+ if (C.search(I) !== -1)
+ (function D(K) {
+ var ae = K.search(I),
+ Q = k(C, E);
+ ae !== -1
+ ? ((M +=
+ `
+
+<` +
+ E +
+ Q +
+ `>
+` +
+ w(K.slice(0, ae), !!R) +
+ "" +
+ E +
+ `>
+`),
+ (E = E === "ul" ? "ol" : "ul"),
+ (I = E === "ul" ? P : L),
+ D(K.slice(ae)))
+ : (M +=
+ `
+
+<` +
+ E +
+ Q +
+ `>
+` +
+ w(K, !!R) +
+ "" +
+ E +
+ `>
+`);
+ })(C);
+ else {
+ var N = k(C, E);
+ M =
+ `
+
+<` +
+ E +
+ N +
+ `>
+` +
+ w(C, !!R) +
+ "" +
+ E +
+ `>
+`;
+ }
+ return M;
+ }
+ return (
+ (d = m.converter._dispatch("lists.before", d, y, m)),
+ (d += "\xA80"),
+ m.gListLevel
+ ? (d = d.replace(
+ /^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
+ function (C, E, R) {
+ var P =
+ R.search(/[*+-]/g) > -1 ? "ul" : "ol";
+ return _(E, P, !0);
+ }
+ ))
+ : (d = d.replace(
+ /(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
+ function (C, E, R, P) {
+ var L =
+ P.search(/[*+-]/g) > -1 ? "ul" : "ol";
+ return _(R, L, !1);
+ }
+ )),
+ (d = d.replace(/¨0/, "")),
+ (d = m.converter._dispatch("lists.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("metadata", function (d, y, m) {
+ if (!y.metadata) return d;
+ d = m.converter._dispatch("metadata.before", d, y, m);
+ function w(k) {
+ (m.metadata.raw = k),
+ (k = k.replace(/&/g, "&").replace(/"/g, """)),
+ (k = k.replace(/\n {4}/g, " ")),
+ k.replace(
+ /^([\S ]+): +([\s\S]+?)$/gm,
+ function (_, C, E) {
+ return (m.metadata.parsed[C] = E), "";
+ }
+ );
+ }
+ return (
+ (d = d.replace(
+ /^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,
+ function (k, _, C) {
+ return w(C), "\xA8M";
+ }
+ )),
+ (d = d.replace(
+ /^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,
+ function (k, _, C) {
+ return _ && (m.metadata.format = _), w(C), "\xA8M";
+ }
+ )),
+ (d = d.replace(/¨M/g, "")),
+ (d = m.converter._dispatch("metadata.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("outdent", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("outdent.before", d, y, m)),
+ (d = d.replace(/^(\t|[ ]{1,4})/gm, "\xA80")),
+ (d = d.replace(/¨0/g, "")),
+ (d = m.converter._dispatch("outdent.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("paragraphs", function (d, y, m) {
+ (d = m.converter._dispatch("paragraphs.before", d, y, m)),
+ (d = d.replace(/^\n+/g, "")),
+ (d = d.replace(/\n+$/g, ""));
+ for (
+ var w = d.split(/\n{2,}/g), k = [], _ = w.length, C = 0;
+ C < _;
+ C++
+ ) {
+ var E = w[C];
+ E.search(/¨(K|G)(\d+)\1/g) >= 0
+ ? k.push(E)
+ : E.search(/\S/) >= 0 &&
+ ((E = r.subParser("spanGamut")(E, y, m)),
+ (E = E.replace(/^([ \t]*)/g, "
")),
+ (E += "
"),
+ k.push(E));
+ }
+ for (_ = k.length, C = 0; C < _; C++) {
+ for (
+ var R = "", P = k[C], L = !1;
+ /¨(K|G)(\d+)\1/.test(P);
+
+ ) {
+ var I = RegExp.$1,
+ M = RegExp.$2;
+ I === "K"
+ ? (R = m.gHtmlBlocks[M])
+ : L
+ ? (R = r.subParser("encodeCode")(
+ m.ghCodeBlocks[M].text,
+ y,
+ m
+ ))
+ : (R = m.ghCodeBlocks[M].codeblock),
+ (R = R.replace(/\$/g, "$$$$")),
+ (P = P.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, R)),
+ /^
]*>\s*]*>/.test(P) && (L = !0);
+ }
+ k[C] = P;
+ }
+ return (
+ (d = k.join(`
+`)),
+ (d = d.replace(/^\n+/g, "")),
+ (d = d.replace(/\n+$/g, "")),
+ m.converter._dispatch("paragraphs.after", d, y, m)
+ );
+ }),
+ r.subParser("runExtension", function (d, y, m, w) {
+ if (d.filter) y = d.filter(y, w.converter, m);
+ else if (d.regex) {
+ var k = d.regex;
+ k instanceof RegExp || (k = new RegExp(k, "g")),
+ (y = y.replace(k, d.replace));
+ }
+ return y;
+ }),
+ r.subParser("spanGamut", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch("spanGamut.before", d, y, m)),
+ (d = r.subParser("codeSpans")(d, y, m)),
+ (d = r.subParser("escapeSpecialCharsWithinTagAttributes")(
+ d,
+ y,
+ m
+ )),
+ (d = r.subParser("encodeBackslashEscapes")(d, y, m)),
+ (d = r.subParser("images")(d, y, m)),
+ (d = r.subParser("anchors")(d, y, m)),
+ (d = r.subParser("autoLinks")(d, y, m)),
+ (d = r.subParser("simplifiedAutoLinks")(d, y, m)),
+ (d = r.subParser("emoji")(d, y, m)),
+ (d = r.subParser("underline")(d, y, m)),
+ (d = r.subParser("italicsAndBold")(d, y, m)),
+ (d = r.subParser("strikethrough")(d, y, m)),
+ (d = r.subParser("ellipsis")(d, y, m)),
+ (d = r.subParser("hashHTMLSpans")(d, y, m)),
+ (d = r.subParser("encodeAmpsAndAngles")(d, y, m)),
+ y.simpleLineBreaks
+ ? /\n\n¨K/.test(d) ||
+ (d = d.replace(
+ /\n+/g,
+ `
+`
+ ))
+ : (d = d.replace(
+ / +\n/g,
+ `
+`
+ )),
+ (d = m.converter._dispatch("spanGamut.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("strikethrough", function (d, y, m) {
+ function w(k) {
+ return (
+ y.simplifiedAutoLink &&
+ (k = r.subParser("simplifiedAutoLinks")(k, y, m)),
+ "" + k + ""
+ );
+ }
+ return (
+ y.strikethrough &&
+ ((d = m.converter._dispatch(
+ "strikethrough.before",
+ d,
+ y,
+ m
+ )),
+ (d = d.replace(
+ /(?:~){2}([\s\S]+?)(?:~){2}/g,
+ function (k, _) {
+ return w(_);
+ }
+ )),
+ (d = m.converter._dispatch(
+ "strikethrough.after",
+ d,
+ y,
+ m
+ ))),
+ d
+ );
+ }),
+ r.subParser("stripLinkDefinitions", function (d, y, m) {
+ var w =
+ /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,
+ k =
+ /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;
+ d += "\xA80";
+ var _ = function (C, E, R, P, L, I, M) {
+ return (
+ (E = E.toLowerCase()),
+ d.toLowerCase().split(E).length - 1 < 2
+ ? C
+ : (R.match(/^data:.+?\/.+?;base64,/)
+ ? (m.gUrls[E] = R.replace(/\s/g, ""))
+ : (m.gUrls[E] = r.subParser(
+ "encodeAmpsAndAngles"
+ )(R, y, m)),
+ I
+ ? I + M
+ : (M &&
+ (m.gTitles[E] = M.replace(
+ /"|'/g,
+ """
+ )),
+ y.parseImgDimensions &&
+ P &&
+ L &&
+ (m.gDimensions[E] = {
+ width: P,
+ height: L,
+ }),
+ ""))
+ );
+ };
+ return (
+ (d = d.replace(k, _)),
+ (d = d.replace(w, _)),
+ (d = d.replace(/¨0/, "")),
+ d
+ );
+ }),
+ r.subParser("tables", function (d, y, m) {
+ if (!y.tables) return d;
+ var w =
+ /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,
+ k =
+ /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
+ function _(L) {
+ return /^:[ \t]*--*$/.test(L)
+ ? ' style="text-align:left;"'
+ : /^--*[ \t]*:[ \t]*$/.test(L)
+ ? ' style="text-align:right;"'
+ : /^:[ \t]*--*[ \t]*:$/.test(L)
+ ? ' style="text-align:center;"'
+ : "";
+ }
+ function C(L, I) {
+ var M = "";
+ return (
+ (L = L.trim()),
+ (y.tablesHeaderId || y.tableHeaderId) &&
+ (M =
+ ' id="' +
+ L.replace(/ /g, "_").toLowerCase() +
+ '"'),
+ (L = r.subParser("spanGamut")(L, y, m)),
+ "
" +
+ L +
+ `
+`
+ );
+ }
+ function E(L, I) {
+ var M = r.subParser("spanGamut")(L, y, m);
+ return (
+ "
" +
+ M +
+ `
+`
+ );
+ }
+ function R(L, I) {
+ for (
+ var M = `
+
+
+`,
+ N = L.length,
+ D = 0;
+ D < N;
+ ++D
+ )
+ M += L[D];
+ for (
+ M += `
+
+
+`,
+ D = 0;
+ D < I.length;
+ ++D
+ ) {
+ M += `
+`;
+ for (var K = 0; K < N; ++K) M += I[D][K];
+ M += `
+`;
+ }
+ return (
+ (M += `
+
+`),
+ M
+ );
+ }
+ function P(L) {
+ var I,
+ M = L.split(`
+`);
+ for (I = 0; I < M.length; ++I)
+ /^ {0,3}\|/.test(M[I]) &&
+ (M[I] = M[I].replace(/^ {0,3}\|/, "")),
+ /\|[ \t]*$/.test(M[I]) &&
+ (M[I] = M[I].replace(/\|[ \t]*$/, "")),
+ (M[I] = r.subParser("codeSpans")(M[I], y, m));
+ var N = M[0].split("|").map(function (Re) {
+ return Re.trim();
+ }),
+ D = M[1].split("|").map(function (Re) {
+ return Re.trim();
+ }),
+ K = [],
+ ae = [],
+ Q = [],
+ me = [];
+ for (M.shift(), M.shift(), I = 0; I < M.length; ++I)
+ M[I].trim() !== "" &&
+ K.push(
+ M[I].split("|").map(function (Re) {
+ return Re.trim();
+ })
+ );
+ if (N.length < D.length) return L;
+ for (I = 0; I < D.length; ++I) Q.push(_(D[I]));
+ for (I = 0; I < N.length; ++I)
+ r.helper.isUndefined(Q[I]) && (Q[I] = ""),
+ ae.push(C(N[I], Q[I]));
+ for (I = 0; I < K.length; ++I) {
+ for (var je = [], Le = 0; Le < ae.length; ++Le)
+ r.helper.isUndefined(K[I][Le]),
+ je.push(E(K[I][Le], Q[Le]));
+ me.push(je);
+ }
+ return R(ae, me);
+ }
+ return (
+ (d = m.converter._dispatch("tables.before", d, y, m)),
+ (d = d.replace(
+ /\\(\|)/g,
+ r.helper.escapeCharactersCallback
+ )),
+ (d = d.replace(w, P)),
+ (d = d.replace(k, P)),
+ (d = m.converter._dispatch("tables.after", d, y, m)),
+ d
+ );
+ }),
+ r.subParser("underline", function (d, y, m) {
+ return (
+ y.underline &&
+ ((d = m.converter._dispatch(
+ "underline.before",
+ d,
+ y,
+ m
+ )),
+ y.literalMidWordUnderscores
+ ? ((d = d.replace(
+ /\b___(\S[\s\S]*?)___\b/g,
+ function (w, k) {
+ return "" + k + "";
+ }
+ )),
+ (d = d.replace(
+ /\b__(\S[\s\S]*?)__\b/g,
+ function (w, k) {
+ return "" + k + "";
+ }
+ )))
+ : ((d = d.replace(
+ /___(\S[\s\S]*?)___/g,
+ function (w, k) {
+ return /\S$/.test(k)
+ ? "" + k + ""
+ : w;
+ }
+ )),
+ (d = d.replace(
+ /__(\S[\s\S]*?)__/g,
+ function (w, k) {
+ return /\S$/.test(k)
+ ? "" + k + ""
+ : w;
+ }
+ ))),
+ (d = d.replace(
+ /(_)/g,
+ r.helper.escapeCharactersCallback
+ )),
+ (d = m.converter._dispatch(
+ "underline.after",
+ d,
+ y,
+ m
+ ))),
+ d
+ );
+ }),
+ r.subParser("unescapeSpecialChars", function (d, y, m) {
+ return (
+ (d = m.converter._dispatch(
+ "unescapeSpecialChars.before",
+ d,
+ y,
+ m
+ )),
+ (d = d.replace(/¨E(\d+)E/g, function (w, k) {
+ var _ = parseInt(k);
+ return String.fromCharCode(_);
+ })),
+ (d = m.converter._dispatch(
+ "unescapeSpecialChars.after",
+ d,
+ y,
+ m
+ )),
+ d
+ );
+ }),
+ r.subParser("makeMarkdown.blockquote", function (d, y) {
+ var m = "";
+ if (d.hasChildNodes())
+ for (
+ var w = d.childNodes, k = w.length, _ = 0;
+ _ < k;
+ ++_
+ ) {
+ var C = r.subParser("makeMarkdown.node")(w[_], y);
+ C !== "" && (m += C);
+ }
+ return (
+ (m = m.trim()),
+ (m =
+ "> " +
+ m.split(`
+`).join(`
+> `)),
+ m
+ );
+ }),
+ r.subParser("makeMarkdown.codeBlock", function (d, y) {
+ var m = d.getAttribute("language"),
+ w = d.getAttribute("precodenum");
+ return (
+ "```" +
+ m +
+ `
+` +
+ y.preList[w] +
+ "\n```"
+ );
+ }),
+ r.subParser("makeMarkdown.codeSpan", function (d) {
+ return "`" + d.innerHTML + "`";
+ }),
+ r.subParser("makeMarkdown.emphasis", function (d, y) {
+ var m = "";
+ if (d.hasChildNodes()) {
+ m += "*";
+ for (var w = d.childNodes, k = w.length, _ = 0; _ < k; ++_)
+ m += r.subParser("makeMarkdown.node")(w[_], y);
+ m += "*";
+ }
+ return m;
+ }),
+ r.subParser("makeMarkdown.header", function (d, y, m) {
+ var w = new Array(m + 1).join("#"),
+ k = "";
+ if (d.hasChildNodes()) {
+ k = w + " ";
+ for (var _ = d.childNodes, C = _.length, E = 0; E < C; ++E)
+ k += r.subParser("makeMarkdown.node")(_[E], y);
+ }
+ return k;
+ }),
+ r.subParser("makeMarkdown.hr", function () {
+ return "---";
+ }),
+ r.subParser("makeMarkdown.image", function (d) {
+ var y = "";
+ return (
+ d.hasAttribute("src") &&
+ ((y += ",
+ (y += "<" + d.getAttribute("src") + ">"),
+ d.hasAttribute("width") &&
+ d.hasAttribute("height") &&
+ (y +=
+ " =" +
+ d.getAttribute("width") +
+ "x" +
+ d.getAttribute("height")),
+ d.hasAttribute("title") &&
+ (y += ' "' + d.getAttribute("title") + '"'),
+ (y += ")")),
+ y
+ );
+ }),
+ r.subParser("makeMarkdown.links", function (d, y) {
+ var m = "";
+ if (d.hasChildNodes() && d.hasAttribute("href")) {
+ var w = d.childNodes,
+ k = w.length;
+ m = "[";
+ for (var _ = 0; _ < k; ++_)
+ m += r.subParser("makeMarkdown.node")(w[_], y);
+ (m += "]("),
+ (m += "<" + d.getAttribute("href") + ">"),
+ d.hasAttribute("title") &&
+ (m += ' "' + d.getAttribute("title") + '"'),
+ (m += ")");
+ }
+ return m;
+ }),
+ r.subParser("makeMarkdown.list", function (d, y, m) {
+ var w = "";
+ if (!d.hasChildNodes()) return "";
+ for (
+ var k = d.childNodes,
+ _ = k.length,
+ C = d.getAttribute("start") || 1,
+ E = 0;
+ E < _;
+ ++E
+ )
+ if (
+ !(
+ typeof k[E].tagName == "undefined" ||
+ k[E].tagName.toLowerCase() !== "li"
+ )
+ ) {
+ var R = "";
+ m === "ol" ? (R = C.toString() + ". ") : (R = "- "),
+ (w +=
+ R +
+ r.subParser("makeMarkdown.listItem")(k[E], y)),
+ ++C;
+ }
+ return (
+ (w += `
+
+`),
+ w.trim()
+ );
+ }),
+ r.subParser("makeMarkdown.listItem", function (d, y) {
+ for (
+ var m = "", w = d.childNodes, k = w.length, _ = 0;
+ _ < k;
+ ++_
+ )
+ m += r.subParser("makeMarkdown.node")(w[_], y);
+ return (
+ /\n$/.test(m)
+ ? (m = m
+ .split(
+ `
+`
+ )
+ .join(
+ `
+ `
+ )
+ .replace(/^ {4}$/gm, "")
+ .replace(
+ /\n\n+/g,
+ `
+
+`
+ ))
+ : (m += `
+`),
+ m
+ );
+ }),
+ r.subParser("makeMarkdown.node", function (d, y, m) {
+ m = m || !1;
+ var w = "";
+ if (d.nodeType === 3)
+ return r.subParser("makeMarkdown.txt")(d, y);
+ if (d.nodeType === 8)
+ return (
+ "
+
+`
+ );
+ if (d.nodeType !== 1) return "";
+ var k = d.tagName.toLowerCase();
+ switch (k) {
+ case "h1":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 1) +
+ `
+
+`);
+ break;
+ case "h2":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 2) +
+ `
+
+`);
+ break;
+ case "h3":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 3) +
+ `
+
+`);
+ break;
+ case "h4":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 4) +
+ `
+
+`);
+ break;
+ case "h5":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 5) +
+ `
+
+`);
+ break;
+ case "h6":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.header")(d, y, 6) +
+ `
+
+`);
+ break;
+ case "p":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.paragraph")(d, y) +
+ `
+
+`);
+ break;
+ case "blockquote":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.blockquote")(d, y) +
+ `
+
+`);
+ break;
+ case "hr":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.hr")(d, y) +
+ `
+
+`);
+ break;
+ case "ol":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.list")(d, y, "ol") +
+ `
+
+`);
+ break;
+ case "ul":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.list")(d, y, "ul") +
+ `
+
+`);
+ break;
+ case "precode":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.codeBlock")(d, y) +
+ `
+
+`);
+ break;
+ case "pre":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.pre")(d, y) +
+ `
+
+`);
+ break;
+ case "table":
+ m ||
+ (w =
+ r.subParser("makeMarkdown.table")(d, y) +
+ `
+
+`);
+ break;
+ case "code":
+ w = r.subParser("makeMarkdown.codeSpan")(d, y);
+ break;
+ case "em":
+ case "i":
+ w = r.subParser("makeMarkdown.emphasis")(d, y);
+ break;
+ case "strong":
+ case "b":
+ w = r.subParser("makeMarkdown.strong")(d, y);
+ break;
+ case "del":
+ w = r.subParser("makeMarkdown.strikethrough")(d, y);
+ break;
+ case "a":
+ w = r.subParser("makeMarkdown.links")(d, y);
+ break;
+ case "img":
+ w = r.subParser("makeMarkdown.image")(d, y);
+ break;
+ default:
+ w =
+ d.outerHTML +
+ `
+
+`;
+ }
+ return w;
+ }),
+ r.subParser("makeMarkdown.paragraph", function (d, y) {
+ var m = "";
+ if (d.hasChildNodes())
+ for (var w = d.childNodes, k = w.length, _ = 0; _ < k; ++_)
+ m += r.subParser("makeMarkdown.node")(w[_], y);
+ return (m = m.trim()), m;
+ }),
+ r.subParser("makeMarkdown.pre", function (d, y) {
+ var m = d.getAttribute("prenum");
+ return "