From 85852e6db48dc9e3dc5c2e967dbb9f657c213567 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 16 Sep 2024 16:39:37 +0200 Subject: [PATCH 1/8] Update WordPress packages to their latest versions --- ReactApp/package-lock.json | 1069 ++++++++++++++++++------------------ ReactApp/package.json | 20 +- 2 files changed, 548 insertions(+), 541 deletions(-) diff --git a/ReactApp/package-lock.json b/ReactApp/package-lock.json index b7df0a41..0a1cad8c 100644 --- a/ReactApp/package-lock.json +++ b/ReactApp/package-lock.json @@ -9,16 +9,16 @@ "version": "0.0.0", "dependencies": { "@monaco-editor/react": "^4.6.0", - "@wordpress/api-fetch": "^7.4.0", - "@wordpress/block-editor": "^14.0.0", - "@wordpress/block-library": "^9.5.0", - "@wordpress/core-data": "^7.5.0", - "@wordpress/edit-post": "^8.6.1", - "@wordpress/editor": "^14.5.0", - "@wordpress/element": "^6.5.0", - "@wordpress/format-library": "^5.5.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/block-library": "^9.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/edit-post": "^8.7.0", + "@wordpress/editor": "^14.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/format-library": "^5.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", "react": "^18.3.1" }, "devDependencies": { @@ -2155,13 +2155,13 @@ } }, "node_modules/@wordpress/a11y": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-4.6.0.tgz", - "integrity": "sha512-dSYGLgntqQCAiHBnNxttLOUZnH26m/BrIQdCXtb9JVJy5p68JAdFHbr6qFoOfOoTCvwUqE8cNS7K4GWfAJwT0w==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-4.7.0.tgz", + "integrity": "sha512-qeh8TcJNNr9M0XL3OUDawBRrZypNLsnLjcXEBd6jp8Y4kOWxowmDDT6re1uToPdYTLLW2PZmZeBLYR9OS7pgpw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/dom-ready": "^4.6.0", - "@wordpress/i18n": "^5.6.0" + "@wordpress/dom-ready": "^4.7.0", + "@wordpress/i18n": "^5.7.0" }, "engines": { "node": ">=18.12.0", @@ -2169,13 +2169,13 @@ } }, "node_modules/@wordpress/api-fetch": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-7.6.0.tgz", - "integrity": "sha512-/T0EORXgfZJQZomDIuZyPwQQWzYjcSxo9ggpKqzQuwq+VHMIC5aEPYh3IC5KhpQxPEquvN5xm2kbcTpBVnUwiA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-7.7.0.tgz", + "integrity": "sha512-Si/Ep5yXmxTpUT1Fxgd8PjhK6amohcSCUR50QGK9FIeCGoxBZiH7gi+VSvFAZsC2z8XvvP/tJZthB2j/9UHfPA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/url": "^4.6.0" + "@wordpress/i18n": "^5.7.0", + "@wordpress/url": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2183,9 +2183,9 @@ } }, "node_modules/@wordpress/autop": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-4.6.0.tgz", - "integrity": "sha512-pcVX9Hy3c9OPbH7hKTb7ZpctpFLh2rbXOcDniosIQ4IUhcXuiePTDToUaN9qlaWdYHByL5Sgvr+abT6usqXVgA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-4.7.0.tgz", + "integrity": "sha512-mxcee/l5ElWy4EyDaQK8GowCTb45YHg6oVkqfgm/uuwZ4JKHmBL3FhbQjqjGn0klBmQL5lDUEA8D6WKYELHhSw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2195,9 +2195,9 @@ } }, "node_modules/@wordpress/blob": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-4.6.0.tgz", - "integrity": "sha512-dMFP7OeWJzoYjjJiU/P7kA3Tm318LBSRtHzUrIIb/iw/zh5rsbdXaqbrw/XfQDWWVmOAMqBpZ8piS8AOgj0Etg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-4.7.0.tgz", + "integrity": "sha512-JT6eMRNjgArGny5pTqC9fey5s4jA8u5msgkYLeiICm9T06ovXgxbaPToT7xnIKZKx5StrRV3wZNApNcylQmDKg==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2207,43 +2207,44 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-14.1.0.tgz", - "integrity": "sha512-CHe7eapTWZ3E4oiM34Zu/0/SviNANz7BngtyyYP79oohcCCeTE4YluJJ/+1jlQEFRXuDurc/3vEij0t7x2YECw==", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-14.2.0.tgz", + "integrity": "sha512-k2rqdxGVsc2//j7EFPAD7bsvDRzKhC+dfUbN8gdzCY0Gaw61bjQHhXC6GwGjQ2w+jcIAUwgH/eyztqNs6UUwbA==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", - "@wordpress/a11y": "^4.6.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/blob": "^4.6.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/commands": "^1.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/date": "^5.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/escape-html": "^3.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/keyboard-shortcuts": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/style-engine": "^2.6.0", - "@wordpress/token-list": "^3.6.0", - "@wordpress/url": "^4.6.0", - "@wordpress/warning": "^3.6.0", - "@wordpress/wordcount": "^4.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/blob": "^4.7.0", + "@wordpress/block-serialization-default-parser": "^5.7.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/commands": "^1.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/date": "^5.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/escape-html": "^3.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/keyboard-shortcuts": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/style-engine": "^2.7.0", + "@wordpress/token-list": "^3.7.0", + "@wordpress/url": "^4.7.0", + "@wordpress/warning": "^3.7.0", + "@wordpress/wordcount": "^4.7.0", "change-case": "^4.1.2", "clsx": "^2.1.1", "colord": "^2.7.0", @@ -2251,8 +2252,9 @@ "diff": "^4.0.2", "fast-deep-equal": "^3.1.3", "memize": "^2.1.0", + "parsel-js": "^1.1.2", "postcss": "^8.4.21", - "postcss-prefixwrap": "^1.51.0", + "postcss-prefix-selector": "^1.16.0", "postcss-urlrebase": "^1.4.0", "react-autosize-textarea": "^7.1.0", "react-easy-crop": "^5.0.6", @@ -2268,44 +2270,44 @@ } }, "node_modules/@wordpress/block-library": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-9.6.1.tgz", - "integrity": "sha512-b+tl6QPO2+ZedeWx6PPgQbCbmpV/PHJbjMsMxEOneFbm69agmIzXvKcWHigu63X5vKcChY1xiozbfwrqzMz9Zg==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-9.7.0.tgz", + "integrity": "sha512-VbjTCslzy6oGTR6tPwYyxtlh7UtiOatHrkxczzF2qafiuKoWCeH1pN8K+w91Kgi+rX0sIyd6F7q+EMN8pdl+ag==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/autop": "^4.6.0", - "@wordpress/blob": "^4.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/date": "^5.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/escape-html": "^3.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/interactivity": "^6.6.0", - "@wordpress/interactivity-router": "^2.6.0", - "@wordpress/keyboard-shortcuts": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/patterns": "^2.6.0", - "@wordpress/primitives": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/reusable-blocks": "^5.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/server-side-render": "^5.6.0", - "@wordpress/url": "^4.6.0", - "@wordpress/viewport": "^6.6.0", - "@wordpress/wordcount": "^4.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/autop": "^4.7.0", + "@wordpress/blob": "^4.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/date": "^5.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/escape-html": "^3.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/interactivity": "^6.7.0", + "@wordpress/interactivity-router": "^2.7.0", + "@wordpress/keyboard-shortcuts": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/patterns": "^2.7.0", + "@wordpress/primitives": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/reusable-blocks": "^5.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/server-side-render": "^5.7.0", + "@wordpress/url": "^4.7.0", + "@wordpress/viewport": "^6.7.0", + "@wordpress/wordcount": "^4.7.0", "change-case": "^4.1.2", "clsx": "^2.1.1", "colord": "^2.7.0", @@ -2326,9 +2328,9 @@ } }, "node_modules/@wordpress/block-serialization-default-parser": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-5.6.0.tgz", - "integrity": "sha512-nbXpyhyBp5pjnrNwqVKC6fz6drVY5rCvb9XN74QPjLDyrYrAg/76m+inv+4mlWGgY1jpPfYsXIGLAdSp4+LzAA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-5.7.0.tgz", + "integrity": "sha512-G+f52f6CoSfB6YgBPo0kV51+EbsFG9782hnX1zNFeFuAVTs8dCXrMdoqxAfOUV0O0semnbLwClcQNNXRn8wz8g==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2338,26 +2340,26 @@ } }, "node_modules/@wordpress/blocks": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-13.6.0.tgz", - "integrity": "sha512-20A1ZEZGFLZAnpGDxVXra1+R0id++jbjVMmzDt16D1ogO086E79gY5VeV2RczvyPfl1+kXCo4/++6zwb/uQXFg==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-13.7.0.tgz", + "integrity": "sha512-JDe46DCW5QhrkKJs0dusKgSmwgFLQkFk7OgHxFpGkZHVkU1gViqh+dYMiEhbuIrAhbYkFFlbf0NcTrYSE12TAQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/autop": "^4.6.0", - "@wordpress/blob": "^4.6.0", - "@wordpress/block-serialization-default-parser": "^5.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/shortcode": "^4.6.0", - "@wordpress/warning": "^3.6.0", + "@wordpress/autop": "^4.7.0", + "@wordpress/blob": "^4.7.0", + "@wordpress/block-serialization-default-parser": "^5.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/shortcode": "^4.7.0", + "@wordpress/warning": "^3.7.0", "change-case": "^4.1.2", "colord": "^2.7.0", "fast-deep-equal": "^3.1.3", @@ -2384,18 +2386,18 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/@wordpress/commands": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-1.6.0.tgz", - "integrity": "sha512-ssWzC4nhIJ0Y8CQFFaOD7o/z86X5a1JZqG2gI8x08vZLVRcIID0mZ4Y01vpp+7RsVmpOyF1ncxhimUFFLScT7g==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-1.7.0.tgz", + "integrity": "sha512-w01WuJFbSnBJ9UPgPtm0M5GZLGOfJF+EdKvonR3Jf3uApmzyCPoDeqc+UJ1MGERANXzwOOtcHqQM26hhTbG+Ug==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^28.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/keyboard-shortcuts": "^5.6.0", - "@wordpress/private-apis": "^1.6.0", + "@wordpress/components": "^28.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/keyboard-shortcuts": "^5.7.0", + "@wordpress/private-apis": "^1.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0" }, @@ -2409,9 +2411,9 @@ } }, "node_modules/@wordpress/components": { - "version": "28.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-28.6.0.tgz", - "integrity": "sha512-9YmA+7Tmz19oOfKifOF/VxcwJwyyLK8Y2LupK7ge6Oue0P1bMLs/9LBgZUBizoKMWmXYdzBm8pXf9Eyqq3PG0Q==", + "version": "28.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-28.7.0.tgz", + "integrity": "sha512-oxF+pAZHJ3L9p42wMDeclo6P0TOZW1+U1pKmKju33aDsAwINOU2ELpVFyIEHkA9txn8VU4lxpnNIsYY6RGlW8w==", "dependencies": { "@ariakit/react": "^0.4.10", "@babel/runtime": "^7.16.0", @@ -2425,23 +2427,23 @@ "@types/gradient-parser": "0.1.3", "@types/highlight-words-core": "1.2.1", "@use-gesture/react": "^10.3.1", - "@wordpress/a11y": "^4.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/date": "^5.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/escape-html": "^3.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/primitives": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/warning": "^3.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/date": "^5.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/escape-html": "^3.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/primitives": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/warning": "^3.7.0", "change-case": "^4.1.2", "clsx": "^2.1.1", "colord": "^2.7.0", @@ -2470,19 +2472,19 @@ } }, "node_modules/@wordpress/compose": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-7.6.0.tgz", - "integrity": "sha512-4ukiLfCOUkb0zmdFpPSVOnQkpNHTWqQUOCgpMykjKO0gRfa/rZ6dxcZUQ/KEYT5EKZkGCo9bR4lBhxjNVrgfug==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-7.7.0.tgz", + "integrity": "sha512-TjhGcw9n/XbiMT63POESs1TF9O6eQRVhAPrMan5t2yusQbog5KLk4TetOasIWxD80pu5sg9P5NuupuU/oSEBYQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/mousetrap": "^1.6.8", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/priority-queue": "^3.6.0", - "@wordpress/undo-manager": "^1.6.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/priority-queue": "^3.7.0", + "@wordpress/undo-manager": "^1.7.0", "change-case": "^4.1.2", "clipboard": "^2.0.11", "mousetrap": "^1.6.5", @@ -2497,23 +2499,23 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-1.6.0.tgz", - "integrity": "sha512-mQULQmZSUd7zVnEk1QKk+V0gF+GuSC0phoKfTg7TM6rctCKVqjwx/ThnvToA3C3tDSWCAbPAy0rfgBWXhECQQg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-1.7.0.tgz", + "integrity": "sha512-WP5YedYVH7ULzyOJHoncRVvg2Mp65sx5dI6pxpanhTGCXEKLCQLQSWrfb9J9FlIwo1fnwsiBM4o3KtsAdkkN6Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/commands": "^1.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/router": "^1.6.0", - "@wordpress/url": "^4.6.0" + "@wordpress/block-editor": "^14.2.0", + "@wordpress/commands": "^1.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/router": "^1.7.0", + "@wordpress/url": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2525,27 +2527,27 @@ } }, "node_modules/@wordpress/core-data": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-7.6.0.tgz", - "integrity": "sha512-TKHm2yZRAsGtwhY5jzbNIxOqokwZKgcllqhY/gS/SFf9MfefO+/pN6AvE2YNi/wlmwKg7O/iBXS/P4PTqMSBUg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-7.7.0.tgz", + "integrity": "sha512-mpk8pDc9nbD+G/4JegL/rxEwz24wvAjdVuieb+Q1MjeHMeSTJrqx6tUN6uKyJJZGZtjfYjasRUmRBIpbsx7qAQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/sync": "^1.6.0", - "@wordpress/undo-manager": "^1.6.0", - "@wordpress/url": "^4.6.0", - "@wordpress/warning": "^3.6.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/sync": "^1.7.0", + "@wordpress/undo-manager": "^1.7.0", + "@wordpress/url": "^4.7.0", + "@wordpress/warning": "^3.7.0", "change-case": "^4.1.2", "equivalent-key-map": "^0.2.2", "fast-deep-equal": "^3.1.3", @@ -2562,18 +2564,18 @@ } }, "node_modules/@wordpress/data": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-10.6.0.tgz", - "integrity": "sha512-u6g1IeK3Vv0Ulr/0jPWU5wpde+flWH1SDvqgc50GjG2v03NWqzie8zTGGeHo8Fque7s/UNbGYKlzrbM3+dPl5g==", + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-10.7.0.tgz", + "integrity": "sha512-0NqDYIMOHdilSYoH6LRaq1CHcWlJiGP6xxkjI6pu2ZEf5mo9S/UblLCzVwaZMnhae/ZxEsgQQIypIQJJqor9uw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", - "@wordpress/priority-queue": "^3.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/redux-routine": "^5.6.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", + "@wordpress/priority-queue": "^3.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/redux-routine": "^5.7.0", "deepmerge": "^4.3.0", "equivalent-key-map": "^0.2.2", "is-plain-object": "^5.0.0", @@ -2591,21 +2593,21 @@ } }, "node_modules/@wordpress/dataviews": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-4.2.0.tgz", - "integrity": "sha512-rCnMbEVXKZYgQmJO7S448KPVh78DTHgfJ+B5H937l/HX8+Gd0OlkpbKi4C4UZUj0k/xwY7ccKERYurq3W8/NFg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-4.3.0.tgz", + "integrity": "sha512-ZAKgac4sFINnAKABhf4/0qAEm1LTTRDJGd8+qfi6mbiQr42BoNVIKtFw8o5uOL4cOEF01wdoUDaCZv6oP9e+eA==", "dependencies": { "@ariakit/react": "^0.4.10", "@babel/runtime": "^7.16.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/primitives": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/warning": "^3.6.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/primitives": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/warning": "^3.7.0", "clsx": "^2.1.1", "remove-accents": "^0.5.0" }, @@ -2618,12 +2620,12 @@ } }, "node_modules/@wordpress/date": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-5.6.0.tgz", - "integrity": "sha512-uB/FaNHudbs4DgaPGld+Ckvoo8kYvxcDhVyJ6Io3MgONMcsDr4KR3lOc50MprbNZPbXG2KB0CTgHA+PHNxP9iQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-5.7.0.tgz", + "integrity": "sha512-iMwGP/Sbz+CCgqxUUKg8W2sZiwvr9K1q7s0rHuy3YVJT46QDNpN0A6HGNmckI0z4C+CRDvOIa09OMgTz1igUAw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^4.6.0", + "@wordpress/deprecated": "^4.7.0", "moment": "^2.29.4", "moment-timezone": "^0.5.40" }, @@ -2649,12 +2651,12 @@ } }, "node_modules/@wordpress/deprecated": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-4.6.0.tgz", - "integrity": "sha512-XQbF7SIb43I4Ey7nEDqowm7YJgzoUpdmZfNBN01/UXKUZ0FNaKzf2LCNjOCwfEfRE7AroyUgMR40qWVBBs+GKQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-4.7.0.tgz", + "integrity": "sha512-FMtYPk+yxvEAs1LDBHk1yHz48vlp/TWrTQeMph5ov7dpw4Xgfd9darXorsl4zudJVrB+Nn6dYrPmrS08rAXtQQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^4.6.0" + "@wordpress/hooks": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2662,12 +2664,12 @@ } }, "node_modules/@wordpress/dom": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-4.6.0.tgz", - "integrity": "sha512-ZCjMOya5dTkzgp/vTq7w1qpvVQDPoF7sJpalARUUQjeMUkUw/PTLYvvXJ3gARBCgaEdD85QjLorpxnJVz1XNng==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-4.7.0.tgz", + "integrity": "sha512-lGPEJHSHOT5Y9gWsX8V2tcsd5shDCTJqDxzL+pwDTfEsi/Os52nZCvzmavzGwRDzlm2Wmd3wNW+k/UCS/PhmXQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^4.6.0" + "@wordpress/deprecated": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2675,9 +2677,9 @@ } }, "node_modules/@wordpress/dom-ready": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.6.0.tgz", - "integrity": "sha512-3fX1O1abmp3++FpZMPnDQygeygUggqfEvWQQQ80di/ksMEo6DXvIdtXolwDQt9WIC1WetLdI7Mf3KKVJnruyxg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.7.0.tgz", + "integrity": "sha512-moMbRCPNfgCc0dT0waEr0renEsptnDMV89fGpMijA66IyvYoYsxDT57w2JqHiaKbTvbIBmgdNgDjcVgZGv5JoA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2687,40 +2689,40 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-8.6.1.tgz", - "integrity": "sha512-WoCg2CAxe9bBv2ffvXzJD1nSrLIoS5a4B3xmJz36HnwghyE1ftct5S0WRcB7VFI3hbu5+vtAyvywuxOEs6QLtA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-8.7.0.tgz", + "integrity": "sha512-6fLzXG0ydegqkaHJ4Byes+A27z3j5aczb25lHeTJK1lxVoI6UJ4To8qLGbRUTZLF+20z4SegHZ9Xo3JGiazWZA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/block-library": "^9.6.1", - "@wordpress/blocks": "^13.6.0", - "@wordpress/commands": "^1.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-commands": "^1.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/editor": "^14.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/keyboard-shortcuts": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/plugins": "^7.6.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/url": "^4.6.0", - "@wordpress/viewport": "^6.6.0", - "@wordpress/warning": "^3.6.0", - "@wordpress/widgets": "^4.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/block-library": "^9.7.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/commands": "^1.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-commands": "^1.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/editor": "^14.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/keyboard-shortcuts": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/plugins": "^7.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/url": "^4.7.0", + "@wordpress/viewport": "^6.7.0", + "@wordpress/warning": "^3.7.0", + "@wordpress/widgets": "^4.7.0", "clsx": "^2.1.1", "memize": "^2.1.0" }, @@ -2734,45 +2736,45 @@ } }, "node_modules/@wordpress/editor": { - "version": "14.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-14.6.0.tgz", - "integrity": "sha512-OkEIvt2mdBnxxqMTO8yw6PqmHQQNhb+Z6mp1bcsFW0J4nNhmC2dAJFFDHc8XGozzvSZ2s/EW8Ki5glPwT/BFSw==", + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-14.7.0.tgz", + "integrity": "sha512-kpDgRAh5FfxmDfyhaVchXRmM5ueQfcYGqyKdXExe1Mt/Anw8IxHcz7/YqtE+L8BakDsS/A7OudlBiLANjrhUVw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/blob": "^4.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/commands": "^1.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/dataviews": "^4.2.0", - "@wordpress/date": "^5.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/dom": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/interface": "^6.6.0", - "@wordpress/keyboard-shortcuts": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", - "@wordpress/media-utils": "^5.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/patterns": "^2.6.0", - "@wordpress/plugins": "^7.6.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/reusable-blocks": "^5.6.0", - "@wordpress/rich-text": "^7.6.0", - "@wordpress/server-side-render": "^5.6.0", - "@wordpress/url": "^4.6.0", - "@wordpress/warning": "^3.6.0", - "@wordpress/wordcount": "^4.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/blob": "^4.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/commands": "^1.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/dataviews": "^4.3.0", + "@wordpress/date": "^5.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/dom": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/interface": "^6.7.0", + "@wordpress/keyboard-shortcuts": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", + "@wordpress/media-utils": "^5.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/patterns": "^2.7.0", + "@wordpress/plugins": "^7.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/reusable-blocks": "^5.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/server-side-render": "^5.7.0", + "@wordpress/url": "^4.7.0", + "@wordpress/warning": "^3.7.0", + "@wordpress/wordcount": "^4.7.0", "change-case": "^4.1.2", "client-zip": "^2.4.5", "clsx": "^2.1.1", @@ -2795,14 +2797,14 @@ } }, "node_modules/@wordpress/element": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.6.0.tgz", - "integrity": "sha512-IvSocvmd0fNus/XZo7K1EU4UD7aOKUdi3Y7pFUW2ljBbL3vuXk3E+6bwYahCjUIlBhpgGuCjemWTdg2Awzfmiw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.7.0.tgz", + "integrity": "sha512-d0kiN8DCNDNoh5P5xLb496amoadvjsSnkyJHmQsw17qP4dHZaSLONiMi9yh3NQlwIu0pcbbn3WI/9ENA79HlFQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", - "@wordpress/escape-html": "^3.6.0", + "@wordpress/escape-html": "^3.7.0", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.3.0", @@ -2814,9 +2816,9 @@ } }, "node_modules/@wordpress/escape-html": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.6.0.tgz", - "integrity": "sha512-NY9As0uJ81TPTogBzD6G/m7L4+sjvkjTEKkNsHLD5aEYxRX+RHlPYPyyd6y4CmlOkttwymbV9eKNP+LrfX5zZQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.7.0.tgz", + "integrity": "sha512-VqLQGNMs1BF6LnS+5eNjpM/sCUQhjn4QOfhDlWdVDi0ZxpZgssPzKhJ1ils/7FC0qF3vrMg8EH5xXxw2xz8A/w==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2826,23 +2828,23 @@ } }, "node_modules/@wordpress/format-library": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-5.5.0.tgz", - "integrity": "sha512-LMu9szPrXOEeZnv7EY/AobxtFdm6Gr82lY6HxMC9KROUByRzrLSgTWHO8IHGpsERT9tO3fO6CaJztO9MxPhU7A==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-5.7.0.tgz", + "integrity": "sha512-ZVJiVa+h7r4BfOYQ/N9zJS8rngw1gFPFSSsOFgeU5DrnB/sshXms8gczOnjYtMCnmJLSggDJNemuQBaB3Kj8Qw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.5.0", - "@wordpress/block-editor": "^14.0.0", - "@wordpress/components": "^28.5.0", - "@wordpress/compose": "^7.5.0", - "@wordpress/data": "^10.5.0", - "@wordpress/element": "^6.5.0", - "@wordpress/html-entities": "^4.5.0", - "@wordpress/i18n": "^5.5.0", - "@wordpress/icons": "^10.5.0", - "@wordpress/private-apis": "^1.5.0", - "@wordpress/rich-text": "^7.5.0", - "@wordpress/url": "^4.5.0" + "@wordpress/a11y": "^4.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/rich-text": "^7.7.0", + "@wordpress/url": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2854,9 +2856,9 @@ } }, "node_modules/@wordpress/hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.6.0.tgz", - "integrity": "sha512-FWJhubBXeyRhx12YUmxT9pNoV9Azvx8nkynhduV+RNgA+F2SXoOf15pr+USPV//m3Bx031GN/wPHjgUCbC6+XA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.7.0.tgz", + "integrity": "sha512-EGHMsNCt+PyStm3o1JWujaTA+HKcTxuEXdSHBBFDavzsgOF13bxTf1LpDYgTZJT3K9TSMP983IwfckP5t66pDw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2866,9 +2868,9 @@ } }, "node_modules/@wordpress/html-entities": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-4.6.0.tgz", - "integrity": "sha512-ypTlGwDKw7jpmu9rneErkkq9dFHXzju8SGdEWkVAeqhRS9Ifri9DvmrovASB2c5IPY+Ijwh4YlVkx1yNBRHr5w==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-4.7.0.tgz", + "integrity": "sha512-dVhbaGyQaDFwMoZn5PT+d6amO3VYurVQN/bkUl6h6SeBNOsTY1DqUVzO0rLxFp8Is/4MOms61sFJL7nvWtkxaA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2878,12 +2880,12 @@ } }, "node_modules/@wordpress/i18n": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.6.0.tgz", - "integrity": "sha512-xTpwuRh0owYFlgRHUbUAQIWr8ye3FC0ZsjDIOskJaNkrheAU9ZWKJDcmQmPvi01Udml4g9LUIaffkcRd2kyW2g==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-5.7.0.tgz", + "integrity": "sha512-o1cq1zutE5rMAM//Ra1hRfgHuWNBxFtd7XNk+BuAcILRENMaEoqAoGBmGj9lRtOcqAj+cdoWxFjBIxRa67vIrg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^4.6.0", + "@wordpress/hooks": "^4.7.0", "gettext-parser": "^1.3.1", "memize": "^2.1.0", "sprintf-js": "^1.1.1", @@ -2898,13 +2900,13 @@ } }, "node_modules/@wordpress/icons": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-10.6.0.tgz", - "integrity": "sha512-dy58bQFVee2izXA65Ptar1f8mVhL1hilOJI3BWbLWmxHr9H4VjI0ohjW4ZkAhahBG2yIvKZja/HaFMTs5O/7Xg==", + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-10.7.0.tgz", + "integrity": "sha512-4cvi9ZIaz6IYRcOjVuALtDLPtzgt1zK+E9LskL0PAi3TJhoh746q28wv6ycP+KtJEiI+bsTf2Qu5dmCePGR/jA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^6.6.0", - "@wordpress/primitives": "^4.6.0" + "@wordpress/element": "^6.7.0", + "@wordpress/primitives": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2912,9 +2914,9 @@ } }, "node_modules/@wordpress/interactivity": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-6.6.0.tgz", - "integrity": "sha512-vrkiOvglZuThnELoNBLpl/cTsR2Vnbw6bw4TPmAyMx/AqJ21Z8KpEkHd5kovTG1qL5OQFqwmRNHeE5rCqLzkJA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-6.7.0.tgz", + "integrity": "sha512-DWzcfrZ7JY7nKYeTO4hfwgxAWrI4xq5GuhpWiT70FGLX9Zr78BuxI1Nt3t15gVS6/IJGruUoiBtWTsE/1Z/Qjw==", "dependencies": { "@preact/signals": "^1.2.2", "preact": "^10.19.3" @@ -2925,11 +2927,11 @@ } }, "node_modules/@wordpress/interactivity-router": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-2.6.0.tgz", - "integrity": "sha512-9psGEk/e0sQzbO2zEFg+ykHhCxp0Y1wG7IGNCrlrjJt+LazFGKiCpdkPlnzNayy4Dwo0gNrzUvjCstq4y55VIg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-2.7.0.tgz", + "integrity": "sha512-0Bhxjcnu/mhiwIXk89Da7EaBaRf1/p9mzwGoXoFlblVvD+FdMFg0X1C/9cUW6axg1aT7rm130U4tm4FDwqBSug==", "dependencies": { - "@wordpress/interactivity": "^6.6.0" + "@wordpress/interactivity": "^6.7.0" }, "engines": { "node": ">=18.12.0", @@ -2937,23 +2939,23 @@ } }, "node_modules/@wordpress/interface": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-6.6.0.tgz", - "integrity": "sha512-aiZfp3x0394n9oIIcqxXd2b42coyFe5y1iA5iRv8kWm2CXVagz1GdC2SKW9CZRtRnGuTyHrpi8UrRmg6r4UNnA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-6.7.0.tgz", + "integrity": "sha512-Me6EaNHNPcI9hiX97hYC2f7Y5PnuQ/HN3yo1DB4/+AAW/71Gl9oGKebGujivchl7RJ3a7Ztg/PJYIDFA+B/XEA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/plugins": "^7.6.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/viewport": "^6.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/plugins": "^7.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/viewport": "^6.7.0", "clsx": "^2.1.1" }, "engines": { @@ -2966,9 +2968,9 @@ } }, "node_modules/@wordpress/is-shallow-equal": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-5.6.0.tgz", - "integrity": "sha512-WjxXleJePz9scpTXMTl//mn3AgEBqdHd56pWtaDgz9Ub7O5H8AMNa2BU4VDK8OOQ3iwpAUgqGhaTRK5GjbaeSA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-5.7.0.tgz", + "integrity": "sha512-PW+OEkojwd8pZs7m8m9jVwVhLTA1kxmf01f0R2aC+bGfYvw0mlqcviCQTR6+EpRYpceh2nkDch2mD/LWT8c7ZA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -2978,14 +2980,14 @@ } }, "node_modules/@wordpress/keyboard-shortcuts": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-5.6.0.tgz", - "integrity": "sha512-z2fZOPm3aOjhXDy/d5tE3TbekeYRv9Mc9CeeG1fdhnEGDPjxzOeMHzFKy9dnpaQ0/eRCPlE99w+/XZj/0ErqTQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-5.7.0.tgz", + "integrity": "sha512-9GmYcJ/jX27UM2sR07i/pGo4uQs/ry0F9K86+aMfR9Clq8PU40z0y+K4U2BEOSBJaVeaM2G2AA1XL68jc5DR8g==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/keycodes": "^4.6.0" + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/keycodes": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -2996,12 +2998,12 @@ } }, "node_modules/@wordpress/keycodes": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.6.0.tgz", - "integrity": "sha512-7jmKM1BLyoQPLXFl+3FPaKBrLEe7kUIkBMGS88083SQtXXFcW8sYQt5jd6E1yY6EAnniGveUNrv0C9Lbaipx3w==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-4.7.0.tgz", + "integrity": "sha512-x8I0xjRM8U0RnpFHWN9mA+x3MqjhJNBldiCpb59GTi3BIzPeDPgxbosAsAAgF0pYdDtGyiRkrOZA23NTia63TA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^5.6.0" + "@wordpress/i18n": "^5.7.0" }, "engines": { "node": ">=18.12.0", @@ -3009,15 +3011,15 @@ } }, "node_modules/@wordpress/media-utils": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-5.6.0.tgz", - "integrity": "sha512-E4ZEfvRlCcjDlhaVMY5xVhluQKAPJbLiChznsnja0nLhMrvWfY5v13w48kiuvTh2Ss+QPBD0Fv310sgArbKo6w==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-5.7.0.tgz", + "integrity": "sha512-uWaU/El9f58fdj9gYWqlTvH2m+5MmV2SKl0jsQhJXL+NEBY8KWsXwAWJyNJ6LyAQztoU1evHIB7a07GJp7gksg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/blob": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0" + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/blob": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0" }, "engines": { "node": ">=18.12.0", @@ -3025,13 +3027,13 @@ } }, "node_modules/@wordpress/notices": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-5.6.0.tgz", - "integrity": "sha512-hQyo1iFxJYQGPmEH2bFsLRMONfwqOqt/ViL7dt5US3+klM7fMY5sK6lIB/JIhIHFgc8wUxJNLIYn1gVO+Yvfkw==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-5.7.0.tgz", + "integrity": "sha512-QF7PT36YHPgbk1xmHHAwn4absKzWy32zdZB/PybK7XktvsB1m9VK9uS0Jyw7wAdJrOwNkPiBkBTJR2LsUI41tg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/data": "^10.6.0" + "@wordpress/a11y": "^4.7.0", + "@wordpress/data": "^10.7.0" }, "engines": { "node": ">=18.12.0", @@ -3042,25 +3044,25 @@ } }, "node_modules/@wordpress/patterns": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-2.6.0.tgz", - "integrity": "sha512-lPsQe+kgfXiVfA7e4KyZXVz2i9ikawSqNE3JjiRoifGTetxZOt8FBqBoTqCPvex/rv7fRLDGDFvE0ELhBqknbw==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-2.7.0.tgz", + "integrity": "sha512-6aE/+bSsAqffzqWLKReN9o5Szk4zMyNzkCsclSPjNp/hBCY7HYKfqlD6TNqLWKLlHgw+mYmtw5gZho6U3hRO9Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/html-entities": "^4.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/url": "^4.6.0" + "@wordpress/a11y": "^4.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/html-entities": "^4.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/url": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -3072,17 +3074,17 @@ } }, "node_modules/@wordpress/plugins": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-7.6.0.tgz", - "integrity": "sha512-dZWh5s6KUMN0Z39+o6bmjpISMcXRblLwU4aHyrPAj3hB/fPugkEC/9EcQ8BpaFFvyTX5YN8x0dTQPvLatDNTwg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-7.7.0.tgz", + "integrity": "sha512-7nKJP7vUrx6RXfCGvrh1qXyQ4Eu6qKlPeyfUqNGDncozUSUAhqf+6UaA27XDIo0/3eY1QLuciMHOvkqhfC5ORg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/hooks": "^4.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/is-shallow-equal": "^5.6.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/hooks": "^4.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/is-shallow-equal": "^5.7.0", "memize": "^2.0.1" }, "engines": { @@ -3095,20 +3097,20 @@ } }, "node_modules/@wordpress/preferences": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-4.6.0.tgz", - "integrity": "sha512-xsG049ADLBIR2faW3TopcQyiyC9/JvbqACDNUkjMLJBNYITjopL3kStKc5vHgTvvTx1gO+6bZdz+TSwsieMopg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-4.7.0.tgz", + "integrity": "sha512-zbzmim/kqWjuBusZjkm5sruugX88TzbadpuNmYklMvsd3jNXpbyPXWfzGcdj/Cl2v6sC1Gbt88tkfif73iPHsQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/private-apis": "^1.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/private-apis": "^1.7.0", "clsx": "^2.1.1" }, "engines": { @@ -3134,12 +3136,12 @@ } }, "node_modules/@wordpress/primitives": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-4.6.0.tgz", - "integrity": "sha512-uu4ANmgwslB2YOyIBQDSwKTQXXqGDL9Gz5INe+UeJZBMt2uU/TGEjKcZ63dqbuM8mqlPAcdVGL52RCt7mIKEhQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-4.7.0.tgz", + "integrity": "sha512-PcAAIMT8+WqKB2HAeQlLmrcQyzyhNw9IeToJoxz+VKcc/7uLfGHplsDvtHY/X4jH8QlwlVwHSiqW/McTcxoUvQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^6.6.0", + "@wordpress/element": "^6.7.0", "clsx": "^2.1.1" }, "engines": { @@ -3151,9 +3153,9 @@ } }, "node_modules/@wordpress/priority-queue": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-3.6.0.tgz", - "integrity": "sha512-r2cyisWaqDLesIqC8BqWoXyNIxt1lwjvevw5Kijl9zxzxfYBsNQlu7RI1JNYgnjbDQQirWukFgprt7tdzhwssQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-3.7.0.tgz", + "integrity": "sha512-WgKOhaQdaEeOxRLL49cp2YKfsZyUsR1qHoLid64Jux9FjFqLT8t52UTYJ796AhU4W0ifxf3R1SkNpW5zslxKOg==", "dependencies": { "@babel/runtime": "^7.16.0", "requestidlecallback": "^0.3.0" @@ -3164,9 +3166,9 @@ } }, "node_modules/@wordpress/private-apis": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-1.6.0.tgz", - "integrity": "sha512-gQ978Fh3QbwzcWLkljYYyqMIbj1zNK/4tjt6zwzjzCxwwh2qcChDVfVt358wjKJ5sGdhYKIbqP8NzQQV9Un0Iw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-1.7.0.tgz", + "integrity": "sha512-H6bbWZRL7u2awmK14ZCz7OupeIjz1HxSlB785X53k9JZ5KsbSK/FCzAvOJ5vCU9poC1fa6IT33qkgx3JNX3JEA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -3176,9 +3178,9 @@ } }, "node_modules/@wordpress/redux-routine": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-5.6.0.tgz", - "integrity": "sha512-CQkO+JZefPJLNBh5iBup2DRCXfUoPfEZeo2mhO91tSbBmrP08v1Pdk6YLsa8gNDXp4qJbFhNHMGCqRzEioMOhA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-5.7.0.tgz", + "integrity": "sha512-KOU1+qFEDrptLY6lOQ3pTR+MZwe35dHfCp8xJHUJa/RI9jKULvXWrEIX0qhEMNWlinyQmwdTfmZqKxP8RuFzag==", "dependencies": { "@babel/runtime": "^7.16.0", "is-plain-object": "^5.0.0", @@ -3194,22 +3196,22 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-5.6.0.tgz", - "integrity": "sha512-n9ZZ4E5XI01zdTgJr7+V8kPRIpdOglJZFykPiUezlG0gYS2phii7a/UKmRLbIp4/xyAFgphPSH47kOi2m5qYlg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-5.7.0.tgz", + "integrity": "sha512-F4CPUtLMKPSDK+OdrJRRBFlA6yBHpfV2tfcrqpo95l06GskIrgr1IQpyLiFnVKZPhO82K5Y/R3NS0xwD2NxuRQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/notices": "^5.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/url": "^4.6.0" + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/notices": "^5.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/url": "^4.7.0" }, "engines": { "node": ">=18.12.0", @@ -3221,19 +3223,19 @@ } }, "node_modules/@wordpress/rich-text": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-7.6.0.tgz", - "integrity": "sha512-XxlfrlwfCPX7f3u9DMinouYNM9PDBMeGZb4MlK2Fbrc8ympaTZOdH4U74VR3jgv0Eusx6vxFEA5JVVXpW/xS2w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-7.7.0.tgz", + "integrity": "sha512-is96sOolYVeE/58jUr6GxZKY1XGWrF988lT8FUg7U4u0KgdDSIEPLacs4USE8OoqxZYCIAnwSPenMXN+ZPvOfw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^4.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/escape-html": "^3.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/keycodes": "^4.6.0", + "@wordpress/a11y": "^4.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/escape-html": "^3.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/keycodes": "^4.7.0", "memize": "^2.1.0" }, "engines": { @@ -3245,14 +3247,14 @@ } }, "node_modules/@wordpress/router": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-1.6.0.tgz", - "integrity": "sha512-vmCMFYkrOkIeAhPOqVdtP1h1X7/sHGM8YGxE5+2rltxIKB8V3qsJ5atFVQuV/3PSAD4MxGw2qdN5elZEWtmROg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-1.7.0.tgz", + "integrity": "sha512-L6pdArDAau+PUXM9/F8OaYY6COXUWS5UaTrk2aGCqZPq1/g2WgF3qMVVwAn5I4Cx8l2knQ0px3TbxMpjDe9aFg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^6.6.0", - "@wordpress/private-apis": "^1.6.0", - "@wordpress/url": "^4.6.0", + "@wordpress/element": "^6.7.0", + "@wordpress/private-apis": "^1.7.0", + "@wordpress/url": "^4.7.0", "history": "^5.3.0" }, "engines": { @@ -3264,20 +3266,20 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-5.6.0.tgz", - "integrity": "sha512-HpPwjsEpQoDAIS0IvlWSi6nT9yYn2FUmLJZnY24bgcAaiy/MkxCAHtEjypI1ZGb9+5Eyq2uIHsUsgrpFEhsbUQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-5.7.0.tgz", + "integrity": "sha512-VXBluHj/WICCx4OcjZrcrBg+YxXbah1YL4n2yLWhDMENAL0p4Ne67EqrQjCGbIfpGUpNDCQhIXXzSJ3gNiuCMg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/deprecated": "^4.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/url": "^4.6.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/deprecated": "^4.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/url": "^4.7.0", "fast-deep-equal": "^3.1.3" }, "engines": { @@ -3290,9 +3292,9 @@ } }, "node_modules/@wordpress/shortcode": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-4.6.0.tgz", - "integrity": "sha512-tiaLByZbcpvsIJ7uK9RdRgCNHQp2w03DYihZEW82Pg0hnKqkIsgO3GcDkZdoItooeNjnT+vFN9R4TFm6qFCmGA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-4.7.0.tgz", + "integrity": "sha512-sgIc7wnkpjGSrYulZn4++LRuj8xH0yDkWguBLeIDrOWHPgyDfqaW8wIZ0WGuQCPb8L9bKXdzkfVfiuVy4JvDNg==", "dependencies": { "@babel/runtime": "^7.16.0", "memize": "^2.0.1" @@ -3303,9 +3305,9 @@ } }, "node_modules/@wordpress/style-engine": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-2.6.0.tgz", - "integrity": "sha512-tFzMGTmWcHacvoLEhxcFnYobC6maotZHMxDsZpse6Bo/PLbxo2JbYBq2QTqMtfxtfTQ8b/PzY/y9eArmPYhRmw==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-2.7.0.tgz", + "integrity": "sha512-ISIUzoTxzMZQLY7dzwPlWaKG8mh5ZUBTALxyNlglHVlxoNyQ1e/Yw1duZySxSvnfdfVeKRw33iJO0iQQCxinsA==", "dependencies": { "@babel/runtime": "^7.16.0", "change-case": "^4.1.2" @@ -3316,13 +3318,13 @@ } }, "node_modules/@wordpress/sync": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-1.6.0.tgz", - "integrity": "sha512-iltTytPtrNd02M9xZbCq/M8cJ8oOQKtKJsYva+Au0pE22Yfg6olnL7WXF80jw8flC+ugaJGJlxqecxJ3fTvcDw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-1.7.0.tgz", + "integrity": "sha512-PhMezrdiMVTeEmi8f1z3MbCAuixBi8wXoTzQUe9wmsD+clM9uvw839KpNym/5ZMC5suADwa1TSGylLf/l3AZtQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/simple-peer": "^9.11.5", - "@wordpress/url": "^4.6.0", + "@wordpress/url": "^4.7.0", "import-locals": "^2.0.0", "lib0": "^0.2.42", "simple-peer": "^9.11.0", @@ -3337,9 +3339,9 @@ } }, "node_modules/@wordpress/token-list": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-3.6.0.tgz", - "integrity": "sha512-Tj+0blLAZRRE/F1ON6gnT3OHBYSmARnD4uQaW3BlyP0ghVofOSQp0wlwNTDOqsRga4mcCrgNlkhcHXVpjbGpvg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-3.7.0.tgz", + "integrity": "sha512-joJ/J3NjzVIXN0PDV+BayyVm4ZNP1XInUI4XDuP1zNb++OEqcuX9OBa4cqNgzyNImRTZStjD/fPKs28BTrG87g==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -3349,12 +3351,12 @@ } }, "node_modules/@wordpress/undo-manager": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-1.6.0.tgz", - "integrity": "sha512-Sl2rG/7t5zTQOgp+jOPn5m27sKd1DJIX/EGhM6LtRcjXZqa0rLDJXal1xWfkZk5oghaqW1TAwXJsg9UdAlh7Nw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-1.7.0.tgz", + "integrity": "sha512-FHkwMD/jbe5jhVXfD9bSNhEivhMeszm20/ymEP6vAsLVJB2K25iAMOGvsq5jtznyJiqQzNUmvPERN0IKnaHQnA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/is-shallow-equal": "^5.6.0" + "@wordpress/is-shallow-equal": "^5.7.0" }, "engines": { "node": ">=18.12.0", @@ -3362,9 +3364,9 @@ } }, "node_modules/@wordpress/url": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.6.0.tgz", - "integrity": "sha512-83RS6lXZ45peBzG3oPKBKU5O4o3jZd7b2oN6rwQGJMILgZl6RCrYFKxpRJ1dh+Cd9744D3PGadsyjLMFpveURA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-4.7.0.tgz", + "integrity": "sha512-c9L3L4+YrygKtf5S7DKFP1wNbFvqPLp8Uub4VgPKWmlZnIB2hsRNXELba5qGHpPmzTg82KwXImRAuHSMrfr+LA==", "dependencies": { "@babel/runtime": "^7.16.0", "remove-accents": "^0.5.0" @@ -3375,14 +3377,14 @@ } }, "node_modules/@wordpress/viewport": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-6.6.0.tgz", - "integrity": "sha512-68UxtozzjegflMcD/tgl47NF+xizLHPXjTh7QsaHwZ8M/Hl4iIqeiH7zZvsQOCwI8jROOZRNNStsgvutLzbFTQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-6.7.0.tgz", + "integrity": "sha512-T05rktsX+xOgTekKKRIAwuK+FdtmOMQVfbkxtGW2RtfwBWc161ZdgXT0C3x+LWwzhocYg2ymwkM9Mm8/MBhgFw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0" + "@wordpress/compose": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0" }, "engines": { "node": ">=18.12.0", @@ -3393,31 +3395,31 @@ } }, "node_modules/@wordpress/warning": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.6.0.tgz", - "integrity": "sha512-pm57z1LZkzfQsXsji6yxcP0XSymKbvP087vJLlMkmLf+MoNVyTD6UvFpXl8hRSH6C6pySoJSgGFXaH81CRuO2Q==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.7.0.tgz", + "integrity": "sha512-wGbQfPlf8YV6gGhcGPYWUhHORct4xaBQSaDTJrwzlgHYyrrJUVXXgZxaM4+Aa23zQoA13nvFQHvfssOkwdh65g==", "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" } }, "node_modules/@wordpress/widgets": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-4.6.0.tgz", - "integrity": "sha512-qc0E8WAZGD/L3T8NAOApj27X7ICaM/4FeLKqiPzUDe2gh8vqTAx6an/C9Yy3JyExQaM+XzIg98Em1xQdICEeMw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-4.7.0.tgz", + "integrity": "sha512-Ycw/2QOqg7KlbIePVys8TM5IBN25QJPC8mJXP4fzC4djV0liIZEsjlQ/1nPR5MVKYwBZPe7B/KTtq6VSYft5TQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^7.6.0", - "@wordpress/block-editor": "^14.1.0", - "@wordpress/blocks": "^13.6.0", - "@wordpress/components": "^28.6.0", - "@wordpress/compose": "^7.6.0", - "@wordpress/core-data": "^7.6.0", - "@wordpress/data": "^10.6.0", - "@wordpress/element": "^6.6.0", - "@wordpress/i18n": "^5.6.0", - "@wordpress/icons": "^10.6.0", - "@wordpress/notices": "^5.6.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/blocks": "^13.7.0", + "@wordpress/components": "^28.7.0", + "@wordpress/compose": "^7.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/data": "^10.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/i18n": "^5.7.0", + "@wordpress/icons": "^10.7.0", + "@wordpress/notices": "^5.7.0", "clsx": "^2.1.1" }, "engines": { @@ -3430,9 +3432,9 @@ } }, "node_modules/@wordpress/wordcount": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-4.6.0.tgz", - "integrity": "sha512-LI5vNOsyPaJ5rHVb7BWnZco3BNrAGJPjVnOl8hls65P7aglTI+X4IKBfIUkbiyX7f7peVRiWJMoYafDuI4xphQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-4.7.0.tgz", + "integrity": "sha512-NcxUhnkvdybK7V2c0w7A/SAiDByTrE/jbTxGwIHa3gh1YOofhwfFH9wGxFQp1ZUpoE9HZY6eS4HCScoWsEXJ0Q==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6422,6 +6424,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parsel-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/parsel-js/-/parsel-js-1.1.2.tgz", + "integrity": "sha512-D66DG2nKx4Yoq66TMEyCUHlR2STGqO7vsBrX7tgyS9cfQyO6XD5JyzOiflwmWN6a4wbUAqpmHqmrxlTQVGZcbA==" + }, "node_modules/pascal-case": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", @@ -6526,12 +6533,12 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-prefixwrap": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/postcss-prefixwrap/-/postcss-prefixwrap-1.51.0.tgz", - "integrity": "sha512-PuP4md5zFSY921dUcLShwSLv2YyyDec0dK9/puXl/lu7ZNvJ1U59+ZEFRMS67xwfNg5nIIlPXnAycPJlhA/Isw==", + "node_modules/postcss-prefix-selector": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/postcss-prefix-selector/-/postcss-prefix-selector-1.16.1.tgz", + "integrity": "sha512-Umxu+FvKMwlY6TyDzGFoSUnzW+NOfMBLyC1tAkIjgX+Z/qGspJeRjVC903D7mx7TuBpJlwti2ibXtWuA7fKMeQ==", "peerDependencies": { - "postcss": "*" + "postcss": ">4 <9" } }, "node_modules/postcss-urlrebase": { @@ -6551,9 +6558,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/preact": { - "version": "10.23.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.23.2.tgz", - "integrity": "sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==", + "version": "10.24.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.0.tgz", + "integrity": "sha512-aK8Cf+jkfyuZ0ZZRG9FbYqwmEiGQ4y/PUO4SuTWoyWL244nZZh7bd5h2APd4rSNDYTBNghg1L+5iJN3Skxtbsw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -8285,9 +8292,9 @@ } }, "node_modules/yjs": { - "version": "13.6.18", - "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.18.tgz", - "integrity": "sha512-GBTjO4QCmv2HFKFkYIJl7U77hIB1o22vSCSQD1Ge8ZxWbIbn8AltI4gyXbtL+g5/GJep67HCMq3Y5AmNwDSyEg==", + "version": "13.6.19", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.19.tgz", + "integrity": "sha512-GNKw4mEUn5yWU2QPHRx8jppxmCm9KzbBhB4qJLUJFiiYD0g/tDVgXQ7aPkyh01YO28kbs2J/BEbWBagjuWyejw==", "dependencies": { "lib0": "^0.2.86" }, diff --git a/ReactApp/package.json b/ReactApp/package.json index 49e8b123..7654029b 100644 --- a/ReactApp/package.json +++ b/ReactApp/package.json @@ -14,16 +14,16 @@ }, "dependencies": { "@monaco-editor/react": "^4.6.0", - "@wordpress/api-fetch": "^7.4.0", - "@wordpress/block-editor": "^14.0.0", - "@wordpress/block-library": "^9.5.0", - "@wordpress/core-data": "^7.5.0", - "@wordpress/edit-post": "^8.6.1", - "@wordpress/editor": "^14.5.0", - "@wordpress/element": "^6.5.0", - "@wordpress/format-library": "^5.5.0", - "@wordpress/preferences": "^4.6.0", - "@wordpress/private-apis": "^1.6.0", + "@wordpress/api-fetch": "^7.7.0", + "@wordpress/block-editor": "^14.2.0", + "@wordpress/block-library": "^9.7.0", + "@wordpress/core-data": "^7.7.0", + "@wordpress/edit-post": "^8.7.0", + "@wordpress/editor": "^14.7.0", + "@wordpress/element": "^6.7.0", + "@wordpress/format-library": "^5.7.0", + "@wordpress/preferences": "^4.7.0", + "@wordpress/private-apis": "^1.7.0", "react": "^18.3.1" }, "devDependencies": { From 31c740f88c759b874358d9f8357ffc64573cafe3 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 16 Sep 2024 16:40:07 +0200 Subject: [PATCH 2/8] API Fetch - Disable calls to post and pages --- ReactApp/src/misc/api-fetch-setup.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ReactApp/src/misc/api-fetch-setup.js b/ReactApp/src/misc/api-fetch-setup.js index 47d44e23..ded66d1f 100644 --- a/ReactApp/src/misc/api-fetch-setup.js +++ b/ReactApp/src/misc/api-fetch-setup.js @@ -21,6 +21,7 @@ export function initializeApiFetch() { apiFetch.use(corsMiddleware); apiFetch.use(apiPathModifierMiddleware); apiFetch.use(createHeadersMiddleware(authHeader)); + apiFetch.use(filterEndpointsMiddleware); // Preload some endpoints to return data needed for some components // Like PostTitle. @@ -125,3 +126,18 @@ function createHeadersMiddleware(authHeader) { return next(options); }; } + +function filterEndpointsMiddleware(options, next) { + const disabledEndpoints = [ + /^\/wp\/v2\/posts\/-?\d+/, // Matches /wp/v2/posts/{ID} + /^\/wp\/v2\/pages\/-?\d+/, // Matches /wp/v2/pages/{ID} + ]; + const isDisabled = disabledEndpoints.some((pattern) => + pattern.test(options.path) + ); + + if (isDisabled) { + return Promise.resolve([]); + } + return next(options); +} From 3c33be910c7341dbde575345003531bb6f407a0a Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 16 Sep 2024 16:40:22 +0200 Subject: [PATCH 3/8] Set a placeholder post ID for empty posts --- ReactApp/src/misc/store.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactApp/src/misc/store.js b/ReactApp/src/misc/store.js index 868c05b9..3aab2d75 100644 --- a/ReactApp/src/misc/store.js +++ b/ReactApp/src/misc/store.js @@ -29,8 +29,11 @@ export function getPost() { }; } + // Since we don't use the auto-save functionality, draft posts need to have an ID. + // We assign a temporary ID of -1. return { type: 'post', status: 'draft', + id: -1, }; } From be0b76c4f4efbd332618860ed08e6aaac80b7594 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 16 Sep 2024 16:40:54 +0200 Subject: [PATCH 4/8] Use ExperimentalEditorProvider --- ReactApp/src/components/Editor.jsx | 120 +++++++++++++---------------- 1 file changed, 53 insertions(+), 67 deletions(-) diff --git a/ReactApp/src/components/Editor.jsx b/ReactApp/src/components/Editor.jsx index 5ad2596e..5dd0009c 100644 --- a/ReactApp/src/components/Editor.jsx +++ b/ReactApp/src/components/Editor.jsx @@ -2,7 +2,7 @@ /** * WordPress dependencies */ -import { useEffect, useRef, useState } from '@wordpress/element'; +import { useEffect, useRef, useState, useMemo } from '@wordpress/element'; import { BlockList, privateApis as blockEditorPrivateApis, @@ -16,10 +16,10 @@ import { mediaUpload, EditorSnackbars, PostTitle, - privateApis as editorPrivateApis, } from '@wordpress/editor'; +import { ExperimentalEditorProvider } from '@wordpress/editor/src/components/provider'; import { useDispatch, useSelect } from '@wordpress/data'; -import { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data'; +import { store as coreStore } from '@wordpress/core-data'; // Default styles that are needed for the editor. import '@wordpress/components/build-style/style.css'; @@ -39,7 +39,7 @@ import '@wordpress/format-library/build-style/style.css'; // Internal imports import EditorToolbar from './EditorToolbar'; -import { editorLoaded, onBlocksChanged } from '../misc/Helpers'; +import { editorLoaded } from '../misc/Helpers'; import { postTypeEntities } from '../misc/post-type-entities'; import { useEditorStyles } from './hooks/use-editor-styles'; import { unlock } from './lock-unlock'; @@ -48,25 +48,19 @@ import { unlock } from './lock-unlock'; // Current editor (assumes can be only one instance). let editor = {}; -const { useBlockEditorSettings } = unlock(editorPrivateApis); -const { - ExperimentalBlockEditorProvider: BlockEditorProvider, - ExperimentalBlockCanvas: BlockCanvas, -} = unlock(blockEditorPrivateApis); +const { ExperimentalBlockCanvas: BlockCanvas } = unlock(blockEditorPrivateApis); function Editor({ post }) { const [blocks, setBlocks] = useState([]); - const [registeredBlocks] = useState([]); const [_isCodeEditorEnabled, setCodeEditorEnabled] = useState(false); const titleRef = useRef(); const { addEntities, receiveEntityRecords } = useDispatch(coreStore); - const { setupEditor } = useDispatch(editorStore); useEffect(() => { window.editor = editor; + addEntities(postTypeEntities); receiveEntityRecords('postType', post.type, post); - setupEditor(post, {}); registerCoreBlocks(); editorLoaded(); @@ -82,32 +76,35 @@ function Editor({ post }) { const { blockPatterns, + currentPost, editorSettings, + hasLoadedPost, hasUploadPermissions, - isEditorReady, reusableBlocks, } = useSelect((select) => { - const { getEntityRecord, getEntityRecords } = select(coreStore); - const { __unstableIsEditorReady, getEditorSettings } = - select(editorStore); + const { getEntityRecord, getEntityRecords, hasFinishedResolution } = + select(coreStore); + const { getEditorSettings } = select(editorStore); const user = getEntityRecord('root', 'user', post.author); - const isEditorReady = post?.id ? __unstableIsEditorReady() : true; + const currentPost = getEntityRecord('postType', post.type, post.id); + const hasLoadedPost = post?.id + ? hasFinishedResolution('getEntityRecord', [ + 'postType', + post.type, + post.id, + ]) + : true; return { - isEditorReady: isEditorReady, blockPatterns: select(coreStore).getBlockPatterns(), + currentPost, editorSettings: getEditorSettings(), + hasLoadedPost, hasUploadPermissions: user?.capabilities?.upload_files ?? true, reusableBlocks: getEntityRecords('postType', 'wp_block'), }; }, []); - const [postBlocks, onInput, onChange] = useEntityBlockEditor( - 'postType', - post.type, - { id: post.id } - ); - // eslint-disable-next-line no-unused-vars function didChangeBlocks(blocks) { // setBlocks(blocks); @@ -119,16 +116,6 @@ function Editor({ post }) { // onBlocksChanged(isEmpty); } - function onBlockEditorInput(blocks, options) { - onInput(blocks, options); - didChangeBlocks(blocks); - } - - function onBlockEditorChange(blocks, options) { - onChange(blocks, options); - didChangeBlocks(blocks); - } - editor.setContent = (content) => { setBlocks(parse(content)); }; @@ -143,21 +130,17 @@ function Editor({ post }) { editor.setCodeEditorEnabled = (enabled) => setCodeEditorEnabled(enabled); - const blockEditorSettings = useBlockEditorSettings( - editorSettings, - post.type, - post.id, - 'visual' + const settings = useMemo( + () => ({ + ...editorSettings, + hasFixedToolbar: true, + mediaUpload: hasUploadPermissions ? mediaUpload : undefined, + __experimentalReusableBlocks: reusableBlocks, + __experimentalBlockPatterns: blockPatterns, + }), + [blockPatterns, editorSettings, hasUploadPermissions, reusableBlocks] ); - const settings = { - ...blockEditorSettings, - hasFixedToolbar: true, - mediaUpload: hasUploadPermissions ? mediaUpload : undefined, - __experimentalReusableBlocks: reusableBlocks, - __experimentalBlockPatterns: blockPatterns, - }; - const styles = useEditorStyles(); // if (isCodeEditorEnabled) { @@ -165,26 +148,29 @@ function Editor({ post }) { // } return ( -
- - -
- {isEditorReady && } -
- -
- {isEditorReady && } - - - -
-
+ hasLoadedPost && ( +
+ + +
+ +
+ +
+ + + + +
+
+ ) ); } From d2113813fc17b5347b7f884ebac956d4e1d8fdc1 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Tue, 17 Sep 2024 12:42:02 +0200 Subject: [PATCH 5/8] Use editor provider instead of experimental --- ReactApp/src/components/Editor.jsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ReactApp/src/components/Editor.jsx b/ReactApp/src/components/Editor.jsx index 5dd0009c..20579e35 100644 --- a/ReactApp/src/components/Editor.jsx +++ b/ReactApp/src/components/Editor.jsx @@ -14,10 +14,10 @@ import { parse, serialize } from '@wordpress/blocks'; import { store as editorStore, mediaUpload, + EditorProvider, EditorSnackbars, PostTitle, } from '@wordpress/editor'; -import { ExperimentalEditorProvider } from '@wordpress/editor/src/components/provider'; import { useDispatch, useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; @@ -150,10 +150,7 @@ function Editor({ post }) { return ( hasLoadedPost && (
- + - +
) ); From e4ad0e42ca4a8cef180c660b88814a38fe57d5e2 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Tue, 17 Sep 2024 12:45:47 +0200 Subject: [PATCH 6/8] Update git ignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9daee56e..ac636769 100644 --- a/.gitignore +++ b/.gitignore @@ -184,6 +184,3 @@ local.properties /Demo-Android/app/src/main/assets/assets /Demo-Android/app/src/main/assets/index.html - -/Sources/GutenbergKit/Gutenberg/assets -/Sources/GutenbergKit/Gutenberg/index.html From 78dfc224b721e4318297d966c5ff591546b4a5ca Mon Sep 17 00:00:00 2001 From: Gerardo Date: Tue, 17 Sep 2024 13:05:24 +0200 Subject: [PATCH 7/8] Update git ignore --- .gitignore | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ac636769..6b38fc66 100644 --- a/.gitignore +++ b/.gitignore @@ -41,13 +41,6 @@ playground.xcworkspace .build/ .swiftpm -## Production Build Products -/Demo-Android/Gutenberg/src/main/assets/assets -/Demo-Android/Gutenberg/src/main/assets/index.html - -/Sources/GutenbergKit/Gutenberg/assets -/Sources/GutenbergKit/Gutenberg/index.html - # Logs logs *.log @@ -182,5 +175,12 @@ local.properties /Demo-Android/.gradle /Demo-Android/.idea -/Demo-Android/app/src/main/assets/assets -/Demo-Android/app/src/main/assets/index.html +## Production Build Products +/Demo-Android/Gutenberg/src/main/assets/assets +/Demo-Android/Gutenberg/src/main/assets/index.html +/Demo-Android/Gutenberg/src/main/assets/remote.html + +# Disabled removing these files until this is published like Android in CI. +# /Sources/GutenbergKit/Gutenberg/assets +# /Sources/GutenbergKit/Gutenberg/index.html +# /Sources/GutenbergKit/Gutenberg/remote.html From 0084b0bfd310c3bc35ed34cf43bc12cbb7db2af5 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Tue, 17 Sep 2024 13:05:52 +0200 Subject: [PATCH 8/8] Update assets --- .../src/main/assets/assets/App-DlPuex2F.js | 1 - .../src/main/assets/assets/index-CVq60r9G.js | 738 ------------------ .../src/main/assets/assets/index-I3FIDKHe.css | 1 - .../src/main/assets/assets/remote-2P_6Wd9h.js | 1 - .../Gutenberg/src/main/assets/index.html | 16 - .../Gutenberg/src/main/assets/remote.html | 16 - .../Gutenberg/assets/App-DlPuex2F.js | 1 - .../Gutenberg/assets/App-Ds6ZXfFz.js | 1 + .../{index-CVq60r9G.js => index-B34yLcjp.js} | 392 +++++----- .../Gutenberg/assets/index-I3FIDKHe.css | 1 - .../Gutenberg/assets/index-aD9ouL0e.css | 1 + ...{remote-2P_6Wd9h.js => remote-DepgMeXI.js} | 2 +- Sources/GutenbergKit/Gutenberg/index.html | 4 +- Sources/GutenbergKit/Gutenberg/remote.html | 2 +- 14 files changed, 205 insertions(+), 972 deletions(-) delete mode 100644 Demo-Android/Gutenberg/src/main/assets/assets/App-DlPuex2F.js delete mode 100644 Demo-Android/Gutenberg/src/main/assets/assets/index-CVq60r9G.js delete mode 100644 Demo-Android/Gutenberg/src/main/assets/assets/index-I3FIDKHe.css delete mode 100644 Demo-Android/Gutenberg/src/main/assets/assets/remote-2P_6Wd9h.js delete mode 100644 Demo-Android/Gutenberg/src/main/assets/index.html delete mode 100644 Demo-Android/Gutenberg/src/main/assets/remote.html delete mode 100644 Sources/GutenbergKit/Gutenberg/assets/App-DlPuex2F.js create mode 100644 Sources/GutenbergKit/Gutenberg/assets/App-Ds6ZXfFz.js rename Sources/GutenbergKit/Gutenberg/assets/{index-CVq60r9G.js => index-B34yLcjp.js} (50%) delete mode 100644 Sources/GutenbergKit/Gutenberg/assets/index-I3FIDKHe.css create mode 100644 Sources/GutenbergKit/Gutenberg/assets/index-aD9ouL0e.css rename Sources/GutenbergKit/Gutenberg/assets/{remote-2P_6Wd9h.js => remote-DepgMeXI.js} (72%) diff --git a/Demo-Android/Gutenberg/src/main/assets/assets/App-DlPuex2F.js b/Demo-Android/Gutenberg/src/main/assets/assets/App-DlPuex2F.js deleted file mode 100644 index 94be7814..00000000 --- a/Demo-Android/Gutenberg/src/main/assets/assets/App-DlPuex2F.js +++ /dev/null @@ -1 +0,0 @@ -const{SVG:M,Path:X}=window.wp.primitives,{jsx:m}=window.ReactJSXRuntime,V=m(M,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:m(X,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),{SVG:z,Path:O}=window.wp.primitives,{jsx:E}=window.ReactJSXRuntime,H=E(z,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:E(O,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),{Fragment:h,jsx:n,jsxs:w}=window.ReactJSXRuntime,{useState:W}=window.wp.element,{BlockInspector:Z,BlockToolbar:q,Inserter:K,store:Q}=window.wp.blockEditor,{useSelect:Y}=window.wp.data,{Button:ee,Popover:te,ToolbarButton:oe}=window.wp.components,{__:se}=window.wp.i18n,ne=()=>{const[e,o]=W(!1),{isSelected:s}=Y(c=>{const{getSelectedBlockClientId:b}=c(Q);return{isSelected:b()!==null}});function a(){o(!0)}function d(){o(!1)}return w(h,{children:[w("div",{className:"gbkit gbkit-editor-toolbar",children:[n(K,{}),s&&n("div",{className:"gbkit-editor-toolbar_toolbar-group",children:n(oe,{title:se("Open Settings"),icon:H,onClick:a,className:"gbkit-editor-toolbar_settings_icon"})}),n(q,{})]}),e&&n(te,{className:"block-settings-menu",variant:"unstyled",placement:"overlay",children:w(h,{children:[n("div",{className:"block-settings-menu__header",children:n(ee,{className:"block-settings-menu__close",icon:V,onClick:d})}),n(Z,{})]})})]})};function ie(){window.editorDelegate&&window.editorDelegate.onEditorLoaded(),window.webkit&&window.webkit.messageHandlers.editorDelegate.postMessage({message:"onEditorLoaded",body:{}})}[{name:"post",baseURL:"/wp/v2/posts"},{name:"page",baseURL:"/wp/v2/pages"},{name:"attachment",baseURL:"/wp/v2/media"},{name:"wp_block",baseURL:"/wp/v2/blocks"}].map(e=>({kind:"postType",...e,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:["title","excerpt","content"]}));const{__dangerousOptInToUnstableAPIsOnlyForCoreModules:re}=window.wp.privateApis,{lock:$e,unlock:k}=re("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),{store:le}=window.wp.editor,{useSelect:ae}=window.wp.data,{privateApis:de}=window.wp.blockEditor,{store:ce}=window.wp.editPost,{useMemo:we}=window.wp.element,{getLayoutStyles:pe}=k(de);function ue(){const{hasThemeStyleSupport:e,editorSettings:o}=ae(s=>({hasThemeStyleSupport:s(ce).isFeatureActive("themeStyles"),editorSettings:s(le).getEditorSettings()}),[]);return we(()=>{const s=[...o?.defaultEditorStyles??[]];return!o.disableLayoutStyles&&!e&&s.push({css:pe({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})}),e?o.styles??[]:s},[o.defaultEditorStyles,o.disableLayoutStyles,o.styles,e])}const{jsx:r,jsxs:y}=window.ReactJSXRuntime,{useEffect:ke,useRef:be,useState:p}=window.wp.element,{BlockList:ge,privateApis:Se}=window.wp.blockEditor,{Popover:me}=window.wp.components,{getBlockTypes:Ee,unregisterBlockType:he}=window.wp.blocks,{registerCoreBlocks:ye}=window.wp.blockLibrary,{parse:v,serialize:f}=window.wp.blocks,{store:B,mediaUpload:ve,EditorSnackbars:fe,PostTitle:Be,privateApis:Re}=window.wp.editor,{useDispatch:R,useSelect:_e}=window.wp.data,{store:u,useEntityBlockEditor:xe}=window.wp.coreData;let l={};const{useBlockEditorSettings:Pe}=k(Re),{ExperimentalBlockEditorProvider:Ce,ExperimentalBlockCanvas:Ie}=k(Se);function Le({post:e}){const[o,s]=p([]);p([]);const[a,d]=p(!1),c=be(),{addEntities:b,receiveEntityRecords:g}=R(u),{setupEditor:_}=R(B);ke(()=>(window.editor=l,g("postType",e.type,e),_(e,{}),ye(),ie(),()=>{window.editor={},Ee().forEach(t=>{he(t.name)})}),[]);const{blockPatterns:x,editorSettings:P,hasUploadPermissions:C,isEditorReady:S,reusableBlocks:I}=_e(t=>{const{getEntityRecord:i,getEntityRecords:G}=t(u),{__unstableIsEditorReady:D,getEditorSettings:F}=t(B),J=i("root","user",e.author);return{isEditorReady:e?.id?D():!0,blockPatterns:t(u).getBlockPatterns(),editorSettings:F(),hasUploadPermissions:J?.capabilities?.upload_files??!0,reusableBlocks:G("postType","wp_block")}},[]),[L,T,j]=xe("postType",e.type,{id:e.id});function A(t,i){T(t,i)}function $(t,i){j(t,i)}l.setContent=t=>{s(v(t))},l.setInitialContent=t=>{const i=v(t);return f(i)},l.getContent=()=>f(o),l.setCodeEditorEnabled=t=>d(t);const U={...Pe(P,e.type,e.id,"visual"),hasFixedToolbar:!0,mediaUpload:C?ve:void 0,__experimentalReusableBlocks:I,__experimentalBlockPatterns:x},N=ue();return r("div",{className:"editor__container",children:y(Ce,{value:L,onInput:A,onChange:$,settings:U,useSubRegistry:!1,children:[y(Ie,{shouldIframe:!1,height:"auto",styles:N,children:[r("div",{className:"editor-visual-editor__post-title-wrapper",children:S&&r(Be,{ref:c})}),r(ge,{})]}),S&&r(ne,{}),r(me.Slot,{}),r(fe,{})]})})}const{jsx:Te}=window.ReactJSXRuntime;function Ue(e){return Te(Le,{...e})}export{Ue as default}; diff --git a/Demo-Android/Gutenberg/src/main/assets/assets/index-CVq60r9G.js b/Demo-Android/Gutenberg/src/main/assets/assets/index-CVq60r9G.js deleted file mode 100644 index 5ba04208..00000000 --- a/Demo-Android/Gutenberg/src/main/assets/assets/index-CVq60r9G.js +++ /dev/null @@ -1,738 +0,0 @@ -var a5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20,_4)=>{function c5e(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var c0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function eE(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var HJ={exports:{}},X5={},UJ={exports:{}},d0={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ez=Symbol.for("react.element"),l5e=Symbol.for("react.portal"),u5e=Symbol.for("react.fragment"),d5e=Symbol.for("react.strict_mode"),p5e=Symbol.for("react.profiler"),f5e=Symbol.for("react.provider"),b5e=Symbol.for("react.context"),h5e=Symbol.for("react.forward_ref"),m5e=Symbol.for("react.suspense"),M5e=Symbol.for("react.memo"),g5e=Symbol.for("react.lazy"),vD=Symbol.iterator;function z5e(e){return e===null||typeof e!="object"?null:(e=vD&&e[vD]||e["@@iterator"],typeof e=="function"?e:null)}var XJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GJ=Object.assign,KJ={};function lh(e,t,n){this.props=e,this.context=t,this.refs=KJ,this.updater=n||XJ}lh.prototype.isReactComponent={};lh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function YJ(){}YJ.prototype=lh.prototype;function tE(e,t,n){this.props=e,this.context=t,this.refs=KJ,this.updater=n||XJ}var nE=tE.prototype=new YJ;nE.constructor=tE;GJ(nE,lh.prototype);nE.isPureReactComponent=!0;var xD=Array.isArray,ZJ=Object.prototype.hasOwnProperty,oE={current:null},QJ={key:!0,ref:!0,__self:!0,__source:!0};function JJ(e,t,n){var o,r={},s=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)ZJ.call(t,o)&&!QJ.hasOwnProperty(o)&&(r[o]=t[o]);var c=arguments.length-2;if(c===1)r.children=n;else if(1/g;function Zk(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const M1=(e,t)=>{if(Oi=e,sa=0,lu=[],Gl=[],nee.lastIndex=0,!C5e(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(R5e(t));return z.createElement(z.Fragment,null,...lu)},C5e=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>z.isValidElement(o))};function R5e(e){const t=W5e(),[n,o,r,s]=t,i=Gl.length,c=r>sa?sa:null;if(!e[o])return Qk(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Gl.pop();lu.push(Oi.substr(p,f))}return Qk(),!1;case"self-closed":return i===0?(c!==null&&lu.push(Oi.substr(c,r-c)),lu.push(e[o]),sa=r+s,!0):(wD(Zk(e[o],r,s)),sa=r+s,!0);case"opener":return Gl.push(Zk(e[o],r,s,r+s,c)),sa=r+s,!0;case"closer":if(i===1)return T5e(r),sa=r+s,!0;const l=Gl.pop(),u=Oi.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=Zk(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,wD(d),sa=r+s,!0;default:return Qk(),!1}}function W5e(){const e=nee.exec(Oi);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function Qk(){const e=Oi.length-sa;e!==0&&lu.push(Oi.substr(sa,e))}function wD(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Gl[Gl.length-1],c=Oi.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(z.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function T5e(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Gl.pop(),i=e?Oi.substr(o,e-o):Oi.substr(o);i&&s.push(i),n!==null&&lu.push(Oi.substr(n,r-n)),lu.push(z.cloneElement(t,null,...s))}var oee={exports:{}},us={},ree={exports:{}},see={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(I,P){var U=I.length;I.push(P);e:for(;0>>1,H=I[X];if(0>>1;Xr(ee,U))Kr(ne,ee)?(I[X]=ne,I[K]=U,X=K):(I[X]=ee,I[oe]=U,X=oe);else if(Kr(ne,U))I[X]=ne,I[K]=U,X=K;else break e}}return P}function r(I,P){var U=I.sortIndex-P.sortIndex;return U!==0?U:I.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,M=!1,O=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(I){for(var P=n(u);P!==null;){if(P.callback===null)o(u);else if(P.startTime<=I)o(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=n(u)}}function g(I){if(M=!1,v(I),!h)if(n(l)!==null)h=!0,W(A);else{var P=n(u);P!==null&&j(g,P.startTime-I)}}function A(I,P){h=!1,M&&(M=!1,y(k),k=-1),b=!0;var U=f;try{for(v(P),p=n(l);p!==null&&(!(p.expirationTime>P)||I&&!C());){var X=p.callback;if(typeof X=="function"){p.callback=null,f=p.priorityLevel;var H=X(p.expirationTime<=P);P=e.unstable_now(),typeof H=="function"?p.callback=H:p===n(l)&&o(l),v(P)}else o(l);p=n(l)}if(p!==null)var Z=!0;else{var oe=n(u);oe!==null&&j(g,oe.startTime-P),Z=!1}return Z}finally{p=null,f=U,b=!1}}var x=!1,w=null,k=-1,q=5,S=-1;function C(){return!(e.unstable_now()-SI||125X?(I.sortIndex=U,t(u,I),n(l)===null&&I===n(u)&&(M?(y(k),k=-1):M=!0,j(g,U-X))):(I.sortIndex=H,t(l,I),h||b||(h=!0,W(A))),I},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(I){var P=f;return function(){var U=f;f=P;try{return I.apply(this,arguments)}finally{f=U}}}})(see);ree.exports=see;var E5e=ree.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var B5e=z,rs=E5e;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),DC=Object.prototype.hasOwnProperty,N5e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,kD={},qD={};function L5e(e){return DC.call(qD,e)?!0:DC.call(kD,e)?!1:N5e.test(e)?qD[e]=!0:(kD[e]=!0,!1)}function j5e(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P5e(e,t,n,o){if(t===null||typeof t>"u"||j5e(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lr(e,t,n,o,r,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var Mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mo[e]=new lr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mo[t]=new lr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mo[e]=new lr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mo[e]=new lr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mo[e]=new lr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mo[e]=new lr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mo[e]=new lr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mo[e]=new lr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mo[e]=new lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var sE=/[\-:]([a-z])/g;function iE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mo[e]=new lr(e,1,!1,e.toLowerCase(),null,!1,!1)});Mo.xlinkHref=new lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mo[e]=new lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function aE(e,t,n,o){var r=Mo.hasOwnProperty(t)?Mo[t]:null;(r!==null?r.type!==0:o||!(2c||r[i]!==s[c]){var l=` -`+r[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=c);break}}}finally{e6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eM(e):""}function I5e(e){switch(e.tag){case 5:return eM(e.type);case 16:return eM("Lazy");case 13:return eM("Suspense");case 19:return eM("SuspenseList");case 0:case 2:case 15:return e=t6(e.type,!1),e;case 11:return e=t6(e.type.render,!1),e;case 1:return e=t6(e.type,!0),e;default:return""}}function HC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fb:return"Fragment";case pb:return"Portal";case $C:return"Profiler";case cE:return"StrictMode";case FC:return"Suspense";case VC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cee:return(e.displayName||"Context")+".Consumer";case aee:return(e._context.displayName||"Context")+".Provider";case lE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uE:return t=e.displayName||null,t!==null?t:HC(e.type)||"Memo";case Il:t=e._payload,e=e._init;try{return HC(e(t))}catch{}}return null}function D5e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return HC(t);case 8:return t===cE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Su(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $5e(e){var t=uee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){o=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kO(e){e._valueTracker||(e._valueTracker=$5e(e))}function dee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=uee(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function w4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function UC(e,t){var n=t.checked;return Yn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function CD(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=Su(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pee(e,t){t=t.checked,t!=null&&aE(e,"checked",t,!1)}function XC(e,t){pee(e,t);var n=Su(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?GC(e,t.type,n):t.hasOwnProperty("defaultValue")&&GC(e,t.type,Su(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function RD(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function GC(e,t,n){(t!=="number"||w4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tM=Array.isArray;function jb(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=qO.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var AM={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},F5e=["Webkit","ms","Moz","O"];Object.keys(AM).forEach(function(e){F5e.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),AM[t]=AM[e]})});function mee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||AM.hasOwnProperty(e)&&AM[e]?(""+t).trim():t+"px"}function Mee(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=mee(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var V5e=Yn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ZC(e,t){if(t){if(V5e[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function QC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var JC=null;function dE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eR=null,Pb=null,Ib=null;function ED(e){if(e=Lz(e)){if(typeof eR!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Q5(t),eR(e.stateNode,e.type,t))}}function gee(e){Pb?Ib?Ib.push(e):Ib=[e]:Pb=e}function zee(){if(Pb){var e=Pb,t=Ib;if(Ib=Pb=null,ED(e),t)for(e=0;e>>=0,e===0?32:31-(txe(e)/nxe|0)|0}var SO=64,CO=4194304;function nM(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function C4(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var c=i&~r;c!==0?o=nM(c):(s&=i,s!==0&&(o=nM(s)))}else i=n&~r,i!==0?o=nM(i):s!==0&&(o=nM(s));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Bz(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ai(t),e[t]=n}function ixe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=vM),FD=" ",VD=!1;function Pee(e,t){switch(e){case"keyup":return Exe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iee(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bb=!1;function Nxe(e,t){switch(e){case"compositionend":return Iee(t);case"keypress":return t.which!==32?null:(VD=!0,FD);case"textInput":return e=t.data,e===FD&&VD?null:e;default:return null}}function Lxe(e,t){if(bb)return e==="compositionend"||!zE&&Pee(e,t)?(e=Lee(),xy=mE=Kl=null,bb=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GD(n)}}function Vee(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vee(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hee(){for(var e=window,t=w4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=w4(e.document)}return t}function OE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Uxe(e){var t=Hee(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vee(n.ownerDocument.documentElement,n)){if(o!==null&&OE(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(o.start,r);o=o.end===void 0?s:Math.min(o.end,r),!e.extend&&s>o&&(r=o,o=s,s=r),r=KD(n,s);var i=KD(n,o);r&&i&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,hb=null,iR=null,_M=null,aR=!1;function YD(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;aR||hb==null||hb!==w4(o)||(o=hb,"selectionStart"in o&&OE(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),_M&&ug(_M,o)||(_M=o,o=T4(iR,"onSelect"),0gb||(e.current=fR[gb],fR[gb]=null,gb--)}function mn(e,t){gb++,fR[gb]=e.current,e.current=t}var Cu={},Fo=ad(Cu),wr=ad(!1),Ap=Cu;function p2(e,t){var n=e.type.contextTypes;if(!n)return Cu;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function kr(e){return e=e.childContextTypes,e!=null}function B4(){wn(wr),wn(Fo)}function o$(e,t,n){if(Fo.current!==Cu)throw Error(Ne(168));mn(Fo,t),mn(wr,n)}function ete(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(Ne(108,D5e(e)||"Unknown",r));return Yn({},n,o)}function N4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cu,Ap=Fo.current,mn(Fo,e),mn(wr,wr.current),!0}function r$(e,t,n){var o=e.stateNode;if(!o)throw Error(Ne(169));n?(e=ete(e,t,Ap),o.__reactInternalMemoizedMergedChildContext=e,wn(wr),wn(Fo),mn(Fo,e)):wn(wr),mn(wr,n)}var Mc=null,J5=!1,h6=!1;function tte(e){Mc===null?Mc=[e]:Mc.push(e)}function r_e(e){J5=!0,tte(e)}function cd(){if(!h6&&Mc!==null){h6=!0;var e=0,t=J0;try{var n=Mc;for(J0=1;e>=i,r-=i,Oc=1<<32-Ai(t)+r|n<k?(q=w,w=null):q=w.sibling;var S=f(y,w,v[k],g);if(S===null){w===null&&(w=q);break}e&&w&&S.alternate===null&&t(y,w),_=s(S,_,k),x===null?A=S:x.sibling=S,x=S,w=q}if(k===v.length)return n(y,w),Nn&&Ld(y,k),A;if(w===null){for(;kk?(q=w,w=null):q=w.sibling;var C=f(y,w,S.value,g);if(C===null){w===null&&(w=q);break}e&&w&&C.alternate===null&&t(y,w),_=s(C,_,k),x===null?A=C:x.sibling=C,x=C,w=q}if(S.done)return n(y,w),Nn&&Ld(y,k),A;if(w===null){for(;!S.done;k++,S=v.next())S=p(y,S.value,g),S!==null&&(_=s(S,_,k),x===null?A=S:x.sibling=S,x=S);return Nn&&Ld(y,k),A}for(w=o(y,w);!S.done;k++,S=v.next())S=b(w,y,k,S.value,g),S!==null&&(e&&S.alternate!==null&&w.delete(S.key===null?k:S.key),_=s(S,_,k),x===null?A=S:x.sibling=S,x=S);return e&&w.forEach(function(T){return t(y,T)}),Nn&&Ld(y,k),A}function O(y,_,v,g){if(typeof v=="object"&&v!==null&&v.type===fb&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wO:e:{for(var A=v.key,x=_;x!==null;){if(x.key===A){if(A=v.type,A===fb){if(x.tag===7){n(y,x.sibling),_=r(x,v.props.children),_.return=y,y=_;break e}}else if(x.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Il&&a$(A)===x.type){n(y,x.sibling),_=r(x,v.props),_.ref=ym(y,x,v),_.return=y,y=_;break e}n(y,x);break}else t(y,x);x=x.sibling}v.type===fb?(_=cp(v.props.children,y.mode,g,v.key),_.return=y,y=_):(g=Wy(v.type,v.key,v.props,null,y.mode,g),g.ref=ym(y,_,v),g.return=y,y=g)}return i(y);case pb:e:{for(x=v.key;_!==null;){if(_.key===x)if(_.tag===4&&_.stateNode.containerInfo===v.containerInfo&&_.stateNode.implementation===v.implementation){n(y,_.sibling),_=r(_,v.children||[]),_.return=y,y=_;break e}else{n(y,_);break}else t(y,_);_=_.sibling}_=v6(v,y.mode,g),_.return=y,y=_}return i(y);case Il:return x=v._init,O(y,_,x(v._payload),g)}if(tM(v))return h(y,_,v,g);if(Mm(v))return M(y,_,v,g);LO(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,_!==null&&_.tag===6?(n(y,_.sibling),_=r(_,v),_.return=y,y=_):(n(y,_),_=y6(v,y.mode,g),_.return=y,y=_),i(y)):n(y,_)}return O}var b2=ste(!0),ite=ste(!1),P4=ad(null),I4=null,Ab=null,xE=null;function _E(){xE=Ab=I4=null}function wE(e){var t=P4.current;wn(P4),e._currentValue=t}function mR(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function $b(e,t){I4=e,xE=Ab=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xr=!0),e.firstContext=null)}function Hs(e){var t=e._currentValue;if(xE!==e)if(e={context:e,memoizedValue:t,next:null},Ab===null){if(I4===null)throw Error(Ne(308));Ab=e,I4.dependencies={lanes:0,firstContext:e}}else Ab=Ab.next=e;return t}var Qd=null;function kE(e){Qd===null?Qd=[e]:Qd.push(e)}function ate(e,t,n,o){var r=t.interleaved;return r===null?(n.next=n,kE(t)):(n.next=r.next,r.next=n),t.interleaved=n,Vc(e,o)}function Vc(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dl=!1;function qE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cc(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bu(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,q0&2){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,Vc(e,n)}return r=o.interleaved,r===null?(t.next=t,kE(o)):(t.next=r.next,r.next=t),o.interleaved=t,Vc(e,n)}function wy(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,fE(e,n)}}function c$(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function D4(e,t,n,o){var r=e.updateQueue;Dl=!1;var s=r.firstBaseUpdate,i=r.lastBaseUpdate,c=r.shared.pending;if(c!==null){r.shared.pending=null;var l=c,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,c=d.lastBaseUpdate,c!==i&&(c===null?d.firstBaseUpdate=u:c.next=u,d.lastBaseUpdate=l))}if(s!==null){var p=r.baseState;i=0,d=u=l=null,c=s;do{var f=c.lane,b=c.eventTime;if((o&f)===f){d!==null&&(d=d.next={eventTime:b,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var h=e,M=c;switch(f=t,b=n,M.tag){case 1:if(h=M.payload,typeof h=="function"){p=h.call(b,p,f);break e}p=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=M.payload,f=typeof h=="function"?h.call(b,p,f):h,f==null)break e;p=Yn({},p,f);break e;case 2:Dl=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,f=r.effects,f===null?r.effects=[c]:f.push(c))}else b={eventTime:b,lane:f,tag:c.tag,payload:c.payload,callback:c.callback,next:null},d===null?(u=d=b,l=p):d=d.next=b,i|=f;if(c=c.next,c===null){if(c=r.shared.pending,c===null)break;f=c,c=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(d===null&&(l=p),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do i|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);xp|=i,e.lanes=i,e.memoizedState=p}}function l$(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=M6.transition;M6.transition={};try{e(!1),t()}finally{J0=n,M6.transition=o}}function _te(){return Us().memoizedState}function c_e(e,t,n){var o=mu(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},wte(e))kte(t,n);else if(n=ate(e,t,n,o),n!==null){var r=nr();yi(n,e,o,r),qte(n,t,o)}}function l_e(e,t,n){var o=mu(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(wte(e))kte(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,c=s(i,n);if(r.hasEagerState=!0,r.eagerState=c,ki(c,i)){var l=t.interleaved;l===null?(r.next=r,kE(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=ate(e,t,r,o),n!==null&&(r=nr(),yi(n,e,o,r),qte(n,t,o))}}function wte(e){var t=e.alternate;return e===Gn||t!==null&&t===Gn}function kte(e,t){wM=F4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qte(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,fE(e,n)}}var V4={readContext:Hs,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},u_e={readContext:Hs,useCallback:function(e,t){return na().memoizedState=[e,t===void 0?null:t],e},useContext:Hs,useEffect:d$,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qy(4194308,4,Ote.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qy(4194308,4,e,t)},useInsertionEffect:function(e,t){return qy(4,2,e,t)},useMemo:function(e,t){var n=na();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=na();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=c_e.bind(null,Gn,e),[o.memoizedState,e]},useRef:function(e){var t=na();return e={current:e},t.memoizedState=e},useState:u$,useDebugValue:NE,useDeferredValue:function(e){return na().memoizedState=e},useTransition:function(){var e=u$(!1),t=e[0];return e=a_e.bind(null,e[1]),na().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Gn,r=na();if(Nn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),V1===null)throw Error(Ne(349));vp&30||pte(o,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,d$(bte.bind(null,o,s,e),[e]),o.flags|=2048,gg(9,fte.bind(null,o,s,n,t),void 0,null),n},useId:function(){var e=na(),t=V1.identifierPrefix;if(Nn){var n=Ac,o=Oc;n=(o&~(1<<32-Ai(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=mg++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(n,{is:o.is}):(e=i.createElement(n),n==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,n),e[ba]=t,e[fg]=o,jte(e,t,!1,!1),t.stateNode=e;e:{switch(i=QC(n,o),n){case"dialog":xn("cancel",e),xn("close",e),r=o;break;case"iframe":case"object":case"embed":xn("load",e),r=o;break;case"video":case"audio":for(r=0;rM2&&(t.flags|=128,o=!0,vm(s,!1),t.lanes=4194304)}else{if(!o)if(e=$4(i),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vm(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Nn)return Co(t),null}else 2*l1()-s.renderingStartTime>M2&&n!==1073741824&&(t.flags|=128,o=!0,vm(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=l1(),t.sibling=null,n=$n.current,mn($n,o?n&1|2:n&1),t):(Co(t),null);case 22:case 23:return $E(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Hr&1073741824&&(Co(t),t.subtreeFlags&6&&(t.flags|=8192)):Co(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function g_e(e,t){switch(yE(t),t.tag){case 1:return kr(t.type)&&B4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return h2(),wn(wr),wn(Fo),RE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return CE(t),null;case 13:if(wn($n),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));f2()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return wn($n),null;case 4:return h2(),null;case 10:return wE(t.type._context),null;case 22:case 23:return $E(),null;case 24:return null;default:return null}}var PO=!1,Eo=!1,z_e=typeof WeakSet=="function"?WeakSet:Set,dt=null;function yb(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){e1(e,t,o)}else n.current=null}function _R(e,t,n){try{n()}catch(o){e1(e,t,o)}}var y$=!1;function O_e(e,t){if(cR=R4,e=Hee(),OE(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,c=-1,l=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var b;p!==n||r!==0&&p.nodeType!==3||(c=i+r),p!==s||o!==0&&p.nodeType!==3||(l=i+o),p.nodeType===3&&(i+=p.nodeValue.length),(b=p.firstChild)!==null;)f=p,p=b;for(;;){if(p===e)break t;if(f===n&&++u===r&&(c=i),f===s&&++d===o&&(l=i),(b=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=b}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(lR={focusedElem:e,selectionRange:n},R4=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){t=dt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var M=h.memoizedProps,O=h.memoizedState,y=t.stateNode,_=y.getSnapshotBeforeUpdate(t.elementType===t.type?M:li(t.type,M),O);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(g){e1(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}return h=y$,y$=!1,h}function kM(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&_R(t,n,s)}r=r.next}while(r!==o)}}function nx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function wR(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Dte(e){var t=e.alternate;t!==null&&(e.alternate=null,Dte(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ba],delete t[fg],delete t[pR],delete t[n_e],delete t[o_e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $te(e){return e.tag===5||e.tag===3||e.tag===4}function v$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$te(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=E4));else if(o!==4&&(e=e.child,e!==null))for(kR(e,t,n),e=e.sibling;e!==null;)kR(e,t,n),e=e.sibling}function qR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(qR(e,t,n),e=e.sibling;e!==null;)qR(e,t,n),e=e.sibling}var oo=null,pi=!1;function ql(e,t,n){for(n=n.child;n!==null;)Fte(e,t,n),n=n.sibling}function Fte(e,t,n){if(Oa&&typeof Oa.onCommitFiberUnmount=="function")try{Oa.onCommitFiberUnmount(G5,n)}catch{}switch(n.tag){case 5:Eo||yb(n,t);case 6:var o=oo,r=pi;oo=null,ql(e,t,n),oo=o,pi=r,oo!==null&&(pi?(e=oo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oo.removeChild(n.stateNode));break;case 18:oo!==null&&(pi?(e=oo,n=n.stateNode,e.nodeType===8?b6(e.parentNode,n):e.nodeType===1&&b6(e,n),cg(e)):b6(oo,n.stateNode));break;case 4:o=oo,r=pi,oo=n.stateNode.containerInfo,pi=!0,ql(e,t,n),oo=o,pi=r;break;case 0:case 11:case 14:case 15:if(!Eo&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var s=r,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&_R(n,t,i),r=r.next}while(r!==o)}ql(e,t,n);break;case 1:if(!Eo&&(yb(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(c){e1(n,t,c)}ql(e,t,n);break;case 21:ql(e,t,n);break;case 22:n.mode&1?(Eo=(o=Eo)||n.memoizedState!==null,ql(e,t,n),Eo=o):ql(e,t,n);break;default:ql(e,t,n)}}function x$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new z_e),t.forEach(function(o){var r=S_e.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function ai(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=i),o&=~s}if(o=r,o=l1()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*y_e(o/1960))-o,10e?16:e,Yl===null)var o=!1;else{if(e=Yl,Yl=null,X4=0,q0&6)throw Error(Ne(331));var r=q0;for(q0|=4,dt=e.current;dt!==null;){var s=dt,i=s.child;if(dt.flags&16){var c=s.deletions;if(c!==null){for(var l=0;ll1()-IE?ap(e,0):PE|=n),qr(e,t)}function Zte(e,t){t===0&&(e.mode&1?(t=CO,CO<<=1,!(CO&130023424)&&(CO=4194304)):t=1);var n=nr();e=Vc(e,t),e!==null&&(Bz(e,t,n),qr(e,n))}function q_e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zte(e,n)}function S_e(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Ne(314))}o!==null&&o.delete(t),Zte(e,n)}var Qte;Qte=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wr.current)xr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xr=!1,m_e(e,t,n);xr=!!(e.flags&131072)}else xr=!1,Nn&&t.flags&1048576&&nte(t,j4,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Sy(e,t),e=t.pendingProps;var r=p2(t,Fo.current);$b(t,n),r=TE(null,t,o,e,r,n);var s=EE();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(o)?(s=!0,N4(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,qE(t),r.updater=tx,t.stateNode=r,r._reactInternals=t,gR(t,o,e,n),t=AR(null,t,o,!0,s,n)):(t.tag=0,Nn&&s&&AE(t),Jo(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(Sy(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=R_e(o),e=li(o,e),r){case 0:t=OR(null,t,o,e,n);break e;case 1:t=z$(null,t,o,e,n);break e;case 11:t=M$(null,t,o,e,n);break e;case 14:t=g$(null,t,o,li(o.type,e),n);break e}throw Error(Ne(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),OR(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),z$(e,t,o,r,n);case 3:e:{if(Bte(t),e===null)throw Error(Ne(387));o=t.pendingProps,s=t.memoizedState,r=s.element,cte(e,t),D4(t,o,null,n);var i=t.memoizedState;if(o=i.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=m2(Error(Ne(423)),t),t=O$(e,t,o,n,r);break e}else if(o!==r){r=m2(Error(Ne(424)),t),t=O$(e,t,o,n,r);break e}else for(Kr=fu(t.stateNode.containerInfo.firstChild),Qr=t,Nn=!0,bi=null,n=ite(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(f2(),o===r){t=Hc(e,t,n);break e}Jo(e,t,o,n)}t=t.child}return t;case 5:return lte(t),e===null&&hR(t),o=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,i=r.children,uR(o,r)?i=null:s!==null&&uR(o,s)&&(t.flags|=32),Ete(e,t),Jo(e,t,i,n),t.child;case 6:return e===null&&hR(t),null;case 13:return Nte(e,t,n);case 4:return SE(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=b2(t,null,o,n):Jo(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),M$(e,t,o,r,n);case 7:return Jo(e,t,t.pendingProps,n),t.child;case 8:return Jo(e,t,t.pendingProps.children,n),t.child;case 12:return Jo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value,mn(P4,o._currentValue),o._currentValue=i,s!==null)if(ki(s.value,i)){if(s.children===r.children&&!wr.current){t=Hc(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){i=s.child;for(var l=c.firstContext;l!==null;){if(l.context===o){if(s.tag===1){l=Cc(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),mR(s.return,n,t),c.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(Ne(341));i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),mR(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Jo(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,$b(t,n),r=Hs(r),o=o(r),t.flags|=1,Jo(e,t,o,n),t.child;case 14:return o=t.type,r=li(o,t.pendingProps),r=li(o.type,r),g$(e,t,o,r,n);case 15:return Wte(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),Sy(e,t),t.tag=1,kr(o)?(e=!0,N4(t)):e=!1,$b(t,n),Ste(t,o,r),gR(t,o,r,n),AR(null,t,o,!0,e,n);case 19:return Lte(e,t,n);case 22:return Tte(e,t,n)}throw Error(Ne(156,t.tag))};function Jte(e,t){return wee(e,t)}function C_e(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bs(e,t,n,o){return new C_e(e,t,n,o)}function VE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R_e(e){if(typeof e=="function")return VE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lE)return 11;if(e===uE)return 14}return 2}function Mu(e,t){var n=e.alternate;return n===null?(n=Bs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wy(e,t,n,o,r,s){var i=2;if(o=e,typeof e=="function")VE(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case fb:return cp(n.children,r,s,t);case cE:i=8,r|=8;break;case $C:return e=Bs(12,n,t,r|2),e.elementType=$C,e.lanes=s,e;case FC:return e=Bs(13,n,t,r),e.elementType=FC,e.lanes=s,e;case VC:return e=Bs(19,n,t,r),e.elementType=VC,e.lanes=s,e;case lee:return rx(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aee:i=10;break e;case cee:i=9;break e;case lE:i=11;break e;case uE:i=14;break e;case Il:i=16,o=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Bs(i,n,t,r),t.elementType=e,t.type=o,t.lanes=s,t}function cp(e,t,n,o){return e=Bs(7,e,o,t),e.lanes=n,e}function rx(e,t,n,o){return e=Bs(22,e,o,t),e.elementType=lee,e.lanes=n,e.stateNode={isHidden:!1},e}function y6(e,t,n){return e=Bs(6,e,null,t),e.lanes=n,e}function v6(e,t,n){return t=Bs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W_e(e,t,n,o,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=o6(0),this.expirationTimes=o6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=o6(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function HE(e,t,n,o,r,s,i,c,l){return e=new W_e(e,t,n,c,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Bs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qE(s),e}function T_e(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o0e)}catch(e){console.error(e)}}o0e(),oee.exports=us;var Rr=oee.exports,r0e,W$=Rr;r0e=W$.createRoot,W$.hydrateRoot;const j_e=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,_1={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function T$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pz(e){var t,n;return T$(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(T$(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var TR=function(e,t){return TR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},TR(e,t)};function P_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");TR(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var a1=function(){return a1=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function Y4(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:"",transform:s0e},t))}function F_e(e,t){return t===0?e.toLowerCase():s0e(e,t)}function KE(e,t){return t===void 0&&(t={}),Y4(e,a1({transform:F_e},t))}function V_e(e){return e.charAt(0).toUpperCase()+e.substr(1)}function H_e(e){return V_e(e.toLowerCase())}function i0e(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:" ",transform:H_e},t))}function U_e(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:"."},t))}function Xs(e,t){return t===void 0&&(t={}),U_e(e,a1({delimiter:"-"},t))}function X_e(e){return e.replace(/>/g,">")}const G_e=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function a0e(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function K_e(e){return e.replace(/"/g,""")}function c0e(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),z.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:Z_e,Consumer:Q_e}=z.createContext(void 0),J_e=z.forwardRef(()=>null),ewe=new Set(["string","boolean","number"]),twe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),nwe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),owe=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),rwe=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function u0e(e,t){return t.some(n=>e.indexOf(n)===0)}function swe(e){return e==="key"||e==="children"}function iwe(e,t){switch(e){case"style":return pwe(t)}return t}const B$=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),N$=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),L$=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function awe(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return N$[t]?N$[t]:B$[t]?Xs(B$[t]):L$[t]?L$[t]:t}function cwe(e){return e.startsWith("--")?e:u0e(e,["ms","O","Moz","Webkit"])?"-"+Xs(e):Xs(e)}function lwe(e,t){return typeof t=="number"&&t!==0&&!rwe.has(e)?t+"px":t}function Po(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return CM(e,t,n);switch(typeof e){case"string":return ER(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case z.StrictMode:case z.Fragment:return CM(r.children,t,n);case C1:const{children:s,...i}=r;return j$(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return j$(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?uwe(o,r,t,n):Po(o(r,n),t,n)}switch(o&&o.$$typeof){case Z_e.$$typeof:return CM(r.children,r.value,n);case Q_e.$$typeof:return Po(r.children(t||o._currentValue),t,n);case J_e.$$typeof:return Po(o.render(r),t,n)}return""}function j$(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=CM(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=CM(t.children,n,o));if(!e)return r;const s=dwe(t);return twe.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function uwe(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),Po(r.render(),n,o)}function CM(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),M.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,M.width?parseInt(M.width):0);break;case"e":p=M.precision?parseFloat(p).toExponential(M.precision):parseFloat(p).toExponential();break;case"f":p=M.precision?parseFloat(p).toFixed(M.precision):parseFloat(p);break;case"g":p=M.precision?String(Number(p.toPrecision(M.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=M.precision?p.substring(0,M.precision):p;break;case"t":p=String(!!p),p=M.precision?p.substring(0,M.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=M.precision?p.substring(0,M.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=M.precision?p.substring(0,M.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(M.type)?f+=p:(t.number.test(M.type)&&(!v||M.sign)?(g=v?"+":"-",p=p.toString().replace(t.sign,"")):g="",y=M.pad_char?M.pad_char==="0"?"0":M.pad_char.charAt(1):" ",_=M.width-(g+p).length,O=M.width&&_>0?y.repeat(_):"",f+=M.align?g+p+O:y==="0"?g+O+p:O+g+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()})(d0e);const fwe=Ao(d0e),bwe=ps(console.error);function le(e,...t){try{return fwe.sprintf(e,...t)}catch(n){return n instanceof Error&&bwe(`sprintf error: - -`+n.toString()),e}}var BR,p0e,rM,f0e;BR={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};p0e=["(","?"];rM={")":["("],":":["?","?:"]};f0e=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function hwe(e){for(var t=[],n=[],o,r,s,i;o=e.match(f0e);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(rM[r]){if(rM[r][0]===i){r=rM[r][1]||r;break}}else if(p0e.indexOf(i)>=0||BR[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Mwe(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new YE({}),r=new Set,s=()=>{r.forEach(g=>g())},i=g=>(r.add(g),()=>r.delete(g)),c=(g="default")=>o.data[g],l=(g,A="default")=>{o.data[A]={...o.data[A],...g},o.data[A][""]={...I$[""],...o.data[A]?.[""]},delete o.pluralForms[A]},u=(g,A)=>{l(g,A),s()},d=(g,A="default")=>{o.data[A]={...o.data[A],...g,"":{...I$[""],...o.data[A]?.[""],...g?.[""]}},delete o.pluralForms[A],s()},p=(g,A)=>{o.data={},o.pluralForms={},u(g,A)},f=(g="default",A,x,w,k)=>(o.data[g]||l(void 0,g),o.dcnpgettext(g,A,x,w,k)),b=(g="default")=>g,h=(g,A)=>{let x=f(A,void 0,g);return n?(x=n.applyFilters("i18n.gettext",x,g,A),n.applyFilters("i18n.gettext_"+b(A),x,g,A)):x},M=(g,A,x)=>{let w=f(x,A,g);return n?(w=n.applyFilters("i18n.gettext_with_context",w,g,A,x),n.applyFilters("i18n.gettext_with_context_"+b(x),w,g,A,x)):w},O=(g,A,x,w)=>{let k=f(w,void 0,g,A,x);return n?(k=n.applyFilters("i18n.ngettext",k,g,A,x,w),n.applyFilters("i18n.ngettext_"+b(w),k,g,A,x,w)):k},y=(g,A,x,w,k)=>{let q=f(k,w,g,A,x);return n?(q=n.applyFilters("i18n.ngettext_with_context",q,g,A,x,w,k),n.applyFilters("i18n.ngettext_with_context_"+b(k),q,g,A,x,w,k)):q},_=()=>M("ltr","text direction")==="rtl",v=(g,A,x)=>{const w=A?A+""+g:g;let k=!!o.data?.[x??"default"]?.[w];return n&&(k=n.applyFilters("i18n.has_translation",k,g,A,x),k=n.applyFilters("i18n.has_translation_"+b(x),k,g,A,x)),k};if(n){const g=A=>{Awe.test(A)&&s()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:M,_n:O,_nx:y,isRTL:_,hasTranslation:v}};function b0e(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function ZE(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function D$(e,t){return function(o,r,s,i=10){const c=e[t];if(!ZE(o)||!b0e(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function $O(e,t,n=!1){return function(r,s){const i=e[t];if(!ZE(r)||!n&&!b0e(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function $$(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function F$(e,t,n=!1){return function(r,...s){const i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;const c=i[r].handlers;if(!c||!c.length)return n?s[0]:void 0;const l={name:r,currentIndex:0};for(i.__current.push(l);l.currentIndex"u"?typeof r.__current[0]<"u":r.__current[0]?o===r.__current[0].name:!1}}function U$(e,t){return function(o){const r=e[t];if(ZE(o))return r[o]&&r[o].runs?r[o].runs:0}}class vwe{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=D$(this,"actions"),this.addFilter=D$(this,"filters"),this.removeAction=$O(this,"actions"),this.removeFilter=$O(this,"filters"),this.hasAction=$$(this,"actions"),this.hasFilter=$$(this,"filters"),this.removeAllActions=$O(this,"actions",!0),this.removeAllFilters=$O(this,"filters",!0),this.doAction=F$(this,"actions"),this.applyFilters=F$(this,"filters",!0),this.currentAction=V$(this,"actions"),this.currentFilter=V$(this,"filters"),this.doingAction=H$(this,"actions"),this.doingFilter=H$(this,"filters"),this.didAction=U$(this,"actions"),this.didFilter=U$(this,"filters")}}function h0e(){return new vwe}const m0e=h0e(),{addAction:X$,addFilter:n0,removeAction:G$,removeFilter:K$,hasAction:mb0,hasFilter:M0e,removeAllActions:Mb0,removeAllFilters:gb0,doAction:g0e,applyFilters:kn,currentAction:zb0,currentFilter:Ob0,doingAction:Ab0,doingFilter:yb0,didAction:vb0,didFilter:xb0,actions:_b0,filters:wb0}=m0e,z1=ywe(void 0,void 0,m0e);z1.getLocaleData.bind(z1);z1.setLocaleData.bind(z1);z1.resetLocaleData.bind(z1);z1.subscribe.bind(z1);const m=z1.__.bind(z1),ye=z1._x.bind(z1),i0=z1._n.bind(z1);z1._nx.bind(z1);const mt=z1.isRTL.bind(z1);z1.hasTranslation.bind(z1);function xwe(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const z0e=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},_we=e=>(t,n)=>z0e(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function of(e){try{return new URL(e),!0}catch{return!1}}const wwe=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function O0e(e){return wwe.test(e)}function dx(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function QE(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function JE(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function kwe(e){return e?/^[^\s#?]+$/.test(e):!1}function rf(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function qwe(e){return e?/^[^\s#?]+$/.test(e):!1}function eB(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function px(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function Swe(e){return e?/^[^\s#?\/]+$/.test(e):!1}function Cwe(e){const t=rf(e),n=eB(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function Rwe(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function NR(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function Og(e){try{return decodeURIComponent(e)}catch{return e}}function Wwe(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(Og);if(o){const s=o.replace(/\]/g,"").split("[");Wwe(t,s,r)}return t},Object.create(null))}function kt(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(fx(e),t),n=n.substr(0,o)),n+"?"+px(t)}function LR(e,t){return fx(e)[t]}function Y$(e,t){return LR(e,t)!==void 0}function Z4(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=fx(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=px(o);return s?r+"?"+s:r}const Twe=/^(?:[a-z]+:|#|\?|\.|\/)/i;function sf(e){return e&&(e=e.trim(),!Twe.test(e)&&!O0e(e)?"http://"+e:e)}function Iz(e){try{return decodeURI(e)}catch{return e}}function Dz(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var bx={exports:{}},A0e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},y0e=Object.keys(A0e).join("|"),Ewe=new RegExp(y0e,"g"),Bwe=new RegExp(y0e,"");function Nwe(e){return A0e[e]}var v0e=function(e){return e.replace(Ewe,Nwe)},Lwe=function(e){return!!e.match(Bwe)};bx.exports=v0e;bx.exports.has=Lwe;bx.exports.remove=v0e;var jwe=bx.exports;const Gs=Ao(jwe);function tB(e){return e?Gs(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function $z(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function Z$(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function Pwe(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[Z$(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=fx(n.url);typeof l=="string"&&(s=kt(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=Z$(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],Q$(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],Q$(l,!!r)}return o(n)}}function Q$(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const Iwe=({path:e,url:t,...n},o)=>({...n,url:t&&kt(t,o),path:e&&kt(e,o)}),J$=e=>e.json?e.json():Promise.reject(e),Dwe=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},eF=e=>{const{next:t}=Dwe(e.headers.get("link"));return t},$we=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},x0e=async(e,t)=>{if(e.parse===!1||!$we(e))return t(e);const n=await pt({...Iwe(e,{per_page:100}),parse:!1}),o=await J$(n);if(!Array.isArray(o))return o;let r=eF(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await pt({...e,path:void 0,url:r,parse:!1}),c=await J$(i);s=s.concat(c),r=eF(i)}return s},Fwe=new Set(["PATCH","PUT","DELETE"]),Vwe="GET",Hwe=(e,t)=>{const{method:n=Vwe}=e;return Fwe.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},Uwe=(e,t)=>(typeof e.url=="string"&&!Y$(e.url,"_locale")&&(e.url=kt(e.url,{_locale:"user"})),typeof e.path=="string"&&!Y$(e.path,"_locale")&&(e.path=kt(e.path,{_locale:"user"})),t(e)),Xwe=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,Gwe=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},_0e=(e,t=!0)=>Promise.resolve(Xwe(e,t)).catch(n=>nB(n,t));function nB(e,t=!0){if(!t)throw e;return Gwe(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function Kwe(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const Ywe=(e,t)=>{if(!Kwe(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):nB(s,e.parse)}).then(s=>_0e(s,e.parse))},Zwe=e=>(t,n)=>{if(typeof t.url=="string"){const o=LR(t.url,"wp_theme_preview");o===void 0?t.url=kt(t.url,{wp_theme_preview:e}):o===""&&(t.url=Z4(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=LR(t.path,"wp_theme_preview");o===void 0?t.path=kt(t.path,{wp_theme_preview:e}):o===""&&(t.path=Z4(t.path,"wp_theme_preview"))}return n(t)},Qwe={Accept:"application/json, */*;q=0.1"},Jwe={credentials:"include"},w0e=[Uwe,z0e,Hwe,x0e];function eke(e){w0e.unshift(e)}const k0e=e=>{if(e.status>=200&&e.status<300)return e;throw e},tke=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...Qwe,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...Jwe,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then(k0e).catch(d=>nB(d,r)).then(d=>_0e(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let q0e=tke;function nke(e){q0e=e}function pt(e){return w0e.reduceRight((n,o)=>r=>o(r,n),q0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(pt.nonceEndpoint).then(k0e).then(o=>o.text()).then(o=>(pt.nonceMiddleware.nonce=o,pt(e))))}pt.use=eke;pt.setFetchHandler=nke;pt.createNonceMiddleware=xwe;pt.createPreloadingMiddleware=Pwe;pt.createRootURLMiddleware=_we;pt.fetchAllMiddleware=x0e;pt.mediaUploadMiddleware=Ywe;pt.createThemePreviewMiddleware=Zwe;const tF=Object.create(null);function Ce(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in tF||(g0e("deprecated",e,t,h),console.warn(h),tF[h]=!0)}function Ag(e){"@babel/helpers - typeof";return Ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ag(e)}function oke(e,t){if(Ag(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ag(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rke(e){var t=oke(e,"string");return Ag(t)=="symbol"?t:t+""}function ske(e,t,n){return(t=rke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function oF(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fr(1));return n(S0e)(e,t)}if(typeof e!="function")throw new Error(Fr(2));var r=e,s=t,i=[],c=i,l=!1;function u(){c===i&&(c=i.slice())}function d(){if(l)throw new Error(Fr(3));return s}function p(M){if(typeof M!="function")throw new Error(Fr(4));if(l)throw new Error(Fr(5));var O=!0;return u(),c.push(M),function(){if(O){if(l)throw new Error(Fr(6));O=!1,u();var _=c.indexOf(M);c.splice(_,1),i=null}}}function f(M){if(!ike(M))throw new Error(Fr(7));if(typeof M.type>"u")throw new Error(Fr(8));if(l)throw new Error(Fr(9));try{l=!0,s=r(s,M)}finally{l=!1}for(var O=i=c,y=0;y1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&ep(i)==="object"&&(s=s[1]),n.call(r,s,i,o)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),e}(),fke=pke;const oa=Ao(fke);function bke(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var C0e={},ln={},hx={};Object.defineProperty(hx,"__esModule",{value:!0});var hke={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};hx.default=hke;Object.defineProperty(ln,"__esModule",{value:!0});ln.createChannel=ln.subscribe=ln.cps=ln.apply=ln.call=ln.invoke=ln.delay=ln.race=ln.join=ln.fork=ln.error=ln.all=void 0;var mke=hx,Va=Mke(mke);function Mke(e){return e&&e.__esModule?e:{default:e}}ln.all=function(t){return{type:Va.default.all,value:t}};ln.error=function(t){return{type:Va.default.error,error:t}};ln.fork=function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r2?o-2:0),s=2;s1?n-1:0),r=1;r"u"?"undefined":gke(t))==="object"&&!!t},all:function(t){return Mr.obj(t)&&t.type===Sl.default.all},error:function(t){return Mr.obj(t)&&t.type===Sl.default.error},array:Array.isArray,func:function(t){return typeof t=="function"},promise:function(t){return t&&Mr.func(t.then)},iterator:function(t){return t&&Mr.func(t.next)&&Mr.func(t.throw)},fork:function(t){return Mr.obj(t)&&t.type===Sl.default.fork},join:function(t){return Mr.obj(t)&&t.type===Sl.default.join},race:function(t){return Mr.obj(t)&&t.type===Sl.default.race},call:function(t){return Mr.obj(t)&&t.type===Sl.default.call},cps:function(t){return Mr.obj(t)&&t.type===Sl.default.cps},subscribe:function(t){return Mr.obj(t)&&t.type===Sl.default.subscribe},channel:function(t){return Mr.obj(t)&&Mr.func(t.subscribe)}};ph.default=Mr;Object.defineProperty(Gr,"__esModule",{value:!0});Gr.iterator=Gr.array=Gr.object=Gr.error=Gr.any=void 0;var Ake=ph,g2=yke(Ake);function yke(e){return e&&e.__esModule?e:{default:e}}var vke=Gr.any=function(t,n,o,r){return r(t),!0},xke=Gr.error=function(t,n,o,r,s){return g2.default.error(t)?(s(t.error),!0):!1},_ke=Gr.object=function(t,n,o,r,s){if(!g2.default.all(t)||!g2.default.obj(t.value))return!1;var i={},c=Object.keys(t.value),l=0,u=!1,d=function(b,h){u||(i[b]=h,l++,l===c.length&&r(i))},p=function(b,h){u||(u=!0,s(h))};return c.map(function(f){o(t.value[f],function(b){return d(f,b)},function(b){return p(f,b)})}),!0},wke=Gr.array=function(t,n,o,r,s){if(!g2.default.all(t)||!g2.default.array(t.value))return!1;var i=[],c=0,l=!1,u=function(f,b){l||(i[f]=b,c++,c===t.value.length&&r(i))},d=function(f,b){l||(l=!0,s(b))};return t.value.map(function(p,f){o(p,function(b){return u(f,b)},function(b){return d(f,b)})}),!0},kke=Gr.iterator=function(t,n,o,r,s){return g2.default.iterator(t)?(o(t,n,s),!0):!1};Gr.default=[xke,kke,wke,_ke,vke];Object.defineProperty(oB,"__esModule",{value:!0});var qke=Gr,Ske=R0e(qke),Cke=ph,Rke=R0e(Cke);function R0e(e){return e&&e.__esModule?e:{default:e}}function aF(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t(c,l,u,d,p)=>{if(!Gke(c,s))return!1;const f=i(c);return E0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>PR(s)?(t(s),i(),!0):!1;n.push(o);const r=C0e.create(n);return s=>new Promise((i,c)=>r(s,l=>{PR(l)&&t(l),i(l)},c))}function Yke(e={}){return t=>{const n=Kke(e,t.dispatch);return o=>r=>bke(r)?n(r):o(r)}}function Rn(e,t){return n=>{const o=e(n);return o.displayName=Zke(t,n),o}}const Zke=(e,t)=>{const n=t.displayName||t.name||"Component";return`${Y4(e??"")}(${n})`},Pr=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(C){const T=o,E=r;return o=void 0,r=void 0,u=C,i=e.apply(E,T),i}function h(C,T){c=setTimeout(C,T)}function M(){c!==void 0&&clearTimeout(c)}function O(C){return u=C,h(g,t),d?b(C):i}function y(C){return C-(l||0)}function _(C){const T=y(C),E=C-u,B=t-T;return p?Math.min(B,s-E):B}function v(C){const T=y(C),E=C-u;return l===void 0||T>=t||T<0||p&&E>=s}function g(){const C=Date.now();if(v(C))return x(C);h(g,_(C))}function A(){c=void 0}function x(C){return A(),f&&o?b(C):(o=r=void 0,i)}function w(){M(),u=0,A(),o=l=r=void 0}function k(){return q()?x(Date.now()):i}function q(){return c!==void 0}function S(...C){const T=Date.now(),E=v(T);if(o=C,r=this,l=T,E){if(!q())return O(l);if(p)return h(g,t),b(l)}return q()||h(g,t),i}return S.cancel=w,S.flush=k,S.pending=q,S},sB=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Pr(e,t,{leading:o,trailing:r,maxWait:t})};function z2(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const B0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},Zl=B0e(),x0=B0e(!0);function iB(e){return Rn(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function N0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=e6e(e);return t?`${t}-${o}`:o},[e,n,t])}const t6e=Rn(e=>t=>{const n=He(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),n6e=Rn(e=>class extends z.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function o6e(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function L0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function r6e(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&L0e(n)}function mx(e,{sequential:t=!1}={}){const n=e.querySelectorAll(o6e(t));return Array.from(n).filter(o=>{if(!L0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?r6e(o):!0})}const s6e=Object.freeze(Object.defineProperty({__proto__:null,find:mx},Symbol.toStringTag,{value:"Module"}));function IR(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function j0e(e){return IR(e)!==-1}function i6e(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function a6e(e,t){return{element:e,index:t}}function c6e(e){return e.element}function l6e(e,t){const n=IR(e.element),o=IR(t.element);return n===o?e.index-t.index:n-o}function aB(e){return e.filter(j0e).map(a6e).sort(l6e).map(c6e).reduce(i6e(),[])}function u6e(e){return aB(mx(e))}function d6e(e){return aB(mx(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function p6e(e){return aB(mx(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const f6e=Object.freeze(Object.defineProperty({__proto__:null,find:u6e,findNext:p6e,findPrevious:d6e,isTabbableIndex:j0e},Symbol.toStringTag,{value:"Module"}));function Ty(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function DR(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?Ty(n):null}function P0e(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function cB(e){return e?.nodeName==="INPUT"}function Ru(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return cB(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function b6e(e){if(!cB(e)&&!Ru(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function h6e(e){return P0e(e)||!!e.activeElement&&b6e(e.activeElement)}function m6e(e){return!!e.activeElement&&(cB(e.activeElement)||Ru(e.activeElement)||P0e(e))}function Q4(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function Sr(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=Q4(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=Q4(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:Sr(e.parentNode,t)}}function Mx(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function M6e(e){if(Mx(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return lF(s,e,"firstChild")&&lF(i,e,"lastChild")&&c===0&&l===u}function lF(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function I0e(e){if(!e)return!1;const{tagName:t}=e;return Mx(e)||t==="BUTTON"||t==="SELECT"}function lB(e){return Q4(e).direction==="rtl"}function g6e(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function z6e(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function O6e(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function D0e(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=Q4(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=O6e(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function $0e(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function F0e(e,t,n=!1){if(Mx(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=z6e(s),u=s.isCollapsed;u||c.collapse(!l);const d=Ty(c),p=Ty(i);if(!d||!p)return!1;const f=g6e(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=lB(e)?!t:t,h=e.getBoundingClientRect(),M=b?h.left+1:h.right-1,O=t?h.top+1:h.bottom-1,y=$0e(e,t,()=>D0e(o,M,O,e));if(!y)return!1;const _=Ty(y);if(!_)return!1;const v=t?"top":"bottom",g=b?"left":"right",A=_[v]-p[v],x=_[g]-d[g],w=Math.abs(A)<=1,k=Math.abs(x)<=1;return n?w:w&&k}function _6(e,t){return F0e(e,t)}function uF(e,t){return F0e(e,t,!0)}function A6e(e,t,n){const{ownerDocument:o}=e,r=lB(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return D0e(o,n,i,e)}function V0e(e,t,n){if(!e)return;if(e.focus(),Mx(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}if(!e.isContentEditable)return;const o=$0e(e,t,()=>A6e(e,t,n));if(!o)return;const{ownerDocument:r}=e,{defaultView:s}=r,i=s.getSelection();i.removeAllRanges(),i.addRange(o)}function H0e(e,t){return V0e(e,t,void 0)}function y6e(e,t,n){return V0e(e,t,n?.left)}function U0e(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function qp(e){e.parentNode,e.parentNode.removeChild(e)}function v6e(e,t){e.parentNode,U0e(t,e.parentNode),qp(e)}function RM(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function dF(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function _m(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function gx(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")qp(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function Wr(e){e=gx(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function J4(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(J4):!0;default:return!0}}const WM={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},x6e=["#text","br"];Object.keys(WM).filter(e=>!x6e.includes(e)).forEach(e=>{const{[e]:t,...n}=WM;WM[e].children=n});const _6e={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},FO={...WM,..._6e};function zx(e){if(e!=="paste")return FO;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...FO,ins:{children:FO.ins.children},del:{children:FO.del.children}};return l}function Vb(e){const t=e.nodeName.toLowerCase();return zx().hasOwnProperty(t)||t==="span"}function X0e(e){const t=e.nodeName.toLowerCase();return WM.hasOwnProperty(t)||t==="span"}function w6e(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const k6e=()=>{};function sM(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(w6e(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&J4(r)){qp(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):k6e);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(sM(r.childNodes,t,n,o),RM(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&Vb(r)?(sM(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!Vb(p))&&RM(r)):sM(r.childNodes,t,l,o);else for(;r.firstChild;)qp(r.firstChild)}}}else sM(r.childNodes,t,n,o),o&&!Vb(r)&&r.nextElementSibling&&U0e(t.createElement("br"),r),RM(r)})}function $R(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,sM(o.body.childNodes,o,t,n),o.body.innerHTML}function ev(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const Ln={focusable:s6e,tabbable:f6e};function Lt(e,t){const n=z.useRef();return z.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function uB(){return Lt(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=Ln.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var G0e={exports:{}};/*! - * clipboard.js v2.0.11 - * https://clipboardjs.com/ - * - * Licensed MIT © Zeno Rocha - */(function(e,t){(function(o,r){e.exports=r()})(c0,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return X}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(H){try{return document.execCommand(H)}catch{return!1}}var M=function(Z){var oe=b()(Z);return h("cut"),oe},O=M;function y(H){var Z=document.documentElement.getAttribute("dir")==="rtl",oe=document.createElement("textarea");oe.style.fontSize="12pt",oe.style.border="0",oe.style.padding="0",oe.style.margin="0",oe.style.position="absolute",oe.style[Z?"right":"left"]="-9999px";var ee=window.pageYOffset||document.documentElement.scrollTop;return oe.style.top="".concat(ee,"px"),oe.setAttribute("readonly",""),oe.value=H,oe}var _=function(Z,oe){var ee=y(Z);oe.container.appendChild(ee);var K=b()(ee);return h("copy"),ee.remove(),K},v=function(Z){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ee="";return typeof Z=="string"?ee=_(Z,oe):Z instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Z?.type)?ee=_(Z.value,oe):(ee=b()(Z),h("copy")),ee},g=v;function A(H){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(oe){return typeof oe}:A=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},A(H)}var x=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.action,ee=oe===void 0?"copy":oe,K=Z.container,ne=Z.target,se=Z.text;if(ee!=="copy"&&ee!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ne!==void 0)if(ne&&A(ne)==="object"&&ne.nodeType===1){if(ee==="copy"&&ne.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ee==="cut"&&(ne.hasAttribute("readonly")||ne.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(se)return g(se,{container:K});if(ne)return ee==="cut"?O(ne):g(ne,{container:K})},w=x;function k(H){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(oe){return typeof oe}:k=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},k(H)}function q(H,Z){if(!(H instanceof Z))throw new TypeError("Cannot call a class as a function")}function S(H,Z){for(var oe=0;oe"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(H){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},I(H)}function P(H,Z){var oe="data-clipboard-".concat(H);if(Z.hasAttribute(oe))return Z.getAttribute(oe)}var U=function(H){T(oe,H);var Z=B(oe);function oe(ee,K){var ne;return q(this,oe),ne=Z.call(this),ne.resolveOptions(K),ne.listenClick(ee),ne}return C(oe,[{key:"resolveOptions",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof K.action=="function"?K.action:this.defaultAction,this.target=typeof K.target=="function"?K.target:this.defaultTarget,this.text=typeof K.text=="function"?K.text:this.defaultText,this.container=k(K.container)==="object"?K.container:document.body}},{key:"listenClick",value:function(K){var ne=this;this.listener=p()(K,"click",function(se){return ne.onClick(se)})}},{key:"onClick",value:function(K){var ne=K.delegateTarget||K.currentTarget,se=this.action(ne)||"copy",ae=w({action:se,container:this.container,target:this.target(ne),text:this.text(ne)});this.emit(ae?"success":"error",{action:se,text:ae,trigger:ne,clearSelection:function(){ne&&ne.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(K){return P("action",K)}},{key:"defaultTarget",value:function(K){var ne=P("target",K);if(ne)return document.querySelector(ne)}},{key:"defaultText",value:function(K){return P("text",K)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(K){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return g(K,ne)}},{key:"cut",value:function(K){return O(K)}},{key:"isSupported",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ne=typeof K=="string"?[K]:K,se=!!document.queryCommandSupported;return ne.forEach(function(ae){se=se&&!!document.queryCommandSupported(ae)}),se}}]),oe}(u()),X=U},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,M,O){var y=p.apply(this,arguments);return f.addEventListener(h,y,O),{destroy:function(){f.removeEventListener(h,y,O)}}}function d(f,b,h,M,O){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(y){return u(y,b,h,M,O)}))}function p(f,b,h,M){return function(O){O.delegateTarget=l(O.target,b),O.delegateTarget&&M.call(f,O)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,M,O){if(!h&&!M&&!O)throw new Error("Missing required arguments");if(!l.string(M))throw new TypeError("Second argument must be a String");if(!l.fn(O))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,M,O);if(l.nodeList(h))return f(h,M,O);if(l.string(h))return b(h,M,O);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,M,O){return h.addEventListener(M,O),{destroy:function(){h.removeEventListener(M,O)}}}function f(h,M,O){return Array.prototype.forEach.call(h,function(y){y.addEventListener(M,O)}),{destroy:function(){Array.prototype.forEach.call(h,function(y){y.removeEventListener(M,O)})}}}function b(h,M,O){return u(document.body,h,M,O)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{const s=new S6e(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function Ca(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const qi=8,Sp=9,O1=13,Ra=27,Ox=32,C6e=33,R6e=34,yg=35,Hb=36,Ns=37,vi=38,Ls=39,Vo=40,ya=46,W6e=121,ui="alt",ia="ctrl",tp="meta",di="shift";function K0e(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function Fz(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const Ax={primary:e=>e()?[tp]:[ia],primaryShift:e=>e()?[di,tp]:[ia,di],primaryAlt:e=>e()?[ui,tp]:[ia,ui],secondary:e=>e()?[di,ui,tp]:[ia,di,ui],access:e=>e()?[ia,ui]:[di,ui],ctrl:()=>[ia],alt:()=>[ui],ctrlShift:()=>[ia,di],shift:()=>[di],shiftAlt:()=>[di,ui],undefined:()=>[]},T6e=Fz(Ax,e=>(t,n=Ca)=>[...e(n),t.toLowerCase()].join("+")),Y0e=Fz(Ax,e=>(t,n=Ca)=>{const o=n(),r={[ui]:o?"⌥":"Alt",[ia]:o?"⌃":"Ctrl",[tp]:"⌘",[di]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),K0e(t)]}),or=Fz(Y0e,e=>(t,n=Ca)=>e(t,n).join("")),Z0e=Fz(Ax,e=>(t,n=Ca)=>{const o=n(),r={[di]:"Shift",[tp]:o?"Command":"Control",[ia]:"Control",[ui]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return K0e((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function E6e(e){return[ui,ia,tp,di].filter(t=>e[`${t}Key`])}const Fs=Fz(Ax,e=>(t,n,o=Ca)=>{const r=e(o),s=E6e(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function yx(e="firstElement"){const t=z.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=z.useRef();return z.useEffect(()=>{t.current=e},[e]),Lt(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current==="firstElement"){o.current=setTimeout(()=>{const i=Ln.tabbable.find(r)[0];i&&n(i)},0);return}return n(r),()=>{o.current&&clearTimeout(o.current)}}},[])}let VO=null;function dB(e){const t=z.useRef(null),n=z.useRef(null),o=z.useRef(e);return z.useEffect(()=>{o.current=e},[e]),z.useCallback(r=>{if(r){if(t.current=r,n.current)return;n.current=r.ownerDocument.activeElement}else if(n.current){const i=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!i){var s;(s=VO)!==null&&s!==void 0||(VO=n.current);return}o.current?o.current():(n.current.isConnected?n.current:VO)?.focus(),VO=null}},[])}const B6e=["button","submit"];function N6e(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return B6e.includes(e.type)}return!1}function Q0e(e){const t=z.useRef(e);z.useEffect(()=>{t.current=e},[e]);const n=z.useRef(!1),o=z.useRef(),r=z.useCallback(()=>{clearTimeout(o.current)},[]);z.useEffect(()=>()=>r(),[]),z.useEffect(()=>{e||r()},[e,r]);const s=z.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:N6e(u)&&(n.current=!0)},[]),i=z.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function HO(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Kt(e){const t=z.useRef(),n=z.useRef(!1),o=z.useRef(!1),r=z.useRef([]),s=z.useRef(e);return s.current=e,z.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(HO(l,null),HO(i,t.current))}),r.current=e},e),z.useLayoutEffect(()=>{o.current=!1}),z.useCallback(i=>{HO(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)HO(l,i)},[])}function J0e(e){const t=z.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;z.useEffect(()=>{t.current=e},Object.values(e));const o=uB(),r=yx(e.focusOnMount),s=dB(),i=Q0e(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=z.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===Ra&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[Kt([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function pB({isDisabled:e=!1}={}){return Lt(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=Pr(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}const fB=typeof window<"u"?z.useLayoutEffect:z.useEffect;function ene({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=z.useState(!1),s=z.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});fB(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=z.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=z.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=z.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return z.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const fF=new Map;function L6e(e){if(!e)return null;let t=fF.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),fF.set(e,t),t):null)}function bB(e){const t=z.useMemo(()=>{const n=L6e(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return z.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function n1(e){const t=z.useRef();return z.useEffect(()=>{t.current=e},[e]),t.current}const Zs=()=>bB("(prefers-reduced-motion: reduce)");function j6e(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const bF=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:Jr(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:j6e(o[n].changes,t.changes)}:o.push(t),o};function P6e(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=bF(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!Jr(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=bF(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const hF={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},I6e={">=":"min-width","<":"max-width"},D6e={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=z.useContext(tne),o=!n&&`(${I6e[t]}: ${hF[e]}px)`,r=bB(o||void 0);return n?D6e[t](hF[e],n):r};m0.__experimentalWidthProvider=tne.Provider;function $6e(e,t){const n=z.useRef(null),o=z.useRef(null),r=z.useRef(),s=z.useCallback(()=>{let i=null;n.current?i=n.current:t&&(t instanceof HTMLElement?i=t:i=t.current),!(o.current&&o.current.element===i&&o.current.reporter===s)&&(r.current&&(r.current(),r.current=null),o.current={reporter:s,element:i},i&&(r.current=e(i)))},[t,e]);return z.useEffect(()=>{s()},[s]),z.useCallback(i=>{n.current=i,s()},[s])}const mF=(e,t,n)=>e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0;function F6e(e={}){const t=e.onResize,n=z.useRef(void 0);n.current=t;const o=e.round||Math.round,r=z.useRef(),[s,i]=z.useState({width:void 0,height:void 0}),c=z.useRef(!1);z.useEffect(()=>(c.current=!1,()=>{c.current=!0}),[]);const l=z.useRef({width:void 0,height:void 0}),u=$6e(z.useCallback(d=>((!r.current||r.current.box!==e.box||r.current.round!==o)&&(r.current={box:e.box,round:o,instance:new ResizeObserver(p=>{const f=p[0];let b="borderBoxSize";e.box==="border-box"?b="borderBoxSize":b=e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize";const h=mF(f,b,"inlineSize"),M=mF(f,b,"blockSize"),O=h?o(h):void 0,y=M?o(M):void 0;if(l.current.width!==O||l.current.height!==y){const _={width:O,height:y};l.current.width=O,l.current.height=y,n.current?n.current(_):c.current||i(_)}})}),r.current.instance.observe(d,{box:e.box}),()=>{r.current&&r.current.instance.unobserve(d)}),[e.box,o]),e.ref);return z.useMemo(()=>({ref:u,width:s.width,height:s.height}),[u,s?s.width:null,s?s.height:null])}function Wa(){const{ref:e,width:t,height:n}=F6e(),o=z.useMemo(()=>({width:t??null,height:n??null}),[t,n]);return[a.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1},"aria-hidden":"true",ref:e}),o]}var V6e={exports:{}};(function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof c0!=null?c0:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,M=0,O=0,y={get didTimeout(){return!1},timeRemaining:function(){var T=p-(Date.now()-M);return T<0?0:T}},_=v(function(){p=22,b=66,f=0});function v(T){var E,B,N=99,W=function(){var j=Date.now()-B;j9?o=setTimeout(w,n):(n=0,w()))}function q(){var T,E,B,N=p>9?9:1;if(M=Date.now(),d=!1,o=null,u>2||M-n-50N;E++)T=l.shift(),O++,T&&T(y);l.length?k():u=0}function S(T){return h++,l.push(T),k(),h}function C(T){var E=T-1-O;l[E]&&(l[E]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=S,s.cancelIdleCallback=C,s.document&&document.addEventListener&&(s.addEventListener("scroll",A,!0),s.addEventListener("resize",A),document.addEventListener("focus",A,!0),document.addEventListener("mouseover",A,!0),["click","keypress","touchstart","mousedown"].forEach(function(T){document.addEventListener(T,A,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(A).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(E){var B,N;if(s.requestIdleCallback=function(W,j){return j&&typeof j.timeout=="number"?E(W,j.timeout):E(W)},s.IdleCallbackDeadline&&(B=IdleCallbackDeadline.prototype)){if(N=Object.getOwnPropertyDescriptor(B,"timeRemaining"),!N||!N.configurable||!N.get)return;Object.defineProperty(B,"timeRemaining",{value:function(){return N.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:S,cancel:C}})})(V6e);function H6e(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const MF=H6e(),nne=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}MF(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,MF(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function U6e(e,t){const n=[];for(let o=0;o{let s=U6e(e,o);s.length{Rr.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function X6e(e,t){if(e.length!==t.length)return!1;for(var n=0;nPr(e,t??0,n),[e,t,n]);return z.useEffect(()=>()=>o.cancel(),[o]),o}function rne(e=""){const[t,n]=z.useState(e),[o,r]=z.useState(e),s=Ko(r,250);return z.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function FR(e,t,n){const o=one(()=>sB(e,t??0,n),[e,t,n]);return z.useEffect(()=>()=>o.cancel(),[o]),o}function If(e){const t=z.useRef();return t.current=e,t}function vx({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=If(n),u=If(o),d=If(r),p=If(s),f=If(i),b=If(c);return Lt(h=>{if(t)return;const M=e??h;let O=!1;const{ownerDocument:y}=M;function _(q){const{defaultView:S}=y;if(!q||!S||!(q instanceof S.HTMLElement)||!M.contains(q))return!1;let C=q;do if(C.dataset.isDropZone)return C===M;while(C=C.parentElement);return!1}function v(q){O||(O=!0,y.addEventListener("dragend",k),y.addEventListener("mousemove",k),u.current&&u.current(q))}function g(q){q.preventDefault(),!M.contains(q.relatedTarget)&&d.current&&d.current(q)}function A(q){!q.defaultPrevented&&b.current&&b.current(q),q.preventDefault()}function x(q){_(q.relatedTarget)||p.current&&p.current(q)}function w(q){q.defaultPrevented||(q.preventDefault(),q.dataTransfer&&q.dataTransfer.files.length,l.current&&l.current(q),k(q))}function k(q){O&&(O=!1,y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),f.current&&f.current(q))}return M.dataset.isDropZone="true",M.addEventListener("drop",w),M.addEventListener("dragenter",g),M.addEventListener("dragover",A),M.addEventListener("dragleave",x),y.addEventListener("dragenter",v),()=>{delete M.dataset.isDropZone,M.removeEventListener("drop",w),M.removeEventListener("dragenter",g),M.removeEventListener("dragover",A),M.removeEventListener("dragleave",x),y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),y.removeEventListener("dragenter",v)}},[t,e])}function sne(){return Lt(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const G6e=30;function K6e(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:G6e,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=z.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return z.useLayoutEffect(()=>{if(!c)return;const d=Sr(e.current),p=b=>{var h;if(!d)return;const M=Math.ceil(d.clientHeight/t),O=b?M:(h=o?.windowOverscan)!==null&&h!==void 0?h:M,y=Math.floor(d.scrollTop/t),_=Math.max(0,y-O),v=Math.min(n-1,y+M+O);u(g=>{const A={visibleItems:M,start:_,end:v,itemInView:x=>_<=x&&x<=v};return g.start!==A.start||g.end!==A.end||g.visibleItems!==A.visibleItems?A:g})};p(!0);const f=Pr(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),z.useLayoutEffect(()=>{if(!c)return;const d=Sr(e.current),p=f=>{switch(f.keyCode){case Hb:return d?.scrollTo({top:0});case yg:return d?.scrollTo({top:n*t});case C6e:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case R6e:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function ine(e,t){const[n,o]=z.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return z.useSyncExternalStore(n,o,o)}function ane(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function nt(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function w6(e){return e.isRegistryControl=!0,e}const Y6e="@@data/SELECT",Z6e="@@data/RESOLVE_SELECT",Q6e="@@data/DISPATCH",J6e={[Y6e]:w6(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[Z6e]:w6(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[Q6e]:w6(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},eqe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews"],gF=[];let VR;try{VR=!globalThis.IS_WORDPRESS_CORE}catch{VR=!0}const ur=(e,t)=>{if(!eqe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!VR&&gF.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return gF.push(t),{lock:tqe,unlock:nqe}};function tqe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");TM in e||(e[TM]={}),cne.set(e[TM],t)}function nqe(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(TM in e))throw new Error("Cannot unlock an object that was not locked before. ");return cne.get(e[TM])}const cne=new WeakMap,TM=Symbol("Private API ID"),{lock:iM,unlock:Df}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),oqe=()=>e=>t=>E0e(t)?t.then(n=>{if(n)return e(n)}):e(t),rqe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function sqe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const iqe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function Ll(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const aqe=iqe("selectorName")((e=new oa,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new oa(e);for(const o of t.args)n.set(Ll(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new oa(e);for(const o of t.args)n.set(Ll(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new oa(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(Ll(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new oa(e);return n.delete(Ll(t.args)),n}}return e}),cqe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return aqe(e,t)}return e};var k6={};function lqe(e){return[e]}function uqe(e){return!!e&&typeof e=="object"}function dqe(){var e={clear:function(){e.head=null}};return e}function zF(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const zqe=ot(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),Oqe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:zqe,getCachedResolvers:Mqe,getIsResolving:pqe,getResolutionError:hqe,getResolutionState:cf,hasFinishedResolution:fqe,hasResolutionFailed:bqe,hasResolvingSelectors:gqe,hasStartedResolution:lne,isResolving:mqe},Symbol.toStringTag,{value:"Module"}));function une(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function dne(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function pne(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function Aqe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function yqe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function vqe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function xqe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function _qe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function wqe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const kqe=Object.freeze(Object.defineProperty({__proto__:null,failResolution:pne,failResolutions:vqe,finishResolution:dne,finishResolutions:yqe,invalidateResolution:xqe,invalidateResolutionForStore:_qe,invalidateResolutionForStoreSelector:wqe,startResolution:une,startResolutions:Aqe},Symbol.toStringTag,{value:"Module"})),q6=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},Ql=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),qqe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function Sqe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(q6(n))},clear(t,n){e[t]&&e[t].delete(q6(n))},markAsRunning(t,n){e[t]||(e[t]=new oa),e[t].set(q6(n),!0)}}}function OF(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function rr(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=Cqe(e,t,i,{registry:i,get dispatch(){return O},get select(){return w},get resolveSelect(){return T()}});iM(d,r);const p=Sqe();function f(W){return(...j)=>Promise.resolve(d.dispatch(W(...j)))}const b={...Ql(kqe,f),...Ql(t.actions,f)},h=OF(f),M=new Proxy(()=>{},{get:(W,j)=>{const I=n[j];return I?h.get(I,j):b[j]}}),O=new Proxy(M,{apply:(W,j,[I])=>d.dispatch(I)});iM(b,M);const y=t.resolvers?Tqe(t.resolvers):{};function _(W,j){W.isRegistrySelector&&(W.registry=i);const I=(...U)=>{U=HR(W,U);const X=d.__unstableOriginalGetState();return W.isRegistrySelector&&(W.registry=i),W(X.root,...U)};I.__unstableNormalizeArgs=W.__unstableNormalizeArgs;const P=y[j];return P?Eqe(I,j,P,d,p):(I.hasResolver=!1,I)}function v(W){const j=(...I)=>{const P=d.__unstableOriginalGetState(),U=I&&I[0],X=I&&I[1],H=t?.selectors?.[U];return U&&H&&(I[1]=HR(H,X)),W(P.metadata,...I)};return j.hasResolver=!1,j}const g={...Ql(Oqe,v),...Ql(t.selectors,_)},A=OF(_);for(const[W,j]of Object.entries(o))A.get(j,W);const x=new Proxy(()=>{},{get:(W,j)=>{const I=o[j];return I?A.get(I,j):g[j]}}),w=new Proxy(x,{apply:(W,j,[I])=>I(d.__unstableOriginalGetState())});iM(g,x);const k=Rqe(g,d),q=Wqe(g,d),S=()=>g,C=()=>b,T=()=>k,E=()=>q;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const B=d&&(W=>(c.add(W),()=>c.delete(W)));let N=d.__unstableOriginalGetState();return d.subscribe(()=>{const W=d.__unstableOriginalGetState(),j=W!==N;if(N=W,j)for(const I of c)I()}),{reducer:l,store:d,actions:b,selectors:g,resolvers:y,getSelectors:S,getResolveSelectors:T,getSuspendSelectors:E,getActions:C,subscribe:B}}};return iM(s,r),s}function Cqe(e,t,n,o){const r={...t.controls,...J6e},s=Ql(r,p=>p.isRegistryControl?p(n):p),i=[rqe(n,e),oqe,Yke(s),sqe(o)],c=[cke(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:qqe}}));const{reducer:l,initialState:u}=t,d=ane({metadata:cqe,root:l});return S0e(d,{root:u},x0(c))}function Rqe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return Ql(f,(b,h)=>b.hasResolver?(...M)=>new Promise((O,y)=>{const _=()=>e.hasFinishedResolution(h,M),v=w=>{if(e.hasResolutionFailed(h,M)){const q=e.getResolutionError(h,M);y(q)}else O(w)},g=()=>b.apply(null,M),A=g();if(_())return v(A);const x=t.subscribe(()=>{_()&&(x(),v(g()))})}):async(...M)=>b.apply(null,M))}function Wqe(e,t){return Ql(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function Tqe(e){return Ql(e,t=>t.fulfill?t:{...t,fulfill:t})}function Eqe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();lne(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(une(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(dne(t,c))}catch(d){o.dispatch(pne(t,c,d))}},0))}const i=(...c)=>(c=HR(e,c),s(c),e(...c));return i.hasResolver=!0,i}function HR(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const Bqe={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function AF(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function wm(e){return typeof e=="string"?e:e.name}function hB(e={},t=null){const n={},o=AF();let r=null;function s(){o.emit()}const i=(A,x)=>{if(!x)return o.subscribe(A);const w=wm(x),k=n[w];return k?k.subscribe(A):t?t.subscribe(A,x):o.subscribe(A)};function c(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getSelectors():t?.select(x)}function l(A,x){r=new Set;try{return A.call(this)}finally{x.current=Array.from(r),r=null}}function u(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getResolveSelectors():t&&t.resolveSelect(x)}function d(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getSuspendSelectors():t&&t.suspendSelect(x)}function p(A){const x=wm(A),w=n[x];return w?w.getActions():t&&t.dispatch(x)}function f(A){return Object.fromEntries(Object.entries(A).map(([x,w])=>typeof w!="function"?[x,w]:[x,function(){return _[x].apply(null,arguments)}]))}function b(A,x){if(n[A])return console.error('Store "'+A+'" is already registered.'),n[A];const w=x();if(typeof w.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof w.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof w.subscribe!="function")throw new TypeError("store.subscribe must be a function");w.emitter=AF();const k=w.subscribe;if(w.subscribe=q=>{const S=w.emitter.subscribe(q),C=k(()=>{if(w.emitter.isPaused){w.emitter.emit();return}q()});return()=>{C?.(),S?.()}},n[A]=w,w.subscribe(s),t)try{Df(w.store).registerPrivateActions(Df(t).privateActionsOf(A)),Df(w.store).registerPrivateSelectors(Df(t).privateSelectorsOf(A))}catch{}return w}function h(A){b(A.name,()=>A.instantiate(_))}function M(A,x){Ce("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(A,()=>x)}function O(A,x){if(!x.reducer)throw new TypeError("Must specify store reducer");return b(A,()=>rr(A,x).instantiate(_)).store}function y(A){if(o.isPaused){A();return}o.pause(),Object.values(n).forEach(x=>x.emitter.pause());try{A()}finally{o.resume(),Object.values(n).forEach(x=>x.emitter.resume())}}let _={batch:y,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:M,registerStore:O,__unstableMarkListeningStores:l};function v(A,x){if(A)return _={..._,...A(_,x)},_}_.register(Bqe);for(const[A,x]of Object.entries(e))_.register(rr(A,x));t&&t.subscribe(s);const g=f(_);return iM(g,{privateActionsOf:A=>{try{return Df(n[A].store).privateActions}catch{return{}}},privateSelectorsOf:A=>{try{return Df(n[A].store).privateSelectors}catch{return{}}}}),g}const Ha=hB();var Nqe=function(t){return Lqe(t)&&!jqe(t)};function Lqe(e){return!!e&&typeof e=="object"}function jqe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Dqe(e)}var Pqe=typeof Symbol=="function"&&Symbol.for,Iqe=Pqe?Symbol.for("react.element"):60103;function Dqe(e){return e.$$typeof===Iqe}function $qe(e){return Array.isArray(e)?[]:{}}function vg(e,t){return t.clone!==!1&&t.isMergeableObject(e)?O2($qe(e),e,t):e}function Fqe(e,t,n){return e.concat(t).map(function(o){return vg(o,n)})}function Vqe(e,t){if(!t.customMerge)return O2;var n=t.customMerge(e);return typeof n=="function"?n:O2}function Hqe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function yF(e){return Object.keys(e).concat(Hqe(e))}function fne(e,t){try{return t in e}catch{return!1}}function Uqe(e,t){return fne(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Xqe(e,t,n){var o={};return n.isMergeableObject(e)&&yF(e).forEach(function(r){o[r]=vg(e[r],n)}),yF(t).forEach(function(r){Uqe(e,r)||(fne(e,r)&&n.isMergeableObject(t[r])?o[r]=Vqe(r,n)(e[r],t[r],n):o[r]=vg(t[r],n))}),o}function O2(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Fqe,n.isMergeableObject=n.isMergeableObject||Nqe,n.cloneUnlessOtherwiseSpecified=vg;var o=Array.isArray(t),r=Array.isArray(e),s=o===r;return s?o?n.arrayMerge(e,t,n):Xqe(e,t,n):vg(t,n)}O2.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,r){return O2(o,r,n)},{})};var Gqe=O2,Kqe=Gqe;const bne=Ao(Kqe),hne=z.createContext(Ha),{Consumer:qb0,Provider:mne}=hne;function O0(){return z.useContext(hne)}const Mne=z.createContext(!1),{Consumer:Sb0,Provider:Yqe}=Mne,xx=Yqe;function Zqe(){return z.useContext(Mne)}const S6=nne();function Qqe(e,t){const n=e.select,o={};let r,s,i=!1,c,l;const u=new Map;function d(f){var b;return(b=e.stores[f]?.store?.getState?.())!==null&&b!==void 0?b:{}}const p=f=>{const b=[...f],h=new Set;function M(y){if(i)for(const x of b)u.get(x)!==d(x)&&(i=!1);u.clear();const _=()=>{i=!1,y()},v=()=>{c?S6.add(o,_):_()},g=[];function A(x){g.push(e.subscribe(v,x))}for(const x of b)A(x);return h.add(A),()=>{h.delete(A);for(const x of g.values())x?.();S6.cancel(o)}}function O(y){for(const _ of y)if(!b.includes(_)){b.push(_);for(const v of h)v(_)}}return{subscribe:M,updateStores:O}};return(f,b)=>{function h(){if(i&&f===r)return s;const O={current:null},y=e.__unstableMarkListeningStores(()=>f(n,e),O);if(l)l.updateStores(O.current);else{for(const _ of O.current)u.set(_,d(_));l=p(O.current)}Jr(s,y)||(s=y),r=f,i=!0}function M(){return h(),s}return c&&!b&&(i=!1,S6.cancel(o)),h(),c=b,{subscribe:l.subscribe,getValue:M}}}function Jqe(e){return O0().select(e)}function eSe(e,t,n){const o=O0(),r=Zqe(),s=z.useMemo(()=>Qqe(o),[o,e]),i=z.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=z.useSyncExternalStore(c,l,l);return z.useDebugValue(u),u}function D(e,t){const n=typeof e!="function",o=z.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?Jqe(e):eSe(!1,e,t)}const Yo=e=>Rn(t=>Jke(n=>{const r=D((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),ie=e=>{const{dispatch:t}=O0();return e===void 0?t:t(e)},tSe=(e,t)=>{const n=O0(),o=z.useRef(e);return fB(()=>{o.current=e}),z.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Ii=e=>Rn(t=>n=>{const r=tSe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function sr(e){return Ha.dispatch(e)}function U0(e){return Ha.select(e)}const go=ane,nSe=Ha.resolveSelect;Ha.suspendSelect;Ha.subscribe;Ha.registerGenericStore;const oSe=Ha.registerStore;Ha.use;const Qs=Ha.register;var rSe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const G1=Ao(rSe);function sSe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)G1(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Wu(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const gne=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,mB=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},vF=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},zne=e=>t=>(n,o)=>t(n,e(o));function iSe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function aSe(e,t){return(e.rawAttributes||[]).includes(t)}function _x(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function cSe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function lSe(e){return/^\s*\d+\s*$/.test(e)}const Ey=["create","read","update","delete"];function One(e){const t={},n=e.headers?.get("allow")||"",o={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[r,s]of Object.entries(o))t[r]=n.includes(s);return t}function MB(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}function Ane(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function uSe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function dSe(e,t={},n,o){return{...Ane(e,n,o),query:t}}function pSe(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{_=_?.[v]}),_x(M,y,_)}}else{if(!e.itemIsComplete[c]?.[b])return null;M=h}p.push(M)}return p}const yne=ot((e,t={})=>{let n=xF.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new oa,xF.set(e,n);const o=fSe(e,t);return n.set(t,o),o});function vne(e,t={}){var n;const{stableKey:o,context:r}=fh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function bSe(e,t={}){var n;const{stableKey:o,context:r}=fh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function hSe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const mSe=go({formatTypes:hSe}),gB=ot(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function MSe(e,t){return e.formatTypes[t]}function gSe(e,t){const n=gB(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function zSe(e,t){return gB(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const OSe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:MSe,getFormatTypeForBareElement:gSe,getFormatTypeForClassName:zSe,getFormatTypes:gB},Symbol.toStringTag,{value:"Module"}));function ASe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function ySe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const vSe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:ASe,removeFormatTypes:ySe},Symbol.toStringTag,{value:"Module"})),xSe="core/rich-text",yc=rr(xSe,{reducer:mSe,selectors:OSe,actions:vSe});Qs(yc);function tv(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];tv(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function _F(e,t,n){return e=e.slice(),e[t]=n,e}function xi(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=_F(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=_F(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function vc({implementation:e},t){return vc.body||(vc.body=e.createHTMLDocument("").body),vc.body.innerHTML=t,vc.body}const gu="",xne="\uFEFF";function zB(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthtv(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function _ne(e){return U0(yc).getFormatType(e)}function wF(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function UO({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=_ne(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:wF(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:wF(l,i)}}function _Se(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function wne({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:M,text:O,start:y,end:_}=e,v=h.length+1,g=n(),A=zB(e),x=A[A.length-1];let w,k;o(g,"");for(let q=0;q{if(E&&w&&_Se(T,w,N)){E=r(E);return}const{type:W,tagName:j,attributes:I,unregisteredAttributes:P}=B,U=f&&B===x,X=s(E),H=o(X,UO({type:W,tagName:j,attributes:I,unregisteredAttributes:P,boundaryClass:U,isEditableTree:f}));i(E)&&c(E).length===0&&l(E),E=o(H,"")}),q===0&&(d&&y===0&&d(g,E),p&&_===0&&p(g,E)),S===gu){const B=M[q];if(!B)continue;const{type:N,attributes:W,innerHTML:j}=B,I=_ne(N);!f&&N==="script"?(E=o(s(E),UO({type:"script",isEditableTree:f})),o(E,{html:decodeURIComponent(W["data-rich-text-script"])})):I?.contentEditable===!1?(E=o(s(E),UO({...B,isEditableTree:f,boundaryClass:y===q&&_===q+1})),j&&o(E,{html:j})):E=o(s(E),UO({...B,object:!0,isEditableTree:f})),E=o(s(E),"")}else!t&&S===` -`?(E=o(s(E),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),E=o(s(E),"")):i(E)?u(E,S):E=o(s(E),S);d&&y===q+1&&d(g,E),p&&_===q+1&&p(g,E),C&&q===O.length&&(o(s(E),xne),b&&O.length===0&&o(s(E),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),w=T,k=S}return g}function S1({value:e,preserveWhiteSpace:t}){const n=wne({value:e,preserveWhiteSpace:t,createEmpty:wSe,append:qSe,getLastChild:kSe,getParent:CSe,isText:RSe,getText:WSe,remove:TSe,appendText:SSe});return kne(n.children)}function wSe(){return{}}function kSe({children:e}){return e&&e[e.length-1]}function qSe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function SSe(e,t){e.text+=t}function CSe({parent:e}){return e}function RSe({text:e}){return typeof e=="string"}function WSe({text:e}){return e}function TSe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function ESe({type:e,attributes:t,object:n,children:o}){let r="";for(const s in t)l0e(s)&&(r+=` ${s}="${ux(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${kne(o)}`}function kne(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?ESe(t):Y_e(t.text)).join("")}function lp({text:e}){return e.replace(gu,"")}function Ud(){return{formats:[],replacements:[],text:""}}function BSe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=U0(yc).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=U0(yc).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class dn{#e;static empty(){return new dn}static fromPlainText(t){return new dn(b0({text:t}))}static fromHTMLString(t){return new dn(b0({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:qne(t),s=new dn(b0({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=Ud()){this.#e=t}toPlainText(){return lp(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||S1({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))dn.prototype.hasOwnProperty(e)||Object.defineProperty(dn.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function b0({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof dn?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=vc(document,n)),typeof e!="object"?Ud():Sne({element:e,range:o,isEditableTree:r}))}function Rd(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function NSe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function qne(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&qne(o,!1)}),n}const LSe="\r";function kF(e){return e.replace(new RegExp(`[${xne}${gu}${LSe}]`,"gu"),"")}function Sne({element:e,range:t,isEditableTree:n}){const o=Ud();if(!e)return o;if(!e.hasChildNodes())return Rd(o,e,t,Ud()),o;const r=e.childNodes.length;for(let i=0;in===t)}function ISe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==gu))return n[e]}function ld({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function UR({text:e}){return e.length===0}function DSe(e,t=""){return typeof t=="string"&&(t=b0({text:t})),bh(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function Cne(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(U0(yc).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=U0(yc).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=U0(yc).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return sr(yc).addFormatTypes(t),t}function ud(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)C6(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)C6(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function C6(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function H1(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=b0({text:t}));const c=n+t.text.length;return bh({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function Si(e,t,n){return H1(e,b0(),t,n)}function $Se({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),bh({formats:e,replacements:t,text:n,start:o,end:r})}function Rne(e,t,n,o){return H1(e,{formats:[,],replacements:[t],text:gu},n,o)}function A2(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function AB({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return FSe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function FSe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function Wne(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function XR(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=XR(o,t,n)),n}function qF(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function VSe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n){t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function HSe(e,t){e.appendData(t)}function USe({lastChild:e}){return e}function XSe({parentNode:e}){return e}function GSe(e){return e.nodeType===e.TEXT_NODE}function KSe({nodeValue:e}){return e}function YSe(e){return e.parentNode.removeChild(e)}function ZSe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:wne({value:e,createEmpty:()=>vc(r,""),append:VSe,getLastChild:USe,getParent:XSe,isText:GSe,getText:KSe,remove:YSe,appendText:HSe,onStartIndex(u,d){s=XR(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=XR(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function QSe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=ZSe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});Tne(s,t),e.start!==void 0&&!o&&JSe(i,t)}function Tne(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(Wne(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function eCe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function tCe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function SF(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function nCe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),CF===e&&(e+=" "),CF=e,e}function rCe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&tCe(),t===null&&SF("assertive"),n===null&&SF("polite")}eCe(rCe);function At(e,t){nCe(),e=oCe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function Ta(e,t){return OB(e,t.type)?(t.title&&At(le(m("%s removed."),t.title),"assertive"),ud(e,t.type)):(t.title&&At(le(m("%s applied."),t.title),"assertive"),xi(e,t))}function sCe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function iCe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function R6(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=sCe(i,e,t,n);return c||iCe(i,e)}function Vz({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=z.useState(()=>R6(e,n,o)),c=n1(r);return z.useLayoutEffect(()=>{if(!e)return;function l(){i(R6(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(R6(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const aCe="pre-wrap",cCe="1px";function lCe(){return z.useCallback(e=>{e&&(e.style.whiteSpace=aCe,e.style.minWidth=cCe)},[])}function uCe({record:e}){const t=z.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return z.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,M="rich-text-boundary-style";let O=l.getElementById(M);O||(O=l.createElement("style"),O.id=M,l.head.appendChild(O)),O.innerHTML!==h&&(O.innerHTML=h)},[n,s]),t}const dCe=e=>t=>{function n(r){const{record:s}=e.current,{ownerDocument:i}=t;if(ld(s.current)||!t.contains(i.activeElement))return;const c=A2(s.current),l=lp(c),u=S1({value:c});r.clipboardData.setData("text/plain",l),r.clipboardData.setData("text/html",u),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&i.execCommand("delete")}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},pCe=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},RF=[],fCe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==Ns&&r!==Ls)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:M,activeFormats:O=[]}=u.current,y=ld(u.current),{ownerDocument:_}=t,{defaultView:v}=_,{direction:g}=v.getComputedStyle(t),A=g==="rtl"?Ls:Ns,x=o.keyCode===A;if(y&&O.length===0&&(h===0&&x||M===f.length&&!x)||!y)return;const w=b[h-1]||RF,k=b[h]||RF,q=x?w:k,S=O.every((W,j)=>W===q[j]);let C=O.length;if(S?C{t.removeEventListener("keydown",n)}},bCe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==ya&&r!==qi)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(Si(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function hCe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(tv(l,i[u]))return i[u]}else if(c[u]&&tv(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const mCe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),WF=[],Ene="data-rich-text-placeholder";function MCe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(Ene)||t.collapseToStart()}const gCe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:M}=e.current;if(p&&(p.indexOf("format")===0||mCe.has(p))){b(f.current);return}const O=h(),{start:y,activeFormats:_=[]}=f.current,v=hCe({value:O,start:y,end:O.start,formats:_});M(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;if(n.activeElement!==t){n.removeEventListener("selectionchange",i);return}if(r)return;const{start:h,end:M,text:O}=f(),y=d.current;if(O!==y.text){s();return}if(h===y.start&&M===y.end){y.text.length===0&&h===0&&MCe(o);return}const _={...y,start:h,end:M,activeFormats:y._newActiveFormats,_newActiveFormats:void 0},v=zB(_,WF);_.activeFormats=v,d.current=_,p(_,{domOnly:!0}),b(h,M)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${Ene}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:WF},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u)}},zCe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!Wne(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}},OCe=[dCe,pCe,fCe,bCe,gCe,zCe];function ACe(e){const t=z.useRef(e);t.current=e;const n=z.useMemo(()=>OCe.map(o=>o(t)),[t]);return Lt(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function Bne({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=O0(),[,h]=z.useReducer(()=>({})),M=z.useRef();function O(){const{ownerDocument:{defaultView:S}}=M.current,C=S.getSelection(),T=C.rangeCount>0?C.getRangeAt(0):null;return b0({element:M.current,range:T,__unstableIsEditableTree:!0})}function y(S,{domOnly:C}={}){QSe({value:S,current:M.current,prepareEditableTree:f,__unstableDomOnly:C,placeholder:o})}const _=z.useRef(e),v=z.useRef();function g(){_.current=e,v.current=e,e instanceof dn||(v.current=e?dn.fromHTMLString(e,{preserveWhiteSpace:s}):dn.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const A=z.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(A.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(A.current=l,g());function x(S){if(v.current=S,y(S),c)_.current=S.text;else{const N=p?p(S):S.formats;S={...S,formats:N},typeof e=="string"?_.current=S1({value:S,preserveWhiteSpace:s}):_.current=new dn(S)}const{start:C,end:T,formats:E,text:B}=v.current;b.batch(()=>{r(C,T),i(_.current,{__unstableFormats:E,__unstableText:B})}),h()}function w(){g(),y(v.current)}const k=z.useRef(!1);z.useLayoutEffect(()=>{k.current&&e!==_.current&&(w(),h())},[e]),z.useLayoutEffect(()=>{A.current&&(M.current.ownerDocument.activeElement!==M.current&&M.current.focus(),y(v.current),A.current=!1)},[A.current]);const q=Kt([M,lCe(),uCe({record:v}),ACe({record:v,handleChange:x,applyRecord:y,createRecord:O,isSelected:l,onSelectionChange:r,forceRender:h}),Lt(()=>{w(),k.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:x,ref:q}}let XO;const yCe=new Uint8Array(16);function vCe(){if(!XO&&(XO=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!XO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return XO(yCe)}const no=[];for(let e=0;e<256;++e)no.push((e+256).toString(16).slice(1));function xCe(e,t=0){return no[e[t+0]]+no[e[t+1]]+no[e[t+2]]+no[e[t+3]]+"-"+no[e[t+4]]+no[e[t+5]]+"-"+no[e[t+6]]+no[e[t+7]]+"-"+no[e[t+8]]+no[e[t+9]]+"-"+no[e[t+10]]+no[e[t+11]]+no[e[t+12]]+no[e[t+13]]+no[e[t+14]]+no[e[t+15]]}const _Ce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TF={randomUUID:_Ce};function Uc(e,t,n){if(TF.randomUUID&&!t&&!e)return TF.randomUUID();e=e||{};const o=e.random||(e.rng||vCe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,xCe(o)}let W6=null;function wCe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function kCe(e){W6===null&&(W6=(await pt({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of wCe(e,W6)){const o=await pt({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function qCe(e=kCe){let t=0,n=[];const o=new SCe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class SCe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const fo="core",Cr=()=>new Map,GR=e=>{const t=Cr();return e.forEach((n,o)=>{t.set(o,n)}),t},Ho=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},CCe=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},RCe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},Tu=()=>new Set,T6=e=>e[e.length-1],WCe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Xc((this._observers.get(t)||Cr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Cr()}}class Hz{constructor(){this._observers=Cr()}on(t,n){Ho(this._observers,t,Tu).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Xc((this._observers.get(t)||Cr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Cr()}}const Ea=Math.floor,By=Math.abs,BCe=Math.log10,yB=(e,t)=>ee>t?e:t,Nne=e=>e!==0?e<0:1/e<0,EF=1,BF=2,E6=4,B6=8,xg=32,Rc=64,es=128,wx=31,KR=63,up=127,NCe=2147483647,Lne=Number.MAX_SAFE_INTEGER,LCe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Ea(e)===e),jCe=String.fromCharCode,PCe=e=>e.toLowerCase(),ICe=/^\s*/g,DCe=e=>e.replace(ICe,""),$Ce=/([A-Z])/g,NF=(e,t)=>DCe(e.replace($Ce,n=>`${t}${PCe(n)}`)),FCe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;r_g.encode(e),YR=_g?VCe:FCe;let EM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});EM&&EM.decode(new Uint8Array).length===1&&(EM=null);class Uz{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const P1=()=>new Uz,HCe=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(HCe(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},wg=B1,Wt=(e,t)=>{for(;t>up;)B1(e,es|up&t),t=Ea(t/128);B1(e,up&t)},vB=(e,t)=>{const n=Nne(t);for(n&&(t=-t),B1(e,(t>KR?es:0)|(n?Rc:0)|KR&t),t=Ea(t/64);t>0;)B1(e,(t>up?es:0)|up&t),t=Ea(t/128)},ZR=new Uint8Array(3e4),XCe=ZR.length/3,GCe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;Wt(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=yB(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(lf(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},Jn=(e,t)=>{Wt(e,t.byteLength),kx(e,t)},xB=(e,t)=>{UCe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},YCe=(e,t)=>xB(e,4).setFloat32(0,t,!1),ZCe=(e,t)=>xB(e,8).setFloat64(0,t,!1),QCe=(e,t)=>xB(e,8).setBigInt64(0,t,!1),LF=new DataView(new ArrayBuffer(4)),JCe=e=>(LF.setFloat32(0,e),LF.getFloat32(0)===e),y2=(e,t)=>{switch(typeof t){case"string":B1(e,119),va(e,t);break;case"number":LCe(t)&&By(t)<=NCe?(B1(e,125),vB(e,t)):JCe(t)?(B1(e,124),YCe(e,t)):(B1(e,123),ZCe(e,t));break;case"bigint":B1(e,122),QCe(e,t);break;case"object":if(t===null)B1(e,126);else if(TCe(t)){B1(e,117),Wt(e,t.length);for(let n=0;n0&&Wt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const PF=e=>{e.count>0&&(vB(e.encoder,e.count===1?e.s:-e.s),e.count>1&&Wt(e.encoder,e.count-2))};class Ny{constructor(){this.encoder=new Uz,this.s=0,this.count=0}write(t){this.s===t?this.count++:(PF(this),this.count=1,this.s=t)}toUint8Array(){return PF(this),Fn(this.encoder)}}const IF=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);vB(e.encoder,t),e.count>1&&Wt(e.encoder,e.count-2)}};class N6{constructor(){this.encoder=new Uz,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(IF(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return IF(this),Fn(this.encoder)}}class eRe{constructor(){this.sarr=[],this.s="",this.lensE=new Ny}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Uz;return this.sarr.push(this.s),this.s="",va(t,this.sarr.join("")),kx(t,this.lensE.toUint8Array()),Fn(t)}}const Ci=e=>new Error(e),xa=()=>{throw Ci("Method unimplemented")},Ba=()=>{throw Ci("Unexpected case")},jne=Ci("Unexpected end of array"),Pne=Ci("Integer out of Range");class qx{constructor(t){this.arr=t,this.pos=0}}const Ua=e=>new qx(e),tRe=e=>e.pos!==e.arr.length,nRe=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},N1=e=>nRe(e,Qt(e)),Cp=e=>e.arr[e.pos++],Qt=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posLne)throw Pne}throw jne},_B=e=>{let t=e.arr[e.pos++],n=t&KR,o=64;const r=(t&Rc)>0?-1:1;if(!(t&es))return r*n;const s=e.arr.length;for(;e.posLne)throw Pne}throw jne},oRe=e=>{let t=Qt(e);if(t===0)return"";{let n=String.fromCodePoint(Cp(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Cp(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},rRe=e=>EM.decode(N1(e)),Wc=EM?rRe:oRe,wB=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},sRe=e=>wB(e,4).getFloat32(0,!1),iRe=e=>wB(e,8).getFloat64(0,!1),aRe=e=>wB(e,8).getBigInt64(0,!1),cRe=[e=>{},e=>null,_B,sRe,iRe,aRe,e=>!1,e=>!0,Wc,e=>{const t=Qt(e),n={};for(let o=0;o{const t=Qt(e),n=[];for(let o=0;ocRe[127-Cp(e)](e);class DF extends qx{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),tRe(this)?this.count=Qt(this)+1:this.count=-1),this.count--,this.s}}class Ly extends qx{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=_B(this);const t=Nne(this.s);this.count=1,t&&(this.s=-this.s,this.count=Qt(this)+2)}return this.count--,this.s}}class L6 extends qx{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=_B(this),n=t&1;this.diff=Ea(t/2),this.count=1,n&&(this.count=Qt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class lRe{constructor(t){this.decoder=new Ly(t),this.str=Wc(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const uRe=crypto.getRandomValues.bind(crypto),dRe=Math.random,Ine=()=>uRe(new Uint32Array(1))[0],pRe="10000000-1000-4000-8000"+-1e11,Dne=()=>pRe.replace(/[018]/g,e=>(e^Ine()&15>>e/4).toString(16)),Gc=Date.now,x2=e=>new Promise(e);Promise.all.bind(Promise);const fRe=e=>Promise.reject(e),kB=e=>Promise.resolve(e),$F=e=>e===void 0?null:e;class bRe{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let $ne=new bRe,qB=!0;try{typeof localStorage<"u"&&localStorage&&($ne=localStorage,qB=!1)}catch{}const Fne=$ne,hRe=e=>qB||addEventListener("storage",e),mRe=e=>qB||removeEventListener("storage",e),MRe=Object.assign,Vne=Object.keys,gRe=(e,t)=>{for(const n in e)t(e[n],n)},FF=e=>Vne(e).length,VF=e=>Vne(e).length,zRe=e=>{for(const t in e)return!1;return!0},ORe=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},Hne=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ARe=(e,t)=>e===t||VF(e)===VF(t)&&ORe(e,(n,o)=>(n!==void 0||Hne(t,o))&&t[o]===n),SB=(e,t,n=0)=>{try{for(;n{},vRe=e=>e,xRe=(e,t)=>e===t,BM=(e,t)=>{if(e==null||t==null)return xRe(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var Une={};const _2=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Xne=typeof window<"u"&&typeof document<"u"&&!_2;let Ki;const wRe=()=>{if(Ki===void 0)if(_2){Ki=Cr();const e=process.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Ki.set(`--${NF(t,"-")}`,n),Ki.set(`-${NF(t,"-")}`,n)}})):Ki=Cr();return Ki},QR=e=>wRe().has(e),nv=e=>$F(_2?Une[e.toUpperCase().replaceAll("-","_")]:Fne.getItem(e)),Gne=e=>QR("--"+e)||nv(e)!==null;Gne("production");const kRe=_2&&_Re(Une.FORCE_COLOR,["true","1","2"]),qRe=kRe||!QR("--no-colors")&&!Gne("no-color")&&(!_2||process.stdout.isTTY)&&(!_2||QR("--color")||nv("COLORTERM")!==null||(nv("TERM")||"").includes("color")),Kne=e=>new Uint8Array(e),SRe=(e,t,n)=>new Uint8Array(e,t,n),CRe=e=>new Uint8Array(e),RRe=e=>{let t="";for(let n=0;nBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),TRe=e=>{const t=atob(e),n=Kne(t.length);for(let o=0;o{const t=Buffer.from(e,"base64");return SRe(t.buffer,t.byteOffset,t.byteLength)},Yne=Xne?RRe:WRe,CB=Xne?TRe:ERe,BRe=e=>{const t=Kne(e.byteLength);return t.set(e),t};class NRe{constructor(t,n){this.left=t,this.right=n}}const sc=(e,t)=>new NRe(e,t);typeof DOMParser<"u"&&new DOMParser;const LRe=e=>CCe(e,(t,n)=>`${n}:${t};`).join(""),jRe=JSON.stringify,pl=Symbol,js=pl(),Rp=pl(),Zne=pl(),RB=pl(),Qne=pl(),Jne=pl(),e1e=pl(),WB=pl(),Sx=pl(),PRe=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=HF[j6],o=nv("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return j6=(j6+1)%HF.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=Gc(),c=i-UF;UF=i,e(n,t,Sx,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return jRe(l)}}),n," +"+c+"ms")}:yRe},DRe={[js]:sc("font-weight","bold"),[Rp]:sc("font-weight","normal"),[Zne]:sc("color","blue"),[Qne]:sc("color","green"),[RB]:sc("color","grey"),[Jne]:sc("color","red"),[e1e]:sc("color","purple"),[WB]:sc("color","orange"),[Sx]:sc("color","black")},$Re=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=Cr();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...FRe(e)),VRe.forEach(t=>t.print(e))},VRe=Tu(),HRe=e=>IRe(t1e,e),n1e=e=>({[Symbol.iterator](){return this},next:e}),URe=(e,t)=>n1e(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),P6=(e,t)=>n1e(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class TB{constructor(t,n){this.clock=t,this.len=n}}class Xz{constructor(){this.clients=new Map}}const o1e=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=Ea((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&XRe(n,t.clock)!==null},EB=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=lf(r.len,s.clock+s.len-r.clock):(o{const t=new Xz;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{Ho(e.clients,t,()=>[]).push(new TB(n,o))},KRe=()=>new Xz,YRe=e=>{const t=KRe();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},hh=(e,t)=>{Wt(e.restEncoder,t.clients.size),Xc(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),Wt(e.restEncoder,n);const r=o.length;Wt(e.restEncoder,r);for(let s=0;s{const t=new Xz,n=Qt(e.restDecoder);for(let o=0;o0){const i=Ho(t.clients,r,()=>[]);for(let c=0;c{const o=new Xz,r=Qt(e.restDecoder);for(let s=0;s0){const s=new Wp;return Wt(s.restEncoder,0),hh(s,o),s.toUint8Array()}return null},s1e=Ine;class mh extends ECe{constructor({guid:t=Dne(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=s1e(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new h1e,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.whenLoaded=x2(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>x2(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&un(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Xc(this.subdocs).map(t=>t.guid))}transact(t,n=null){return un(this,t,n)}get(t,n=bo){const o=Ho(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==bo&&r!==n)if(r===bo){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,Xb)}getText(t=""){return this.get(t,q2)}getMap(t=""){return this.get(t,k2)}getXmlElement(t=""){return this.get(t,S2)}getXmlFragment(t=""){return this.get(t,Tp)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){Xc(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new mh({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,un(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class i1e{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Qt(this.restDecoder)}readDsLen(){return Qt(this.restDecoder)}}class a1e extends i1e{readLeftID(){return M0(Qt(this.restDecoder),Qt(this.restDecoder))}readRightID(){return M0(Qt(this.restDecoder),Qt(this.restDecoder))}readClient(){return Qt(this.restDecoder)}readInfo(){return Cp(this.restDecoder)}readString(){return Wc(this.restDecoder)}readParentInfo(){return Qt(this.restDecoder)===1}readTypeRef(){return Qt(this.restDecoder)}readLen(){return Qt(this.restDecoder)}readAny(){return v2(this.restDecoder)}readBuf(){return BRe(N1(this.restDecoder))}readJSON(){return JSON.parse(Wc(this.restDecoder))}readKey(){return Wc(this.restDecoder)}}class ZRe{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Qt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Qt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class w2 extends ZRe{constructor(t){super(t),this.keys=[],Qt(t),this.keyClockDecoder=new L6(N1(t)),this.clientDecoder=new Ly(N1(t)),this.leftClockDecoder=new L6(N1(t)),this.rightClockDecoder=new L6(N1(t)),this.infoDecoder=new DF(N1(t),Cp),this.stringDecoder=new lRe(N1(t)),this.parentInfoDecoder=new DF(N1(t),Cp),this.typeRefDecoder=new Ly(N1(t)),this.lenDecoder=new Ly(N1(t))}readLeftID(){return new Ub(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Ub(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return v2(this.restDecoder)}readBuf(){return N1(this.restDecoder)}readJSON(){return v2(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=lf(o,t[0].id.clock);const r=Na(t,o);Wt(e.restEncoder,t.length-r),e.writeClient(n),Wt(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{D1(t,s)>r&&o.set(s,r)}),Cx(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),Wt(e.restEncoder,o.size),Xc(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{QRe(e,t.clients.get(r),r,s)})},JRe=(e,t)=>{const n=Cr(),o=Qt(e.restDecoder);for(let r=0;r{const o=[];let r=Xc(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new h1e,l=new Map,u=(b,h)=>{const M=l.get(b);(M==null||M>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,M=n.get(h);M?(M.i--,c.clients.set(h,M.refs.slice(M.i)),n.delete(h),M.i=0,M.refs=[]):c.clients.set(h,[b]),r=r.filter(O=>O!==h)}o.length=0};for(;;){if(d.constructor!==Ws){const h=Ho(p,d.id.client,()=>D1(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const M=d.getMissing(e,t);if(M!==null){o.push(d);const O=n.get(M)||{refs:[],i:0};if(O.refs.length===O.i)u(M,D1(t,M)),f();else{d=O.refs[O.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new Wp;return NB(b,c,new Map),Wt(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},t8e=(e,t)=>NB(e,t.doc.store,t.beforeState),n8e=(e,t,n,o=new w2(e))=>un(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=JRe(o,i),u=e8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=rv([d.update,u.update])}}else c.pendingStructs=u;const p=XF(o,r,c);if(c.pendingDs){const f=new w2(Ua(c.pendingDs));Qt(f.restDecoder);const b=XF(f,r,c);p&&b?c.pendingDs=rv([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,u1e(r.doc,f)}},n,!1),u1e=(e,t,n,o=w2)=>{const r=Ua(t);n8e(r,e,n,new o(r))},d1e=(e,t,n)=>u1e(e,t,n,a1e),o8e=(e,t,n=new Map)=>{NB(e,t.store,n),hh(e,YRe(t.store))},r8e=(e,t=new Uint8Array([0]),n=new Wp)=>{const o=p1e(t);o8e(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(z8e(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===Gz)return M8e(r.map((s,i)=>i===0?s:A8e(s)));if(n.constructor===Wp)return rv(r)}return r[0]},LB=(e,t)=>r8e(e,t,new Gz),s8e=e=>{const t=new Map,n=Qt(e.restDecoder);for(let o=0;os8e(new i1e(Ua(e))),f1e=(e,t)=>(Wt(e.restEncoder,t.size),Xc(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{Wt(e.restEncoder,n),Wt(e.restEncoder,o)}),e),i8e=(e,t)=>f1e(e,Cx(t.store)),a8e=(e,t=new l1e)=>(e instanceof Map?f1e(t,e):i8e(t,e),t.toUint8Array()),c8e=e=>a8e(e,new c1e);class l8e{constructor(){this.l=[]}}const GF=()=>new l8e,KF=(e,t)=>e.l.push(t),YF=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},b1e=(e,t,n)=>SB(e.l,[t,n]);class Ub{constructor(t,n){this.client=t,this.clock=n}}const GO=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,M0=(e,t)=>new Ub(e,t),u8e=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw Ba()},ob=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!r1e(t.ds,e.id),JR=(e,t)=>{const n=Ho(e.meta,JR,Tu),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class h1e{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Cx=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},D1=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},m1e=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw Ba()}n.push(t)},Na=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=Ea(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[Na(n,t.clock)]},I6=d8e,e8=(e,t,n)=>{const o=Na(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[e8(e,n,t.clock)]},ZF=(e,t,n)=>{const o=t.clients.get(n.client),r=Na(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==Rs&&o.splice(r+1,0,uv(e,s,n.clock-s.id.clock+1)),s},p8e=(e,t,n)=>{const o=e.clients.get(t.id.client);o[Na(o,t.id.clock)]=n},M1e=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=e8(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!RCe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(EB(t.deleteSet),t8e(e,t),hh(e,t.deleteSet),!0),JF=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&Ho(e.changed,t,Tu).add(n)},jy=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof Bo&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},b8e=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=Na(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=yB(r.length-1,1+Na(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+jy(r,l)}})},g1e=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),b1e(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),SB(c,[]),n._needFormattingCleanup&&B8e(n)}finally{o.gc&&b8e(s,r,o.gcFilter),h8e(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=lf(Na(b,f),1);for(let M=b.length-1;M>=h;)M-=1+jy(b,M)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=Na(b,f);h+11||h>0&&jy(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(t1e(WB,js,"[yjs] ",Rp,Jne,"Changed the client-id because another client seems to be using it."),o.clientID=s1e()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new Gz;QF(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new Wp;QF(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):g1e(e,t+1)}}},un=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new f8e(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&g1e(r,0)}}return i};function*m8e(e){const t=Qt(e.restDecoder);for(let n=0;nrv(e,a1e,Gz),g8e=(e,t)=>{if(e.constructor===Rs){const{client:n,clock:o}=e.id;return new Rs(M0(n,o+t),e.length-t)}else if(e.constructor===Ws){const{client:n,clock:o}=e.id;return new Ws(M0(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new Bo(M0(o,r+t),null,M0(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},rv=(e,t=w2,n=Wp)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Ua(d)));let r=o.map(d=>new jB(d,!0)),s=null;const i=new n,c=new PB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ws?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Ul(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ws?s.struct.length-=h:f=g8e(f,h)),s.struct.mergeWith(f)||(Ul(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ws;f=d.next())Ul(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Ul(c,s.struct,s.offset),s=null),IB(c);const l=o.map(d=>BB(d)),u=GRe(l);return hh(i,u),i.toUint8Array()},z8e=(e,t,n=w2,o=Wp)=>{const r=p1e(t),s=new o,i=new PB(s),c=new n(Ua(e)),l=new jB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ws){l.next();continue}if(d.id.clock+d.length>f)for(Ul(i,d,lf(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Ul(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}IB(i);const u=BB(c);return hh(s,u),s.toUint8Array()},z1e=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:Fn(e.encoder.restEncoder)}),e.encoder.restEncoder=P1(),e.written=0)},Ul=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&z1e(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),Wt(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},IB=e=>{z1e(e);const t=e.encoder.restEncoder;Wt(t,e.clientStructs.length);for(let n=0;n{const r=new n(Ua(e)),s=new jB(r,!1),i=new o,c=new PB(i);for(let u=s.curr;u!==null;u=s.next())Ul(c,t(u),0);IB(c);const l=BB(r);return hh(i,l),i.toUint8Array()},A8e=e=>O8e(e,vRe,w2,Gz),eV="You must not compute changes after the event-handler fired.";class Rx{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=y8e(this.currentTarget,this.target))}deletes(t){return r1e(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(eV);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=T6(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=T6(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=T6(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(eV);const n=this.target,o=Tu(),r=Tu(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const y8e=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},O1e=80;let DB=0;class v8e{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=DB++}}const x8e=e=>{e.timestamp=DB++},A1e=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=DB++},_8e=(e,t,n)=>{if(e.length>=O1e){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>By(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&By(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=lf(t,r.index+n))}},Tx=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;Ho(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;b1e(o._eH,n,t)};class bo{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GF(),this._dEH=GF(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw xa()}clone(){throw xa()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){KF(this._eH,t)}observeDeep(t){KF(this._dEH,t)}unobserve(t){YF(this._eH,t)}unobserveDeep(t){YF(this._dEH,t)}toJSON(){}}const y1e=(e,t,n)=>{t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},v1e=e=>{const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(;o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return qg(e,(o,r)=>{n.push(t(o,r,e))}),n},w8e=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},_1e=(e,t)=>{const n=Wx(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Ep(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Kz(new Uint8Array(p))),r.integrate(e,0);break;case mh:r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Yz(p)),r.integrate(e,0);break;default:if(p instanceof bo)r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new fl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},w1e=()=>Ci("Length exceeded!"),k1e=(e,t,n,o)=>{if(n>t._length)throw w1e();if(n===0)return t._searchMarker&&kg(t._searchMarker,n,o.length),sv(e,t,null,o);const r=n,s=Wx(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return sv(e,t,r,n)},q1e=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=Wx(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw w1e();t._searchMarker&&kg(t._searchMarker,r,-s+o)},iv=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},$B=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new Ep([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new Ep([o]);break;case Uint8Array:c=new Kz(o);break;case mh:c=new Yz(o);break;default:if(o instanceof bo)c=new fl(o);else throw new Error("Unexpected content type")}new Bo(M0(i,D1(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},FB=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},S1e=e=>{const t={};return e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},C1e=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted},q8e=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&ob(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},KO=e=>URe(e.entries(),t=>!t[1].deleted);class S8e extends Rx{}class Xb extends bo{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new Xb;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Xb}clone(){const t=new Xb;return t.insert(0,this.toArray().map(n=>n instanceof bo?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}_callObserver(t,n){super._callObserver(t,n),Tx(this,t,new S8e(this,t))}insert(t,n){this.doc!==null?un(this.doc,o=>{k1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?un(this.doc,n=>{k8e(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?un(this.doc,o=>{q1e(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return _1e(this,t)}toArray(){return v1e(this)}slice(t=0,n=this.length){return y1e(this,t,n)}toJSON(){return this.map(t=>t instanceof bo?t.toJSON():t)}map(t){return x1e(this,t)}forEach(t){qg(this,t)}[Symbol.iterator](){return w8e(this)}_write(t){t.writeTypeRef(J8e)}}const C8e=e=>new Xb;class R8e extends Rx{constructor(t,n,o){super(t,n),this.keysChanged=o}}class k2 extends bo{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new k2}clone(){const t=new k2;return this.forEach((n,o)=>{t.set(o,n instanceof bo?n.clone():n)}),t}_callObserver(t,n){Tx(this,t,new R8e(this,t,n))}toJSON(){const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof bo?r.toJSON():r}}),t}get size(){return[...KO(this._map)].length}keys(){return P6(KO(this._map),t=>t[0])}values(){return P6(KO(this._map),t=>t[1].content.getContent()[t[1].length-1])}entries(){return P6(KO(this._map),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return FB(this,t)}has(t){return C1e(this,t)}clear(){this.doc!==null?un(this.doc,t=>{this.forEach(function(n,o,r){iv(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(eWe)}}const W8e=e=>new k2,Jl=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&ARe(e,t);class t8{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&Ba(),this.right.content.constructor){case R1:this.right.deleted||Mh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const tV=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case R1:t.right.deleted||Mh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?Wx(t,n):null;if(s){const i=new t8(s.p.left,s.p,s.index,r);return tV(e,i,n-s.index)}else{const i=new t8(null,t._start,0,r);return tV(e,i,n)}},R1e=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===R1&&Jl(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new Bo(M0(s,D1(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new R1(c,i));d.integrate(e,0),n.right=d,n.forward()})},Mh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},W1e=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===R1&&Jl(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},T1e=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!Jl(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new Bo(M0(s,D1(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new R1(c,l)),n.right.integrate(e,0),n.forward()}}return i},D6=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;W1e(n,r);const c=T1e(e,t,n,r),l=o.constructor===String?new La(o):o instanceof bo?new fl(o):new uf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&kg(t._searchMarker,n.index,l.getLength()),d=new Bo(M0(i,D1(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),R1e(e,t,n,c)},nV=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;W1e(n,r);const c=T1e(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===R1));){if(!n.right.deleted)switch(n.right.content.constructor){case R1:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(Jl(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` -`;n.right=new Bo(M0(i,D1(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new La(l)),n.right.integrate(e,0),n.forward()}R1e(e,t,n,c)},E1e=(e,t,n,o,r)=>{let s=t;const i=Cr();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===R1){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case R1:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&Mh(r,u);break}}}t=t.right}return c},T8e=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===R1){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},E8e=e=>{let t=0;return un(e.doc,n=>{let o=e._start,r=e._start,s=Cr();const i=GR(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case R1:Mh(i,r.content);break;default:t+=E1e(n,o,r,s,i),s=GR(i),o=r;break}r=r.right}}),t},B8e=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&M1e(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===R1&&i.constructor!==Rs&&t.add(i.parent)})}un(n,o=>{o1e(e,e.deleteSet,r=>{if(r instanceof Rs||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===R1?t.add(s):T8e(o,r)});for(const r of t)E8e(r)})},oV=(e,t,n)=>{const o=n,r=GR(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case fl:case uf:case La:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,n=[];un(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,M)=>{h!==null&&(b.attributes[M]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},zRe(l)||(b.attributes=MRe({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case fl:case uf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case La:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case R1:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const M=r.get(b)??null;Jl(M,h)?h!==null&&i.delete(o):(c==="retain"&&f(),Jl(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const M=r.get(b)??null;Jl(M,h)||(c==="retain"&&f(),l[b]=M)}else if(!i.deleted){s.set(b,h);const M=l[b];M!==void 0&&(Jl(M,h)?M!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),Mh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class q2 extends bo{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new q2}clone(){const t=new q2;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new N8e(this,t,n);Tx(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===La&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?un(this.doc,o=>{const r=new t8(null,this._start,0,new Map);for(let s=0;s0)&&D6(o,this,r,c,i.attributes||{})}else i.retain!==void 0?nV(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&oV(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,M)=>{f=!0,p[M]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(ob(l,t)||n!==void 0&&ob(l,n))switch(l.content.constructor){case La:{const p=s.get("ychange");t!==void 0&&!ob(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!ob(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case fl:case uf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case R1:ob(l,t)&&(u(),Mh(s,l.content));break}l=l.right}u()};return t||n?un(i,p=>{t&&JR(p,t),n&&JR(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),D6(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!o);D6(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?un(o,r=>{oV(r,YO(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!1);i.right!==null&&nV(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return FB(this,t)}getAttributes(){return S1e(this)}_write(t){t.writeTypeRef(tWe)}}const L8e=e=>new q2;class $6{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===S2||n.constructor===Tp)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;break}else t.parent===this._root?t=null:t=t.parent._item;while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Tp extends bo{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Tp}clone(){const t=new Tp;return t.insert(0,this.toArray().map(n=>n instanceof bo?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new $6(this,t)}querySelector(t){t=t.toUpperCase();const o=new $6(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Xc(new $6(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){Tx(this,t,new I8e(this,n,t))}toString(){return x1e(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),qg(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?un(this.doc,o=>{k1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)un(this.doc,o=>{const r=t&&t instanceof bo?t._item:t;sv(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw Ci("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?un(this.doc,o=>{q1e(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return v1e(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return _1e(this,t)}slice(t=0,n=this.length){return y1e(this,t,n)}forEach(t){qg(this,t)}_write(t){t.writeTypeRef(oWe)}}const j8e=e=>new Tp;class S2 extends Tp{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new S2(this.nodeName)}clone(){const t=new S2(this.nodeName),n=this.getAttributes();return gRe(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof bo?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return FB(this,t)}hasAttribute(t){return C1e(this,t)}getAttributes(t){return t?q8e(this,t):S1e(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return qg(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(nWe),t.writeKey(this.nodeName)}}const P8e=e=>new S2(e.readKey());class I8e extends Rx{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class av extends k2{constructor(t){super(),this.hookName=t}_copy(){return new av(this.hookName)}clone(){const t=new av(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef(rWe),t.writeKey(this.hookName)}}const D8e=e=>new av(e.readKey());class cv extends q2{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new cv}clone(){const t=new cv;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(sWe)}}const $8e=e=>new cv;class VB{constructor(t,n){this.id=t,this.length=n}get deleted(){throw xa()}mergeWith(t){return!1}write(t,n,o){throw xa()}integrate(t,n){throw xa()}}const F8e=0;class Rs extends VB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),m1e(t.doc.store,this)}write(t,n){t.writeInfo(F8e),t.writeLen(this.length-n)}getMissing(t,n){return null}}class Kz{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Kz(this.content)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const V8e=e=>new Kz(e.readBuf());class Sg{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Sg(this.len)}splice(t){const n=new Sg(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){ov(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const H8e=e=>new Sg(e.readLen()),B1e=(e,t)=>new mh({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Yz{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Yz(B1e(this.doc.guid,this.opts))}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const U8e=e=>new Yz(B1e(e.readString(),e.readAny()));class uf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new uf(this.embed)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const X8e=e=>new uf(e.readJSON());class R1{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new R1(this.key,this.value)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const G8e=e=>new R1(e.readKey(),e.readJSON());class lv{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new lv(this.arr)}splice(t){const n=new lv(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const Z8e=e=>new La(e.readString()),Q8e=[C8e,W8e,L8e,P8e,j8e,D8e,$8e],J8e=0,eWe=1,tWe=2,nWe=3,oWe=4,rWe=5,sWe=6;class fl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new fl(this.type._copy())}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const iWe=e=>new fl(Q8e[e.readTypeRef()](e)),uv=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new Bo(M0(o,r+n),t,M0(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=M0(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let Bo=class n8 extends VB{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?BF:0}set marker(t){(this.info&B6)>0!==t&&(this.info^=B6)}get marker(){return(this.info&B6)>0}get keep(){return(this.info&EF)>0}set keep(t){this.keep!==t&&(this.info^=EF)}get countable(){return(this.info&BF)>0}get deleted(){return(this.info&E6)>0}set deleted(t){this.deleted!==t&&(this.info^=E6)}markDeleted(){this.info|=E6}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=D1(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=D1(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Ub&&this.id.client!==this.parent.client&&this.parent.clock>=D1(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ZF(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Eu(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Rs||this.right&&this.right.constructor===Rs)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===n8&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===n8&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Ub){const o=I6(n,this.parent);o.constructor===Rs?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=ZF(t,t.doc.store,M0(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),GO(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),ov(t.deleteSet,this.id.client,this.id.clock,this.length),JF(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw Ba();this.content.gc(t),n?p8e(t,this,new Rs(this.id,this.length)):this.content=new Sg(this.length)}write(t,n){const o=n>0?M0(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&wx|(o===null?0:es)|(r===null?0:Rc)|(s===null?0:xg);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=u8e(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===Ub?(t.writeParentInfo(!1),t.writeLeftID(c)):Ba();s!==null&&t.writeString(s)}this.content.write(t,n)}};const N1e=(e,t)=>aWe[t&wx](e),aWe=[()=>{Ba()},H8e,K8e,V8e,Z8e,X8e,G8e,iWe,Y8e,U8e,()=>{Ba()}],cWe=10;class Ws extends VB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){Ba()}write(t,n){t.writeInfo(cWe),Wt(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const L1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},j1e="__ $YJS$ __";L1e[j1e]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");L1e[j1e]=!0;const df=e=>x2((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),lWe=(e,t)=>x2((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(Ci(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),uWe=e=>df(indexedDB.deleteDatabase(e)),dWe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),aM=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>zWe(o,r))},P1e=(e,t)=>df(e.count(t)),pWe=(e,t)=>df(e.get(t)),I1e=(e,t)=>df(e.delete(t)),fWe=(e,t,n)=>df(e.put(t,n)),o8=(e,t)=>df(e.add(t)),bWe=(e,t,n)=>df(e.getAll(t,n)),hWe=(e,t,n)=>{let o=null;return gWe(e,t,r=>(o=r,!1),n).then(()=>o)},mWe=(e,t=null)=>hWe(e,t,"prev"),MWe=(e,t)=>x2((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),gWe=(e,t,n,o="next")=>MWe(e.openKeyCursor(t,o),r=>n(r.key)),zWe=(e,t)=>e.objectStore(t),OWe=(e,t)=>IDBKeyRange.upperBound(e,t),AWe=(e,t)=>IDBKeyRange.lowerBound(e,t),F6="custom",D1e="updates",$1e=500,F1e=(e,t=()=>{},n=()=>{})=>{const[o]=aM(e.db,[D1e]);return bWe(o,AWe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),un(e.doc,()=>{r.forEach(s=>d1e(e.doc,s))},e,!1),n(o))}).then(()=>mWe(o).then(r=>{e._dbref=r+1})).then(()=>P1e(o).then(r=>{e._dbsize=r})).then(()=>o)},yWe=(e,t=!0)=>F1e(e).then(n=>{(t||e._dbsize>=$1e)&&o8(n,LB(e.doc)).then(()=>I1e(n,OWe(e._dbref,!0))).then(()=>P1e(n).then(o=>{e._dbsize=o}))});class vWe extends Hz{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=lWe(t,o=>dWe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=x2(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,F1e(this,i=>o8(i,LB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=aM(this.db,[D1e]);o8(s,o),++this._dbsize>=$1e&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{yWe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{uWe(this.name)})}get(t){return this._db.then(n=>{const[o]=aM(n,[F6],"readonly");return pWe(o,t)})}set(t,n){return this._db.then(o=>{const[r]=aM(o,[F6]);return fWe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=aM(n,[F6]);return I1e(o,t)})}}function xWe(e,t,n){const o=`${t}-${e}`,r=new vWe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const _We=1200,wWe=2500,dv=3e4,r8=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=Gc();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,dv/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout(r8,yB(BCe(e.unsuccessfulReconnects+1)*_We,wWe),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=Gc(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,dv/2)}}};class kWe extends Hz{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&dvn.key===t&&this.onmessage!==null&&this.onmessage({data:CB(n.newValue||"")}),hRe(this._onChange)}postMessage(t){Fne.setItem(this.room,Yne(CRe(t)))}close(){mRe(this._onChange)}}const SWe=typeof BroadcastChannel>"u"?qWe:BroadcastChannel,HB=e=>Ho(V1e,e,()=>{const t=Tu(),n=new SWe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),CWe=(e,t)=>(HB(e).subs.add(t),t),RWe=(e,t)=>{const n=HB(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),V1e.delete(e)),o},WWe=(e,t,n=null)=>{const o=HB(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},TWe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function ZO(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H1e={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof ZO=="function"&&ZO;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var M=new Error("Cannot find module '"+f+"'");throw M.code="MODULE_NOT_FOUND",M}var O=c[f]={exports:{}};i[f][0].call(O.exports,function(y){var _=i[f][1][y];return u(_||y)},O,O.exports,s,i,c,l)}return c[f].exports}for(var d=typeof ZO=="function"&&ZO,p=0;p>16,S[C++]=255&A>>8,S[C++]=255&A;return q===2&&(A=M[g.charCodeAt(x)]<<2|M[g.charCodeAt(x+1)]>>4,S[C++]=255&A),q===1&&(A=M[g.charCodeAt(x)]<<10|M[g.charCodeAt(x+1)]<<4|M[g.charCodeAt(x+2)]>>2,S[C++]=255&A>>8,S[C++]=255&A),S}function p(g){return h[63&g>>18]+h[63&g>>12]+h[63&g>>6]+h[63&g]}function f(g,A,x){for(var w,k=[],q=A;qC?C:S+q));return w===1?(A=g[x-1],k.push(h[A>>2]+h[63&A<<4]+"==")):w===2&&(A=(g[x-2]<<8)+g[x-1],k.push(h[A>>10]+h[63&A>>4]+h[63&A<<2]+"=")),k.join("")}c.byteLength=function(g){var A=l(g),x=A[0],w=A[1];return 3*(x+w)/4-w},c.toByteArray=d,c.fromByteArray=b;for(var h=[],M=[],O=typeof Uint8Array>"u"?Array:Uint8Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,v=y.length;_R)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function h(R,L,V){return b(R),0>=R||L===void 0?d(R):typeof V=="string"?d(R).fill(L,V):d(R).fill(L)}function M(R){return b(R),d(0>R?0:0|g(R))}function O(R,L){if((typeof L!="string"||L==="")&&(L="utf8"),!p.isEncoding(L))throw new TypeError("Unknown encoding: "+L);var V=0|A(R,L),de=d(V),ge=de.write(R,L);return ge!==V&&(de=de.slice(0,ge)),de}function y(R){for(var L=0>R.length?0:0|g(R.length),V=d(L),de=0;deL||R.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|R}function A(R,L){if(p.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Y(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var V=R.length,de=2>>1;case"base64":return G(R).length;default:if(ge)return de?-1:be(R).length;L=(""+L).toLowerCase(),ge=!0}}function x(R,L,V){var de=!1;if((L===void 0||0>L)&&(L=0),L>this.length||((V===void 0||V>this.length)&&(V=this.length),0>=V)||(V>>>=0,L>>>=0,V<=L))return"";for(R||(R="utf8");;)switch(R){case"hex":return X(this,L,V);case"utf8":case"utf-8":return j(this,L,V);case"ascii":return P(this,L,V);case"latin1":case"binary":return U(this,L,V);case"base64":return W(this,L,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,L,V);default:if(de)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),de=!0}}function w(R,L,V){var de=R[L];R[L]=R[V],R[V]=de}function k(R,L,V,de,ge){if(R.length===0)return-1;if(typeof V=="string"?(de=V,V=0):2147483647V&&(V=-2147483648),V=+V,re(V)&&(V=ge?0:R.length-1),0>V&&(V=R.length+V),V>=R.length){if(ge)return-1;V=R.length-1}else if(0>V)if(ge)V=0;else return-1;if(typeof L=="string"&&(L=p.from(L,de)),p.isBuffer(L))return L.length===0?-1:q(R,L,V,de,ge);if(typeof L=="number")return L&=255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(R,L,V):Uint8Array.prototype.lastIndexOf.call(R,L,V):q(R,[L],V,de,ge);throw new TypeError("val must be string, number or Buffer")}function q(R,L,V,de,ge){function ve(Ye,Ue){return Pe===1?Ye[Ue]:Ye.readUInt16BE(Ue*Pe)}var Pe=1,rt=R.length,ht=L.length;if(de!==void 0&&(de=(de+"").toLowerCase(),de==="ucs2"||de==="ucs-2"||de==="utf16le"||de==="utf-16le")){if(2>R.length||2>L.length)return-1;Pe=2,rt/=2,ht/=2,V/=2}var ft;if(ge){var Xe=-1;for(ft=V;ftrt&&(V=rt-ht),ft=V;0<=ft;ft--){for(var et=!0,Bt=0;Btge&&(de=ge)):de=ge;var ve=L.length;de>ve/2&&(de=ve/2);for(var Pe,rt=0;rtve&&(Pe=ve):rt===2?(ht=R[ge+1],(192&ht)==128&&(et=(31&ve)<<6|63&ht,127et||57343et&&(Pe=et)))}Pe===null?(Pe=65533,rt=1):65535>>10),Pe=56320|1023&Pe),de.push(Pe),ge+=rt}return I(de)}function I(R){var L=R.length;if(L<=4096)return l.apply(String,R);for(var V="",de=0;deL)&&(L=0),(!V||0>V||V>de)&&(V=de);for(var ge="",ve=L;veR)throw new RangeError("offset is not uint");if(R+L>V)throw new RangeError("Trying to access beyond buffer length")}function oe(R,L,V,de,ge,ve){if(!p.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>ge||LR.length)throw new RangeError("Index out of range")}function ee(R,L,V,de){if(V+de>R.length)throw new RangeError("Index out of range");if(0>V)throw new RangeError("Index out of range")}function K(R,L,V,de,ge){return L=+L,V>>>=0,ge||ee(R,L,V,4),he.write(R,L,V,de,23,4),V+4}function ne(R,L,V,de,ge){return L=+L,V>>>=0,ge||ee(R,L,V,8),he.write(R,L,V,de,52,8),V+8}function se(R){if(R=R.split("=")[0],R=R.trim().replace(Q,""),2>R.length)return"";for(;R.length%4!=0;)R+="=";return R}function ae(R){return 16>R?"0"+R.toString(16):R.toString(16)}function be(R,L){L=L||1/0;for(var V,de=R.length,ge=null,ve=[],Pe=0;PeV){if(!ge){if(56319V){-1<(L-=3)&&ve.push(239,191,189),ge=V;continue}V=(ge-55296<<10|V-56320)+65536}else ge&&-1<(L-=3)&&ve.push(239,191,189);if(ge=null,128>V){if(0>(L-=1))break;ve.push(V)}else if(2048>V){if(0>(L-=2))break;ve.push(192|V>>6,128|63&V)}else if(65536>V){if(0>(L-=3))break;ve.push(224|V>>12,128|63&V>>6,128|63&V)}else if(1114112>V){if(0>(L-=4))break;ve.push(240|V>>18,128|63&V>>12,128|63&V>>6,128|63&V)}else throw new Error("Invalid code point")}return ve}function Oe(R){for(var L=[],V=0;V(L-=2));++Pe)V=R.charCodeAt(Pe),de=V>>8,ge=V%256,ve.push(ge),ve.push(de);return ve}function G(R){return Me.toByteArray(se(R))}function fe(R,L,V,de){for(var ge=0;ge=L.length||ge>=R.length);++ge)L[ge+V]=R[ge];return ge}function Y(R,L){return R instanceof L||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===L.name}function re(R){return R!==R}var Me=s("base64-js"),he=s("ieee754");c.Buffer=p,c.SlowBuffer=function(R){return+R!=R&&(R=0),p.alloc(+R)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var R=new Uint8Array(1);return R.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},R.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(R,L,V){return f(R,L,V)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(R,L,V){return h(R,L,V)},p.allocUnsafe=function(R){return M(R)},p.allocUnsafeSlow=function(R){return M(R)},p.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==p.prototype},p.compare=function(R,L){if(Y(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),Y(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),!p.isBuffer(R)||!p.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===L)return 0;for(var V=R.length,de=L.length,ge=0,ve=u(V,de);geL&&(R+=" ... "),""},p.prototype.compare=function(R,L,V,de,ge){if(Y(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),!p.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(L===void 0&&(L=0),V===void 0&&(V=R?R.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),0>L||V>R.length||0>de||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&L>=V)return 0;if(de>=ge)return-1;if(L>=V)return 1;if(L>>>=0,V>>>=0,de>>>=0,ge>>>=0,this===R)return 0;for(var ve=ge-de,Pe=V-L,rt=u(ve,Pe),ht=this.slice(de,ge),ft=R.slice(L,V),Xe=0;Xe>>=0,isFinite(V)?(V>>>=0,de===void 0&&(de="utf8")):(de=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-L;if((V===void 0||V>ge)&&(V=ge),0V||0>L)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var ve=!1;;)switch(de){case"hex":return S(this,R,L,V);case"utf8":case"utf-8":return C(this,R,L,V);case"ascii":return T(this,R,L,V);case"latin1":case"binary":return E(this,R,L,V);case"base64":return B(this,R,L,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,R,L,V);default:if(ve)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),ve=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(R,L){var V=this.length;R=~~R,L=L===void 0?V:~~L,0>R?(R+=V,0>R&&(R=0)):R>V&&(R=V),0>L?(L+=V,0>L&&(L=0)):L>V&&(L=V),L>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R],ge=1,ve=0;++ve>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R+--L],ge=1;0>>=0,L||Z(R,1,this.length),this[R]},p.prototype.readUInt16LE=function(R,L){return R>>>=0,L||Z(R,2,this.length),this[R]|this[R+1]<<8},p.prototype.readUInt16BE=function(R,L){return R>>>=0,L||Z(R,2,this.length),this[R]<<8|this[R+1]},p.prototype.readUInt32LE=function(R,L){return R>>>=0,L||Z(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+16777216*this[R+3]},p.prototype.readUInt32BE=function(R,L){return R>>>=0,L||Z(R,4,this.length),16777216*this[R]+(this[R+1]<<16|this[R+2]<<8|this[R+3])},p.prototype.readIntLE=function(R,L,V){R>>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R],ge=1,ve=0;++ve=ge&&(de-=r(2,8*L)),de},p.prototype.readIntBE=function(R,L,V){R>>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=L,ge=1,ve=this[R+--de];0=ge&&(ve-=r(2,8*L)),ve},p.prototype.readInt8=function(R,L){return R>>>=0,L||Z(R,1,this.length),128&this[R]?-1*(255-this[R]+1):this[R]},p.prototype.readInt16LE=function(R,L){R>>>=0,L||Z(R,2,this.length);var V=this[R]|this[R+1]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt16BE=function(R,L){R>>>=0,L||Z(R,2,this.length);var V=this[R+1]|this[R]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt32LE=function(R,L){return R>>>=0,L||Z(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},p.prototype.readInt32BE=function(R,L){return R>>>=0,L||Z(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},p.prototype.readFloatLE=function(R,L){return R>>>=0,L||Z(R,4,this.length),he.read(this,R,!0,23,4)},p.prototype.readFloatBE=function(R,L){return R>>>=0,L||Z(R,4,this.length),he.read(this,R,!1,23,4)},p.prototype.readDoubleLE=function(R,L){return R>>>=0,L||Z(R,8,this.length),he.read(this,R,!0,52,8)},p.prototype.readDoubleBE=function(R,L){return R>>>=0,L||Z(R,8,this.length),he.read(this,R,!1,52,8)},p.prototype.writeUIntLE=function(R,L,V,de){if(R=+R,L>>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;oe(this,R,L,V,ge,0)}var ve=1,Pe=0;for(this[L]=255&R;++Pe>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;oe(this,R,L,V,ge,0)}var ve=V-1,Pe=1;for(this[L+ve]=255&R;0<=--ve&&(Pe*=256);)this[L+ve]=255&R/Pe;return L+V},p.prototype.writeUInt8=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,1,255,0),this[L]=255&R,L+1},p.prototype.writeUInt16LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,65535,0),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeUInt16BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,65535,0),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeUInt32LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,4294967295,0),this[L+3]=R>>>24,this[L+2]=R>>>16,this[L+1]=R>>>8,this[L]=255&R,L+4},p.prototype.writeUInt32BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,4294967295,0),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeIntLE=function(R,L,V,de){if(R=+R,L>>>=0,!de){var ge=r(2,8*V-1);oe(this,R,L,V,ge-1,-ge)}var ve=0,Pe=1,rt=0;for(this[L]=255&R;++veR&&rt===0&&this[L+ve-1]!==0&&(rt=1),this[L+ve]=255&(R/Pe>>0)-rt;return L+V},p.prototype.writeIntBE=function(R,L,V,de){if(R=+R,L>>>=0,!de){var ge=r(2,8*V-1);oe(this,R,L,V,ge-1,-ge)}var ve=V-1,Pe=1,rt=0;for(this[L+ve]=255&R;0<=--ve&&(Pe*=256);)0>R&&rt===0&&this[L+ve+1]!==0&&(rt=1),this[L+ve]=255&(R/Pe>>0)-rt;return L+V},p.prototype.writeInt8=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,1,127,-128),0>R&&(R=255+R+1),this[L]=255&R,L+1},p.prototype.writeInt16LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,32767,-32768),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeInt16BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,32767,-32768),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeInt32LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,2147483647,-2147483648),this[L]=255&R,this[L+1]=R>>>8,this[L+2]=R>>>16,this[L+3]=R>>>24,L+4},p.prototype.writeInt32BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,2147483647,-2147483648),0>R&&(R=4294967295+R+1),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeFloatLE=function(R,L,V){return K(this,R,L,!0,V)},p.prototype.writeFloatBE=function(R,L,V){return K(this,R,L,!1,V)},p.prototype.writeDoubleLE=function(R,L,V){return ne(this,R,L,!0,V)},p.prototype.writeDoubleBE=function(R,L,V){return ne(this,R,L,!1,V)},p.prototype.copy=function(R,L,V,de){if(!p.isBuffer(R))throw new TypeError("argument should be a Buffer");if(V||(V=0),de||de===0||(de=this.length),L>=R.length&&(L=R.length),L||(L=0),0L)throw new RangeError("targetStart out of bounds");if(0>V||V>=this.length)throw new RangeError("Index out of range");if(0>de)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),R.length-Lge||de==="latin1")&&(R=ge)}}else typeof R=="number"&&(R&=255);if(0>L||this.length>>=0,V=V===void 0?this.length:V>>>0,R||(R=0);var ve;if(typeof R=="number")for(ve=L;ve{M==="%%"||(b++,M==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...M){if(!f.enabled)return;const O=f,y=+new Date,_=y-(b||y);O.diff=_,O.prev=b,O.curr=y,b=y,M[0]=l.coerce(M[0]),typeof M[0]!="string"&&M.unshift("%O");let v=0;M[0]=M[0].replace(/%([a-zA-Z%])/g,(A,x)=>{if(A==="%%")return"%";v++;const w=l.formatters[x];if(typeof w=="function"){const k=M[v];A=w.call(O,k),M.splice(v,1),v--}return A}),l.formatArgs.call(O,M),(O.log||l.log).apply(O,M)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:M=>{h=M}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bB&&!W.warned){W.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+W.length+" "+(C+" listeners added. Use emitter.setMaxListeners() to increase limit"));j.name="MaxListenersExceededWarning",j.emitter=S,j.type=C,j.count=W.length,c(j)}return S}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(S,C,T){var E={fired:!1,wrapFn:void 0,target:S,type:C,listener:T},B=f.bind(E);return B.listener=T,E.wrapFn=B,B}function h(S,C,T){var E=S._events;if(E===void 0)return[];var B=E[C];return B===void 0?[]:typeof B=="function"?T?[B.listener||B]:[B]:T?_(B):O(B,B.length)}function M(S){var C=this._events;if(C!==void 0){var T=C[S];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}function O(S,C){for(var T=Array(C),E=0;ES||k(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");q=S}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(S){if(typeof S!="number"||0>S||k(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(S){for(var C=[],T=1;TB)return this;B===0?T.shift():y(T,B),T.length===1&&(E[S]=T[0]),E.removeListener!==void 0&&this.emit("removeListener",S,W||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(S){var C,T,E;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[S]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete T[S]),this;if(arguments.length===0){var B,N=Object.keys(T);for(E=0;E"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,M=8*f-p-1,O=(1<>1,_=-7,v=d?f-1:0,g=d?-1:1,A=l[u+v];for(v+=g,b=A&(1<<-_)-1,A>>=-_,_+=M;0<_;b=256*b+l[u+v],v+=g,_-=8);for(h=b&(1<<-_)-1,b>>=-_,_+=p;0<_;h=256*h+l[u+v],v+=g,_-=8);if(b===0)b=1-y;else{if(b===O)return h?NaN:(A?-1:1)*(1/0);h+=r(2,p),b-=y}return(A?-1:1)*h*r(2,b-p)},c.write=function(l,u,d,p,f,b){var h,M,O,y=Math.LN2,_=Math.log,v=8*b-f-1,g=(1<>1,x=f===23?r(2,-24)-r(2,-77):0,w=p?0:b-1,k=p?1:-1,q=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(M=isNaN(u)?1:0,h=g):(h=n(_(u)/y),1>u*(O=r(2,-h))&&(h--,O*=2),u+=1<=h+A?x/O:x*r(2,1-A),2<=u*O&&(h++,O/=2),h+A>=g?(M=0,h=g):1<=h+A?(M=(u*O-1)*r(2,f),h+=A):(M=u*r(2,A-1)*r(2,f),h=0));8<=f;l[d+w]=255&M,w+=k,M/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof c0>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,M){h.prototype=Object.create(M.prototype),h.prototype.constructor=h,h.__proto__=M}function l(h,M,O){function y(v,g,A){return typeof M=="string"?M:M(v,g,A)}O||(O=Error);var _=function(v){function g(A,x,w){return v.call(this,y(A,x,w))||this}return c(g,v),g}(O);_.prototype.name=O.name,_.prototype.code=h,b[h]=_}function u(h,M){if(Array.isArray(h)){var O=h.length;return h=h.map(function(y){return y+""}),2h.length)&&(O=h.length),h.substring(O-M.length,O)===M}function f(h,M,O){return typeof O!="number"&&(O=0),!(O+M.length>h.length)&&h.indexOf(M,O)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,M){return'The value "'+M+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,M,O){var y;typeof M=="string"&&d(M,"not ")?(y="must not be",M=M.replace(/^not /,"")):y="must be";var _;if(p(h," argument"))_="The ".concat(h," ").concat(y," ").concat(u(M,"type"));else{var v=f(h,".")?"property":"argument";_='The "'.concat(h,'" ').concat(v," ").concat(y," ").concat(u(M,"type"))}return _+=". Received type ".concat(typeof O),_},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(y){return this instanceof l?(f.call(this,y),b.call(this,y),this.allowHalfOpen=!0,void(y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(y)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(y){y.end()}var p=Object.keys||function(y){var _=[];for(var v in y)_.push(v);return _};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,M=p(b.prototype),O=0;O>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function _(Q,R){return 0>=Q||R.length===0&&R.ended?0:R.objectMode?1:Q===Q?(Q>R.highWaterMark&&(R.highWaterMark=y(Q)),Q<=R.length?Q:R.ended?R.length:(R.needReadable=!0,0)):R.flowing&&R.length?R.buffer.head.data.length:R.length}function v(Q,R){if(P("onEofChunk"),!R.ended){if(R.decoder){var L=R.decoder.end();L&&L.length&&(R.buffer.push(L),R.length+=R.objectMode?1:L.length)}R.ended=!0,R.sync?g(Q):(R.needReadable=!1,!R.emittedReadable&&(R.emittedReadable=!0,A(Q)))}}function g(Q){var R=Q._readableState;P("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(P("emitReadable",R.flowing),R.emittedReadable=!0,c.nextTick(A,Q))}function A(Q){var R=Q._readableState;P("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(Q.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,E(Q)}function x(Q,R){R.readingMore||(R.readingMore=!0,c.nextTick(w,Q,R))}function w(Q,R){for(;!R.reading&&!R.ended&&(R.length=R.length?(L=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):L=R.buffer.consume(Q,R.decoder),L}function N(Q){var R=Q._readableState;P("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,c.nextTick(W,R,Q))}function W(Q,R){if(P("endReadableNT",Q.endEmitted,Q.length),!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,R.readable=!1,R.emit("end"),Q.autoDestroy)){var L=R._writableState;(!L||L.autoDestroy&&L.finished)&&R.destroy()}}function j(Q,R){for(var L=0,V=Q.length;L=R.highWaterMark)||R.ended))return P("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?N(this):g(this),null;if(Q=_(Q,R),Q===0&&R.ended)return R.length===0&&N(this),null;var V=R.needReadable;P("need readable",V),(R.length===0||R.length-Q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(y,_){var v=this._transformState;v.transforming=!1;var g=v.writecb;if(g===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,_!=null&&this.push(_),g(y);var A=this._readableState;A.reading=!1,(A.needReadable||A.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(k,q,S){return q in k?Object.defineProperty(k,q,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[q]=S,k}function u(k,q){return{value:k,done:q}}function d(k){var q=k[M];if(q!==null){var S=k[A].read();S!==null&&(k[v]=null,k[M]=null,k[O]=null,q(u(S,!1)))}}function p(k){c.nextTick(d,k)}function f(k,q){return function(S,C){k.then(function(){return q[_]?void S(u(void 0,!0)):void q[g](S,C)},C)}}var b,h=s("./end-of-stream"),M=Symbol("lastResolve"),O=Symbol("lastReject"),y=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),g=Symbol("handlePromise"),A=Symbol("stream"),x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((b={get stream(){return this[A]},next:function(){var k=this,q=this[y];if(q!==null)return Promise.reject(q);if(this[_])return Promise.resolve(u(void 0,!0));if(this[A].destroyed)return new Promise(function(E,B){c.nextTick(function(){k[y]?B(k[y]):E(u(void 0,!0))})});var S,C=this[v];if(C)S=new Promise(f(C,this));else{var T=this[A].read();if(T!==null)return Promise.resolve(u(T,!1));S=new Promise(this[g])}return this[v]=S,S}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var k=this;return new Promise(function(q,S){k[A].destroy(null,function(C){return C?void S(C):void q(u(void 0,!0))})})}),b),x);i.exports=function(k){var q,S=Object.create(w,(q={},l(q,A,{value:k,writable:!0}),l(q,M,{value:null,writable:!0}),l(q,O,{value:null,writable:!0}),l(q,y,{value:null,writable:!0}),l(q,_,{value:k._readableState.endEmitted,writable:!0}),l(q,g,{value:function(C,T){var E=S[A].read();E?(S[v]=null,S[M]=null,S[O]=null,C(u(E,!1))):(S[M]=C,S[O]=T)},writable:!0}),q));return S[v]=null,h(k,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var T=S[O];return T!==null&&(S[v]=null,S[M]=null,S[O]=null,T(C)),void(S[y]=C)}var E=S[M];E!==null&&(S[v]=null,S[M]=null,S[O]=null,E(u(void 0,!0))),S[_]=!0}),k.on("readable",p.bind(null,S)),S}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,g){var A=Object.keys(v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(v);g&&(x=x.filter(function(w){return Object.getOwnPropertyDescriptor(v,w).enumerable})),A.push.apply(A,x)}return A}function l(v){for(var g,A=1;A>>0),x=this.head,w=0;x;)b(x.data,A,w),w+=x.data.length,x=x.next;return A}},{key:"consume",value:function(g,A){var x;return gk.length?k.length:g;if(w+=q===k.length?k:k.slice(0,g),g-=q,g===0){q===k.length?(++x,this.head=A.next?A.next:this.tail=null):(this.head=A,A.data=k.slice(q));break}++x}return this.length-=x,w}},{key:"_getBuffer",value:function(g){var A=M.allocUnsafe(g),x=this.head,w=1;for(x.data.copy(A),g-=x.data.length;x=x.next;){var k=x.data,q=g>k.length?k.length:g;if(k.copy(A,A.length-g,0,q),g-=q,g===0){q===k.length?(++w,this.head=x.next?x.next:this.tail=null):(this.head=x,x.data=k.slice(q));break}++w}return this.length-=w,A}},{key:_,value:function(g,A){return y(this,l({},A,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return h||M?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(O){!f&&O?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,O)):c.nextTick(l,b,O):f?(c.nextTick(u,b),f(O)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,M=Array(h),O=0;Ov.length)throw new O("streams");var x,w=v.map(function(k,q){var S=qb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var M=p(f);return b===void 0?M.fill(0):typeof h=="string"?M.fill(b,h):M.fill(b),M},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(w){if(!w)return"utf8";for(var k;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}function u(w){var k=l(w);if(typeof k!="string"&&(A.isEncoding===x||!x(w)))throw new Error("Unknown encoding: "+w);return k||w}function d(w){this.encoding=u(w);var k;switch(this.encoding){case"utf16le":this.text=M,this.end=O,k=4;break;case"utf8":this.fillLast=h,k=4;break;case"base64":this.text=y,this.end=_,k=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(k)}function p(w){return 127>=w?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function f(w,k,q){var S=k.length-1;if(S=S)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],q.slice(0,-1)}return q}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",k,w.length-1)}function O(w){var k=w&&w.length?this.write(w):"";if(this.lastNeed){var q=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,q)}return k}function y(w,k){var q=(w.length-k)%3;return q==0?w.toString("base64",k):(this.lastNeed=3-q,this.lastTotal=3,q==1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",k,w.length-q))}function _(w){var k=w&&w.length?this.write(w):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function v(w){return w.toString(this.encoding)}function g(w){return w&&w.length?this.write(w):""}var A=s("safe-buffer").Buffer,x=A.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(w){if(w.length===0)return"";var k,q;if(this.lastNeed){if(k=this.fillLast(w),k===void 0)return"";q=this.lastNeed,this.lastNeed=0}else q=0;return q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{}],"/":[function(s,i){function c(_){return _.replace(/a=ice-options:trickle\s\n/g,"")}function l(_){console.warn(_)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:M}=s("buffer"),O=65536;class y extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||y.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},y.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(g=>g),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(g){return void this.destroy(h(g,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=g=>{this._onIceCandidate(g)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(g=>{this.destroy(h(g,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=g=>{this._setupData(g)},this.streams&&this.streams.forEach(g=>{this.addStream(g)}),this._pc.ontrack=g=>{this._onTrack(g)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(g=>{this._addIceCandidate(g)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(g=>{this.destroy(h(g,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const g=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(g).catch(A=>{!g.address||g.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(A,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,g),this._needsNegotiation()}catch(A){this.destroy(h(A,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:g}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(g=>{this.addTrack(g,v)})}}addTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const A=this._senderMap.get(v)||new Map;let x=A.get(g);if(!x)x=this._pc.addTrack(v,g),A.set(g,x),this._senderMap.set(v,A),this._needsNegotiation();else throw x.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,g,A){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const x=this._senderMap.get(v),w=x?x.get(A):null;if(!w)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");g&&this._senderMap.set(g,x),w.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):w.replaceTrack(g)}removeTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const A=this._senderMap.get(v),x=A?A.get(g):null;if(!x)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{x.removed=!0,this._pc.removeTrack(x)}catch(w){w.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(x):this.destroy(h(w,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(g=>{this.removeTrack(g,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,g){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),g()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=O),this.channelName=this._channel.label,this._channel.onmessage=A=>{this._onChannelMessage(A)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=A=>{const x=A.error instanceof Error?A.error:new Error(`Datachannel error: ${A.message} ${A.filename}:${A.lineno}:${A.colno}`);this.destroy(h(x,"ERR_DATA_CHANNEL"))};let g=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(g&&this._onChannelClose(),g=!0):g=!1},5e3)}_read(){}_write(v,g,A){if(this.destroyed)return A(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(x){return this.destroy(h(x,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>O?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=A):A(null)}else this._debug("write before connect"),this._chunk=v,this._cb=A}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,g=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,g),this.emit("iceStateChange",v,g),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const g=A=>(Object.prototype.toString.call(A.values)==="[object Array]"&&A.values.forEach(x=>{Object.assign(A,x)}),A);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(A=>{const x=[];A.forEach(w=>{x.push(g(w))}),v(null,x)},A=>v(A)):0{if(this.destroyed)return;const x=[];A.result().forEach(w=>{const k={};w.names().forEach(q=>{k[q]=w.stat(q)}),k.id=w.id,k.type=w.type,k.timestamp=w.timestamp,x.push(g(k))}),v(null,x)},A=>v(A)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((g,A)=>{if(this.destroyed)return;g&&(A=[]);const x={},w={},k={};let q=!1;A.forEach(C=>{(C.type==="remotecandidate"||C.type==="remote-candidate")&&(x[C.id]=C),(C.type==="localcandidate"||C.type==="local-candidate")&&(w[C.id]=C),(C.type==="candidatepair"||C.type==="candidate-pair")&&(k[C.id]=C)});const S=C=>{q=!0;let T=w[C.localCandidateId];T&&(T.ip||T.address)?(this.localAddress=T.ip||T.address,this.localPort=+T.port):T&&T.ipAddress?(this.localAddress=T.ipAddress,this.localPort=+T.portNumber):typeof C.googLocalAddress=="string"&&(T=C.googLocalAddress.split(":"),this.localAddress=T[0],this.localPort=+T[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let E=x[C.remoteCandidateId];E&&(E.ip||E.address)?(this.remoteAddress=E.ip||E.address,this.remotePort=+E.port):E&&E.ipAddress?(this.remoteAddress=E.ipAddress,this.remotePort=+E.portNumber):typeof C.googRemoteAddress=="string"&&(E=C.googRemoteAddress.split(":"),this.remoteAddress=E[0],this.remotePort=+E[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(A.forEach(C=>{C.type==="transport"&&C.selectedCandidatePairId&&S(k[C.selectedCandidatePairId]),(C.type==="googCandidatePair"&&C.googActiveConnection==="true"||(C.type==="candidatepair"||C.type==="candidate-pair")&&C.selected)&&S(C)}),!q&&(!Object.keys(k).length||Object.keys(w).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(T){return this.destroy(h(T,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const C=this._cb;this._cb=null,C(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>O)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let g=v.data;g instanceof ArrayBuffer&&(g=M.from(g)),this.push(g)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(g=>{this._debug("on track"),this.emit("track",v.track,g),this._remoteTracks.push({track:v.track,stream:g}),this._remoteStreams.some(A=>A.id===g.id)||(this._remoteStreams.push(g),b(()=>{this._debug("on stream"),this.emit("stream",g)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}y.WEBRTC_SUPPORT=!!d(),y.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},y.channelConfig={},i.exports=y},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(H1e);var EWe=H1e.exports;const BWe=Ao(EWe),UB=0,XB=1,U1e=2,X1e=(e,t)=>{Wt(e,UB);const n=c8e(t);Jn(e,n)},G1e=(e,t,n)=>{Wt(e,XB),Jn(e,LB(t,n))},NWe=(e,t,n)=>G1e(t,n,N1(e)),K1e=(e,t,n)=>{try{d1e(t,N1(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},LWe=(e,t)=>{Wt(e,U1e),Jn(e,t)},jWe=K1e,PWe=(e,t,n,o)=>{const r=Qt(e);switch(r){case UB:NWe(e,t,n);break;case XB:K1e(e,n,o);break;case U1e:jWe(e,n,o);break;default:throw new Error("Unknown message type")}return r},V6=3e4;class IWe extends Hz{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=Gc();this.getLocalState()!==null&&V6/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&V6<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&s8(this,o,"timeout")},Ea(V6/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:Gc()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),BM(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const s8=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},pv=(e,t,n=e.states)=>{const o=t.length,r=P1();Wt(r,o);for(let s=0;s{const o=Ua(t),r=Gc(),s=[],i=[],c=[],l=[],u=Qt(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},$We=(e,t)=>{const n=YR(e).buffer,o=YR(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},Y1e=(e,t)=>{if(!t)return kB(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=P1();return va(r,"AES-GCM"),Jn(r,n),Jn(r,new Uint8Array(o)),Fn(r)})},FWe=(e,t)=>{const n=P1();return y2(n,e),Y1e(Fn(n),t)},Z1e=(e,t)=>{if(!t)return kB(e);const n=Ua(e);Wc(n)!=="AES-GCM"&&fRe(Ci("Unknown encryption algorithm"));const r=N1(n),s=N1(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},Q1e=(e,t)=>Z1e(e,t).then(n=>v2(Ua(new Uint8Array(n)))),$1=HRe("y-webrtc"),Gb=0,J1e=3,Cg=1,GB=4,Rg=new Map,_a=new Map,eoe=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),$1("synced ",js,e.name,Rp," with all peers"))},toe=(e,t,n)=>{const o=Ua(t),r=P1(),s=Qt(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case Gb:{Wt(r,Gb);const u=PWe(o,r,c,e);u===XB&&!e.synced&&n(),u===UB&&(l=!0);break}case J1e:Wt(r,Cg),Jn(r,pv(i,Array.from(i.getStates().keys()))),l=!0;break;case Cg:DWe(i,N1(o),e);break;case GB:{const u=Cp(o)===1,d=Wc(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),noe(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},VWe=(e,t)=>{const n=e.room;return $1("received message from ",js,e.remotePeerId,RB," (",n.name,")",Rp,Sx),toe(n,t,()=>{e.synced=!0,$1("synced ",js,n.name,Rp," with ",js,e.remotePeerId),eoe(n)})},H6=(e,t)=>{$1("send message to ",js,e.remotePeerId,Rp,RB," (",e.room.name,")",Sx);try{e.peer.send(Fn(t))}catch{}},HWe=(e,t)=>{$1("broadcast message in ",js,e.name,Rp),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class fv{constructor(t,n,o,r){$1("establishing connection to ",js,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new BWe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),Ex(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{$1("connected to ",js,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=P1();Wt(l,Gb),X1e(l,i),H6(this,l);const u=c.getStates();if(u.size>0){const d=P1();Wt(d,Cg),Jn(d,pv(c,Array.from(u.keys()))),H6(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),eoe(r),this.peer.destroy(),$1("closed connection to ",js,o),i8(r)}),this.peer.on("error",s=>{$1("Error in connection to ",js,o,": ",s),i8(r)}),this.peer.on("data",s=>{const i=VWe(this,s);i!==null&&H6(this,i)})}destroy(){this.peer.destroy()}}const $l=(e,t)=>Y1e(t,e.key).then(n=>e.mux(()=>WWe(e.name,n))),rV=(e,t)=>{e.bcconnected&&$l(e,t),HWe(e,t)},i8=e=>{Rg.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=P1();Wt(t,GB),wg(t,1),va(t,e.peerId),$l(e,Fn(t))}};class UWe{constructor(t,n,o,r){this.peerId=Dne(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=TWe(),this.bcconnected=!1,this._bcSubscriber=s=>Z1e(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=toe(this,i,()=>{});c&&$l(this,Fn(c))})),this._docUpdateHandler=(s,i)=>{const c=P1();Wt(c,Gb),LWe(c,s),rV(this,Fn(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=P1();Wt(d,Cg),Jn(d,pv(this.awareness,u)),rV(this,Fn(d))},this._beforeUnloadHandler=()=>{s8(this.awareness,[t.clientID],"window unload"),_a.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),i8(this);const t=this.name;CWe(t,this._bcSubscriber),this.bcconnected=!0,noe(this);const n=P1();Wt(n,Gb),X1e(n,this.doc),$l(this,Fn(n));const o=P1();Wt(o,Gb),G1e(o,this.doc),$l(this,Fn(o));const r=P1();Wt(r,J1e),$l(this,Fn(r));const s=P1();Wt(s,Cg),Jn(s,pv(this.awareness,[this.doc.clientID])),$l(this,Fn(s))}disconnect(){Rg.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),s8(this.awareness,[this.doc.clientID],"disconnect");const t=P1();Wt(t,GB),wg(t,0),va(t,this.peerId),$l(this,Fn(t)),RWe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.off("exit",this._beforeUnloadHandler)}}const XWe=(e,t,n,o)=>{if(_a.has(n))throw Ci(`A Yjs Doc connected to room "${n}" already exists!`);const r=new UWe(e,t,n,o);return _a.set(n,r),r},Ex=(e,t,n)=>{t.key?FWe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:Yne(o)})}):e.send({type:"publish",topic:t.name,data:n})};class ooe extends kWe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{$1(`connected (${t})`);const n=Array.from(_a.keys());this.send({type:"subscribe",topics:n}),_a.forEach(o=>Ex(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=_a.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew fv(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$1("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(Ho(c,i.from,()=>new fv(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Q1e(CB(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>$1(`disconnect (${t})`))}}class GWe extends Hz{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new IWe(n),maxConns:i=20+Ea(dRe()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?$We(r,t):kB(null),this.room=null,this.key.then(u=>{this.room=XWe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=Ho(Rg,t,()=>new ooe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),Rg.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),_a.delete(this.roomName)}),super.destroy()}}function KWe(e,t){e.on("connect",()=>{$1(`connected (${t})`);const n=Array.from(_a.keys());e.send({type:"subscribe",topics:n}),_a.forEach(o=>Ex(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=_a.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew fv(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$1("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(Ho(c,i.from,()=>new fv(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Q1e(CB(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>$1(`disconnect (${t})`))}function sV(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(kt(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,bv/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{$1("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,bv/2))}}}const bv=3e4;class YWe extends Hz{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&bv{const n=Ho(Rg,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new ooe(t):()=>new YWe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function QWe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new ZWe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const JWe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new mh;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const O=n[u].fromCRDTDoc(f);p(O)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const M=n[u].fetch;M&&M(d).then(O=>{f.transact(()=>{n[u].applyChangesToDoc(f,O)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let U6;function Wg(){return U6||(U6=JWe(xWe,QWe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),U6}function eTe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function tTe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function roe(e){return{type:"ADD_ENTITIES",entities:e}}function nTe(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=dSe(n,o,s,i):c=Ane(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function oTe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function rTe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function sTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function iTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function aTe(){return Ce("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function cTe(e,t){return Ce("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function lTe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const soe=(e,t,n,o,{__unstableFetch:r=pt,throwOnError:s=!1}={})=>async({dispatch:i})=>{const l=(await i(Xa(e,t))).find(f=>f.kind===e&&f.name===t);let u,d=!1;if(!l)return;const p=await i.__unstableAcquireStoreLock(fo,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let f=!1;try{let b=`${l.baseURL}/${n}`;o&&(b=kt(b,o)),d=await r({path:b,method:"DELETE"}),await i(uSe(e,t,n,!0))}catch(b){f=!0,u=b}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:u}),f&&s)throw u;return d}finally{i.__unstableReleaseStoreLock(p)}},uTe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],M=d[b],O=l[b]?{...M,...o[b]}:o[b];return f[b]=G1(h,O)?void 0:O,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);Wg().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},dTe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},pTe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},fTe=()=>({select:e})=>{e.getUndoManager().addRecord()},ioe=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=pt,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await l(Xa(e,t))).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||zo,f=n[p],b=await l.__unstableAcquireStoreLock(fo,["entities","records",e,t,f||Uc()],{exclusive:!0});try{for(const[y,_]of Object.entries(n))if(typeof _=="function"){const v=_(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[y]:v},{undoIgnore:!0}),n[y]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,M,O=!1;try{const y=`${d.baseURL}${f?"/"+f:""}`,_=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),g=v?v.id:void 0,A=await c.getAutosave(_.type,_.id,g);let x={..._,...A,...n};if(x=Object.keys(x).reduce((w,k)=>(["title","excerpt","content","meta"].includes(k)&&(w[k]=x[k]),w),{status:x.status==="auto-draft"?"draft":void 0}),h=await r({path:`${y}/autosaves`,method:"POST",data:x}),_.id===h.id){let w={..._,...x,...h};w=Object.keys(w).reduce((k,q)=>(["title","excerpt","content"].includes(q)?k[q]=w[q]:q==="status"?k[q]=_.status==="auto-draft"&&w.status==="draft"?w.status:_.status:k[q]=_[q],k),{}),l.receiveEntityRecords(e,t,w,void 0,!0)}else l.receiveAutosaves(_.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(_,v)}),h=await r({path:y,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(y){O=!0,M=y}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:M,isAutosave:o}),O&&s)throw M;return h}finally{l.__unstableReleaseStoreLock(b)}},bTe=e=>async({dispatch:t})=>{const n=qCe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},hTe=(e,t,n,o)=>async({select:r,dispatch:s})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const c=(await s(Xa(e,t))).find(p=>p.kind===e&&p.name===t);if(!c)return;const l=c.key||zo,u=r.getEntityRecordNonTransientEdits(e,t,n),d={[l]:n,...u};return await s.saveEntityRecord(e,t,d,o)},mTe=(e,t,n,o,r)=>async({select:s,dispatch:i})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const c=s.getEntityRecordNonTransientEdits(e,t,n),l={};for(const f of o)_x(l,f,cSe(c,f));const p=(await i(Xa(e,t))).find(f=>f.kind===e&&f.name===t)?.key||zo;return n&&(l[p]=n),await i.saveEntityRecord(e,t,l,r)};function MTe(e){return Ce("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),aoe("create/media",e)}function aoe(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function gTe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function zTe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function OTe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const ATe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c})=>{const u=(await c(Xa(e,t))).find(p=>p.kind===e&&p.name===t),d=u&&u?.revisionKey?u.revisionKey:zo;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},yTe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:bTe,__experimentalReceiveCurrentGlobalStylesId:rTe,__experimentalReceiveThemeBaseGlobalStyles:sTe,__experimentalReceiveThemeGlobalStyleVariations:iTe,__experimentalSaveSpecifiedEntityEdits:mTe,__unstableCreateUndoLevel:fTe,addEntities:roe,deleteEntityRecord:soe,editEntityRecord:uTe,receiveAutosaves:gTe,receiveCurrentTheme:oTe,receiveCurrentUser:tTe,receiveDefaultTemplateId:OTe,receiveEmbedPreview:lTe,receiveEntityRecords:nTe,receiveNavigationFallbackId:zTe,receiveRevisions:ATe,receiveThemeGlobalStyleRevisions:cTe,receiveThemeSupports:aTe,receiveUploadPermissions:MTe,receiveUserPermission:aoe,receiveUserQuery:eTe,redo:pTe,saveEditedEntityRecord:hTe,saveEntityRecord:ioe,undo:dTe},Symbol.toStringTag,{value:"Module"})),zo="id",vTe=["title","excerpt","content"],coe=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>pt({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>pt({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],loe=[{kind:"postType",loadEntities:wTe},{kind:"taxonomy",loadEntities:kTe},{kind:"root",name:"site",plural:"sites",loadEntities:qTe}],xTe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},X6=new WeakMap;function _Te(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof dn&&(t[n]=o.valueOf());return t}function uoe(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:_Te(o),innerBlocks:uoe(n)}})}async function wTe(){const e=await pt({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:vTe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?i0e((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:xTe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>pt({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(X6.has(d)||X6.set(d,uoe(d)),d=X6.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":zo}})}async function kTe(){const e=await pt({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function qTe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>pt({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await pt({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const C2=(e,t,n="get")=>{const o=e==="root"?"":Y4(e),r=Y4(t);return`${n}${o}${r}`};function iV(e){e.forEach(({syncObjectType:t,syncConfig:n})=>{Wg().register(t,n);const o={...n};delete o.fetch,Wg().register(t+"--edit",o)})}const Xa=(e,t)=>async({select:n,dispatch:o})=>{let r=n.getEntitiesConfig(e);const s=!!n.getEntityConfig(e,t);if(r?.length>0&&s)return window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&iV(r),r;const i=loe.find(c=>!t||!c.name?c.kind===e:c.kind===e&&c.name===t);return i?(r=await i.loadEntities(),window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&iV(r),o(roe(r)),r):[]};function doe(e){const{query:t}=e;return t?fh(t).context:"default"}function STe(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function CTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=doe(t),o=t.key||zo;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=sSe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,poe(o,t.itemIds)]))}return e}function RTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=doe(t),{query:o,key:r=zo}=t,s=o?fh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,poe(o,t.itemIds)]))}return e}const WTe=x0([gne(e=>"query"in e),zne(e=>e.query?{...e,...fh(e.query)}:e),vF("context"),vF("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=zo}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:STe(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),TTe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return WTe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},aV=go({items:CTe,itemIsComplete:RTe,queries:TTe});function ETe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function BTe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function NTe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function LTe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function jTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function PTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function ITe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function DTe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const $Te=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function FTe(e){return x0([$Te,gne(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),zne(t=>({key:e.key||zo,...t}))])(go({queriedData:aV,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!G1(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!G1(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=aV(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function VTe(e=coe,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const HTe=(e={},t)=>{const n=VTe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=go(Object.entries(s).reduce((i,[c,l])=>{const u=go(l.reduce((d,p)=>({...d,[p.name]:FTe(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function UTe(e=P6e()){return e}function XTe(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function GTe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function KTe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed}}return e}function YTe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function ZTe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function QTe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function JTe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function eEe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function tEe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function nEe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}const oEe=go({terms:ETe,users:BTe,currentTheme:jTe,currentGlobalStylesId:PTe,currentUser:NTe,themeGlobalStyleVariations:DTe,themeBaseGlobalStyles:ITe,themeGlobalStyleRevisions:tEe,taxonomies:LTe,entities:HTe,editsReference:XTe,undoManager:UTe,embedPreviews:GTe,userPermissions:KTe,autosaves:YTe,blockPatterns:ZTe,blockPatternCategories:QTe,userPatternCategories:JTe,navigationFallbackId:eEe,defaultTemplates:nEe}),rEe={},sEe=nt(e=>(t,n)=>e(fo).isResolving("getEmbedPreview",[n]));function iEe(e,t){Ce("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=kt("/wp/v2/users/?who=authors&per_page=100",t);return foe(e,n)}function aEe(e){return e.currentUser}const foe=ot((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function cEe(e,t){return Ce("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),boe(e,t)}const boe=ot((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function lEe(e,t,n){return Ce("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),gh(e,t,n)}function gh(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const pf=ot((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Wu(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[M]}),_x(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});pf.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=lSe(n)?Number(n):n,t};function uEe(e,t,n,o){return pf(e,t,n,o)}const hoe=ot((e,t,n,o)=>{const r=pf(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(aSe(gh(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function dEe(e,t,n,o){return Array.isArray(Bx(e,t,n,o))}const Bx=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?yne(r,o):null},pEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?vne(r,o):null},fEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=vne(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):bSe(r,o))},bEe=ot(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>pf(e,o,r,i)&&Moe(e,o,r,i));if(s.length){const i=gh(e,o,r);s.forEach(c=>{const l=Nx(e,o,r,c);n.push({key:l?l[i.key||zo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),hEe=ot(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>YB(e,o,r,i));if(s.length){const i=gh(e,o,r);s.forEach(c=>{const l=Nx(e,o,r,c);n.push({key:l?l[i.key||zo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function KB(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const moe=ot((e,t,n,o)=>{const{transientEdits:r}=gh(e,t,n)||{},s=KB(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function Moe(e,t,n,o){return YB(e,t,n,o)||Object.keys(moe(e,t,n,o)).length>0}const Nx=ot((e,t,n,o)=>{const r=hoe(e,t,n,o),s=KB(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function mEe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function YB(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function MEe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function gEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function zEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function OEe(e){Ce("select( 'core' ).getUndoEdit()",{since:"6.3"})}function AEe(e){Ce("select( 'core' ).getRedoEdit()",{since:"6.3"})}function yEe(e){return e.undoManager.hasUndo()}function vEe(e){return e.undoManager.hasRedo()}function Lx(e){return e.currentTheme?pf(e,"root","theme",e.currentTheme):null}function goe(e){return e.currentGlobalStylesId}function xEe(e){var t;return(t=Lx(e)?.theme_supports)!==null&&t!==void 0?t:rEe}function _Ee(e,t){return e.embedPreviews[t]}function wEe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function zoe(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=MB(t,n,o);return e.userPermissions[s]}function kEe(e,t,n,o){return Ce("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),zoe(e,"update",{kind:t,name:n,id:o})}function qEe(e,t,n){return e.autosaves[n]}function SEe(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const CEe=nt(e=>(t,n,o)=>e(fo).hasFinishedResolution("getAutosaves",[n,o]));function REe(e){return e.editsReference}function WEe(e,t){const n=Bx(e,"postType","wp_template",{"find-template":t});return n?.length?Nx(e,"postType","wp_template",n[0].id):null}function TEe(e){const t=Lx(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function EEe(e){const t=Lx(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function BEe(e){return e.blockPatterns}function NEe(e){return e.blockPatternCategories}function LEe(e){return e.userPatternCategories}function jEe(e){Ce("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=goe(e);return t?e.themeGlobalStyleRevisions[t]:null}function PEe(e,t){return e.defaultTemplates[JSON.stringify(t)]}const IEe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?yne(s,r):null},DEe=ot((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Wu(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{M=M?.[O]}),_x(p,h,M)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),$Ee=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:goe,__experimentalGetCurrentThemeBaseGlobalStyles:TEe,__experimentalGetCurrentThemeGlobalStylesVariations:EEe,__experimentalGetDirtyEntityRecords:bEe,__experimentalGetEntitiesBeingSaved:hEe,__experimentalGetEntityRecordNoResolver:uEe,__experimentalGetTemplateForLink:WEe,canUser:zoe,canUserEditEntityRecord:kEe,getAuthors:iEe,getAutosave:SEe,getAutosaves:qEe,getBlockPatternCategories:NEe,getBlockPatterns:BEe,getCurrentTheme:Lx,getCurrentThemeGlobalStylesRevisions:jEe,getCurrentUser:aEe,getDefaultTemplateId:PEe,getEditedEntityRecord:Nx,getEmbedPreview:_Ee,getEntitiesByKind:cEe,getEntitiesConfig:boe,getEntity:lEe,getEntityConfig:gh,getEntityRecord:pf,getEntityRecordEdits:KB,getEntityRecordNonTransientEdits:moe,getEntityRecords:Bx,getEntityRecordsTotalItems:pEe,getEntityRecordsTotalPages:fEe,getLastEntityDeleteError:zEe,getLastEntitySaveError:gEe,getRawEntityRecord:hoe,getRedoEdit:AEe,getReferenceByDistinctEdits:REe,getRevision:DEe,getRevisions:IEe,getThemeSupports:xEe,getUndoEdit:OEe,getUserPatternCategories:LEe,getUserQueryResults:foe,hasEditsForEntityRecord:Moe,hasEntityRecords:dEe,hasFetchedAutosaves:CEe,hasRedo:vEe,hasUndo:yEe,isAutosavingEntityRecord:mEe,isDeletingEntityRecord:MEe,isPreviewEmbedFallback:wEe,isRequestingEmbedPreview:sEe,isSavingEntityRecord:YB},Symbol.toStringTag,{value:"Module"}));function FEe(e){return e.undoManager}function VEe(e){return e.navigationFallbackId}const HEe=nt(e=>ot((t,n)=>e(fo).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(fo).getBlockPatterns()])),Ooe=nt(e=>ot((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(fo).canUser("delete",{kind:n,name:o,id:i}),update:e(fo).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function UEe(e,t,n,o){return Ooe(e,t,n,o)[0]}const XEe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:HEe,getEntityRecordPermissions:UEe,getEntityRecordsPermissions:Ooe,getNavigationFallbackId:VEe,getUndoManager:FEe},Symbol.toStringTag,{value:"Module"}));let $f;function qt(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;$f===void 0&&(document.implementation&&document.implementation.createHTMLDocument?$f=document.implementation.createHTMLDocument("").createElement("textarea"):$f=document.createElement("textarea")),$f.innerHTML=e;const t=$f.textContent;return $f.innerHTML="",t}async function GEe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(pt({path:kt("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:qt(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=KEe(p,e),p=p.slice(0,c),p}function KEe(e,t){const n=cV(t),o={};for(const r of e)if(r.title){const s=cV(r.title),i=s.filter(c=>n.some(l=>c.includes(l)));o[r.id]=i.length/s.length}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function cV(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const G6=new Map,YEe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:sf(e)};if(!of(e))return Promise.reject(`${e} is not a valid URL.`);const r=dx(e);return!r||!QE(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):G6.has(e)?G6.get(e):pt({path:kt(n,o),...t}).then(s=>(G6.set(e,s),s))};async function ZEe(){const e=await pt({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[KE(n),o]))):[]}const QEe=e=>async({dispatch:t})=>{const n=kt("/wp/v2/users/?who=authors&per_page=100",e),o=await pt({path:n});t.receiveUserQuery(n,o)},JEe=()=>async({dispatch:e})=>{const t=await pt({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},Aoe=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i})=>{const l=(await s(Xa(e,t))).find(d=>d.name===t&&d.kind===e);if(!l)return;const u=await s.__unstableAcquireStoreLock(fo,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&l.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const d=l.getSyncObjectId(n);await Wg().bootstrap(l.syncObjectType,d,p=>{s.receiveEntityRecords(e,t,p,o)}),await Wg().bootstrap(l.syncObjectType+"--edit",d,p=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:p,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],l.key||zo])].join()});const d=kt(l.baseURL+(n?"/"+n:""),{...l.baseURLParams,...o});if(o!==void 0&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const p=await pt({path:d,parse:!1}),f=await p.json(),b=One(p);i.batch(()=>{s.receiveEntityRecords(e,t,f,o);for(const h of Ey){const M=MB(h,{kind:e,name:t,id:n});s.receiveUserPermission(M,b[h]),s.finishResolution("canUser",[h,{kind:e,name:t,id:n}])}})}}finally{s.__unstableReleaseStoreLock(u)}},eBe=mB("getEntityRecord"),tBe=mB("getEntityRecord"),hv=(e,t,n={})=>async({dispatch:o,registry:r})=>{const i=(await o(Xa(e,t))).find(l=>l.name===t&&l.kind===e);if(!i)return;const c=await o.__unstableAcquireStoreLock(fo,["entities","records",e,t],{exclusive:!1});try{n._fields&&(n={...n,_fields:[...new Set([...Wu(n._fields)||[],i.key||zo])].join()});const l=kt(i.baseURL,{...i.baseURLParams,...n});let u,d;if(i.supportsPagination&&n.per_page!==-1){const p=await pt({path:l,parse:!1});u=Object.values(await p.json()),d={totalItems:parseInt(p.headers.get("X-WP-Total")),totalPages:parseInt(p.headers.get("X-WP-TotalPages"))}}else u=Object.values(await pt({path:l}));n._fields&&(u=u.map(p=>(n._fields.split(",").forEach(f=>{p.hasOwnProperty(f)||(p[f]=void 0)}),p))),r.batch(()=>{if(o.receiveEntityRecords(e,t,u,n,!1,void 0,d),!n?._fields&&!n.context){const p=i.key||zo,f=u.filter(b=>b?.[p]).map(b=>[e,t,b[p]]);o.finishResolutions("getEntityRecord",f)}o.__unstableReleaseStoreLock(c)})}catch{o.__unstableReleaseStoreLock(c)}};hv.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const nBe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},oBe=mB("getCurrentTheme"),rBe=e=>async({dispatch:t})=>{try{const n=await pt({path:kt("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},yoe=(e,t,n)=>async({dispatch:o,registry:r})=>{if(!Ey.includes(e))throw new Error(`'${e}' is not a valid action.`);let s=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const d=(await o(Xa(t.kind,t.name))).find(p=>p.name===t.name&&p.kind===t.kind);if(!d)return;s=d.baseURL+(t.id?"/"+t.id:"")}else s=`/wp/v2/${t}`+(n?"/"+n:"");const{hasStartedResolution:i}=r.select(fo);for(const u of Ey){if(u===e)continue;if(i("canUser",[u,t,n]))return}let c;try{c=await pt({path:s,method:"OPTIONS",parse:!1})}catch{return}const l=One(c);r.batch(()=>{for(const u of Ey){const d=MB(u,t,n);o.receiveUserPermission(d,l[u]),u!==e&&o.finishResolution("canUser",[u,t,n])}})},sBe=(e,t,n)=>async({dispatch:o})=>{await o(yoe("update",{kind:e,name:t,id:n}))},iBe=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2"}=await o.getPostType(e),i=await pt({path:`/${s}/${r}/${t}/autosaves?context=edit`});i&&i.length&&n.receiveAutosaves(t,i)},aBe=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},voe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{o=await pt({url:kt(e,{"_wp-find-template":!0})}).then(({data:s})=>s)}catch{}if(!o)return;const r=await n.getEntityRecord("postType","wp_template",o.id);r&&t.receiveEntityRecords("postType","wp_template",[r],{"find-template":e})};voe.shouldInvalidate=e=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&e.kind==="postType"&&e.name==="wp_template";const cBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},lBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await pt({path:`/wp/v2/global-styles/themes/${n.stylesheet}`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},uBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await pt({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},xoe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await pt({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[KE(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};xoe.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const dBe=()=>async({dispatch:e})=>{const t=await ZEe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},pBe=()=>async({dispatch:e})=>{const t=await pt({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},fBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:qt(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},bBe=()=>async({dispatch:e,select:t})=>{const n=await pt({path:kt("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),o=n?._embedded?.self;if(e.receiveNavigationFallbackId(n?.id),o){const s=!t.getEntityRecord("postType","wp_navigation",n.id);e.receiveEntityRecords("postType","wp_navigation",o,void 0,s),e.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])}},hBe=e=>async({dispatch:t})=>{const n=await pt({path:kt("/wp/v2/templates/lookup",e)});n?.id&&t.receiveDefaultTemplateId(e,n.id)},_oe=(e,t,n,o={})=>async({dispatch:r})=>{const i=(await r(Xa(e,t))).find(f=>f.name===t&&f.kind===e);if(!i)return;o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],i.revisionKey||zo])].join()});const c=kt(i.getRevisionsUrl(n),o);let l,u;const d={},p=i.supportsPagination&&o.per_page!==-1;try{u=await pt({path:c,parse:!p})}catch{return}if(u&&(p?(l=Object.values(await u.json()),d.totalItems=parseInt(u.headers.get("X-WP-Total"))):l=Object.values(u),o._fields&&(l=l.map(f=>(o._fields.split(",").forEach(b=>{f.hasOwnProperty(b)||(f[b]=void 0)}),f))),r.receiveRevisions(e,t,n,l,o,!1,d),!o?._fields&&!o.context)){const f=i.key||zo,b=l.filter(h=>h[f]).map(h=>[e,t,n,h[f]]);r.startResolutions("getRevision",b),r.finishResolutions("getRevision",b)}};_oe.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const mBe=(e,t,n,o,r)=>async({dispatch:s})=>{const c=(await s(Xa(e,t))).find(d=>d.name===t&&d.kind===e);if(!c)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Wu(r._fields)||[],c.revisionKey||zo])].join()});const l=kt(c.getRevisionsUrl(n,o),r);let u;try{u=await pt({path:l})}catch{return}u&&s.receiveRevisions(e,t,n,u,r)},MBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:cBe,__experimentalGetCurrentThemeBaseGlobalStyles:lBe,__experimentalGetCurrentThemeGlobalStylesVariations:uBe,__experimentalGetTemplateForLink:voe,canUser:yoe,canUserEditEntityRecord:sBe,getAuthors:QEe,getAutosave:aBe,getAutosaves:iBe,getBlockPatternCategories:pBe,getBlockPatterns:dBe,getCurrentTheme:nBe,getCurrentThemeGlobalStylesRevisions:xoe,getCurrentUser:JEe,getDefaultTemplateId:hBe,getEditedEntityRecord:tBe,getEmbedPreview:rBe,getEntityRecord:Aoe,getEntityRecords:hv,getNavigationFallbackId:bBe,getRawEntityRecord:eBe,getRevision:mBe,getRevisions:_oe,getThemeSupports:oBe,getUserPatternCategories:fBe},Symbol.toStringTag,{value:"Module"}));function lV(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function a8(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*gBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*zBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function uV({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const OBe={requests:[],tree:{locks:[],children:{}}};function QO(e=OBe,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=lV(e.tree,i),l=a8(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=lV(e.tree,o),s=a8(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function ABe(e){return e.requests}function yBe(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of gBe(s,r))if(uV({exclusive:o},c.locks))return!1;const i=a8(s,r);if(!i)return!0;for(const c of zBe(i))if(uV({exclusive:o},c.locks))return!1;return!0}function vBe(){let e=QO(void 0,{type:"@@INIT"});function t(){for(const r of ABe(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if(yBe(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=QO(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=QO(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=QO(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function xBe(){const e=vBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}const{lock:Cb0,unlock:woe}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data"),c8=z.createContext({});function l8({kind:e,type:t,id:n,children:o}){const r=z.useContext(c8),s=z.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(c8.Provider,{value:s,children:o})}let Or=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const _Be=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function ZB(e,t){return D((n,o)=>e(s=>wBe(n(s)),o),t)}const wBe=ps(e=>{const t={};for(const n in e)_Be.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=Or.Resolving;break;case"finished":i=Or.Success;break;case"error":i=Or.Error;break;case void 0:i=Or.Idle;break}return{data:r,status:i,isResolving:i===Or.Resolving,hasStarted:i!==Or.Idle,hasResolved:i===Or.Success||i===Or.Error}}});return t}),dV={};function koe(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=ie(ce),i=z.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=D(f=>o.enabled?{editedRecord:f(ce).getEditedEntityRecord(e,t,n),hasEdits:f(ce).hasEditsForEntityRecord(e,t,n),edits:f(ce).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:dV,hasEdits:!1,edits:dV},[e,t,n,o.enabled]),{data:d,...p}=ZB(f=>o.enabled?f(ce).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const kBe=[];function Kb(e,t,n={},o={enabled:!0}){const r=kt("",n),{data:s,...i}=ZB(u=>o.enabled?u(ce).getEntityRecords(e,t,n):{data:kBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=D(u=>o.enabled?{totalItems:u(ce).getEntityRecordsTotalItems(e,t,n),totalPages:u(ce).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}const pV=new Set;function qBe(){return globalThis.SCRIPT_DEBUG===!0}function Xt(e){if(qBe()&&!pV.has(e)){console.warn(e);try{throw Error(e)}catch{}pV.add(e)}}function qoe(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&Xt("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),ZB(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(ce),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),M=c.isResolving||h.isResolving,O=c.hasResolved&&h.hasResolved;let y=Or.Idle;return M?y=Or.Resolving:O&&(y=Or.Success),{status:y,isResolving:M,hasResolved:O,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=Or.Idle;return p?b=Or.Resolving:f&&(b=Or.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var SBe={grad:.9,turn:360,rad:360/(2*Math.PI)},ic=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},j1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ps=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Soe=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},fV=function(e){return{r:Ps(e.r,0,255),g:Ps(e.g,0,255),b:Ps(e.b,0,255),a:Ps(e.a)}},K6=function(e){return{r:j1(e.r),g:j1(e.g),b:j1(e.b),a:j1(e.a,3)}},CBe=/^#([0-9a-f]{3,8})$/i,JO=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Coe=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},Roe=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},bV=function(e){return{h:Soe(e.h),s:Ps(e.s,0,100),l:Ps(e.l,0,100),a:Ps(e.a)}},hV=function(e){return{h:j1(e.h),s:j1(e.s),l:j1(e.l),a:j1(e.a,3)}},mV=function(e){return Roe((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},NM=function(e){return{h:(t=Coe(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},RBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,WBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,TBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,EBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,u8={string:[[function(e){var t=CBe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?j1(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?j1(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=TBe.exec(e)||EBe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:fV({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=RBe.exec(e)||WBe.exec(e);if(!t)return null;var n,o,r=bV({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(SBe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return mV(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return ic(t)&&ic(n)&&ic(o)?fV({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!ic(t)||!ic(n)||!ic(o))return null;var i=bV({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return mV(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!ic(t)||!ic(n)||!ic(o))return null;var i=function(c){return{h:Soe(c.h),s:Ps(c.s,0,100),v:Ps(c.v,0,100),a:Ps(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return Roe(i)},"hsv"]]},MV=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=K6(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?JO(j1(255*s)):"","#"+JO(n)+JO(o)+JO(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return K6(this.rgba)},e.prototype.toRgbString=function(){return t=K6(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return hV(NM(this.rgba))},e.prototype.toHslString=function(){return t=hV(NM(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=Coe(this.rgba),{h:j1(t.h),s:j1(t.s),v:j1(t.v),a:j1(t.a,3)};var t},e.prototype.invert=function(){return Tt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Tt(Y6(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tt(Y6(this.rgba,-t))},e.prototype.grayscale=function(){return Tt(Y6(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tt(gV(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tt(gV(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Tt({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):j1(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=NM(this.rgba);return typeof t=="number"?Tt({h:t,s:n.s,l:n.l,a:n.a}):j1(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tt(t).toHex()},e}(),Tt=function(e){return e instanceof d8?e:new d8(e)},zV=[],fs=function(e){e.forEach(function(t){zV.indexOf(t)<0&&(t(d8,u8),zV.push(t))})};function bs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var M=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));Ml?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const Woe="block-default",p8=["attributes","supports","save","migrate","isEligible","apiVersion"],Id={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},aa={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},NBe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:LBe,unlock:Bu}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),OV={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function mv(e){return e!==null&&typeof e=="object"}function jBe({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(OV).forEach(r=>{o[r]&&(o[r]=f8(OV[r],o[r],e))}),o}function PBe(e,t){const n=mv(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(U0(Ve).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Bu(sr(Ve));if(mv(e)){const s=jBe(e);o(n,s)}return r(n,t),U0(Ve).getBlockType(n)}function f8(e,t,n){return typeof e=="string"&&typeof t=="string"?ye(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>f8(e[0],o,n)):mv(e)&&Object.entries(e).length&&mv(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=f8(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function IBe(e){const t=U0(Ve).getBlockType(e);if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+e+'" is not registered.');return}return sr(Ve).removeBlockTypes(e),t}function DBe(e){sr(Ve).setFreeformFallbackBlockName(e)}function Nu(){return U0(Ve).getFreeformFallbackBlockName()}function Toe(){return U0(Ve).getGroupingBlockName()}function $Be(e){sr(Ve).setUnregisteredFallbackBlockName(e)}function Zz(){return U0(Ve).getUnregisteredFallbackBlockName()}function FBe(e){sr(Ve).setDefaultBlockName(e)}function VBe(e){sr(Ve).setGroupingBlockName(e)}function Pn(){return U0(Ve).getDefaultBlockName()}function Nt(e){return U0(Ve)?.getBlockType(e)}function ir(){return U0(Ve).getBlockTypes()}function Yt(e,t,n){return U0(Ve).getBlockSupport(e,t,n)}function it(e,t,n){return U0(Ve).hasBlockSupport(e,t,n)}function dd(e){return e?.name==="core/block"}function zh(e){return e?.name==="core/template-part"}const jx=(e,t)=>U0(Ve).getBlockVariations(e,t),HBe=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,getPlaceholder:i,canUserEditValue:c,getFieldsList:l}=e,u=Bu(U0(Ve)).getBlockBindingsSource(t);if(u?.getValues){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(n&&u?.label){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings "'+t+'" source label is already defined in the server.');return}if(!n&&!u?.label){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source label must be a string.");return}if(o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getPlaceholder must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source canUserEditValue must be a function.");return}if(l&&typeof l!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getFieldsList must be a function.");return}return Bu(sr(Ve)).addBlockBindingsSource(e)};function UBe(e){if(!Eoe(e)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+e+'" is not registered.');return}Bu(sr(Ve)).removeBlockBindingsSource(e)}function Eoe(e){return Bu(U0(Ve)).getBlockBindingsSource(e)}function XBe(){return Bu(U0(Ve)).getAllBlockBindingsSources()}fs([bs,ff]);const AV=["#191e23","#f8f9f9"];function Yb(e){var t;return Object.entries((t=Nt(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return o.hasOwnProperty("default")?r===o.default:o.type==="rich-text"?!r?.length:r===void 0})}function Kc(e){return e.name===Pn()&&Yb(e)}function Boe(e){return!!e&&(typeof e=="string"||z.isValidElement(e)||typeof e=="function"||e instanceof z.Component)}function GBe(e){if(e=e||Woe,Boe(e))return{src:e};if("background"in e){const t=Tt(e.background),n=r=>t.contrast(r),o=Math.max(...AV.map(n));return{...e,foreground:e.foreground?e.foreground:AV.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function Qz(e){return typeof e=="string"?Nt(e):e}function QB(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():Wr(s):r}function KBe(e,t,n,o="vertical"){const r=e?.title,s=e?QB(e,t,"accessibility"):"",i=n!==void 0,c=s&&s!==r;return i&&o==="vertical"?c?le(m("%1$s Block. Row %2$d. %3$s"),r,n,s):le(m("%1$s Block. Row %2$d"),r,n):i&&o==="horizontal"?c?le(m("%1$s Block. Column %2$d. %3$s"),r,n,s):le(m("%1$s Block. Column %2$d"),r,n):c?le(m("%1$s Block. %2$s"),r,s):le(m("%s Block"),r)}function Noe(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new dn}function JB(e,t){const n=Nt(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof dn?o[r]=i:typeof i=="string"&&(o[r]=dn.fromHTMLString(i)):s.type==="string"&&i instanceof dn?o[r]=i.toHTMLString():o[r]=i;else{const c=Noe(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function YBe(e,t){const n=Nt(e)?.attributes;return n?Object.keys(n).filter(r=>n[r]?.__experimentalRole===t):[]}function bf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const ZBe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function eN(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function Mv(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function QBe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[KE(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function JBe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function eNe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...eN(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function tNe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(eN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Mv([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=Mv([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function nNe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(eN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Mv([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:Mv([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function Px(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const oNe=Px("SET_DEFAULT_BLOCK_NAME"),rNe=Px("SET_FREEFORM_FALLBACK_BLOCK_NAME"),sNe=Px("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),iNe=Px("SET_GROUPING_BLOCK_NAME");function aNe(e=ZBe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function cNe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return bf(e,t.namespace)}return e}function yV(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function lNe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{label:e[t.name]?.label||t.label,usesContext:yV(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,getPlaceholder:t.getPlaceholder,canUserEditValue:t.canUserEditValue,getFieldsList:t.getFieldsList}};case"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{...e[t.name],label:t.label,usesContext:yV(e[t.name]?.usesContext,t.usesContext)}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return bf(e,t.name)}return e}const uNe=go({bootstrappedBlockTypes:QBe,unprocessedBlockTypes:JBe,blockTypes:eNe,blockStyles:tNe,blockVariations:nNe,defaultBlockName:oNe,freeformFallbackBlockName:rNe,unregisteredFallbackBlockName:sNe,groupingBlockName:iNe,categories:aNe,collections:cNe,blockBindingsSources:lNe}),Tg=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function vV(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function Loe(e,t){return vV(e)&&vV(t)?Object.entries(t).every(([n,o])=>Loe(e?.[n],o)):e===t}const joe=(e,t)=>typeof t=="string"?Jz(e,t):t,Poe=ot(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function Jz(e,t){return e.blockTypes[t]}function dNe(e,t){return e.blockStyles[t]}const tN=ot((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function pNe(e,t,n,o){const r=tN(e,t,o);if(!r)return r;const s=Jz(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=Tg(u.attributes,b);if(h===void 0)return!1;let M=Tg(n,b);return M instanceof dn&&(M=M.toHTMLString()),Loe(M,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function fNe(e,t,n){const o=tN(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function bNe(e){return e.categories}function hNe(e){return e.collections}function mNe(e){return e.defaultBlockName}function MNe(e){return e.freeformFallbackBlockName}function gNe(e){return e.unregisteredFallbackBlockName}function zNe(e){return e.groupingBlockName}const nN=ot((e,t)=>Poe(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),Ioe=(e,t,n,o)=>{const r=joe(e,t);return r?.supports?Tg(r.supports,n,o):o};function Doe(e,t,n,o){return!!Ioe(e,t,n,o)}function xV(e){return Gs(e??"").toLowerCase().trim()}function ONe(e,t,n=""){const o=joe(e,t),r=xV(n),s=i=>xV(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const ANe=(e,t)=>nN(e,t).length>0,yNe=(e,t)=>nN(e,t).some(n=>Doe(e,n,"inserter",!0)),vNe=ot((e,t)=>{const n=Jz(e,t);return n?Object.entries(n.attributes).some(([,{__experimentalRole:o}])=>o==="content"):!1},(e,t)=>[e.blockTypes[t]?.attributes]),xNe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:vNe,getActiveBlockVariation:pNe,getBlockStyles:dNe,getBlockSupport:Ioe,getBlockType:Jz,getBlockTypes:Poe,getBlockVariations:tN,getCategories:bNe,getChildBlockNames:nN,getCollections:hNe,getDefaultBlockName:mNe,getDefaultBlockVariation:fNe,getFreeformFallbackBlockName:MNe,getGroupingBlockName:zNe,getUnregisteredFallbackBlockName:gNe,hasBlockSupport:Doe,hasChildBlocks:ANe,hasChildBlocksWithInserterSupport:yNe,isMatchingSearchTerm:ONe},Symbol.toStringTag,{value:"Module"})),_Ne=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function _V(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const wNe=ot((e,t,n)=>{if(!t)return _V(_Ne,t,n);const o=Jz(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Id).forEach(s=>{if(Id[s].support){if(Id[s].requiresOptOut&&Id[s].support[0]in o.supports&&Tg(o.supports,Id[s].support)!==!1){r.push(s);return}Tg(o.supports,Id[s].support,!1)&&r.push(s)}}),_V(r,t,n)},(e,t)=>[e.blockTypes[t]]);function kNe(e,t){return e.bootstrappedBlockTypes[t]}function qNe(e){return e.unprocessedBlockTypes}function SNe(e){return e.blockBindingsSources}function CNe(e,t){return e.blockBindingsSources[t]}const RNe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:SNe,getBlockBindingsSource:CNe,getBootstrappedBlockType:kNe,getSupportedStyles:wNe,getUnprocessedBlockTypes:qNe},Symbol.toStringTag,{value:"Module"}));var $oe={exports:{}},on={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var oN=Symbol.for("react.element"),rN=Symbol.for("react.portal"),Ix=Symbol.for("react.fragment"),Dx=Symbol.for("react.strict_mode"),$x=Symbol.for("react.profiler"),Fx=Symbol.for("react.provider"),Vx=Symbol.for("react.context"),WNe=Symbol.for("react.server_context"),Hx=Symbol.for("react.forward_ref"),Ux=Symbol.for("react.suspense"),Xx=Symbol.for("react.suspense_list"),Gx=Symbol.for("react.memo"),Kx=Symbol.for("react.lazy"),TNe=Symbol.for("react.offscreen"),Foe;Foe=Symbol.for("react.module.reference");function Js(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case oN:switch(e=e.type,e){case Ix:case $x:case Dx:case Ux:case Xx:return e;default:switch(e=e&&e.$$typeof,e){case WNe:case Vx:case Hx:case Kx:case Gx:case Fx:return e;default:return t}}case rN:return t}}}on.ContextConsumer=Vx;on.ContextProvider=Fx;on.Element=oN;on.ForwardRef=Hx;on.Fragment=Ix;on.Lazy=Kx;on.Memo=Gx;on.Portal=rN;on.Profiler=$x;on.StrictMode=Dx;on.Suspense=Ux;on.SuspenseList=Xx;on.isAsyncMode=function(){return!1};on.isConcurrentMode=function(){return!1};on.isContextConsumer=function(e){return Js(e)===Vx};on.isContextProvider=function(e){return Js(e)===Fx};on.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===oN};on.isForwardRef=function(e){return Js(e)===Hx};on.isFragment=function(e){return Js(e)===Ix};on.isLazy=function(e){return Js(e)===Kx};on.isMemo=function(e){return Js(e)===Gx};on.isPortal=function(e){return Js(e)===rN};on.isProfiler=function(e){return Js(e)===$x};on.isStrictMode=function(e){return Js(e)===Dx};on.isSuspense=function(e){return Js(e)===Ux};on.isSuspenseList=function(e){return Js(e)===Xx};on.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ix||e===$x||e===Dx||e===Ux||e===Xx||e===TNe||typeof e=="object"&&e!==null&&(e.$$typeof===Kx||e.$$typeof===Gx||e.$$typeof===Fx||e.$$typeof===Vx||e.$$typeof===Hx||e.$$typeof===Foe||e.getModuleId!==void 0)};on.typeOf=Js;$oe.exports=on;var ENe=$oe.exports;const wV={common:"text",formatting:"text",layout:"design"};function BNe(e=[],t=[]){const n=[...e];return t.forEach(o=>{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const Voe=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:Woe,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:BNe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=kn("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&Ce("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(kn("blocks.registerBlockType",{...bf(r,p8),...i},r.name,i)).filter(([c])=>p8.includes(c))))),!Pz(s)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt('The "save" property must be a valid function.');return}if("edit"in s&&!ENe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&Xt('The "edit" property must be a valid component.');return}if(wV.hasOwnProperty(s.category)&&(s.category=wV[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block titles must be strings.");return}if(s.icon=GBe(s.icon),!Boe(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&Xt("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}return s};function NNe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function Hoe(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(Voe(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function LNe(){return Ce('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),Hoe()}function jNe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function PNe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function INe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function DNe(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function $Ne(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function FNe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function VNe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function HNe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function UNe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function XNe(e){return{type:"SET_CATEGORIES",categories:e}}function GNe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function KNe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function YNe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const ZNe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:LNe,addBlockCollection:KNe,addBlockStyles:PNe,addBlockTypes:NNe,addBlockVariations:DNe,reapplyBlockTypeFilters:Hoe,removeBlockCollection:YNe,removeBlockStyles:INe,removeBlockTypes:jNe,removeBlockVariations:$Ne,setCategories:XNe,setDefaultBlockName:FNe,setFreeformFallbackBlockName:VNe,setGroupingBlockName:UNe,setUnregisteredFallbackBlockName:HNe,updateCategory:GNe},Symbol.toStringTag,{value:"Module"}));function QNe(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function JNe(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(Voe(e,t));o&&n.addBlockTypes(o)}}function eLe(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,getPlaceholder:e.getPlaceholder,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function tLe(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}function nLe(e){return{type:"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext}}const oLe=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:eLe,addBootstrappedBlockBindingsSource:nLe,addBootstrappedBlockType:QNe,addUnprocessedBlockType:JNe,removeBlockBindingsSource:tLe},Symbol.toStringTag,{value:"Module"})),rLe="core/blocks",Ve=rr(rLe,{reducer:uNe,selectors:xNe,actions:ZNe});Qs(Ve);Bu(Ve).registerPrivateSelectors(RNe);Bu(Ve).registerPrivateActions(oLe);function me(e,t={},n=[]){const o=JB(e,t);return{clientId:Uc(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function Lu(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return me(o,r,Lu(s))})}function Uoe(e,t={},n){const o=Uc(),r=JB(e.name,{...e.attributes,...t});return{...e,clientId:o,attributes:r,innerBlocks:n||e.innerBlocks.map(s=>Uoe(s))}}function gn(e,t={},n){const o=Uc();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>gn(r))}}const Xoe=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(Zb(e)||!o||e.isMultiBlock)||!Zb(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||Zb(e))||!o&&t==="from"&&kV(c.name)&&kV(e.blockName)||!b8(e,n))},sLe=e=>e.length?ir().filter(o=>{const r=Ys("from",o.name);return!!ja(r,s=>Xoe(s,"from",e))}):[],iLe=e=>{if(!e.length)return[];const t=e[0],n=Nt(t.name);return(n?Ys("to",n.name):[]).filter(i=>i&&Xoe(i,"to",e)).map(i=>i.blocks).flat().map(Nt)},Zb=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),kV=e=>e===Toe();function Goe(e){if(!e.length)return[];const t=sLe(e),n=iLe(e);return[...new Set([...t,...n])]}function ja(e,t){const n=h0e();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Ys(e,t){if(t===void 0)return ir().map(({name:c})=>Ys(e,c)).flat();const n=Qz(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:Zb(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function b8(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function u1(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Ys("from",t),c=Ys("to",s),l=ja(c,f=>f.type==="block"&&(Zb(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&b8(f,n))||ja(i,f=>f.type==="block"&&(Zb(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&b8(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!Nt(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>kn("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const sN=(e,t)=>{try{var n;return me(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>sN(o.name,o)))}catch{return me("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""})}};let wa,ca,Bp,eu;const Koe=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function Py(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function iN(e){return Py(null,{},[],e,[e])}function aLe(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const cLe=e=>{wa=e,ca=0,Bp=[],eu=[],Koe.lastIndex=0;do;while(lLe());return Bp};function lLe(){const e=eu.length,t=dLe(),[n,o,r,s,i]=t,c=s>ca?ca:null;switch(n){case"no-more-tokens":if(e===0)return eq(),!1;if(e===1)return tq(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function fLe(e){const t=[];let n=e,o;for(;o=n.match(pLe);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function bLe(e,t){const n=fLe(e);let o=!1;const r=Object.keys(t);for(let s=1;s"),i=s.pop();e="";for(let c=0;c";n.push([d,l.substr(u)+""]),e+=l.substr(0,u)+d}e+=i}e=e.replace(/\s*/g,` - -`);const o="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";e=e.replace(new RegExp("(<"+o+"[\\s/>])","g"),` - -$1`),e=e.replace(new RegExp("()","g"),`$1 - -`),e=e.replace(/\r\n|\r/g,` -`),e=bLe(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` - -`);const r=e.split(/\n\s*\n/).filter(Boolean);return e="",r.forEach(s=>{e+="

"+s.replace(/^\n*|\n*$/g,"")+`

-`}),e=e.replace(/

\s*<\/p>/g,""),e=e.replace(/

([^<]+)<\/(div|address|form)>/g,"

$1

"),e=e.replace(new RegExp("

\\s*(]*>)\\s*

","g"),"$1"),e=e.replace(/

(/g,"$1"),e=e.replace(/

]*)>/gi,"

"),e=e.replace(/<\/blockquote><\/p>/g,"

"),e=e.replace(new RegExp("

\\s*(]*>)","g"),"$1"),e=e.replace(new RegExp("(]*>)\\s*

","g"),"$1"),t&&(e=e.replace(/<(script|style).*?<\/\\1>/g,s=>s[0].replace(/\n/g,"")),e=e.replace(/
|/g,"
"),e=e.replace(/(
)?\s*\n/g,(s,i)=>i?s:`
-`),e=e.replace(//g,` -`)),e=e.replace(new RegExp("(]*>)\\s*
","g"),"$1"),e=e.replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1"),e=e.replace(/\n<\/p>$/g,"

"),n.forEach(s=>{const[i,c]=s;e=e.replace(i,c)}),e.indexOf("")!==-1&&(e=e.replace(/\s?\s?/g,` -`)),e}function Zoe(e){const t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",o=t+"|pre",r=[];let s=!1,i=!1;return e?((e.indexOf("]*>[\s\S]*?<\/\1>/g,c=>(r.push(c),""))),e.indexOf("]*>[\s\S]+?<\/pre>/g,c=>(c=c.replace(/
(\r\n|\n)?/g,""),c=c.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,""),c.replace(/\r?\n/g,"")))),e.indexOf("[caption")!==-1&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,c=>c.replace(/]*)>/g,"").replace(/[\r\n\t]+/,""))),e=e.replace(new RegExp("\\s*\\s*","g"),` -`),e=e.replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),` -<$1>`),e=e.replace(/(

]+>[\s\S]*?)<\/p>/g,"$1"),e=e.replace(/]*)?>\s*

/gi,` - -`),e=e.replace(/\s*

/gi,""),e=e.replace(/\s*<\/p>\s*/gi,` - -`),e=e.replace(/\n[\s\u00a0]+\n/g,` - -`),e=e.replace(/(\s*)
\s*/gi,(c,l)=>l&&l.indexOf(` -`)!==-1?` - -`:` -`),e=e.replace(/\s*

\s*/g,`
-`),e=e.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,` - -[caption$1[/caption] - -`),e=e.replace(/caption\]\n\n+\[caption/g,`caption] - -[caption`),e=e.replace(new RegExp("\\s*<((?:"+o+")(?: [^>]*)?)\\s*>","g"),` -<$1>`),e=e.replace(new RegExp("\\s*\\s*","g"),` -`),e=e.replace(/<((li|dt|dd)[^>]*)>/g," <$1>"),e.indexOf("/g,` -`)),e.indexOf("]*)?>\s*/g,` - - - -`)),e.indexOf("/g,c=>c.replace(/[\r\n]+/g,""))),e=e.replace(/<\/p#>/g,`

-`),e=e.replace(/\s*(

]+>[\s\S]*?<\/p>)/g,` -$1`),e=e.replace(/^\s+/,""),e=e.replace(/[\s\u00a0]+$/,""),s&&(e=e.replace(//g,` -`)),i&&(e=e.replace(/]*)>/g,"")),r.length&&(e=e.replace(//g,()=>r.shift())),e):""}function Eg(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:o,attrs:r={},innerBlocks:s=[],innerContent:i=[]}=e;let c=0;const l=i.map(u=>u!==null?u:Eg(s[c++],t)).join(` -`).replace(/\n+/g,` -`).trim();return n?ere(o,r,l):l}function gv(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return kn("blocks.getBlockDefaultClassName",t,e)}function aN(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return kn("blocks.getBlockMenuDefaultClassName",t,e)}const h8={},Qoe={};function zv(e={}){const{blockType:t,attributes:n}=h8;return zv.skipFilters?e:kn("blocks.getSaveContent.extraProps",{...e},t,n)}function hLe(e={}){const{innerBlocks:t}=Qoe;if(!Array.isArray(t))return{...e,children:t};const n=Uo(t,{isInnerBlocks:!0});return{...e,children:a.jsx(C1,{children:n})}}function Joe(e,t,n=[]){const o=Qz(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof z.Component){const i=new r({attributes:t});r=i.render.bind(i)}h8.blockType=o,h8.attributes=t,Qoe.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&M0e("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=kn("blocks.getSaveContent.extraProps",{...s.props},o,t);Jr(i,s.props)||(s=z.cloneElement(s,i))}return kn("blocks.getSaveElement",s,o,t)}function hf(e,t,n){const o=Qz(e);return Po(Joe(o,t,n))}function mLe(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.__experimentalRole==="local"||"default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o},{})}function MLe(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function Yx(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=hf(e.name,e.attributes,e.innerBlocks)}catch{}return t}function ere(e,t,n){const o=t&&Object.entries(t).length?MLe(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` -`+n+` -`:``}function gLe(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return Eg(e.__unstableBlockSource);const n=e.name,o=Yx(e);if(n===Zz()||!t&&n===Nu())return o;const r=Nt(n);if(!r)return o;const s=mLe(r,e.attributes);return ere(n,s,o)}function pd(e){e.length===1&&Kc(e[0])&&(e=[]);let t=Uo(e);return e.length===1&&e[0].name===Nu()&&e[0].name==="core/freeform"&&(t=Zoe(t)),t}function Uo(e,t){return(Array.isArray(e)?e:[e]).map(o=>gLe(o,t)).join(` - -`)}var zLe=/[\t\n\f ]/,OLe=/[A-Za-z]/,ALe=/\r\n?/g;function Ro(e){return zLe.test(e)}function SV(e){return OLe.test(e)}function yLe(e){return e.replace(ALe,` -`)}var vLe=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` -`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||SV(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();Ro(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();Ro(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();Ro(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!Ro(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();Ro(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();Ro(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();Ro(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();Ro(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();Ro(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();Ro(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(Ro(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();Ro(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(Ro(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();Ro(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();Ro(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();Ro(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||SV(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=yLe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),xLe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new vLe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function _Le(){const e=[],t=Oh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const wLe=e=>e,kLe=/[\t\n\r\v\f ]+/g,qLe=/^[\t\n\r\v\f ]*$/,SLe=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,tre=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],CLe=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],RLe=[...tre,...CLe],CV=[wLe,LLe],WLe=/^[\da-z]+$/i,TLe=/^#\d+$/,ELe=/^#x[\da-f]+$/i;function BLe(e){return WLe.test(e)||TLe.test(e)||ELe.test(e)}class NLe{parse(t){if(BLe(t))return qt("&"+t+";")}}function cN(e){return e.trim().split(kLe)}function LLe(e){return cN(e).join(" ")}function jLe(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||RLe.includes(n)})}function RV(e,t,n=Oh()){let o=e.chars,r=t.chars;for(let s=0;s{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),ILe(s.trim())]});return Object.fromEntries(t)}const $Le={class:(e,t)=>{const[n,o]=[e,t].map(cN),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>G1(...[e,t].map(DLe)),...Object.fromEntries(tre.map(e=>[e,()=>!0]))};function FLe(e,t,n=Oh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):FLe(...[e,t].map(jLe),n),Chars:RV,Comment:RV};function km(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!qLe.test(t.chars))return t}function HLe(e,t=Oh()){try{return new xLe(new NLe).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function WV(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function ULe(e,t,n=Oh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>HLe(c,n));if(!o||!r)return!1;let s,i;for(;s=km(o);){if(i=km(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=VLe[s.type];if(c&&!c(s,i,n))return!1;WV(s,r[0])?km(r):WV(i,o[0])&&km(o)}return(i=km(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function Bg(e,t=e.name){if(e.name===Nu()||e.name===Zz())return[!0,[]];const o=_Le(),r=Qz(t);let s;try{s=hf(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: - -%s`,c.toString()),[!1,o.getItems()]}const i=ULe(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). - -Content generated by \`save\` function: - -%s - -Content retrieved from post body: - -%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function nre(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function XLe(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var GLe=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function lN(e,t){if(t){if(typeof e=="string"){var n=GLe();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=lN(e,s),o},{})}}function uN(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return XLe(s,n)}}function KLe(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=uN(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function YLe(e){return uN(e,"textContent")}function ZLe(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return lN(r,t)})}}function QLe(e){return Ce("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function JLe(...e){Ce("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?dN(n.childNodes):[]}}const m8={concat:JLe,getChildrenArray:QLe,fromDOM:dN,toHTML:e7e,matcher:ore};function t7e(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return rre(n)}catch{return null}}}function o7e(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?dn.fromHTMLElement(o,{preserveWhiteSpace:t}):dn.empty()},s7e=e=>t=>e(t)!==void 0;function i7e(e,t){switch(t){case"rich-text":return e instanceof dn;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function a7e(e,t){return t.some(n=>i7e(e,n))}function c7e(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=pN(n,t);break}return(!l7e(s,t.type)||!u7e(s,t.enum))&&(s=void 0),s===void 0&&(s=Noe(t)),s}function l7e(e,t){return t===void 0||a7e(e,Array.isArray(t)?t:[t])}function u7e(e,t){return!Array.isArray(t)||t.includes(e)}const sre=ps(e=>{switch(e.source){case"attribute":{let n=KLe(e.selector,e.attribute);return e.type==="boolean"&&(n=s7e(n)),n}case"html":return o7e(e.selector,e.multiline);case"text":return YLe(e.selector);case"rich-text":return r7e(e.selector,e.__unstablePreserveWhiteSpace);case"children":return ore(e.selector);case"node":return n7e(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,sre(o)]));return ZLe(e.selector,t);case"tag":{const n=uN(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function ire(e){return lN(e,t=>t)}function pN(e,t){return sre(t)(ire(e))}function Yc(e,t,n={}){var o;const r=ire(t),s=Qz(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,c7e(c,l,r,n,t)]));return kn("blocks.getBlockAttributes",i,s,t,n)}const d7e={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function TV(e){const t=pN(`

${e}
`,d7e);return t?t.trim().split(/\s+/):[]}function p7e(e,t,n){if(!it(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=hf(t,s),c=TV(i),u=TV(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}function Ov(e,t){const n=p7e(e.attributes,t,e.originalContent);return{...e,attributes:n}}function f7e(){return!1}function b7e(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sare(d,t)).filter(d=>!!d),i=me(n.blockName,Yc(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=g7e(i,o),{validationIssues:l}=c,u=b7e(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). - -New content generated by \`save\` function: - -%s - -Content retrieved from post body: - -%s`,o.name,o,hf(o,u.attributes),u.originalContent),console.groupEnd()):!c.isValid&&!u.isValid&&l.forEach(({log:d,args:p})=>d(...p)),u}function qn(e,t){return cLe(e).reduce((n,o)=>{const r=are(o,t);return r&&n.push(r),n},[])}function cre(){return Ys("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function lre(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=ja(cre(),({isMatch:c})=>c(o));if(!r)return _1.isNative?qn(`${o.outerHTML}`):me("core/html",Yc("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return me(i,Yc(i,o.outerHTML))})}function Zx(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?J4(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?J4(i)&&!t.raw?r.removeChild(i):s.appendChild(i):Vb(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function ure(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=z7e(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")v6e(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),qp(e.parentNode)}}function z7e(e,t){if(e.nodeValue==="nextpage")return A7e(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,qp(o);break}return O7e(n,r,t)}function O7e(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function A7e(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function EV(e){return e.nodeName==="OL"||e.nodeName==="UL"}function y7e(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function dre(e){if(!EV(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(y7e(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&EV(o)){const r=e.previousElementSibling;r?r.appendChild(e):RM(e)}}function pre(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=Zx(t.innerHTML,e))}}function v7e(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||X0e(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function x7e(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function nq(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function fre(e,t,n){if(!v7e(e,n))return;let o=e;const r=e.parentNode;x7e(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&nq(o,s):nq(o,s):o.parentNode.nodeName==="BODY"&&nq(o)}function fN(e,t,n=0){const o=Ng(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return fN(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:bN(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function _7e(e,t,n){return t.replace(Ng(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(bN(arguments));return p||p===""?r+p+d:o})}function w7e(e){return new hN(e).string()}function Ng(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const BV=ps(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function bN(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new hN({tag:e[2],attrs:e[3],type:t,content:e[5]})}const hN=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=BV(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:fN,replace:_7e,string:w7e,regexp:Ng,attrs:BV,fromMatch:bN});Object.assign(hN.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const NV=e=>Array.isArray(e)?e:[e],LV=/(\n|

)\s*$/,jV=/^\s*(\n|<\/p>)/;function xb(e,t=0,n=[]){const o=Ys("from"),r=ja(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&NV(u.tag).some(d=>Ng(d).test(e)));if(!r)return[e];const i=NV(r.tag).find(u=>Ng(u).test(e));let c;const l=t;if(c=fN(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(LV.test(u)&&jV.test(d)))return xb(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return xb(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,Ov(f,Nt(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,O])=>O.shortcode).map(([O,y])=>[O,y.shortcode(c.shortcode.attrs,c)])),b=Nt(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let M=me(r.blockName,Yc(h,c.shortcode.content,f));M.originalContent=c.shortcode.content,M=Ov(M,h),p=[M]}return[...xb(u.replace(LV,"")),...p,...xb(d.replace(jV,""))]}return[e]}function k7e(e,t){const o={phrasingContentSchema:zx(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=it(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function bre(e){return k7e(cre(),e)}function q7e(e){return!/<(?!br[ />])/i.test(e)}function hre(e,t,n,o){Array.from(e).forEach(r=>{hre(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function dp(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,hre(o.body.childNodes,t,o,n),o.body.innerHTML}function Av(e,t){const n=e[`${t}Sibling`];if(n&&Vb(n))return n;const{parentNode:o}=e;if(!(!o||!Vb(o)))return Av(o,t)}function mre(e){e.nodeType===e.COMMENT_NODE&&qp(e)}function S7e(e,t){if(X0e(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function Mre(e,t){return e.every(n=>S7e(n,t)&&Mre(Array.from(n.children),t))}function C7e(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function R7e(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some(C7e)&&Mre(o,t)}function gre(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&_m(t.createElement("strong"),e),o==="italic"&&_m(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&_m(t.createElement("s"),e),i==="super"?_m(t.createElement("sup"),e):i==="sub"&&_m(t.createElement("sub"),e)}else e.nodeName==="B"?e=dF(e,"strong"):e.nodeName==="I"?e=dF(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function zre(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Ore(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function oq(e){return e.nodeName==="OL"||e.nodeName==="UL"}function W7e(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!oq(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=dp(e.innerHTML,[Ore]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,oq(c)&&(c=c.lastChild||c);oq(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const yv={};function Zc(e){const t=window.URL.createObjectURL(e);return yv[t]=e,t}function Are(e){return yv[e]}function yre(e){return Are(e)?.type.split("/")[0]}function M8(e){yv[e]&&window.URL.revokeObjectURL(e),delete yv[e]}function o1(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function PV(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function T7e(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"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,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(g===!1)return JSON.parse(JSON.stringify(A));var x={};for(var w in A)A.hasOwnProperty(w)&&(x[w]=A[w].defaultValue);return x}function n(){var g=t(!0),A={};for(var x in g)g.hasOwnProperty(x)&&(A[x]=!0);return A}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(g,A){return i[g]=A,this},o.getOption=function(g){return i[g]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(g){if(!l.hasOwnProperty(g))throw Error(g+" flavor was not found");o.resetOptions();var A=l[g];c=g;for(var x in A)A.hasOwnProperty(x)&&(i[x]=A[x])},o.getFlavor=function(){return c},o.getFlavorOptions=function(g){if(l.hasOwnProperty(g))return l[g]},o.getDefaultOptions=function(g){return t(g)},o.subParser=function(g,A){if(o.helper.isString(g))if(typeof A<"u")r[g]=A;else{if(r.hasOwnProperty(g))return r[g];throw Error("SubParser named "+g+" not registered!")}},o.extension=function(g,A){if(!o.helper.isString(g))throw Error("Extension 'name' must be a string");if(g=o.helper.stdExtName(g),o.helper.isUndefined(A)){if(!s.hasOwnProperty(g))throw Error("Extension named "+g+" is not registered!");return s[g]}else{typeof A=="function"&&(A=A()),o.helper.isArray(A)||(A=[A]);var x=u(A,g);if(x.valid)s[g]=A;else throw Error(x.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(g){delete s[g]},o.resetExtensions=function(){s={}};function u(g,A){var x=A?"Error in "+A+" extension->":"Error in unnamed extension",w={valid:!0,error:""};o.helper.isArray(g)||(g=[g]);for(var k=0;k"u"},o.helper.forEach=function(g,A){if(o.helper.isUndefined(g))throw new Error("obj param is required");if(o.helper.isUndefined(A))throw new Error("callback param is required");if(!o.helper.isFunction(A))throw new Error("callback param must be a function/closure");if(typeof g.forEach=="function")g.forEach(A);else if(o.helper.isArray(g))for(var x=0;x").replace(/&/g,"&")};var p=function(g,A,x,w){var k=w||"",q=k.indexOf("g")>-1,S=new RegExp(A+"|"+x,"g"+k.replace(/g/g,"")),C=new RegExp(A,k.replace(/g/g,"")),T=[],E,B,N,W,j;do for(E=0;N=S.exec(g);)if(C.test(N[0]))E++||(B=S.lastIndex,W=B-N[0].length);else if(E&&!--E){j=N.index+N[0].length;var I={left:{start:W,end:B},match:{start:B,end:N.index},right:{start:N.index,end:j},wholeMatch:{start:W,end:j}};if(T.push(I),!q)return T}while(E&&(S.lastIndex=B));return T};o.helper.matchRecursiveRegExp=function(g,A,x,w){for(var k=p(g,A,x,w),q=[],S=0;S0){var E=[];S[0].wholeMatch.start!==0&&E.push(g.slice(0,S[0].wholeMatch.start));for(var B=0;B=0?w+(x||0):w},o.helper.splitAtIndex=function(g,A){if(!o.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,A),g.substring(A)]},o.helper.encodeEmailAddress=function(g){var A=[function(x){return"&#"+x.charCodeAt(0)+";"},function(x){return"&#x"+x.charCodeAt(0).toString(16)+";"},function(x){return x}];return g=g.replace(/./g,function(x){if(x==="@")x=A[Math.floor(Math.random()*2)](x);else{var w=Math.random();x=w>.9?A[2](x):w>.45?A[1](x):A[0](x)}return x}),g},o.helper.padEnd=function(A,x,w){return x=x>>0,w=String(w||" "),A.length>x?String(A):(x=x-A.length,x>w.length&&(w+=w.repeat(x/w.length)),String(A)+w.slice(0,x))},typeof console>"u"&&(console={warn:function(g){alert(g)},log:function(g){alert(g)},error:function(g){throw g}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(g){var A={},x=[],w=[],k={},q=c,S={parsed:{},raw:"",format:""};C();function C(){g=g||{};for(var W in i)i.hasOwnProperty(W)&&(A[W]=i[W]);if(typeof g=="object")for(var j in g)g.hasOwnProperty(j)&&(A[j]=g[j]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof g+" was passed instead.");A.extensions&&o.helper.forEach(A.extensions,T)}function T(W,j){if(j=j||null,o.helper.isString(W))if(W=o.helper.stdExtName(W),j=W,o.extensions[W]){console.warn("DEPRECATION WARNING: "+W+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),E(o.extensions[W],W);return}else if(!o.helper.isUndefined(s[W]))W=s[W];else throw Error('Extension "'+W+'" could not be loaded. It was either not found or is not a valid extension.');typeof W=="function"&&(W=W()),o.helper.isArray(W)||(W=[W]);var I=u(W,j);if(!I.valid)throw Error(I.error);for(var P=0;P[ \t]+¨NBSP;<"),!j)if(window&&window.document)j=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var I=j.createElement("div");I.innerHTML=W;var P={preList:oe(I)};Z(I);for(var U=I.childNodes,X="",H=0;H'}else ne.push(K[se].innerHTML),K[se].innerHTML="",K[se].setAttribute("prenum",se.toString());return ne}return X},this.setOption=function(W,j){A[W]=j},this.getOption=function(W){return A[W]},this.getOptions=function(){return A},this.addExtension=function(W,j){j=j||null,T(W,j)},this.useExtension=function(W){T(W)},this.setFlavor=function(W){if(!l.hasOwnProperty(W))throw Error(W+" flavor was not found");var j=l[W];q=W;for(var I in j)j.hasOwnProperty(I)&&(A[I]=j[I])},this.getFlavor=function(){return q},this.removeExtension=function(W){o.helper.isArray(W)||(W=[W]);for(var j=0;j? ?(['"].*['"])?\)$/m)>-1)C="";else if(!C)if(S||(S=q.toLowerCase().replace(/ ?\n/g," ")),C="#"+S,!o.helper.isUndefined(x.gUrls[S]))C=x.gUrls[S],o.helper.isUndefined(x.gTitles[S])||(B=x.gTitles[S]);else return k;C=C.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var N='",N};return g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[([^\[\]]+)]()()()()()/g,w),A.ghMentions&&(g=g.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(k,q,S,C,T){if(S==="\\")return q+C;if(!o.helper.isString(A.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var E=A.ghMentionsLink.replace(/\{u}/g,T),B="";return A.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),q+'"+C+""})),g=x.converter._dispatch("anchors.after",g,A,x),g});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,b=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,h=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,M=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,O=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,y=function(g){return function(A,x,w,k,q,S,C){w=w.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var T=w,E="",B="",N=x||"",W=C||"";return/^www\./i.test(w)&&(w=w.replace(/^www\./i,"http://www.")),g.excludeTrailingPunctuationFromURLs&&S&&(E=S),g.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),N+'"+T+""+E+W}},_=function(g,A){return function(x,w,k){var q="mailto:";return w=w||"",k=o.subParser("unescapeSpecialChars")(k,g,A),g.encodeEmails?(q=o.helper.encodeEmailAddress(q+k),k=o.helper.encodeEmailAddress(k)):q=q+k,w+''+k+""}};o.subParser("autoLinks",function(g,A,x){return g=x.converter._dispatch("autoLinks.before",g,A,x),g=g.replace(h,y(A)),g=g.replace(O,_(A,x)),g=x.converter._dispatch("autoLinks.after",g,A,x),g}),o.subParser("simplifiedAutoLinks",function(g,A,x){return A.simplifiedAutoLink&&(g=x.converter._dispatch("simplifiedAutoLinks.before",g,A,x),A.excludeTrailingPunctuationFromURLs?g=g.replace(b,y(A)):g=g.replace(f,y(A)),g=g.replace(M,_(A,x)),g=x.converter._dispatch("simplifiedAutoLinks.after",g,A,x)),g}),o.subParser("blockGamut",function(g,A,x){return g=x.converter._dispatch("blockGamut.before",g,A,x),g=o.subParser("blockQuotes")(g,A,x),g=o.subParser("headers")(g,A,x),g=o.subParser("horizontalRule")(g,A,x),g=o.subParser("lists")(g,A,x),g=o.subParser("codeBlocks")(g,A,x),g=o.subParser("tables")(g,A,x),g=o.subParser("hashHTMLBlocks")(g,A,x),g=o.subParser("paragraphs")(g,A,x),g=x.converter._dispatch("blockGamut.after",g,A,x),g}),o.subParser("blockQuotes",function(g,A,x){g=x.converter._dispatch("blockQuotes.before",g,A,x),g=g+` - -`;var w=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return A.splitAdjacentBlockquotes&&(w=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),g=g.replace(w,function(k){return k=k.replace(/^[ \t]*>[ \t]?/gm,""),k=k.replace(/¨0/g,""),k=k.replace(/^[ \t]+$/gm,""),k=o.subParser("githubCodeBlocks")(k,A,x),k=o.subParser("blockGamut")(k,A,x),k=k.replace(/(^|\n)/g,"$1 "),k=k.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(q,S){var C=S;return C=C.replace(/^  /mg,"¨0"),C=C.replace(/¨0/g,""),C}),o.subParser("hashBlock")(`
-`+k+` -
`,A,x)}),g=x.converter._dispatch("blockQuotes.after",g,A,x),g}),o.subParser("codeBlocks",function(g,A,x){g=x.converter._dispatch("codeBlocks.before",g,A,x),g+="¨0";var w=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return g=g.replace(w,function(k,q,S){var C=q,T=S,E=` -`;return C=o.subParser("outdent")(C,A,x),C=o.subParser("encodeCode")(C,A,x),C=o.subParser("detab")(C,A,x),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),A.omitExtraWLInCodeBlocks&&(E=""),C="
"+C+E+"
",o.subParser("hashBlock")(C,A,x)+T}),g=g.replace(/¨0/,""),g=x.converter._dispatch("codeBlocks.after",g,A,x),g}),o.subParser("codeSpans",function(g,A,x){return g=x.converter._dispatch("codeSpans.before",g,A,x),typeof g>"u"&&(g=""),g=g.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(w,k,q,S){var C=S;return C=C.replace(/^([ \t]*)/g,""),C=C.replace(/[ \t]*$/g,""),C=o.subParser("encodeCode")(C,A,x),C=k+""+C+"",C=o.subParser("hashHTMLSpans")(C,A,x),C}),g=x.converter._dispatch("codeSpans.after",g,A,x),g}),o.subParser("completeHTMLDocument",function(g,A,x){if(!A.completeHTMLDocument)return g;g=x.converter._dispatch("completeHTMLDocument.before",g,A,x);var w="html",k=` -`,q="",S=` -`,C="",T="";typeof x.metadata.parsed.doctype<"u"&&(k=" -`,w=x.metadata.parsed.doctype.toString().toLowerCase(),(w==="html"||w==="html5")&&(S=''));for(var E in x.metadata.parsed)if(x.metadata.parsed.hasOwnProperty(E))switch(E.toLowerCase()){case"doctype":break;case"title":q=""+x.metadata.parsed.title+` -`;break;case"charset":w==="html"||w==="html5"?S=' -`:S=' -`;break;case"language":case"lang":C=' lang="'+x.metadata.parsed[E]+'"',T+=' -`;break;default:T+=' -`}return g=k+" - -`+q+S+T+` - -`+g.trim()+` - -`,g=x.converter._dispatch("completeHTMLDocument.after",g,A,x),g}),o.subParser("detab",function(g,A,x){return g=x.converter._dispatch("detab.before",g,A,x),g=g.replace(/\t(?=\t)/g," "),g=g.replace(/\t/g,"¨A¨B"),g=g.replace(/¨B(.+?)¨A/g,function(w,k){for(var q=k,S=4-q.length%4,C=0;C/g,">"),g=x.converter._dispatch("encodeAmpsAndAngles.after",g,A,x),g}),o.subParser("encodeBackslashEscapes",function(g,A,x){return g=x.converter._dispatch("encodeBackslashEscapes.before",g,A,x),g=g.replace(/\\(\\)/g,o.helper.escapeCharactersCallback),g=g.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("encodeBackslashEscapes.after",g,A,x),g}),o.subParser("encodeCode",function(g,A,x){return g=x.converter._dispatch("encodeCode.before",g,A,x),g=g.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("encodeCode.after",g,A,x),g}),o.subParser("escapeSpecialCharsWithinTagAttributes",function(g,A,x){g=x.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",g,A,x);var w=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,k=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return g=g.replace(w,function(q){return q.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=g.replace(k,function(q){return q.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=x.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",g,A,x),g}),o.subParser("githubCodeBlocks",function(g,A,x){return A.ghCodeBlocks?(g=x.converter._dispatch("githubCodeBlocks.before",g,A,x),g+="¨0",g=g.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(w,k,q,S){var C=A.omitExtraWLInCodeBlocks?"":` -`;return S=o.subParser("encodeCode")(S,A,x),S=o.subParser("detab")(S,A,x),S=S.replace(/^\n+/g,""),S=S.replace(/\n+$/g,""),S="
"+S+C+"
",S=o.subParser("hashBlock")(S,A,x),` - -¨G`+(x.ghCodeBlocks.push({text:w,codeblock:S})-1)+`G - -`}),g=g.replace(/¨0/,""),x.converter._dispatch("githubCodeBlocks.after",g,A,x)):g}),o.subParser("hashBlock",function(g,A,x){return g=x.converter._dispatch("hashBlock.before",g,A,x),g=g.replace(/(^\n+|\n+$)/g,""),g=` - -¨K`+(x.gHtmlBlocks.push(g)-1)+`K - -`,g=x.converter._dispatch("hashBlock.after",g,A,x),g}),o.subParser("hashCodeTags",function(g,A,x){g=x.converter._dispatch("hashCodeTags.before",g,A,x);var w=function(k,q,S,C){var T=S+o.subParser("encodeCode")(q,A,x)+C;return"¨C"+(x.gHtmlSpans.push(T)-1)+"C"};return g=o.helper.replaceRecursiveRegExp(g,w,"]*>","","gim"),g=x.converter._dispatch("hashCodeTags.after",g,A,x),g}),o.subParser("hashElement",function(g,A,x){return function(w,k){var q=k;return q=q.replace(/\n\n/g,` -`),q=q.replace(/^\n/,""),q=q.replace(/\n+$/g,""),q=` - -¨K`+(x.gHtmlBlocks.push(q)-1)+`K - -`,q}}),o.subParser("hashHTMLBlocks",function(g,A,x){g=x.converter._dispatch("hashHTMLBlocks.before",g,A,x);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(W,j,I,P){var U=W;return I.search(/\bmarkdown\b/)!==-1&&(U=I+x.converter.makeHtml(j)+P),` - -¨K`+(x.gHtmlBlocks.push(U)-1)+`K - -`};A.backslashEscapesHTMLTags&&(g=g.replace(/\\<(\/?[^>]+?)>/g,function(W,j){return"<"+j+">"}));for(var q=0;q]*>)","im"),T="<"+w[q]+"\\b[^>]*>",E="";(S=o.helper.regexIndexOf(g,C))!==-1;){var B=o.helper.splitAtIndex(g,S),N=o.helper.replaceRecursiveRegExp(B[1],k,T,E,"im");if(N===B[1])break;g=B[0].concat(N)}return g=g.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,x)),g=o.helper.replaceRecursiveRegExp(g,function(W){return` - -¨K`+(x.gHtmlBlocks.push(W)-1)+`K - -`},"^ {0,3}","gm"),g=g.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,x)),g=x.converter._dispatch("hashHTMLBlocks.after",g,A,x),g}),o.subParser("hashHTMLSpans",function(g,A,x){g=x.converter._dispatch("hashHTMLSpans.before",g,A,x);function w(k){return"¨C"+(x.gHtmlSpans.push(k)-1)+"C"}return g=g.replace(/<[^>]+?\/>/gi,function(k){return w(k)}),g=g.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<[^>]+?>/gi,function(k){return w(k)}),g=x.converter._dispatch("hashHTMLSpans.after",g,A,x),g}),o.subParser("unhashHTMLSpans",function(g,A,x){g=x.converter._dispatch("unhashHTMLSpans.before",g,A,x);for(var w=0;w]*>\\s*]*>","^ {0,3}\\s*
","gim"),g=x.converter._dispatch("hashPreCodeTags.after",g,A,x),g}),o.subParser("headers",function(g,A,x){g=x.converter._dispatch("headers.before",g,A,x);var w=isNaN(parseInt(A.headerLevelStart))?1:parseInt(A.headerLevelStart),k=A.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,q=A.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;g=g.replace(k,function(T,E){var B=o.subParser("spanGamut")(E,A,x),N=A.noHeaderId?"":' id="'+C(E)+'"',W=w,j=""+B+"";return o.subParser("hashBlock")(j,A,x)}),g=g.replace(q,function(T,E){var B=o.subParser("spanGamut")(E,A,x),N=A.noHeaderId?"":' id="'+C(E)+'"',W=w+1,j=""+B+"";return o.subParser("hashBlock")(j,A,x)});var S=A.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;g=g.replace(S,function(T,E,B){var N=B;A.customizedHeaderId&&(N=B.replace(/\s?\{([^{]+?)}\s*$/,""));var W=o.subParser("spanGamut")(N,A,x),j=A.noHeaderId?"":' id="'+C(B)+'"',I=w-1+E.length,P=""+W+"";return o.subParser("hashBlock")(P,A,x)});function C(T){var E,B;if(A.customizedHeaderId){var N=T.match(/\{([^{]+?)}\s*$/);N&&N[1]&&(T=N[1])}return E=T,o.helper.isString(A.prefixHeaderId)?B=A.prefixHeaderId:A.prefixHeaderId===!0?B="section-":B="",A.rawPrefixHeaderId||(E=B+E),A.ghCompatibleHeaderId?E=E.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():A.rawHeaderId?E=E.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():E=E.replace(/[^\w]/g,"").toLowerCase(),A.rawPrefixHeaderId&&(E=B+E),x.hashLinkCounts[E]?E=E+"-"+x.hashLinkCounts[E]++:x.hashLinkCounts[E]=1,E}return g=x.converter._dispatch("headers.after",g,A,x),g}),o.subParser("horizontalRule",function(g,A,x){g=x.converter._dispatch("horizontalRule.before",g,A,x);var w=o.subParser("hashBlock")("
",A,x);return g=g.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,w),g=x.converter._dispatch("horizontalRule.after",g,A,x),g}),o.subParser("images",function(g,A,x){g=x.converter._dispatch("images.before",g,A,x);var w=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\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,q=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,S=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,C=/!\[([^\[\]]+)]()()()()()/g;function T(B,N,W,j,I,P,U,X){return j=j.replace(/\s/g,""),E(B,N,W,j,I,P,U,X)}function E(B,N,W,j,I,P,U,X){var H=x.gUrls,Z=x.gTitles,oe=x.gDimensions;if(W=W.toLowerCase(),X||(X=""),B.search(/\(? ?(['"].*['"])?\)$/m)>-1)j="";else if(j===""||j===null)if((W===""||W===null)&&(W=N.toLowerCase().replace(/ ?\n/g," ")),j="#"+W,!o.helper.isUndefined(H[W]))j=H[W],o.helper.isUndefined(Z[W])||(X=Z[W]),o.helper.isUndefined(oe[W])||(I=oe[W].width,P=oe[W].height);else return B;N=N.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),j=j.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var ee=''+N+'","
")}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(k,q){return w(q,"","")}),g=g.replace(/\b_(\S[\s\S]*?)_\b/g,function(k,q){return w(q,"","")})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/__(\S[\s\S]*?)__/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/_([^\s_][\s\S]*?)_/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),A.literalMidWordAsterisks?(g=g.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")})):(g=g.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*([^\s*][\s\S]*?)\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),g=x.converter._dispatch("italicsAndBold.after",g,A,x),g}),o.subParser("lists",function(g,A,x){function w(S,C){x.gListLevel++,S=S.replace(/\n{2,}$/,` -`),S+="¨0";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,E=/\n[ \t]*\n(?!¨0)/.test(S);return A.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),S=S.replace(T,function(B,N,W,j,I,P,U){U=U&&U.trim()!=="";var X=o.subParser("outdent")(I,A,x),H="";return P&&A.tasklists&&(H=' class="task-list-item" style="list-style-type: none;"',X=X.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Z='-1?(X=o.subParser("githubCodeBlocks")(X,A,x),X=o.subParser("blockGamut")(X,A,x)):(X=o.subParser("lists")(X,A,x),X=X.replace(/\n$/,""),X=o.subParser("hashHTMLBlocks")(X,A,x),X=X.replace(/\n\n+/g,` - -`),E?X=o.subParser("paragraphs")(X,A,x):X=o.subParser("spanGamut")(X,A,x)),X=X.replace("¨A",""),X=""+X+` -`,X}),S=S.replace(/¨0/g,""),x.gListLevel--,C&&(S=S.replace(/\s+$/,"")),S}function k(S,C){if(C==="ol"){var T=S.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function q(S,C,T){var E=A.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,B=A.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,N=C==="ul"?E:B,W="";if(S.search(N)!==-1)(function I(P){var U=P.search(N),X=k(S,C);U!==-1?(W+=` - -<`+C+X+`> -`+w(P.slice(0,U),!!T)+" -`,C=C==="ul"?"ol":"ul",N=C==="ul"?E:B,I(P.slice(U))):W+=` - -<`+C+X+`> -`+w(P,!!T)+" -`})(S);else{var j=k(S,C);W=` - -<`+C+j+`> -`+w(S,!!T)+" -`}return W}return g=x.converter._dispatch("lists.before",g,A,x),g+="¨0",x.gListLevel?g=g.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T){var E=T.search(/[*+-]/g)>-1?"ul":"ol";return q(C,E,!0)}):g=g.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T,E){var B=E.search(/[*+-]/g)>-1?"ul":"ol";return q(T,B,!1)}),g=g.replace(/¨0/,""),g=x.converter._dispatch("lists.after",g,A,x),g}),o.subParser("metadata",function(g,A,x){if(!A.metadata)return g;g=x.converter._dispatch("metadata.before",g,A,x);function w(k){x.metadata.raw=k,k=k.replace(/&/g,"&").replace(/"/g,"""),k=k.replace(/\n {4}/g," "),k.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(q,S,C){return x.metadata.parsed[S]=C,""})}return g=g.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(k,q,S){return w(S),"¨M"}),g=g.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(k,q,S){return q&&(x.metadata.format=q),w(S),"¨M"}),g=g.replace(/¨M/g,""),g=x.converter._dispatch("metadata.after",g,A,x),g}),o.subParser("outdent",function(g,A,x){return g=x.converter._dispatch("outdent.before",g,A,x),g=g.replace(/^(\t|[ ]{1,4})/gm,"¨0"),g=g.replace(/¨0/g,""),g=x.converter._dispatch("outdent.after",g,A,x),g}),o.subParser("paragraphs",function(g,A,x){g=x.converter._dispatch("paragraphs.before",g,A,x),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,"");for(var w=g.split(/\n{2,}/g),k=[],q=w.length,S=0;S=0?k.push(C):C.search(/\S/)>=0&&(C=o.subParser("spanGamut")(C,A,x),C=C.replace(/^([ \t]*)/g,"

"),C+="

",k.push(C))}for(q=k.length,S=0;S]*>\s*]*>/.test(E)&&(B=!0)}k[S]=E}return g=k.join(` -`),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),x.converter._dispatch("paragraphs.after",g,A,x)}),o.subParser("runExtension",function(g,A,x,w){if(g.filter)A=g.filter(A,w.converter,x);else if(g.regex){var k=g.regex;k instanceof RegExp||(k=new RegExp(k,"g")),A=A.replace(k,g.replace)}return A}),o.subParser("spanGamut",function(g,A,x){return g=x.converter._dispatch("spanGamut.before",g,A,x),g=o.subParser("codeSpans")(g,A,x),g=o.subParser("escapeSpecialCharsWithinTagAttributes")(g,A,x),g=o.subParser("encodeBackslashEscapes")(g,A,x),g=o.subParser("images")(g,A,x),g=o.subParser("anchors")(g,A,x),g=o.subParser("autoLinks")(g,A,x),g=o.subParser("simplifiedAutoLinks")(g,A,x),g=o.subParser("emoji")(g,A,x),g=o.subParser("underline")(g,A,x),g=o.subParser("italicsAndBold")(g,A,x),g=o.subParser("strikethrough")(g,A,x),g=o.subParser("ellipsis")(g,A,x),g=o.subParser("hashHTMLSpans")(g,A,x),g=o.subParser("encodeAmpsAndAngles")(g,A,x),A.simpleLineBreaks?/\n\n¨K/.test(g)||(g=g.replace(/\n+/g,`
-`)):g=g.replace(/ +\n/g,`
-`),g=x.converter._dispatch("spanGamut.after",g,A,x),g}),o.subParser("strikethrough",function(g,A,x){function w(k){return A.simplifiedAutoLink&&(k=o.subParser("simplifiedAutoLinks")(k,A,x)),""+k+""}return A.strikethrough&&(g=x.converter._dispatch("strikethrough.before",g,A,x),g=g.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(k,q){return w(q)}),g=x.converter._dispatch("strikethrough.after",g,A,x)),g}),o.subParser("stripLinkDefinitions",function(g,A,x){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]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;g+="¨0";var q=function(S,C,T,E,B,N,W){return C=C.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?x.gUrls[C]=T.replace(/\s/g,""):x.gUrls[C]=o.subParser("encodeAmpsAndAngles")(T,A,x),N?N+W:(W&&(x.gTitles[C]=W.replace(/"|'/g,""")),A.parseImgDimensions&&E&&B&&(x.gDimensions[C]={width:E,height:B}),"")};return g=g.replace(k,q),g=g.replace(w,q),g=g.replace(/¨0/,""),g}),o.subParser("tables",function(g,A,x){if(!A.tables)return g;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 q(B){return/^:[ \t]*--*$/.test(B)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(B)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(B)?' style="text-align:center;"':""}function S(B,N){var W="";return B=B.trim(),(A.tablesHeaderId||A.tableHeaderId)&&(W=' id="'+B.replace(/ /g,"_").toLowerCase()+'"'),B=o.subParser("spanGamut")(B,A,x),""+B+` -`}function C(B,N){var W=o.subParser("spanGamut")(B,A,x);return""+W+` -`}function T(B,N){for(var W=` - - -`,j=B.length,I=0;I - - -`,I=0;I -`;for(var P=0;P -`}return W+=` -
-`,W}function E(B){var N,W=B.split(` -`);for(N=0;N"+k+""}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(w,k){return""+k+""})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(w,k){return/\S$/.test(k)?""+k+"":w}),g=g.replace(/__(\S[\s\S]*?)__/g,function(w,k){return/\S$/.test(k)?""+k+"":w})),g=g.replace(/(_)/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("underline.after",g,A,x)),g}),o.subParser("unescapeSpecialChars",function(g,A,x){return g=x.converter._dispatch("unescapeSpecialChars.before",g,A,x),g=g.replace(/¨E(\d+)E/g,function(w,k){var q=parseInt(k);return String.fromCharCode(q)}),g=x.converter._dispatch("unescapeSpecialChars.after",g,A,x),g}),o.subParser("makeMarkdown.blockquote",function(g,A){var x="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q "+x.split(` -`).join(` -> `),x}),o.subParser("makeMarkdown.codeBlock",function(g,A){var x=g.getAttribute("language"),w=g.getAttribute("precodenum");return"```"+x+` -`+A.preList[w]+"\n```"}),o.subParser("makeMarkdown.codeSpan",function(g){return"`"+g.innerHTML+"`"}),o.subParser("makeMarkdown.emphasis",function(g,A){var x="";if(g.hasChildNodes()){x+="*";for(var w=g.childNodes,k=w.length,q=0;q",g.hasAttribute("width")&&g.hasAttribute("height")&&(A+=" ="+g.getAttribute("width")+"x"+g.getAttribute("height")),g.hasAttribute("title")&&(A+=' "'+g.getAttribute("title")+'"'),A+=")"),A}),o.subParser("makeMarkdown.links",function(g,A){var x="";if(g.hasChildNodes()&&g.hasAttribute("href")){var w=g.childNodes,k=w.length;x="[";for(var q=0;q",g.hasAttribute("title")&&(x+=' "'+g.getAttribute("title")+'"'),x+=")"}return x}),o.subParser("makeMarkdown.list",function(g,A,x){var w="";if(!g.hasChildNodes())return"";for(var k=g.childNodes,q=k.length,S=g.getAttribute("start")||1,C=0;C"u"||k[C].tagName.toLowerCase()!=="li")){var T="";x==="ol"?T=S.toString()+". ":T="- ",w+=T+o.subParser("makeMarkdown.listItem")(k[C],A),++S}return w+=` - -`,w.trim()}),o.subParser("makeMarkdown.listItem",function(g,A){for(var x="",w=g.childNodes,k=w.length,q=0;q - -`;if(g.nodeType!==1)return"";var k=g.tagName.toLowerCase();switch(k){case"h1":x||(w=o.subParser("makeMarkdown.header")(g,A,1)+` - -`);break;case"h2":x||(w=o.subParser("makeMarkdown.header")(g,A,2)+` - -`);break;case"h3":x||(w=o.subParser("makeMarkdown.header")(g,A,3)+` - -`);break;case"h4":x||(w=o.subParser("makeMarkdown.header")(g,A,4)+` - -`);break;case"h5":x||(w=o.subParser("makeMarkdown.header")(g,A,5)+` - -`);break;case"h6":x||(w=o.subParser("makeMarkdown.header")(g,A,6)+` - -`);break;case"p":x||(w=o.subParser("makeMarkdown.paragraph")(g,A)+` - -`);break;case"blockquote":x||(w=o.subParser("makeMarkdown.blockquote")(g,A)+` - -`);break;case"hr":x||(w=o.subParser("makeMarkdown.hr")(g,A)+` - -`);break;case"ol":x||(w=o.subParser("makeMarkdown.list")(g,A,"ol")+` - -`);break;case"ul":x||(w=o.subParser("makeMarkdown.list")(g,A,"ul")+` - -`);break;case"precode":x||(w=o.subParser("makeMarkdown.codeBlock")(g,A)+` - -`);break;case"pre":x||(w=o.subParser("makeMarkdown.pre")(g,A)+` - -`);break;case"table":x||(w=o.subParser("makeMarkdown.table")(g,A)+` - -`);break;case"code":w=o.subParser("makeMarkdown.codeSpan")(g,A);break;case"em":case"i":w=o.subParser("makeMarkdown.emphasis")(g,A);break;case"strong":case"b":w=o.subParser("makeMarkdown.strong")(g,A);break;case"del":w=o.subParser("makeMarkdown.strikethrough")(g,A);break;case"a":w=o.subParser("makeMarkdown.links")(g,A);break;case"img":w=o.subParser("makeMarkdown.image")(g,A);break;default:w=g.outerHTML+` - -`}return w}),o.subParser("makeMarkdown.paragraph",function(g,A){var x="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q"+A.preList[x]+""}),o.subParser("makeMarkdown.strikethrough",function(g,A){var x="";if(g.hasChildNodes()){x+="~~";for(var w=g.childNodes,k=w.length,q=0;qtr>th"),q=g.querySelectorAll("tbody>tr"),S,C;for(S=0;SI&&(I=P)}for(S=0;S/g,"\\$1>"),A=A.replace(/^#/gm,"\\#"),A=A.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),A=A.replace(/^( {0,3}\d+)\./gm,"$1\\."),A=A.replace(/^( {0,3})([+-])/gm,"$1\\$2"),A=A.replace(/]([\s]*)\(/g,"\\]$1\\("),A=A.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),A});var v=this;e.exports?e.exports=o:v.showdown=o}).call(c0)})(vre);var B7e=vre.exports;const N7e=Ao(B7e),L7e=new N7e.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function j7e(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} -${o} -${r}`)}function P7e(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function I7e(e){return L7e.makeHtml(j7e(P7e(e)))}function D7e(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function xre(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?RM(e):e.removeAttribute("id"))}function $7e(e){return e===" "||e==="\r"||e===` -`||e===" "}function _re(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=Av(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=Av(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&$7e(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function wre(e){e.nodeName==="BR"&&(Av(e,"next")||e.parentNode.removeChild(e))}function F7e(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function V7e(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const kre=(...e)=>window?.console?.log?.(...e);function IV(e){return e=dp(e,[zre,xre,Ore,gre,mre]),e=$R(e,zx("paste"),{inline:!0}),e=dp(e,[_re,wre]),kre(`Processed inline HTML: - -`,e),e}function mf({HTML:e="",plainText:t="",mode:n="AUTO",tagName:o}){if(e=e.replace(/]+>/g,""),e=e.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf("",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function xvt(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function Yj({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=vvt(n),n=xvt(n);const o=ev(e);return o.length&&!_vt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function _vt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const e2e=Symbol("requiresWrapperOnCopy");function t2e(e,t,n){let o=t;const[r]=t;if(r&&n.select(Ve).getBlockType(r.name)[e2e]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select($),d=c(r.clientId),p=l(d);p&&(o=me(p,u(d),o))}const s=Uo(o);e.clipboardData.setData("text/plain",kvt(s)),e.clipboardData.setData("text/html",s)}function wvt(e,t){const{plainText:n,html:o,files:r}=Yj(e);let s=[];if(r.length){const i=Ys("from");s=r.reduce((c,l)=>{const u=ja(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=mf({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function kvt(e){return e=e.replace(/
/g,` -`),Wr(e).trim().replace(/\n\n+/g,` - -`)}function qvt(){const e=O0(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=D($),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:M,__unstableExpandSelection:O,__unstableSplitSelection:y}=ie($),_=Kj();return Lt(v=>{function g(A){if(A.defaultPrevented)return;const x=n();if(x.length===0)return;if(!o()){const{target:C}=A,{ownerDocument:T}=C;if(A.type==="copy"||A.type==="cut"?h6e(T):m6e(T)&&!T.activeElement.isContentEditable)return}const{activeElement:w}=A.target.ownerDocument;if(!v.contains(w))return;const k=l(),q=c()||i(),S=!q&&!k;if(A.type==="copy"||A.type==="cut")if(A.preventDefault(),x.length===1&&f(x[0]),S)O();else{_(A.type,x);let C;if(q)C=t(x);else{const[T,E]=u(),B=t(x.slice(1,x.length-1));C=[T,...B,E]}t2e(A,C,e)}if(A.type==="cut")q&&!S?b(x):(A.target.ownerDocument.activeElement.contentEditable=!1,M());else if(A.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:C}=r();if(A.clipboardData.getData("rich-text")==="true")return;const{plainText:E,html:B,files:N}=Yj(A),W=i();let j=[];if(N.length){const X=Ys("from");j=N.reduce((H,Z)=>{const oe=ja(X,ee=>ee.type==="files"&&ee.isMatch([Z]));return oe&&H.push(oe.transform([Z])),H},[]).flat()}else j=mf({HTML:B,plainText:E,mode:W?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:C});if(typeof j=="string")return;if(W){h(x,j,j.length-1,-1),A.preventDefault();return}if(!o()&&!it(s(x[0]),"splitting",!1)&&!A.__deprecatedOnSplit)return;const[I]=x,P=p(I),U=[];for(const X of j)if(d(X.name,P))U.push(X);else{const H=s(P),Z=X.name!==H?u1(X,H):[X];if(!Z)return;for(const oe of Z)for(const ee of oe.innerBlocks)U.push(ee)}y(U),A.preventDefault()}}return v.ownerDocument.addEventListener("copy",g),v.ownerDocument.addEventListener("cut",g),v.ownerDocument.addEventListener("paste",g),()=>{v.ownerDocument.removeEventListener("copy",g),v.ownerDocument.removeEventListener("cut",g),v.ownerDocument.removeEventListener("paste",g)}},[])}function n2e(){const[e,t,n]=pvt(),o=D(r=>r($).hasMultiSelection(),[]);return[e,Kt([t,qvt(),yvt(),mvt(),Ovt(),Avt(),dvt(),hvt(),bvt(),Lt(r=>{if(r.tabIndex=0,!!o)return r.classList.add("has-multi-selection"),r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{r.classList.remove("has-multi-selection"),r.removeAttribute("aria-label")}},[o])]),n]}function Svt({children:e,...t},n){const[o,r,s]=n2e();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:Kt([r,n]),className:F(t.className,"block-editor-writing-flow"),children:e}),s]})}const Cvt=z.forwardRef(Svt);let WA=null;function Rvt(){return WA||(WA=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||n.id==="wp-reset-editor-styles-css"||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),WA)}function o2e(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function Wvt(e){return Lt(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];o2e(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function Tvt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=D(ee=>{const{getSettings:K}=ee($),ne=K();return{resolvedAssets:ne.__unstableResolvedAssets,isPreviewMode:ne.__unstableIsPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=z.useState(),M=z.useRef(),[O,y]=z.useState([]),_=Gj(),[v,g,A]=n2e(),[x,{height:w}]=Wa(),[k,{width:q}]=Wa(),S=Lt(ee=>{ee._load=()=>{h(ee.contentDocument)};let K;function ne(ae){ae.preventDefault()}function se(){const{contentDocument:ae,ownerDocument:be}=ee,{documentElement:Oe}=ae;K=ae,Oe.classList.add("block-editor-iframe__html"),_(Oe),y(Array.from(be.body.classList).filter(xe=>xe.startsWith("admin-color-")||xe.startsWith("post-type-")||xe==="wp-embed-responsive")),ae.dir=be.dir;for(const xe of Rvt())ae.getElementById(xe.id)||(ae.head.appendChild(xe.cloneNode(!0)),d||console.warn(`${xe.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,xe));K.addEventListener("dragover",ne,!1),K.addEventListener("drop",ne,!1)}return ee.addEventListener("load",se),()=>{delete ee._load,ee.removeEventListener("load",se),K?.removeEventListener("dragover",ne),K?.removeEventListener("drop",ne)}},[]),[C,T]=z.useState(),E=Lt(ee=>{const K=ee.ownerDocument.defaultView;T(K.innerHeight);const ne=()=>{T(K.innerHeight)};return K.addEventListener("resize",ne),()=>{K.removeEventListener("resize",ne)}},[]),[B,N]=z.useState(),W=Lt(ee=>{const K=ee.ownerDocument.defaultView;N(K.innerWidth);const ne=()=>{N(K.innerWidth)};return K.addEventListener("resize",ne),()=>{K.removeEventListener("resize",ne)}},[]),j=o!==1;z.useEffect(()=>{j||(M.current=q)},[q,j]);const I=pB({isDisabled:!s}),P=Kt([Wvt(b),e,_,g,I,j?E:null]),U=` - - - - - - - -
- - diff --git a/Demo-Android/Gutenberg/src/main/assets/remote.html b/Demo-Android/Gutenberg/src/main/assets/remote.html deleted file mode 100644 index b4d5529a..00000000 --- a/Demo-Android/Gutenberg/src/main/assets/remote.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Gutenberg - - - - -
- - diff --git a/Sources/GutenbergKit/Gutenberg/assets/App-DlPuex2F.js b/Sources/GutenbergKit/Gutenberg/assets/App-DlPuex2F.js deleted file mode 100644 index 94be7814..00000000 --- a/Sources/GutenbergKit/Gutenberg/assets/App-DlPuex2F.js +++ /dev/null @@ -1 +0,0 @@ -const{SVG:M,Path:X}=window.wp.primitives,{jsx:m}=window.ReactJSXRuntime,V=m(M,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:m(X,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),{SVG:z,Path:O}=window.wp.primitives,{jsx:E}=window.ReactJSXRuntime,H=E(z,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:E(O,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),{Fragment:h,jsx:n,jsxs:w}=window.ReactJSXRuntime,{useState:W}=window.wp.element,{BlockInspector:Z,BlockToolbar:q,Inserter:K,store:Q}=window.wp.blockEditor,{useSelect:Y}=window.wp.data,{Button:ee,Popover:te,ToolbarButton:oe}=window.wp.components,{__:se}=window.wp.i18n,ne=()=>{const[e,o]=W(!1),{isSelected:s}=Y(c=>{const{getSelectedBlockClientId:b}=c(Q);return{isSelected:b()!==null}});function a(){o(!0)}function d(){o(!1)}return w(h,{children:[w("div",{className:"gbkit gbkit-editor-toolbar",children:[n(K,{}),s&&n("div",{className:"gbkit-editor-toolbar_toolbar-group",children:n(oe,{title:se("Open Settings"),icon:H,onClick:a,className:"gbkit-editor-toolbar_settings_icon"})}),n(q,{})]}),e&&n(te,{className:"block-settings-menu",variant:"unstyled",placement:"overlay",children:w(h,{children:[n("div",{className:"block-settings-menu__header",children:n(ee,{className:"block-settings-menu__close",icon:V,onClick:d})}),n(Z,{})]})})]})};function ie(){window.editorDelegate&&window.editorDelegate.onEditorLoaded(),window.webkit&&window.webkit.messageHandlers.editorDelegate.postMessage({message:"onEditorLoaded",body:{}})}[{name:"post",baseURL:"/wp/v2/posts"},{name:"page",baseURL:"/wp/v2/pages"},{name:"attachment",baseURL:"/wp/v2/media"},{name:"wp_block",baseURL:"/wp/v2/blocks"}].map(e=>({kind:"postType",...e,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:["title","excerpt","content"]}));const{__dangerousOptInToUnstableAPIsOnlyForCoreModules:re}=window.wp.privateApis,{lock:$e,unlock:k}=re("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),{store:le}=window.wp.editor,{useSelect:ae}=window.wp.data,{privateApis:de}=window.wp.blockEditor,{store:ce}=window.wp.editPost,{useMemo:we}=window.wp.element,{getLayoutStyles:pe}=k(de);function ue(){const{hasThemeStyleSupport:e,editorSettings:o}=ae(s=>({hasThemeStyleSupport:s(ce).isFeatureActive("themeStyles"),editorSettings:s(le).getEditorSettings()}),[]);return we(()=>{const s=[...o?.defaultEditorStyles??[]];return!o.disableLayoutStyles&&!e&&s.push({css:pe({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})}),e?o.styles??[]:s},[o.defaultEditorStyles,o.disableLayoutStyles,o.styles,e])}const{jsx:r,jsxs:y}=window.ReactJSXRuntime,{useEffect:ke,useRef:be,useState:p}=window.wp.element,{BlockList:ge,privateApis:Se}=window.wp.blockEditor,{Popover:me}=window.wp.components,{getBlockTypes:Ee,unregisterBlockType:he}=window.wp.blocks,{registerCoreBlocks:ye}=window.wp.blockLibrary,{parse:v,serialize:f}=window.wp.blocks,{store:B,mediaUpload:ve,EditorSnackbars:fe,PostTitle:Be,privateApis:Re}=window.wp.editor,{useDispatch:R,useSelect:_e}=window.wp.data,{store:u,useEntityBlockEditor:xe}=window.wp.coreData;let l={};const{useBlockEditorSettings:Pe}=k(Re),{ExperimentalBlockEditorProvider:Ce,ExperimentalBlockCanvas:Ie}=k(Se);function Le({post:e}){const[o,s]=p([]);p([]);const[a,d]=p(!1),c=be(),{addEntities:b,receiveEntityRecords:g}=R(u),{setupEditor:_}=R(B);ke(()=>(window.editor=l,g("postType",e.type,e),_(e,{}),ye(),ie(),()=>{window.editor={},Ee().forEach(t=>{he(t.name)})}),[]);const{blockPatterns:x,editorSettings:P,hasUploadPermissions:C,isEditorReady:S,reusableBlocks:I}=_e(t=>{const{getEntityRecord:i,getEntityRecords:G}=t(u),{__unstableIsEditorReady:D,getEditorSettings:F}=t(B),J=i("root","user",e.author);return{isEditorReady:e?.id?D():!0,blockPatterns:t(u).getBlockPatterns(),editorSettings:F(),hasUploadPermissions:J?.capabilities?.upload_files??!0,reusableBlocks:G("postType","wp_block")}},[]),[L,T,j]=xe("postType",e.type,{id:e.id});function A(t,i){T(t,i)}function $(t,i){j(t,i)}l.setContent=t=>{s(v(t))},l.setInitialContent=t=>{const i=v(t);return f(i)},l.getContent=()=>f(o),l.setCodeEditorEnabled=t=>d(t);const U={...Pe(P,e.type,e.id,"visual"),hasFixedToolbar:!0,mediaUpload:C?ve:void 0,__experimentalReusableBlocks:I,__experimentalBlockPatterns:x},N=ue();return r("div",{className:"editor__container",children:y(Ce,{value:L,onInput:A,onChange:$,settings:U,useSubRegistry:!1,children:[y(Ie,{shouldIframe:!1,height:"auto",styles:N,children:[r("div",{className:"editor-visual-editor__post-title-wrapper",children:S&&r(Be,{ref:c})}),r(ge,{})]}),S&&r(ne,{}),r(me.Slot,{}),r(fe,{})]})})}const{jsx:Te}=window.ReactJSXRuntime;function Ue(e){return Te(Le,{...e})}export{Ue as default}; diff --git a/Sources/GutenbergKit/Gutenberg/assets/App-Ds6ZXfFz.js b/Sources/GutenbergKit/Gutenberg/assets/App-Ds6ZXfFz.js new file mode 100644 index 00000000..040d9609 --- /dev/null +++ b/Sources/GutenbergKit/Gutenberg/assets/App-Ds6ZXfFz.js @@ -0,0 +1 @@ +const{SVG:N,Path:M}=window.wp.primitives,{jsx:h}=window.ReactJSXRuntime,F=h(N,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:h(M,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),{SVG:G,Path:D}=window.wp.primitives,{jsx:y}=window.ReactJSXRuntime,J=y(G,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:y(D,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),{Fragment:v,jsx:n,jsxs:p}=window.ReactJSXRuntime,{useState:X}=window.wp.element,{BlockInspector:V,BlockToolbar:z,Inserter:O,store:H}=window.wp.blockEditor,{useSelect:W}=window.wp.data,{Button:Z,Popover:q,ToolbarButton:K}=window.wp.components,{__:Q}=window.wp.i18n,Y=()=>{const[e,t]=X(!1),{isSelected:s}=W(d=>{const{getSelectedBlockClientId:w}=d(H);return{isSelected:w()!==null}});function a(){t(!0)}function c(){t(!1)}return p(v,{children:[p("div",{className:"gbkit gbkit-editor-toolbar",children:[n(O,{}),s&&n("div",{className:"gbkit-editor-toolbar_toolbar-group",children:n(K,{title:Q("Open Settings"),icon:J,onClick:a,className:"gbkit-editor-toolbar_settings_icon"})}),n(z,{})]}),e&&n(q,{className:"block-settings-menu",variant:"unstyled",placement:"overlay",children:p(v,{children:[n("div",{className:"block-settings-menu__header",children:n(Z,{className:"block-settings-menu__close",icon:F,onClick:c})}),n(V,{})]})})]})};function ee(){window.editorDelegate&&window.editorDelegate.onEditorLoaded(),window.webkit&&window.webkit.messageHandlers.editorDelegate.postMessage({message:"onEditorLoaded",body:{}})}const te=[{name:"post",baseURL:"/wp/v2/posts"},{name:"page",baseURL:"/wp/v2/pages"},{name:"attachment",baseURL:"/wp/v2/media"},{name:"wp_block",baseURL:"/wp/v2/blocks"}].map(e=>({kind:"postType",...e,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:["title","excerpt","content"]})),{__dangerousOptInToUnstableAPIsOnlyForCoreModules:oe}=window.wp.privateApis,{lock:Le,unlock:B}=oe("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),{store:se}=window.wp.editor,{useSelect:ne}=window.wp.data,{privateApis:ie}=window.wp.blockEditor,{store:re}=window.wp.editPost,{useMemo:le}=window.wp.element,{getLayoutStyles:ae}=B(ie);function ce(){const{hasThemeStyleSupport:e,editorSettings:t}=ne(s=>({hasThemeStyleSupport:s(re).isFeatureActive("themeStyles"),editorSettings:s(se).getEditorSettings()}),[]);return le(()=>{const s=[...t?.defaultEditorStyles??[]];return!t.disableLayoutStyles&&!e&&s.push({css:ae({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})}),e?t.styles??[]:s},[t.defaultEditorStyles,t.disableLayoutStyles,t.styles,e])}const{jsx:i,jsxs:E}=window.ReactJSXRuntime,{useEffect:de,useRef:we,useState:f,useMemo:pe}=window.wp.element,{BlockList:ue,privateApis:be}=window.wp.blockEditor,{Popover:ke}=window.wp.components,{getBlockTypes:me,unregisterBlockType:Se}=window.wp.blocks,{registerCoreBlocks:ge}=window.wp.blockLibrary,{parse:P,serialize:_}=window.wp.blocks,{store:he,mediaUpload:ye,EditorProvider:ve,EditorSnackbars:Ee,PostTitle:fe}=window.wp.editor,{useDispatch:Pe,useSelect:_e}=window.wp.data,{store:u}=window.wp.coreData;let r={};const{ExperimentalBlockCanvas:Be}=B(be);function Re({post:e}){const[t,s]=f([]),[a,c]=f(!1),d=we(),{addEntities:w,receiveEntityRecords:b}=Pe(u);de(()=>(window.editor=r,w(te),b("postType",e.type,e),ge(),ee(),()=>{window.editor={},me().forEach(o=>{Se(o.name)})}),[]);const{blockPatterns:k,currentPost:R,editorSettings:m,hasLoadedPost:x,hasUploadPermissions:S,reusableBlocks:g}=_e(o=>{const{getEntityRecord:l,getEntityRecords:T,hasFinishedResolution:$}=o(u),{getEditorSettings:j}=o(he),I=l("root","user",e.author),A=l("postType",e.type,e.id),U=e?.id?$("getEntityRecord",["postType",e.type,e.id]):!0;return{blockPatterns:o(u).getBlockPatterns(),currentPost:A,editorSettings:j(),hasLoadedPost:U,hasUploadPermissions:I?.capabilities?.upload_files??!0,reusableBlocks:T("postType","wp_block")}},[]);r.setContent=o=>{s(P(o))},r.setInitialContent=o=>{const l=P(o);return _(l)},r.getContent=()=>_(t),r.setCodeEditorEnabled=o=>c(o);const L=pe(()=>({...m,hasFixedToolbar:!0,mediaUpload:S?ye:void 0,__experimentalReusableBlocks:g,__experimentalBlockPatterns:k}),[k,m,S,g]),C=ce();return x&&i("div",{className:"editor__container",children:E(ve,{post:R,settings:L,children:[E(Be,{shouldIframe:!1,height:"auto",styles:C,children:[i("div",{className:"editor-visual-editor__post-title-wrapper",children:i(fe,{ref:d})}),i(ue,{})]}),i(Y,{}),i(ke.Slot,{}),i(Ee,{})]})})}const{jsx:xe}=window.ReactJSXRuntime;function Ce(e){return xe(Re,{...e})}export{Ce as default}; diff --git a/Sources/GutenbergKit/Gutenberg/assets/index-CVq60r9G.js b/Sources/GutenbergKit/Gutenberg/assets/index-B34yLcjp.js similarity index 50% rename from Sources/GutenbergKit/Gutenberg/assets/index-CVq60r9G.js rename to Sources/GutenbergKit/Gutenberg/assets/index-B34yLcjp.js index 5ba04208..1908e8e2 100644 --- a/Sources/GutenbergKit/Gutenberg/assets/index-CVq60r9G.js +++ b/Sources/GutenbergKit/Gutenberg/assets/index-B34yLcjp.js @@ -1,4 +1,4 @@ -var a5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20,_4)=>{function c5e(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var c0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function eE(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var HJ={exports:{}},X5={},UJ={exports:{}},d0={};/** +var z5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Nf0=z5e((kb0,W4)=>{function O5e(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var Dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function iee(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var aee={exports:{}},tx={},cee={exports:{}},d0={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var a5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ez=Symbol.for("react.element"),l5e=Symbol.for("react.portal"),u5e=Symbol.for("react.fragment"),d5e=Symbol.for("react.strict_mode"),p5e=Symbol.for("react.profiler"),f5e=Symbol.for("react.provider"),b5e=Symbol.for("react.context"),h5e=Symbol.for("react.forward_ref"),m5e=Symbol.for("react.suspense"),M5e=Symbol.for("react.memo"),g5e=Symbol.for("react.lazy"),vD=Symbol.iterator;function z5e(e){return e===null||typeof e!="object"?null:(e=vD&&e[vD]||e["@@iterator"],typeof e=="function"?e:null)}var XJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GJ=Object.assign,KJ={};function lh(e,t,n){this.props=e,this.context=t,this.refs=KJ,this.updater=n||XJ}lh.prototype.isReactComponent={};lh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function YJ(){}YJ.prototype=lh.prototype;function tE(e,t,n){this.props=e,this.context=t,this.refs=KJ,this.updater=n||XJ}var nE=tE.prototype=new YJ;nE.constructor=tE;GJ(nE,lh.prototype);nE.isPureReactComponent=!0;var xD=Array.isArray,ZJ=Object.prototype.hasOwnProperty,oE={current:null},QJ={key:!0,ref:!0,__self:!0,__source:!0};function JJ(e,t,n){var o,r={},s=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)ZJ.call(t,o)&&!QJ.hasOwnProperty(o)&&(r[o]=t[o]);var c=arguments.length-2;if(c===1)r.children=n;else if(1()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var x5e=z,_5e=Symbol.for("react.element"),w5e=Symbol.for("react.fragment"),k5e=Object.prototype.hasOwnProperty,q5e=x5e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S5e={key:!0,ref:!0,__self:!0,__source:!0};function tee(e,t,n){var o,r={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)k5e.call(t,o)&&!S5e.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:_5e,type:e,key:s,ref:i,props:r,_owner:q5e.current}}X5.Fragment=w5e;X5.jsx=tee;X5.jsxs=tee;HJ.exports=X5;var a=HJ.exports;let Oi,sa,lu,Gl;const nee=/<(\/)?(\w+)\s*(\/)?>/g;function Zk(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const M1=(e,t)=>{if(Oi=e,sa=0,lu=[],Gl=[],nee.lastIndex=0,!C5e(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(R5e(t));return z.createElement(z.Fragment,null,...lu)},C5e=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>z.isValidElement(o))};function R5e(e){const t=W5e(),[n,o,r,s]=t,i=Gl.length,c=r>sa?sa:null;if(!e[o])return Qk(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Gl.pop();lu.push(Oi.substr(p,f))}return Qk(),!1;case"self-closed":return i===0?(c!==null&&lu.push(Oi.substr(c,r-c)),lu.push(e[o]),sa=r+s,!0):(wD(Zk(e[o],r,s)),sa=r+s,!0);case"opener":return Gl.push(Zk(e[o],r,s,r+s,c)),sa=r+s,!0;case"closer":if(i===1)return T5e(r),sa=r+s,!0;const l=Gl.pop(),u=Oi.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=Zk(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,wD(d),sa=r+s,!0;default:return Qk(),!1}}function W5e(){const e=nee.exec(Oi);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function Qk(){const e=Oi.length-sa;e!==0&&lu.push(Oi.substr(sa,e))}function wD(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Gl[Gl.length-1],c=Oi.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(z.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function T5e(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Gl.pop(),i=e?Oi.substr(o,e-o):Oi.substr(o);i&&s.push(i),n!==null&&lu.push(Oi.substr(n,r-n)),lu.push(z.cloneElement(t,null,...s))}var oee={exports:{}},us={},ree={exports:{}},see={};/** + */var N5e=O,L5e=Symbol.for("react.element"),j5e=Symbol.for("react.fragment"),P5e=Object.prototype.hasOwnProperty,I5e=N5e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D5e={key:!0,ref:!0,__self:!0,__source:!0};function Mee(e,t,n){var o,r={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)P5e.call(t,o)&&!D5e.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:L5e,type:e,key:s,ref:i,props:r,_owner:I5e.current}}tx.Fragment=j5e;tx.jsx=Mee;tx.jsxs=Mee;aee.exports=tx;var a=aee.exports;let Ai,ca,du,Yl;const gee=/<(\/)?(\w+)\s*(\/)?>/g;function a6(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const z1=(e,t)=>{if(Ai=e,ca=0,du=[],Yl=[],gee.lastIndex=0,!F5e(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while($5e(t));return O.createElement(O.Fragment,null,...du)},F5e=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>O.isValidElement(o))};function $5e(e){const t=V5e(),[n,o,r,s]=t,i=Yl.length,c=r>ca?ca:null;if(!e[o])return c6(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Yl.pop();du.push(Ai.substr(p,f))}return c6(),!1;case"self-closed":return i===0?(c!==null&&du.push(Ai.substr(c,r-c)),du.push(e[o]),ca=r+s,!0):(PD(a6(e[o],r,s)),ca=r+s,!0);case"opener":return Yl.push(a6(e[o],r,s,r+s,c)),ca=r+s,!0;case"closer":if(i===1)return H5e(r),ca=r+s,!0;const l=Yl.pop(),u=Ai.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=a6(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,PD(d),ca=r+s,!0;default:return c6(),!1}}function V5e(){const e=gee.exec(Ai);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function c6(){const e=Ai.length-ca;e!==0&&du.push(Ai.substr(ca,e))}function PD(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Yl[Yl.length-1],c=Ai.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(O.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function H5e(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Yl.pop(),i=e?Ai.substr(o,e-o):Ai.substr(o);i&&s.push(i),n!==null&&du.push(Ai.substr(n,r-n)),du.push(O.cloneElement(t,null,...s))}var zee={exports:{}},us={},Oee={exports:{}},Aee={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var a5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(I,P){var U=I.length;I.push(P);e:for(;0>>1,H=I[X];if(0>>1;Xr(ee,U))Kr(ne,ee)?(I[X]=ne,I[K]=U,X=K):(I[X]=ee,I[oe]=U,X=oe);else if(Kr(ne,U))I[X]=ne,I[K]=U,X=K;else break e}}return P}function r(I,P){var U=I.sortIndex-P.sortIndex;return U!==0?U:I.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,M=!1,O=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(I){for(var P=n(u);P!==null;){if(P.callback===null)o(u);else if(P.startTime<=I)o(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=n(u)}}function g(I){if(M=!1,v(I),!h)if(n(l)!==null)h=!0,W(A);else{var P=n(u);P!==null&&j(g,P.startTime-I)}}function A(I,P){h=!1,M&&(M=!1,y(k),k=-1),b=!0;var U=f;try{for(v(P),p=n(l);p!==null&&(!(p.expirationTime>P)||I&&!C());){var X=p.callback;if(typeof X=="function"){p.callback=null,f=p.priorityLevel;var H=X(p.expirationTime<=P);P=e.unstable_now(),typeof H=="function"?p.callback=H:p===n(l)&&o(l),v(P)}else o(l);p=n(l)}if(p!==null)var Z=!0;else{var oe=n(u);oe!==null&&j(g,oe.startTime-P),Z=!1}return Z}finally{p=null,f=U,b=!1}}var x=!1,w=null,k=-1,q=5,S=-1;function C(){return!(e.unstable_now()-SI||125X?(I.sortIndex=U,t(u,I),n(l)===null&&I===n(u)&&(M?(y(k),k=-1):M=!0,j(g,U-X))):(I.sortIndex=H,t(l,I),h||b||(h=!0,W(A))),I},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(I){var P=f;return function(){var U=f;f=P;try{return I.apply(this,arguments)}finally{f=U}}}})(see);ree.exports=see;var E5e=ree.exports;/** + */(function(e){function t(I,P){var H=I.length;I.push(P);e:for(;0>>1,X=I[U];if(0>>1;Ur(oe,H))Yr(ee,oe)?(I[U]=ee,I[Y]=H,U=Y):(I[U]=oe,I[ne]=H,U=ne);else if(Yr(ee,H))I[U]=ee,I[Y]=H,U=Y;else break e}}return P}function r(I,P){var H=I.sortIndex-P.sortIndex;return H!==0?H:I.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,M=!1,z=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(I){for(var P=n(u);P!==null;){if(P.callback===null)o(u);else if(P.startTime<=I)o(u),P.sortIndex=P.expirationTime,t(l,P);else break;P=n(u)}}function g(I){if(M=!1,v(I),!h)if(n(l)!==null)h=!0,E(A);else{var P=n(u);P!==null&&L(g,P.startTime-I)}}function A(I,P){h=!1,M&&(M=!1,y(k),k=-1),b=!0;var H=f;try{for(v(P),p=n(l);p!==null&&(!(p.expirationTime>P)||I&&!C());){var U=p.callback;if(typeof U=="function"){p.callback=null,f=p.priorityLevel;var X=U(p.expirationTime<=P);P=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(l)&&o(l),v(P)}else o(l);p=n(l)}if(p!==null)var Z=!0;else{var ne=n(u);ne!==null&&L(g,ne.startTime-P),Z=!1}return Z}finally{p=null,f=H,b=!1}}var _=!1,w=null,k=-1,q=5,S=-1;function C(){return!(e.unstable_now()-SI||125U?(I.sortIndex=H,t(u,I),n(l)===null&&I===n(u)&&(M?(y(k),k=-1):M=!0,L(g,H-U))):(I.sortIndex=X,t(l,I),h||b||(h=!0,E(A))),I},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(I){var P=f;return function(){var H=f;f=P;try{return I.apply(this,arguments)}finally{f=H}}}})(Aee);Oee.exports=Aee;var U5e=Oee.exports;/** * @license React * react-dom.production.min.js * @@ -30,32 +30,32 @@ var a5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pb0=a5e((o20 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var B5e=z,rs=E5e;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),DC=Object.prototype.hasOwnProperty,N5e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,kD={},qD={};function L5e(e){return DC.call(qD,e)?!0:DC.call(kD,e)?!1:N5e.test(e)?qD[e]=!0:(kD[e]=!0,!1)}function j5e(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P5e(e,t,n,o){if(t===null||typeof t>"u"||j5e(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lr(e,t,n,o,r,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var Mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mo[e]=new lr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mo[t]=new lr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mo[e]=new lr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mo[e]=new lr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mo[e]=new lr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mo[e]=new lr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mo[e]=new lr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mo[e]=new lr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mo[e]=new lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var sE=/[\-:]([a-z])/g;function iE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sE,iE);Mo[t]=new lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mo[e]=new lr(e,1,!1,e.toLowerCase(),null,!1,!1)});Mo.xlinkHref=new lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mo[e]=new lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function aE(e,t,n,o){var r=Mo.hasOwnProperty(t)?Mo[t]:null;(r!==null?r.type!==0:o||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JC=Object.prototype.hasOwnProperty,G5e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ID={},DD={};function K5e(e){return JC.call(DD,e)?!0:JC.call(ID,e)?!1:G5e.test(e)?DD[e]=!0:(ID[e]=!0,!1)}function Y5e(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Z5e(e,t,n,o){if(t===null||typeof t>"u"||Y5e(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ar(e,t,n,o,r,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var go={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){go[e]=new ar(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];go[t]=new ar(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){go[e]=new ar(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){go[e]=new ar(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){go[e]=new ar(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){go[e]=new ar(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){go[e]=new ar(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){go[e]=new ar(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){go[e]=new ar(e,5,!1,e.toLowerCase(),null,!1,!1)});var zE=/[\-:]([a-z])/g;function OE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zE,OE);go[t]=new ar(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zE,OE);go[t]=new ar(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zE,OE);go[t]=new ar(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){go[e]=new ar(e,1,!1,e.toLowerCase(),null,!1,!1)});go.xlinkHref=new ar("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){go[e]=new ar(e,1,!1,e.toLowerCase(),null,!0,!0)});function AE(e,t,n,o){var r=go.hasOwnProperty(t)?go[t]:null;(r!==null?r.type!==0:o||!(2c||r[i]!==s[c]){var l=` -`+r[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=c);break}}}finally{e6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eM(e):""}function I5e(e){switch(e.tag){case 5:return eM(e.type);case 16:return eM("Lazy");case 13:return eM("Suspense");case 19:return eM("SuspenseList");case 0:case 2:case 15:return e=t6(e.type,!1),e;case 11:return e=t6(e.type.render,!1),e;case 1:return e=t6(e.type,!0),e;default:return""}}function HC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fb:return"Fragment";case pb:return"Portal";case $C:return"Profiler";case cE:return"StrictMode";case FC:return"Suspense";case VC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cee:return(e.displayName||"Context")+".Consumer";case aee:return(e._context.displayName||"Context")+".Provider";case lE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uE:return t=e.displayName||null,t!==null?t:HC(e.type)||"Memo";case Il:t=e._payload,e=e._init;try{return HC(e(t))}catch{}}return null}function D5e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return HC(t);case 8:return t===cE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Su(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $5e(e){var t=uee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){o=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kO(e){e._valueTracker||(e._valueTracker=$5e(e))}function dee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=uee(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function w4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function UC(e,t){var n=t.checked;return Yn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function CD(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=Su(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pee(e,t){t=t.checked,t!=null&&aE(e,"checked",t,!1)}function XC(e,t){pee(e,t);var n=Su(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?GC(e,t.type,n):t.hasOwnProperty("defaultValue")&&GC(e,t.type,Su(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function RD(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function GC(e,t,n){(t!=="number"||w4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tM=Array.isArray;function jb(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=qO.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var AM={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},F5e=["Webkit","ms","Moz","O"];Object.keys(AM).forEach(function(e){F5e.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),AM[t]=AM[e]})});function mee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||AM.hasOwnProperty(e)&&AM[e]?(""+t).trim():t+"px"}function Mee(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=mee(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var V5e=Yn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ZC(e,t){if(t){if(V5e[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function QC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var JC=null;function dE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eR=null,Pb=null,Ib=null;function ED(e){if(e=Lz(e)){if(typeof eR!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Q5(t),eR(e.stateNode,e.type,t))}}function gee(e){Pb?Ib?Ib.push(e):Ib=[e]:Pb=e}function zee(){if(Pb){var e=Pb,t=Ib;if(Ib=Pb=null,ED(e),t)for(e=0;e>>=0,e===0?32:31-(txe(e)/nxe|0)|0}var SO=64,CO=4194304;function nM(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function C4(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var c=i&~r;c!==0?o=nM(c):(s&=i,s!==0&&(o=nM(s)))}else i=n&~r,i!==0?o=nM(i):s!==0&&(o=nM(s));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Bz(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ai(t),e[t]=n}function ixe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=vM),FD=" ",VD=!1;function Pee(e,t){switch(e){case"keyup":return Exe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iee(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bb=!1;function Nxe(e,t){switch(e){case"compositionend":return Iee(t);case"keypress":return t.which!==32?null:(VD=!0,FD);case"textInput":return e=t.data,e===FD&&VD?null:e;default:return null}}function Lxe(e,t){if(bb)return e==="compositionend"||!zE&&Pee(e,t)?(e=Lee(),xy=mE=Kl=null,bb=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GD(n)}}function Vee(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vee(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hee(){for(var e=window,t=w4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=w4(e.document)}return t}function OE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Uxe(e){var t=Hee(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vee(n.ownerDocument.documentElement,n)){if(o!==null&&OE(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(o.start,r);o=o.end===void 0?s:Math.min(o.end,r),!e.extend&&s>o&&(r=o,o=s,s=r),r=KD(n,s);var i=KD(n,o);r&&i&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,hb=null,iR=null,_M=null,aR=!1;function YD(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;aR||hb==null||hb!==w4(o)||(o=hb,"selectionStart"in o&&OE(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),_M&&ug(_M,o)||(_M=o,o=T4(iR,"onSelect"),0gb||(e.current=fR[gb],fR[gb]=null,gb--)}function mn(e,t){gb++,fR[gb]=e.current,e.current=t}var Cu={},Fo=ad(Cu),wr=ad(!1),Ap=Cu;function p2(e,t){var n=e.type.contextTypes;if(!n)return Cu;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function kr(e){return e=e.childContextTypes,e!=null}function B4(){wn(wr),wn(Fo)}function o$(e,t,n){if(Fo.current!==Cu)throw Error(Ne(168));mn(Fo,t),mn(wr,n)}function ete(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(Ne(108,D5e(e)||"Unknown",r));return Yn({},n,o)}function N4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cu,Ap=Fo.current,mn(Fo,e),mn(wr,wr.current),!0}function r$(e,t,n){var o=e.stateNode;if(!o)throw Error(Ne(169));n?(e=ete(e,t,Ap),o.__reactInternalMemoizedMergedChildContext=e,wn(wr),wn(Fo),mn(Fo,e)):wn(wr),mn(wr,n)}var Mc=null,J5=!1,h6=!1;function tte(e){Mc===null?Mc=[e]:Mc.push(e)}function r_e(e){J5=!0,tte(e)}function cd(){if(!h6&&Mc!==null){h6=!0;var e=0,t=J0;try{var n=Mc;for(J0=1;e>=i,r-=i,Oc=1<<32-Ai(t)+r|n<k?(q=w,w=null):q=w.sibling;var S=f(y,w,v[k],g);if(S===null){w===null&&(w=q);break}e&&w&&S.alternate===null&&t(y,w),_=s(S,_,k),x===null?A=S:x.sibling=S,x=S,w=q}if(k===v.length)return n(y,w),Nn&&Ld(y,k),A;if(w===null){for(;kk?(q=w,w=null):q=w.sibling;var C=f(y,w,S.value,g);if(C===null){w===null&&(w=q);break}e&&w&&C.alternate===null&&t(y,w),_=s(C,_,k),x===null?A=C:x.sibling=C,x=C,w=q}if(S.done)return n(y,w),Nn&&Ld(y,k),A;if(w===null){for(;!S.done;k++,S=v.next())S=p(y,S.value,g),S!==null&&(_=s(S,_,k),x===null?A=S:x.sibling=S,x=S);return Nn&&Ld(y,k),A}for(w=o(y,w);!S.done;k++,S=v.next())S=b(w,y,k,S.value,g),S!==null&&(e&&S.alternate!==null&&w.delete(S.key===null?k:S.key),_=s(S,_,k),x===null?A=S:x.sibling=S,x=S);return e&&w.forEach(function(T){return t(y,T)}),Nn&&Ld(y,k),A}function O(y,_,v,g){if(typeof v=="object"&&v!==null&&v.type===fb&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wO:e:{for(var A=v.key,x=_;x!==null;){if(x.key===A){if(A=v.type,A===fb){if(x.tag===7){n(y,x.sibling),_=r(x,v.props.children),_.return=y,y=_;break e}}else if(x.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Il&&a$(A)===x.type){n(y,x.sibling),_=r(x,v.props),_.ref=ym(y,x,v),_.return=y,y=_;break e}n(y,x);break}else t(y,x);x=x.sibling}v.type===fb?(_=cp(v.props.children,y.mode,g,v.key),_.return=y,y=_):(g=Wy(v.type,v.key,v.props,null,y.mode,g),g.ref=ym(y,_,v),g.return=y,y=g)}return i(y);case pb:e:{for(x=v.key;_!==null;){if(_.key===x)if(_.tag===4&&_.stateNode.containerInfo===v.containerInfo&&_.stateNode.implementation===v.implementation){n(y,_.sibling),_=r(_,v.children||[]),_.return=y,y=_;break e}else{n(y,_);break}else t(y,_);_=_.sibling}_=v6(v,y.mode,g),_.return=y,y=_}return i(y);case Il:return x=v._init,O(y,_,x(v._payload),g)}if(tM(v))return h(y,_,v,g);if(Mm(v))return M(y,_,v,g);LO(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,_!==null&&_.tag===6?(n(y,_.sibling),_=r(_,v),_.return=y,y=_):(n(y,_),_=y6(v,y.mode,g),_.return=y,y=_),i(y)):n(y,_)}return O}var b2=ste(!0),ite=ste(!1),P4=ad(null),I4=null,Ab=null,xE=null;function _E(){xE=Ab=I4=null}function wE(e){var t=P4.current;wn(P4),e._currentValue=t}function mR(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function $b(e,t){I4=e,xE=Ab=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xr=!0),e.firstContext=null)}function Hs(e){var t=e._currentValue;if(xE!==e)if(e={context:e,memoizedValue:t,next:null},Ab===null){if(I4===null)throw Error(Ne(308));Ab=e,I4.dependencies={lanes:0,firstContext:e}}else Ab=Ab.next=e;return t}var Qd=null;function kE(e){Qd===null?Qd=[e]:Qd.push(e)}function ate(e,t,n,o){var r=t.interleaved;return r===null?(n.next=n,kE(t)):(n.next=r.next,r.next=n),t.interleaved=n,Vc(e,o)}function Vc(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dl=!1;function qE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cc(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bu(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,q0&2){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,Vc(e,n)}return r=o.interleaved,r===null?(t.next=t,kE(o)):(t.next=r.next,r.next=t),o.interleaved=t,Vc(e,n)}function wy(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,fE(e,n)}}function c$(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function D4(e,t,n,o){var r=e.updateQueue;Dl=!1;var s=r.firstBaseUpdate,i=r.lastBaseUpdate,c=r.shared.pending;if(c!==null){r.shared.pending=null;var l=c,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,c=d.lastBaseUpdate,c!==i&&(c===null?d.firstBaseUpdate=u:c.next=u,d.lastBaseUpdate=l))}if(s!==null){var p=r.baseState;i=0,d=u=l=null,c=s;do{var f=c.lane,b=c.eventTime;if((o&f)===f){d!==null&&(d=d.next={eventTime:b,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var h=e,M=c;switch(f=t,b=n,M.tag){case 1:if(h=M.payload,typeof h=="function"){p=h.call(b,p,f);break e}p=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=M.payload,f=typeof h=="function"?h.call(b,p,f):h,f==null)break e;p=Yn({},p,f);break e;case 2:Dl=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,f=r.effects,f===null?r.effects=[c]:f.push(c))}else b={eventTime:b,lane:f,tag:c.tag,payload:c.payload,callback:c.callback,next:null},d===null?(u=d=b,l=p):d=d.next=b,i|=f;if(c=c.next,c===null){if(c=r.shared.pending,c===null)break;f=c,c=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(d===null&&(l=p),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do i|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);xp|=i,e.lanes=i,e.memoizedState=p}}function l$(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=M6.transition;M6.transition={};try{e(!1),t()}finally{J0=n,M6.transition=o}}function _te(){return Us().memoizedState}function c_e(e,t,n){var o=mu(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},wte(e))kte(t,n);else if(n=ate(e,t,n,o),n!==null){var r=nr();yi(n,e,o,r),qte(n,t,o)}}function l_e(e,t,n){var o=mu(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(wte(e))kte(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,c=s(i,n);if(r.hasEagerState=!0,r.eagerState=c,ki(c,i)){var l=t.interleaved;l===null?(r.next=r,kE(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=ate(e,t,r,o),n!==null&&(r=nr(),yi(n,e,o,r),qte(n,t,o))}}function wte(e){var t=e.alternate;return e===Gn||t!==null&&t===Gn}function kte(e,t){wM=F4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qte(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,fE(e,n)}}var V4={readContext:Hs,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},u_e={readContext:Hs,useCallback:function(e,t){return na().memoizedState=[e,t===void 0?null:t],e},useContext:Hs,useEffect:d$,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qy(4194308,4,Ote.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qy(4194308,4,e,t)},useInsertionEffect:function(e,t){return qy(4,2,e,t)},useMemo:function(e,t){var n=na();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=na();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=c_e.bind(null,Gn,e),[o.memoizedState,e]},useRef:function(e){var t=na();return e={current:e},t.memoizedState=e},useState:u$,useDebugValue:NE,useDeferredValue:function(e){return na().memoizedState=e},useTransition:function(){var e=u$(!1),t=e[0];return e=a_e.bind(null,e[1]),na().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Gn,r=na();if(Nn){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),V1===null)throw Error(Ne(349));vp&30||pte(o,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,d$(bte.bind(null,o,s,e),[e]),o.flags|=2048,gg(9,fte.bind(null,o,s,n,t),void 0,null),n},useId:function(){var e=na(),t=V1.identifierPrefix;if(Nn){var n=Ac,o=Oc;n=(o&~(1<<32-Ai(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=mg++,0")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=c);break}}}finally{u6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ym(e):""}function Q5e(e){switch(e.tag){case 5:return Ym(e.type);case 16:return Ym("Lazy");case 13:return Ym("Suspense");case 19:return Ym("SuspenseList");case 0:case 2:case 15:return e=d6(e.type,!1),e;case 11:return e=d6(e.type.render,!1),e;case 1:return e=d6(e.type,!0),e;default:return""}}function oR(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ub:return"Fragment";case lb:return"Portal";case eR:return"Profiler";case yE:return"StrictMode";case tR:return"Suspense";case nR:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xee:return(e.displayName||"Context")+".Consumer";case vee:return(e._context.displayName||"Context")+".Provider";case vE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xE:return t=e.displayName||null,t!==null?t:oR(e.type)||"Memo";case Fl:t=e._payload,e=e._init;try{return oR(e(t))}catch{}}return null}function J5e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oR(t);case 8:return t===yE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function exe(e){var t=wee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){o=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function WO(e){e._valueTracker||(e._valueTracker=exe(e))}function kee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=wee(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function T4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rR(e,t){var n=t.checked;return Yn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $D(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=Cu(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qee(e,t){t=t.checked,t!=null&&AE(e,"checked",t,!1)}function sR(e,t){qee(e,t);var n=Cu(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?iR(e,t.type,n):t.hasOwnProperty("defaultValue")&&iR(e,t.type,Cu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function VD(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function iR(e,t,n){(t!=="number"||T4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zm=Array.isArray;function Nb(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=TO.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function og(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zM={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},txe=["Webkit","ms","Moz","O"];Object.keys(zM).forEach(function(e){txe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zM[t]=zM[e]})});function Wee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zM.hasOwnProperty(e)&&zM[e]?(""+t).trim():t+"px"}function Tee(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=Wee(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var nxe=Yn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lR(e,t){if(t){if(nxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Le(62))}}function uR(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var dR=null;function _E(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pR=null,Lb=null,jb=null;function XD(e){if(e=Lz(e)){if(typeof pR!="function")throw Error(Le(280));var t=e.stateNode;t&&(t=ix(t),pR(e.stateNode,e.type,t))}}function Eee(e){Lb?jb?jb.push(e):jb=[e]:Lb=e}function Bee(){if(Lb){var e=Lb,t=jb;if(jb=Lb=null,XD(e),t)for(e=0;e>>=0,e===0?32:31-(fxe(e)/bxe|0)|0}var EO=64,BO=4194304;function Qm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function L4(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var c=i&~r;c!==0?o=Qm(c):(s&=i,s!==0&&(o=Qm(s)))}else i=n&~r,i!==0?o=Qm(i):s!==0&&(o=Qm(s));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Bz(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yi(t),e[t]=n}function gxe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=AM),nF=" ",oF=!1;function tte(e,t){switch(e){case"keyup":return Uxe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nte(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var db=!1;function Gxe(e,t){switch(e){case"compositionend":return nte(t);case"keypress":return t.which!==32?null:(oF=!0,nF);case"textInput":return e=t.data,e===nF&&oF?null:e;default:return null}}function Kxe(e,t){if(db)return e==="compositionend"||!TE&&tte(e,t)?(e=Jee(),Sy=CE=Zl=null,db=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=aF(n)}}function ite(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ite(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ate(){for(var e=window,t=T4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=T4(e.document)}return t}function EE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function r_e(e){var t=ate(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ite(n.ownerDocument.documentElement,n)){if(o!==null&&EE(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(o.start,r);o=o.end===void 0?s:Math.min(o.end,r),!e.extend&&s>o&&(r=o,o=s,s=r),r=cF(n,s);var i=cF(n,o);r&&i&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pb=null,gR=null,vM=null,zR=!1;function lF(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zR||pb==null||pb!==T4(o)||(o=pb,"selectionStart"in o&&EE(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),vM&&lg(vM,o)||(vM=o,o=I4(gR,"onSelect"),0hb||(e.current=_R[hb],_R[hb]=null,hb--)}function hn(e,t){hb++,_R[hb]=e.current,e.current=t}var Ru={},Io=cd(Ru),kr=cd(!1),zp=Ru;function u2(e,t){var n=e.type.contextTypes;if(!n)return Ru;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function qr(e){return e=e.childContextTypes,e!=null}function F4(){vn(kr),vn(Io)}function mF(e,t,n){if(Io.current!==Ru)throw Error(Le(168));hn(Io,t),hn(kr,n)}function mte(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(Le(108,J5e(e)||"Unknown",r));return Yn({},n,o)}function $4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ru,zp=Io.current,hn(Io,e),hn(kr,kr.current),!0}function MF(e,t,n){var o=e.stateNode;if(!o)throw Error(Le(169));n?(e=mte(e,t,zp),o.__reactInternalMemoizedMergedChildContext=e,vn(kr),vn(Io),hn(Io,e)):vn(kr),hn(kr,n)}var zc=null,ax=!1,_6=!1;function Mte(e){zc===null?zc=[e]:zc.push(e)}function m_e(e){ax=!0,Mte(e)}function ld(){if(!_6&&zc!==null){_6=!0;var e=0,t=Y0;try{var n=zc;for(Y0=1;e>=i,r-=i,yc=1<<32-yi(t)+r|n<k?(q=w,w=null):q=w.sibling;var S=f(y,w,v[k],g);if(S===null){w===null&&(w=q);break}e&&w&&S.alternate===null&&t(y,w),x=s(S,x,k),_===null?A=S:_.sibling=S,_=S,w=q}if(k===v.length)return n(y,w),Nn&&Ed(y,k),A;if(w===null){for(;kk?(q=w,w=null):q=w.sibling;var C=f(y,w,S.value,g);if(C===null){w===null&&(w=q);break}e&&w&&C.alternate===null&&t(y,w),x=s(C,x,k),_===null?A=C:_.sibling=C,_=C,w=q}if(S.done)return n(y,w),Nn&&Ed(y,k),A;if(w===null){for(;!S.done;k++,S=v.next())S=p(y,S.value,g),S!==null&&(x=s(S,x,k),_===null?A=S:_.sibling=S,_=S);return Nn&&Ed(y,k),A}for(w=o(y,w);!S.done;k++,S=v.next())S=b(w,y,k,S.value,g),S!==null&&(e&&S.alternate!==null&&w.delete(S.key===null?k:S.key),x=s(S,x,k),_===null?A=S:_.sibling=S,_=S);return e&&w.forEach(function(T){return t(y,T)}),Nn&&Ed(y,k),A}function z(y,x,v,g){if(typeof v=="object"&&v!==null&&v.type===ub&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case RO:e:{for(var A=v.key,_=x;_!==null;){if(_.key===A){if(A=v.type,A===ub){if(_.tag===7){n(y,_.sibling),x=r(_,v.props.children),x.return=y,y=x;break e}}else if(_.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Fl&&OF(A)===_.type){n(y,_.sibling),x=r(_,v.props),x.ref=gm(y,_,v),x.return=y,y=x;break e}n(y,_);break}else t(y,_);_=_.sibling}v.type===ub?(x=ip(v.props.children,y.mode,g,v.key),x.return=y,y=x):(g=Ly(v.type,v.key,v.props,null,y.mode,g),g.ref=gm(y,x,v),g.return=y,y=g)}return i(y);case lb:e:{for(_=v.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(y,x.sibling),x=r(x,v.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=T6(v,y.mode,g),x.return=y,y=x}return i(y);case Fl:return _=v._init,z(y,x,_(v._payload),g)}if(Zm(v))return h(y,x,v,g);if(fm(v))return M(y,x,v,g);FO(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(y,x.sibling),x=r(x,v),x.return=y,y=x):(n(y,x),x=W6(v,y.mode,g),x.return=y,y=x),i(y)):n(y,x)}return z}var p2=Ate(!0),yte=Ate(!1),U4=cd(null),X4=null,gb=null,jE=null;function PE(){jE=gb=X4=null}function IE(e){var t=U4.current;vn(U4),e._currentValue=t}function qR(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function Ib(e,t){X4=e,jE=gb=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_r=!0),e.firstContext=null)}function Vs(e){var t=e._currentValue;if(jE!==e)if(e={context:e,memoizedValue:t,next:null},gb===null){if(X4===null)throw Error(Le(308));gb=e,X4.dependencies={lanes:0,firstContext:e}}else gb=gb.next=e;return t}var Yd=null;function DE(e){Yd===null?Yd=[e]:Yd.push(e)}function vte(e,t,n,o){var r=t.interleaved;return r===null?(n.next=n,DE(t)):(n.next=r.next,r.next=n),t.interleaved=n,Hc(e,o)}function Hc(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $l=!1;function FE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rc(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mu(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,q0&2){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,Hc(e,n)}return r=o.interleaved,r===null?(t.next=t,DE(o)):(t.next=r.next,r.next=t),o.interleaved=t,Hc(e,n)}function Ry(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,kE(e,n)}}function AF(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function G4(e,t,n,o){var r=e.updateQueue;$l=!1;var s=r.firstBaseUpdate,i=r.lastBaseUpdate,c=r.shared.pending;if(c!==null){r.shared.pending=null;var l=c,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,c=d.lastBaseUpdate,c!==i&&(c===null?d.firstBaseUpdate=u:c.next=u,d.lastBaseUpdate=l))}if(s!==null){var p=r.baseState;i=0,d=u=l=null,c=s;do{var f=c.lane,b=c.eventTime;if((o&f)===f){d!==null&&(d=d.next={eventTime:b,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var h=e,M=c;switch(f=t,b=n,M.tag){case 1:if(h=M.payload,typeof h=="function"){p=h.call(b,p,f);break e}p=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=M.payload,f=typeof h=="function"?h.call(b,p,f):h,f==null)break e;p=Yn({},p,f);break e;case 2:$l=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,f=r.effects,f===null?r.effects=[c]:f.push(c))}else b={eventTime:b,lane:f,tag:c.tag,payload:c.payload,callback:c.callback,next:null},d===null?(u=d=b,l=p):d=d.next=b,i|=f;if(c=c.next,c===null){if(c=r.shared.pending,c===null)break;f=c,c=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(d===null&&(l=p),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do i|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);yp|=i,e.lanes=i,e.memoizedState=p}}function yF(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=k6.transition;k6.transition={};try{e(!1),t()}finally{Y0=n,k6.transition=o}}function Dte(){return Hs().memoizedState}function O_e(e,t,n){var o=gu(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},Fte(e))$te(t,n);else if(n=vte(e,t,n,o),n!==null){var r=Qo();vi(n,e,o,r),Vte(n,t,o)}}function A_e(e,t,n){var o=gu(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fte(e))$te(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,c=s(i,n);if(r.hasEagerState=!0,r.eagerState=c,qi(c,i)){var l=t.interleaved;l===null?(r.next=r,DE(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=vte(e,t,r,o),n!==null&&(r=Qo(),vi(n,e,o,r),Vte(n,t,o))}}function Fte(e){var t=e.alternate;return e===Gn||t!==null&&t===Gn}function $te(e,t){xM=Y4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vte(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,kE(e,n)}}var Z4={readContext:Vs,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useInsertionEffect:wo,useLayoutEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useMutableSource:wo,useSyncExternalStore:wo,useId:wo,unstable_isNewReconciler:!1},y_e={readContext:Vs,useCallback:function(e,t){return sa().memoizedState=[e,t===void 0?null:t],e},useContext:Vs,useEffect:xF,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ty(4194308,4,Nte.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ty(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ty(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=sa();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=O_e.bind(null,Gn,e),[o.memoizedState,e]},useRef:function(e){var t=sa();return e={current:e},t.memoizedState=e},useState:vF,useDebugValue:YE,useDeferredValue:function(e){return sa().memoizedState=e},useTransition:function(){var e=vF(!1),t=e[0];return e=z_e.bind(null,e[1]),sa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Gn,r=sa();if(Nn){if(n===void 0)throw Error(Le(407));n=n()}else{if(n=t(),G1===null)throw Error(Le(349));Ap&30||qte(o,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,xF(Cte.bind(null,o,s,e),[e]),o.flags|=2048,Mg(9,Ste.bind(null,o,s,n,t),void 0,null),n},useId:function(){var e=sa(),t=G1.identifierPrefix;if(Nn){var n=vc,o=yc;n=(o&~(1<<32-yi(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=hg++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(n,{is:o.is}):(e=i.createElement(n),n==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,n),e[ba]=t,e[fg]=o,jte(e,t,!1,!1),t.stateNode=e;e:{switch(i=QC(n,o),n){case"dialog":xn("cancel",e),xn("close",e),r=o;break;case"iframe":case"object":case"embed":xn("load",e),r=o;break;case"video":case"audio":for(r=0;rM2&&(t.flags|=128,o=!0,vm(s,!1),t.lanes=4194304)}else{if(!o)if(e=$4(i),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vm(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Nn)return Co(t),null}else 2*l1()-s.renderingStartTime>M2&&n!==1073741824&&(t.flags|=128,o=!0,vm(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=l1(),t.sibling=null,n=$n.current,mn($n,o?n&1|2:n&1),t):(Co(t),null);case 22:case 23:return $E(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Hr&1073741824&&(Co(t),t.subtreeFlags&6&&(t.flags|=8192)):Co(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function g_e(e,t){switch(yE(t),t.tag){case 1:return kr(t.type)&&B4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return h2(),wn(wr),wn(Fo),RE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return CE(t),null;case 13:if(wn($n),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));f2()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return wn($n),null;case 4:return h2(),null;case 10:return wE(t.type._context),null;case 22:case 23:return $E(),null;case 24:return null;default:return null}}var PO=!1,Eo=!1,z_e=typeof WeakSet=="function"?WeakSet:Set,dt=null;function yb(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){e1(e,t,o)}else n.current=null}function _R(e,t,n){try{n()}catch(o){e1(e,t,o)}}var y$=!1;function O_e(e,t){if(cR=R4,e=Hee(),OE(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,c=-1,l=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var b;p!==n||r!==0&&p.nodeType!==3||(c=i+r),p!==s||o!==0&&p.nodeType!==3||(l=i+o),p.nodeType===3&&(i+=p.nodeValue.length),(b=p.firstChild)!==null;)f=p,p=b;for(;;){if(p===e)break t;if(f===n&&++u===r&&(c=i),f===s&&++d===o&&(l=i),(b=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=b}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(lR={focusedElem:e,selectionRange:n},R4=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){t=dt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var M=h.memoizedProps,O=h.memoizedState,y=t.stateNode,_=y.getSnapshotBeforeUpdate(t.elementType===t.type?M:li(t.type,M),O);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(g){e1(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}return h=y$,y$=!1,h}function kM(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&_R(t,n,s)}r=r.next}while(r!==o)}}function nx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function wR(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Dte(e){var t=e.alternate;t!==null&&(e.alternate=null,Dte(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ba],delete t[fg],delete t[pR],delete t[n_e],delete t[o_e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $te(e){return e.tag===5||e.tag===3||e.tag===4}function v$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$te(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=E4));else if(o!==4&&(e=e.child,e!==null))for(kR(e,t,n),e=e.sibling;e!==null;)kR(e,t,n),e=e.sibling}function qR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(qR(e,t,n),e=e.sibling;e!==null;)qR(e,t,n),e=e.sibling}var oo=null,pi=!1;function ql(e,t,n){for(n=n.child;n!==null;)Fte(e,t,n),n=n.sibling}function Fte(e,t,n){if(Oa&&typeof Oa.onCommitFiberUnmount=="function")try{Oa.onCommitFiberUnmount(G5,n)}catch{}switch(n.tag){case 5:Eo||yb(n,t);case 6:var o=oo,r=pi;oo=null,ql(e,t,n),oo=o,pi=r,oo!==null&&(pi?(e=oo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oo.removeChild(n.stateNode));break;case 18:oo!==null&&(pi?(e=oo,n=n.stateNode,e.nodeType===8?b6(e.parentNode,n):e.nodeType===1&&b6(e,n),cg(e)):b6(oo,n.stateNode));break;case 4:o=oo,r=pi,oo=n.stateNode.containerInfo,pi=!0,ql(e,t,n),oo=o,pi=r;break;case 0:case 11:case 14:case 15:if(!Eo&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var s=r,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&_R(n,t,i),r=r.next}while(r!==o)}ql(e,t,n);break;case 1:if(!Eo&&(yb(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(c){e1(n,t,c)}ql(e,t,n);break;case 21:ql(e,t,n);break;case 22:n.mode&1?(Eo=(o=Eo)||n.memoizedState!==null,ql(e,t,n),Eo=o):ql(e,t,n);break;default:ql(e,t,n)}}function x$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new z_e),t.forEach(function(o){var r=S_e.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function ai(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=i),o&=~s}if(o=r,o=l1()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*y_e(o/1960))-o,10e?16:e,Yl===null)var o=!1;else{if(e=Yl,Yl=null,X4=0,q0&6)throw Error(Ne(331));var r=q0;for(q0|=4,dt=e.current;dt!==null;){var s=dt,i=s.child;if(dt.flags&16){var c=s.deletions;if(c!==null){for(var l=0;ll1()-IE?ap(e,0):PE|=n),qr(e,t)}function Zte(e,t){t===0&&(e.mode&1?(t=CO,CO<<=1,!(CO&130023424)&&(CO=4194304)):t=1);var n=nr();e=Vc(e,t),e!==null&&(Bz(e,t,n),qr(e,n))}function q_e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zte(e,n)}function S_e(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Ne(314))}o!==null&&o.delete(t),Zte(e,n)}var Qte;Qte=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wr.current)xr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xr=!1,m_e(e,t,n);xr=!!(e.flags&131072)}else xr=!1,Nn&&t.flags&1048576&&nte(t,j4,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Sy(e,t),e=t.pendingProps;var r=p2(t,Fo.current);$b(t,n),r=TE(null,t,o,e,r,n);var s=EE();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(o)?(s=!0,N4(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,qE(t),r.updater=tx,t.stateNode=r,r._reactInternals=t,gR(t,o,e,n),t=AR(null,t,o,!0,s,n)):(t.tag=0,Nn&&s&&AE(t),Jo(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(Sy(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=R_e(o),e=li(o,e),r){case 0:t=OR(null,t,o,e,n);break e;case 1:t=z$(null,t,o,e,n);break e;case 11:t=M$(null,t,o,e,n);break e;case 14:t=g$(null,t,o,li(o.type,e),n);break e}throw Error(Ne(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),OR(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),z$(e,t,o,r,n);case 3:e:{if(Bte(t),e===null)throw Error(Ne(387));o=t.pendingProps,s=t.memoizedState,r=s.element,cte(e,t),D4(t,o,null,n);var i=t.memoizedState;if(o=i.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=m2(Error(Ne(423)),t),t=O$(e,t,o,n,r);break e}else if(o!==r){r=m2(Error(Ne(424)),t),t=O$(e,t,o,n,r);break e}else for(Kr=fu(t.stateNode.containerInfo.firstChild),Qr=t,Nn=!0,bi=null,n=ite(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(f2(),o===r){t=Hc(e,t,n);break e}Jo(e,t,o,n)}t=t.child}return t;case 5:return lte(t),e===null&&hR(t),o=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,i=r.children,uR(o,r)?i=null:s!==null&&uR(o,s)&&(t.flags|=32),Ete(e,t),Jo(e,t,i,n),t.child;case 6:return e===null&&hR(t),null;case 13:return Nte(e,t,n);case 4:return SE(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=b2(t,null,o,n):Jo(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),M$(e,t,o,r,n);case 7:return Jo(e,t,t.pendingProps,n),t.child;case 8:return Jo(e,t,t.pendingProps.children,n),t.child;case 12:return Jo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value,mn(P4,o._currentValue),o._currentValue=i,s!==null)if(ki(s.value,i)){if(s.children===r.children&&!wr.current){t=Hc(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){i=s.child;for(var l=c.firstContext;l!==null;){if(l.context===o){if(s.tag===1){l=Cc(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),mR(s.return,n,t),c.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(Ne(341));i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),mR(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Jo(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,$b(t,n),r=Hs(r),o=o(r),t.flags|=1,Jo(e,t,o,n),t.child;case 14:return o=t.type,r=li(o,t.pendingProps),r=li(o.type,r),g$(e,t,o,r,n);case 15:return Wte(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),Sy(e,t),t.tag=1,kr(o)?(e=!0,N4(t)):e=!1,$b(t,n),Ste(t,o,r),gR(t,o,r,n),AR(null,t,o,!0,e,n);case 19:return Lte(e,t,n);case 22:return Tte(e,t,n)}throw Error(Ne(156,t.tag))};function Jte(e,t){return wee(e,t)}function C_e(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bs(e,t,n,o){return new C_e(e,t,n,o)}function VE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R_e(e){if(typeof e=="function")return VE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lE)return 11;if(e===uE)return 14}return 2}function Mu(e,t){var n=e.alternate;return n===null?(n=Bs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wy(e,t,n,o,r,s){var i=2;if(o=e,typeof e=="function")VE(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case fb:return cp(n.children,r,s,t);case cE:i=8,r|=8;break;case $C:return e=Bs(12,n,t,r|2),e.elementType=$C,e.lanes=s,e;case FC:return e=Bs(13,n,t,r),e.elementType=FC,e.lanes=s,e;case VC:return e=Bs(19,n,t,r),e.elementType=VC,e.lanes=s,e;case lee:return rx(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aee:i=10;break e;case cee:i=9;break e;case lE:i=11;break e;case uE:i=14;break e;case Il:i=16,o=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Bs(i,n,t,r),t.elementType=e,t.type=o,t.lanes=s,t}function cp(e,t,n,o){return e=Bs(7,e,o,t),e.lanes=n,e}function rx(e,t,n,o){return e=Bs(22,e,o,t),e.elementType=lee,e.lanes=n,e.stateNode={isHidden:!1},e}function y6(e,t,n){return e=Bs(6,e,null,t),e.lanes=n,e}function v6(e,t,n){return t=Bs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W_e(e,t,n,o,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=o6(0),this.expirationTimes=o6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=o6(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function HE(e,t,n,o,r,s,i,c,l){return e=new W_e(e,t,n,c,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Bs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qE(s),e}function T_e(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o0e)}catch(e){console.error(e)}}o0e(),oee.exports=us;var Rr=oee.exports,r0e,W$=Rr;r0e=W$.createRoot,W$.hydrateRoot;const j_e=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,_1={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! +`+s.stack}return{value:e,source:t,stack:r,digest:null}}function C6(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function RR(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var __e=typeof WeakMap=="function"?WeakMap:Map;function Ute(e,t,n){n=Rc(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){J4||(J4=!0,DR=o),RR(e,t)},n}function Xte(e,t,n){n=Rc(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var r=t.value;n.payload=function(){return o(r)},n.callback=function(){RR(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){RR(e,t),typeof o!="function"&&(Mu===null?Mu=new Set([this]):Mu.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function kF(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new __e;var r=new Set;o.set(t,r)}else r=o.get(t),r===void 0&&(r=new Set,o.set(t,r));r.has(n)||(r.add(n),e=P_e.bind(null,e,t,n),t.then(e,e))}function qF(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function SF(e,t,n,o,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rc(-1,1),t.tag=2,mu(n,t,1))),n.lanes|=1),e)}var w_e=pl.ReactCurrentOwner,_r=!1;function Ko(e,t,n,o){t.child=e===null?yte(t,null,n,o):p2(t,e.child,n,o)}function CF(e,t,n,o,r){n=n.render;var s=t.ref;return Ib(t,r),o=XE(e,t,n,o,s,r),n=GE(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Uc(e,t,r)):(Nn&&n&&BE(t),t.flags|=1,Ko(e,t,o,r),t.child)}function RF(e,t,n,o,r){if(e===null){var s=n.type;return typeof s=="function"&&!rB(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Gte(e,t,s,o,r)):(e=Ly(n.type,null,o,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&r)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:lg,n(i,o)&&e.ref===t.ref)return Uc(e,t,r)}return t.flags|=1,e=zu(s,o),e.ref=t.ref,e.return=t,t.child=e}function Gte(e,t,n,o,r){if(e!==null){var s=e.memoizedProps;if(lg(s,o)&&e.ref===t.ref)if(_r=!1,t.pendingProps=o=s,(e.lanes&r)!==0)e.flags&131072&&(_r=!0);else return t.lanes=e.lanes,Uc(e,t,r)}return WR(e,t,n,o,r)}function Kte(e,t,n){var o=t.pendingProps,r=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},hn(Ob,Hr),Hr|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,hn(Ob,Hr),Hr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:n,hn(Ob,Hr),Hr|=o}else s!==null?(o=s.baseLanes|n,t.memoizedState=null):o=n,hn(Ob,Hr),Hr|=o;return Ko(e,t,r,n),t.child}function Yte(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function WR(e,t,n,o,r){var s=qr(n)?zp:Io.current;return s=u2(t,s),Ib(t,r),n=XE(e,t,n,o,s,r),o=GE(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Uc(e,t,r)):(Nn&&o&&BE(t),t.flags|=1,Ko(e,t,n,r),t.child)}function WF(e,t,n,o,r){if(qr(n)){var s=!0;$4(t)}else s=!1;if(Ib(t,r),t.stateNode===null)Ey(e,t),Hte(t,n,o),CR(t,n,o,r),o=!0;else if(e===null){var i=t.stateNode,c=t.memoizedProps;i.props=c;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Vs(u):(u=qr(n)?zp:Io.current,u=u2(t,u));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";p||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==o||l!==u)&&wF(t,i,o,u),$l=!1;var f=t.memoizedState;i.state=f,G4(t,o,i,r),l=t.memoizedState,c!==o||f!==l||kr.current||$l?(typeof d=="function"&&(SR(t,n,d,o),l=t.memoizedState),(c=$l||_F(t,n,c,o,f,l,u))?(p||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,xte(e,t),c=t.memoizedProps,u=t.type===t.elementType?c:li(t.type,c),i.props=u,p=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vs(l):(l=qr(n)?zp:Io.current,l=u2(t,l));var b=n.getDerivedStateFromProps;(d=typeof b=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==p||f!==l)&&wF(t,i,o,l),$l=!1,f=t.memoizedState,i.state=f,G4(t,o,i,r);var h=t.memoizedState;c!==p||f!==h||kr.current||$l?(typeof b=="function"&&(SR(t,n,b,o),h=t.memoizedState),(u=$l||_F(t,n,u,o,f,h,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,h,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,h,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),i.props=o,i.state=h,i.context=l,o=u):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return TR(e,t,n,o,s,r)}function TR(e,t,n,o,r,s){Yte(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return r&&MF(t,n,!1),Uc(e,t,s);o=t.stateNode,w_e.current=t;var c=i&&typeof n.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=p2(t,e.child,null,s),t.child=p2(t,null,c,s)):Ko(e,t,c,s),t.memoizedState=o.state,r&&MF(t,n,!0),t.child}function Zte(e){var t=e.stateNode;t.pendingContext?mF(e,t.pendingContext,t.pendingContext!==t.context):t.context&&mF(e,t.context,!1),$E(e,t.containerInfo)}function TF(e,t,n,o,r){return d2(),LE(r),t.flags|=256,Ko(e,t,n,o),t.child}var ER={dehydrated:null,treeContext:null,retryLane:0};function BR(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qte(e,t,n){var o=t.pendingProps,r=Fn.current,s=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(r&2)!==0),c?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),hn(Fn,r&1),e===null)return kR(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=o.children,e=o.fallback,s?(o=t.mode,s=t.child,i={mode:"hidden",children:i},!(o&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=px(i,o,0,null),e=ip(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=BR(n),t.memoizedState=ER,e):ZE(t,i));if(r=e.memoizedState,r!==null&&(c=r.dehydrated,c!==null))return k_e(e,t,i,o,c,r,n);if(s){s=o.fallback,i=t.mode,r=e.child,c=r.sibling;var l={mode:"hidden",children:o.children};return!(i&1)&&t.child!==r?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=zu(r,l),o.subtreeFlags=r.subtreeFlags&14680064),c!==null?s=zu(c,s):(s=ip(s,i,n,null),s.flags|=2),s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,i=e.child.memoizedState,i=i===null?BR(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=ER,o}return s=e.child,e=s.sibling,o=zu(s,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=n),o.return=t,o.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function ZE(e,t){return t=px({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $O(e,t,n,o){return o!==null&&LE(o),p2(t,e.child,null,n),e=ZE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function k_e(e,t,n,o,r,s,i){if(n)return t.flags&256?(t.flags&=-257,o=C6(Error(Le(422))),$O(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=o.fallback,r=t.mode,o=px({mode:"visible",children:o.children},r,0,null),s=ip(s,r,i,null),s.flags|=2,o.return=t,s.return=t,o.sibling=s,t.child=o,t.mode&1&&p2(t,e.child,null,i),t.child.memoizedState=BR(i),t.memoizedState=ER,s);if(!(t.mode&1))return $O(e,t,i,null);if(r.data==="$!"){if(o=r.nextSibling&&r.nextSibling.dataset,o)var c=o.dgst;return o=c,s=Error(Le(419)),o=C6(s,o,void 0),$O(e,t,i,o)}if(c=(i&e.childLanes)!==0,_r||c){if(o=G1,o!==null){switch(i&-i){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(o.suspendedLanes|i)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Hc(e,r),vi(o,e,r,-1))}return oB(),o=C6(Error(Le(421))),$O(e,t,i,o)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=I_e.bind(null,e),r._reactRetry=t,null):(e=s.treeContext,Kr=hu(r.nextSibling),Qr=t,Nn=!0,bi=null,e!==null&&(_s[ws++]=yc,_s[ws++]=vc,_s[ws++]=Op,yc=e.id,vc=e.overflow,Op=t),t=ZE(t,o.children),t.flags|=4096,t)}function EF(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),qR(e.return,t,n)}function R6(e,t,n,o,r){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:r}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=n,s.tailMode=r)}function Jte(e,t,n){var o=t.pendingProps,r=o.revealOrder,s=o.tail;if(Ko(e,t,o.children,n),o=Fn.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EF(e,n,t);else if(e.tag===19)EF(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(hn(Fn,o),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&K4(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),R6(t,!1,r,n,s);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&K4(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}R6(t,!0,n,null,s);break;case"together":R6(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ey(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Uc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yp|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Le(153));if(t.child!==null){for(e=t.child,n=zu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function q_e(e,t,n){switch(t.tag){case 3:Zte(t),d2();break;case 5:_te(t);break;case 1:qr(t.type)&&$4(t);break;case 4:$E(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,r=t.memoizedProps.value;hn(U4,o._currentValue),o._currentValue=r;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(hn(Fn,Fn.current&1),t.flags|=128,null):n&t.child.childLanes?Qte(e,t,n):(hn(Fn,Fn.current&1),e=Uc(e,t,n),e!==null?e.sibling:null);hn(Fn,Fn.current&1);break;case 19:if(o=(n&t.childLanes)!==0,e.flags&128){if(o)return Jte(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),hn(Fn,Fn.current),o)break;return null;case 22:case 23:return t.lanes=0,Kte(e,t,n)}return Uc(e,t,n)}var e0e,NR,t0e,n0e;e0e=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};NR=function(){};t0e=function(e,t,n,o){var r=e.memoizedProps;if(r!==o){e=t.stateNode,Zd(xa.current);var s=null;switch(n){case"input":r=rR(e,r),o=rR(e,o),s=[];break;case"select":r=Yn({},r,{value:void 0}),o=Yn({},o,{value:void 0}),s=[];break;case"textarea":r=aR(e,r),o=aR(e,o),s=[];break;default:typeof r.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=D4)}lR(n,o);var i;n=null;for(u in r)if(!o.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var c=r[u];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ng.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in o){var l=o[u];if(c=r?.[u],o.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u==="style")if(c){for(i in c)!c.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&c[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ng.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&An("scroll",e),s||c===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};n0e=function(e,t,n,o){n!==o&&(t.flags|=4)};function zm(e,t){if(!Nn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ko(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags&14680064,o|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags,o|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function S_e(e,t,n){var o=t.pendingProps;switch(NE(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ko(t),null;case 1:return qr(t.type)&&F4(),ko(t),null;case 3:return o=t.stateNode,f2(),vn(kr),vn(Io),HE(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(DO(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bi!==null&&(VR(bi),bi=null))),NR(e,t),ko(t),null;case 5:VE(t);var r=Zd(bg.current);if(n=t.type,e!==null&&t.stateNode!=null)t0e(e,t,n,o,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(Le(166));return ko(t),null}if(e=Zd(xa.current),DO(t)){o=t.stateNode,n=t.type;var s=t.memoizedProps;switch(o[Ma]=t,o[pg]=s,e=(t.mode&1)!==0,n){case"dialog":An("cancel",o),An("close",o);break;case"iframe":case"object":case"embed":An("load",o);break;case"video":case"audio":for(r=0;r<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(n,{is:o.is}):(e=i.createElement(n),n==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,n),e[Ma]=t,e[pg]=o,e0e(e,t,!1,!1),t.stateNode=e;e:{switch(i=uR(n,o),n){case"dialog":An("cancel",e),An("close",e),r=o;break;case"iframe":case"object":case"embed":An("load",e),r=o;break;case"video":case"audio":for(r=0;rh2&&(t.flags|=128,o=!0,zm(s,!1),t.lanes=4194304)}else{if(!o)if(e=K4(i),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zm(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Nn)return ko(t),null}else 2*c1()-s.renderingStartTime>h2&&n!==1073741824&&(t.flags|=128,o=!0,zm(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=c1(),t.sibling=null,n=Fn.current,hn(Fn,o?n&1|2:n&1),t):(ko(t),null);case 22:case 23:return nB(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Hr&1073741824&&(ko(t),t.subtreeFlags&6&&(t.flags|=8192)):ko(t),null;case 24:return null;case 25:return null}throw Error(Le(156,t.tag))}function C_e(e,t){switch(NE(t),t.tag){case 1:return qr(t.type)&&F4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return f2(),vn(kr),vn(Io),HE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return VE(t),null;case 13:if(vn(Fn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Le(340));d2()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vn(Fn),null;case 4:return f2(),null;case 10:return IE(t.type._context),null;case 22:case 23:return nB(),null;case 24:return null;default:return null}}var VO=!1,Ro=!1,R_e=typeof WeakSet=="function"?WeakSet:Set,dt=null;function zb(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Jn(e,t,o)}else n.current=null}function LR(e,t,n){try{n()}catch(o){Jn(e,t,o)}}var BF=!1;function W_e(e,t){if(OR=j4,e=ate(),EE(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,c=-1,l=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var b;p!==n||r!==0&&p.nodeType!==3||(c=i+r),p!==s||o!==0&&p.nodeType!==3||(l=i+o),p.nodeType===3&&(i+=p.nodeValue.length),(b=p.firstChild)!==null;)f=p,p=b;for(;;){if(p===e)break t;if(f===n&&++u===r&&(c=i),f===s&&++d===o&&(l=i),(b=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=b}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(AR={focusedElem:e,selectionRange:n},j4=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){t=dt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var M=h.memoizedProps,z=h.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?M:li(t.type,M),z);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Le(163))}}catch(g){Jn(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}return h=BF,BF=!1,h}function _M(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&LR(t,n,s)}r=r.next}while(r!==o)}}function ux(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function jR(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function o0e(e){var t=e.alternate;t!==null&&(e.alternate=null,o0e(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ma],delete t[pg],delete t[xR],delete t[b_e],delete t[h_e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function r0e(e){return e.tag===5||e.tag===3||e.tag===4}function NF(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r0e(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function PR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=D4));else if(o!==4&&(e=e.child,e!==null))for(PR(e,t,n),e=e.sibling;e!==null;)PR(e,t,n),e=e.sibling}function IR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(IR(e,t,n),e=e.sibling;e!==null;)IR(e,t,n),e=e.sibling}var io=null,pi=!1;function Cl(e,t,n){for(n=n.child;n!==null;)s0e(e,t,n),n=n.sibling}function s0e(e,t,n){if(va&&typeof va.onCommitFiberUnmount=="function")try{va.onCommitFiberUnmount(nx,n)}catch{}switch(n.tag){case 5:Ro||zb(n,t);case 6:var o=io,r=pi;io=null,Cl(e,t,n),io=o,pi=r,io!==null&&(pi?(e=io,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):io.removeChild(n.stateNode));break;case 18:io!==null&&(pi?(e=io,n=n.stateNode,e.nodeType===8?x6(e.parentNode,n):e.nodeType===1&&x6(e,n),ag(e)):x6(io,n.stateNode));break;case 4:o=io,r=pi,io=n.stateNode.containerInfo,pi=!0,Cl(e,t,n),io=o,pi=r;break;case 0:case 11:case 14:case 15:if(!Ro&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var s=r,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&LR(n,t,i),r=r.next}while(r!==o)}Cl(e,t,n);break;case 1:if(!Ro&&(zb(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(c){Jn(n,t,c)}Cl(e,t,n);break;case 21:Cl(e,t,n);break;case 22:n.mode&1?(Ro=(o=Ro)||n.memoizedState!==null,Cl(e,t,n),Ro=o):Cl(e,t,n);break;default:Cl(e,t,n)}}function LF(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R_e),t.forEach(function(o){var r=D_e.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function ai(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=i),o&=~s}if(o=r,o=c1()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*E_e(o/1960))-o,10e?16:e,Ql===null)var o=!1;else{if(e=Ql,Ql=null,ev=0,q0&6)throw Error(Le(331));var r=q0;for(q0|=4,dt=e.current;dt!==null;){var s=dt,i=s.child;if(dt.flags&16){var c=s.deletions;if(c!==null){for(var l=0;lc1()-eB?sp(e,0):JE|=n),Sr(e,t)}function f0e(e,t){t===0&&(e.mode&1?(t=BO,BO<<=1,!(BO&130023424)&&(BO=4194304)):t=1);var n=Qo();e=Hc(e,t),e!==null&&(Bz(e,t,n),Sr(e,n))}function I_e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),f0e(e,n)}function D_e(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Le(314))}o!==null&&o.delete(t),f0e(e,n)}var b0e;b0e=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||kr.current)_r=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _r=!1,q_e(e,t,n);_r=!!(e.flags&131072)}else _r=!1,Nn&&t.flags&1048576&>e(t,H4,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Ey(e,t),e=t.pendingProps;var r=u2(t,Io.current);Ib(t,n),r=XE(null,t,o,e,r,n);var s=GE();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qr(o)?(s=!0,$4(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,FE(t),r.updater=lx,t.stateNode=r,r._reactInternals=t,CR(t,o,e,n),t=TR(null,t,o,!0,s,n)):(t.tag=0,Nn&&s&&BE(t),Ko(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(Ey(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=$_e(o),e=li(o,e),r){case 0:t=WR(null,t,o,e,n);break e;case 1:t=WF(null,t,o,e,n);break e;case 11:t=CF(null,t,o,e,n);break e;case 14:t=RF(null,t,o,li(o.type,e),n);break e}throw Error(Le(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),WR(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),WF(e,t,o,r,n);case 3:e:{if(Zte(t),e===null)throw Error(Le(387));o=t.pendingProps,s=t.memoizedState,r=s.element,xte(e,t),G4(t,o,null,n);var i=t.memoizedState;if(o=i.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=b2(Error(Le(423)),t),t=TF(e,t,o,n,r);break e}else if(o!==r){r=b2(Error(Le(424)),t),t=TF(e,t,o,n,r);break e}else for(Kr=hu(t.stateNode.containerInfo.firstChild),Qr=t,Nn=!0,bi=null,n=yte(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(d2(),o===r){t=Uc(e,t,n);break e}Ko(e,t,o,n)}t=t.child}return t;case 5:return _te(t),e===null&&kR(t),o=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,i=r.children,yR(o,r)?i=null:s!==null&&yR(o,s)&&(t.flags|=32),Yte(e,t),Ko(e,t,i,n),t.child;case 6:return e===null&&kR(t),null;case 13:return Qte(e,t,n);case 4:return $E(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=p2(t,null,o,n):Ko(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),CF(e,t,o,r,n);case 7:return Ko(e,t,t.pendingProps,n),t.child;case 8:return Ko(e,t,t.pendingProps.children,n),t.child;case 12:return Ko(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value,hn(U4,o._currentValue),o._currentValue=i,s!==null)if(qi(s.value,i)){if(s.children===r.children&&!kr.current){t=Uc(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){i=s.child;for(var l=c.firstContext;l!==null;){if(l.context===o){if(s.tag===1){l=Rc(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),qR(s.return,n,t),c.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(Le(341));i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),qR(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Ko(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,Ib(t,n),r=Vs(r),o=o(r),t.flags|=1,Ko(e,t,o,n),t.child;case 14:return o=t.type,r=li(o,t.pendingProps),r=li(o.type,r),RF(e,t,o,r,n);case 15:return Gte(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),Ey(e,t),t.tag=1,qr(o)?(e=!0,$4(t)):e=!1,Ib(t,n),Hte(t,o,r),CR(t,o,r,n),TR(null,t,o,!0,e,n);case 19:return Jte(e,t,n);case 22:return Kte(e,t,n)}throw Error(Le(156,t.tag))};function h0e(e,t){return Fee(e,t)}function F_e(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Es(e,t,n,o){return new F_e(e,t,n,o)}function rB(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $_e(e){if(typeof e=="function")return rB(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vE)return 11;if(e===xE)return 14}return 2}function zu(e,t){var n=e.alternate;return n===null?(n=Es(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ly(e,t,n,o,r,s){var i=2;if(o=e,typeof e=="function")rB(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ub:return ip(n.children,r,s,t);case yE:i=8,r|=8;break;case eR:return e=Es(12,n,t,r|2),e.elementType=eR,e.lanes=s,e;case tR:return e=Es(13,n,t,r),e.elementType=tR,e.lanes=s,e;case nR:return e=Es(19,n,t,r),e.elementType=nR,e.lanes=s,e;case _ee:return px(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vee:i=10;break e;case xee:i=9;break e;case vE:i=11;break e;case xE:i=14;break e;case Fl:i=16,o=null;break e}throw Error(Le(130,e==null?e:typeof e,""))}return t=Es(i,n,t,r),t.elementType=e,t.type=o,t.lanes=s,t}function ip(e,t,n,o){return e=Es(7,e,o,t),e.lanes=n,e}function px(e,t,n,o){return e=Es(22,e,o,t),e.elementType=_ee,e.lanes=n,e.stateNode={isHidden:!1},e}function W6(e,t,n){return e=Es(6,e,null,t),e.lanes=n,e}function T6(e,t,n){return t=Es(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function V_e(e,t,n,o,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=f6(0),this.expirationTimes=f6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=f6(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function sB(e,t,n,o,r,s,i,c,l){return e=new V_e(e,t,n,c,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Es(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},FE(s),e}function H_e(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z0e)}catch(e){console.error(e)}}z0e(),zee.exports=us;var Jo=zee.exports,O0e,HF=Jo;O0e=HF.createRoot,HF.hydrateRoot;const Y_e=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,w1={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function T$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pz(e){var t,n;return T$(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(T$(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var TR=function(e,t){return TR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},TR(e,t)};function P_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");TR(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var a1=function(){return a1=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function Y4(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:"",transform:s0e},t))}function F_e(e,t){return t===0?e.toLowerCase():s0e(e,t)}function KE(e,t){return t===void 0&&(t={}),Y4(e,a1({transform:F_e},t))}function V_e(e){return e.charAt(0).toUpperCase()+e.substr(1)}function H_e(e){return V_e(e.toLowerCase())}function i0e(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:" ",transform:H_e},t))}function U_e(e,t){return t===void 0&&(t={}),lx(e,a1({delimiter:"."},t))}function Xs(e,t){return t===void 0&&(t={}),U_e(e,a1({delimiter:"-"},t))}function X_e(e){return e.replace(/>/g,">")}const G_e=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function a0e(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function K_e(e){return e.replace(/"/g,""")}function c0e(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),z.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:Z_e,Consumer:Q_e}=z.createContext(void 0),J_e=z.forwardRef(()=>null),ewe=new Set(["string","boolean","number"]),twe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),nwe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),owe=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),rwe=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function u0e(e,t){return t.some(n=>e.indexOf(n)===0)}function swe(e){return e==="key"||e==="children"}function iwe(e,t){switch(e){case"style":return pwe(t)}return t}const B$=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),N$=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),L$=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function awe(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return N$[t]?N$[t]:B$[t]?Xs(B$[t]):L$[t]?L$[t]:t}function cwe(e){return e.startsWith("--")?e:u0e(e,["ms","O","Moz","Webkit"])?"-"+Xs(e):Xs(e)}function lwe(e,t){return typeof t=="number"&&t!==0&&!rwe.has(e)?t+"px":t}function Po(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return CM(e,t,n);switch(typeof e){case"string":return ER(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case z.StrictMode:case z.Fragment:return CM(r.children,t,n);case C1:const{children:s,...i}=r;return j$(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return j$(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?uwe(o,r,t,n):Po(o(r,n),t,n)}switch(o&&o.$$typeof){case Z_e.$$typeof:return CM(r.children,r.value,n);case Q_e.$$typeof:return Po(r.children(t||o._currentValue),t,n);case J_e.$$typeof:return Po(o.render(r),t,n)}return""}function j$(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=CM(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=CM(t.children,n,o));if(!e)return r;const s=dwe(t);return twe.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function uwe(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),Po(r.render(),n,o)}function CM(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),M.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,M.width?parseInt(M.width):0);break;case"e":p=M.precision?parseFloat(p).toExponential(M.precision):parseFloat(p).toExponential();break;case"f":p=M.precision?parseFloat(p).toFixed(M.precision):parseFloat(p);break;case"g":p=M.precision?String(Number(p.toPrecision(M.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=M.precision?p.substring(0,M.precision):p;break;case"t":p=String(!!p),p=M.precision?p.substring(0,M.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=M.precision?p.substring(0,M.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=M.precision?p.substring(0,M.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(M.type)?f+=p:(t.number.test(M.type)&&(!v||M.sign)?(g=v?"+":"-",p=p.toString().replace(t.sign,"")):g="",y=M.pad_char?M.pad_char==="0"?"0":M.pad_char.charAt(1):" ",_=M.width-(g+p).length,O=M.width&&_>0?y.repeat(_):"",f+=M.align?g+p+O:y==="0"?g+O+p:O+g+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()})(d0e);const fwe=Ao(d0e),bwe=ps(console.error);function le(e,...t){try{return fwe.sprintf(e,...t)}catch(n){return n instanceof Error&&bwe(`sprintf error: + */function UF(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pz(e){var t,n;return UF(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(UF(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var HR=function(e,t){return HR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},HR(e,t)};function Z_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");HR(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var i1=function(){return i1=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function ov(e,t){return t===void 0&&(t={}),Mx(e,i1({delimiter:"",transform:A0e},t))}function twe(e,t){return t===0?e.toLowerCase():A0e(e,t)}function lB(e,t){return t===void 0&&(t={}),ov(e,i1({transform:twe},t))}function nwe(e){return e.charAt(0).toUpperCase()+e.substr(1)}function owe(e){return nwe(e.toLowerCase())}function y0e(e,t){return t===void 0&&(t={}),Mx(e,i1({delimiter:" ",transform:owe},t))}function rwe(e,t){return t===void 0&&(t={}),Mx(e,i1({delimiter:"."},t))}function Us(e,t){return t===void 0&&(t={}),rwe(e,i1({delimiter:"-"},t))}function swe(e){return e.replace(/>/g,">")}const iwe=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function v0e(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function awe(e){return e.replace(/"/g,""")}function x0e(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),O.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:lwe,Consumer:uwe}=O.createContext(void 0),dwe=O.forwardRef(()=>null),pwe=new Set(["string","boolean","number"]),fwe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),bwe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),hwe=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),mwe=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function w0e(e,t){return t.some(n=>e.indexOf(n)===0)}function Mwe(e){return e==="key"||e==="children"}function gwe(e,t){switch(e){case"style":return xwe(t)}return t}const GF=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),KF=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),YF=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function zwe(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return KF[t]?KF[t]:GF[t]?Us(GF[t]):YF[t]?YF[t]:t}function Owe(e){return e.startsWith("--")?e:w0e(e,["ms","O","Moz","Webkit"])?"-"+Us(e):Us(e)}function Awe(e,t){return typeof t=="number"&&t!==0&&!mwe.has(e)?t+"px":t}function No(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return qM(e,t,n);switch(typeof e){case"string":return UR(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case O.StrictMode:case O.Fragment:return qM(r.children,t,n);case C1:const{children:s,...i}=r;return ZF(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return ZF(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?ywe(o,r,t,n):No(o(r,n),t,n)}switch(o&&o.$$typeof){case lwe.$$typeof:return qM(r.children,r.value,n);case uwe.$$typeof:return No(r.children(t||o._currentValue),t,n);case dwe.$$typeof:return No(o.render(r),t,n)}return""}function ZF(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=qM(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=qM(t.children,n,o));if(!e)return r;const s=vwe(t);return fwe.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function ywe(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),No(r.render(),n,o)}function qM(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),M.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,M.width?parseInt(M.width):0);break;case"e":p=M.precision?parseFloat(p).toExponential(M.precision):parseFloat(p).toExponential();break;case"f":p=M.precision?parseFloat(p).toFixed(M.precision):parseFloat(p);break;case"g":p=M.precision?String(Number(p.toPrecision(M.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=M.precision?p.substring(0,M.precision):p;break;case"t":p=String(!!p),p=M.precision?p.substring(0,M.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=M.precision?p.substring(0,M.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=M.precision?p.substring(0,M.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(M.type)?f+=p:(t.number.test(M.type)&&(!v||M.sign)?(g=v?"+":"-",p=p.toString().replace(t.sign,"")):g="",y=M.pad_char?M.pad_char==="0"?"0":M.pad_char.charAt(1):" ",x=M.width-(g+p).length,z=M.width&&x>0?y.repeat(x):"",f+=M.align?g+p+z:y==="0"?g+z+p:z+g+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()})(k0e);const _we=yo(k0e),wwe=ps(console.error);function le(e,...t){try{return _we.sprintf(e,...t)}catch(n){return n instanceof Error&&wwe(`sprintf error: -`+n.toString()),e}}var BR,p0e,rM,f0e;BR={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};p0e=["(","?"];rM={")":["("],":":["?","?:"]};f0e=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function hwe(e){for(var t=[],n=[],o,r,s,i;o=e.match(f0e);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(rM[r]){if(rM[r][0]===i){r=rM[r][1]||r;break}}else if(p0e.indexOf(i)>=0||BR[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Mwe(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new YE({}),r=new Set,s=()=>{r.forEach(g=>g())},i=g=>(r.add(g),()=>r.delete(g)),c=(g="default")=>o.data[g],l=(g,A="default")=>{o.data[A]={...o.data[A],...g},o.data[A][""]={...I$[""],...o.data[A]?.[""]},delete o.pluralForms[A]},u=(g,A)=>{l(g,A),s()},d=(g,A="default")=>{o.data[A]={...o.data[A],...g,"":{...I$[""],...o.data[A]?.[""],...g?.[""]}},delete o.pluralForms[A],s()},p=(g,A)=>{o.data={},o.pluralForms={},u(g,A)},f=(g="default",A,x,w,k)=>(o.data[g]||l(void 0,g),o.dcnpgettext(g,A,x,w,k)),b=(g="default")=>g,h=(g,A)=>{let x=f(A,void 0,g);return n?(x=n.applyFilters("i18n.gettext",x,g,A),n.applyFilters("i18n.gettext_"+b(A),x,g,A)):x},M=(g,A,x)=>{let w=f(x,A,g);return n?(w=n.applyFilters("i18n.gettext_with_context",w,g,A,x),n.applyFilters("i18n.gettext_with_context_"+b(x),w,g,A,x)):w},O=(g,A,x,w)=>{let k=f(w,void 0,g,A,x);return n?(k=n.applyFilters("i18n.ngettext",k,g,A,x,w),n.applyFilters("i18n.ngettext_"+b(w),k,g,A,x,w)):k},y=(g,A,x,w,k)=>{let q=f(k,w,g,A,x);return n?(q=n.applyFilters("i18n.ngettext_with_context",q,g,A,x,w,k),n.applyFilters("i18n.ngettext_with_context_"+b(k),q,g,A,x,w,k)):q},_=()=>M("ltr","text direction")==="rtl",v=(g,A,x)=>{const w=A?A+""+g:g;let k=!!o.data?.[x??"default"]?.[w];return n&&(k=n.applyFilters("i18n.has_translation",k,g,A,x),k=n.applyFilters("i18n.has_translation_"+b(x),k,g,A,x)),k};if(n){const g=A=>{Awe.test(A)&&s()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:M,_n:O,_nx:y,isRTL:_,hasTranslation:v}};function b0e(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function ZE(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function D$(e,t){return function(o,r,s,i=10){const c=e[t];if(!ZE(o)||!b0e(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function $O(e,t,n=!1){return function(r,s){const i=e[t];if(!ZE(r)||!n&&!b0e(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function $$(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function F$(e,t,n=!1){return function(r,...s){const i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;const c=i[r].handlers;if(!c||!c.length)return n?s[0]:void 0;const l={name:r,currentIndex:0};for(i.__current.push(l);l.currentIndex"u"?typeof r.__current[0]<"u":r.__current[0]?o===r.__current[0].name:!1}}function U$(e,t){return function(o){const r=e[t];if(ZE(o))return r[o]&&r[o].runs?r[o].runs:0}}class vwe{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=D$(this,"actions"),this.addFilter=D$(this,"filters"),this.removeAction=$O(this,"actions"),this.removeFilter=$O(this,"filters"),this.hasAction=$$(this,"actions"),this.hasFilter=$$(this,"filters"),this.removeAllActions=$O(this,"actions",!0),this.removeAllFilters=$O(this,"filters",!0),this.doAction=F$(this,"actions"),this.applyFilters=F$(this,"filters",!0),this.currentAction=V$(this,"actions"),this.currentFilter=V$(this,"filters"),this.doingAction=H$(this,"actions"),this.doingFilter=H$(this,"filters"),this.didAction=U$(this,"actions"),this.didFilter=U$(this,"filters")}}function h0e(){return new vwe}const m0e=h0e(),{addAction:X$,addFilter:n0,removeAction:G$,removeFilter:K$,hasAction:mb0,hasFilter:M0e,removeAllActions:Mb0,removeAllFilters:gb0,doAction:g0e,applyFilters:kn,currentAction:zb0,currentFilter:Ob0,doingAction:Ab0,doingFilter:yb0,didAction:vb0,didFilter:xb0,actions:_b0,filters:wb0}=m0e,z1=ywe(void 0,void 0,m0e);z1.getLocaleData.bind(z1);z1.setLocaleData.bind(z1);z1.resetLocaleData.bind(z1);z1.subscribe.bind(z1);const m=z1.__.bind(z1),ye=z1._x.bind(z1),i0=z1._n.bind(z1);z1._nx.bind(z1);const mt=z1.isRTL.bind(z1);z1.hasTranslation.bind(z1);function xwe(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const z0e=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},_we=e=>(t,n)=>z0e(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function of(e){try{return new URL(e),!0}catch{return!1}}const wwe=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function O0e(e){return wwe.test(e)}function dx(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function QE(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function JE(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function kwe(e){return e?/^[^\s#?]+$/.test(e):!1}function rf(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function qwe(e){return e?/^[^\s#?]+$/.test(e):!1}function eB(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function px(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function Swe(e){return e?/^[^\s#?\/]+$/.test(e):!1}function Cwe(e){const t=rf(e),n=eB(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function Rwe(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function NR(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function Og(e){try{return decodeURIComponent(e)}catch{return e}}function Wwe(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(Og);if(o){const s=o.replace(/\]/g,"").split("[");Wwe(t,s,r)}return t},Object.create(null))}function kt(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(fx(e),t),n=n.substr(0,o)),n+"?"+px(t)}function LR(e,t){return fx(e)[t]}function Y$(e,t){return LR(e,t)!==void 0}function Z4(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=fx(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=px(o);return s?r+"?"+s:r}const Twe=/^(?:[a-z]+:|#|\?|\.|\/)/i;function sf(e){return e&&(e=e.trim(),!Twe.test(e)&&!O0e(e)?"http://"+e:e)}function Iz(e){try{return decodeURI(e)}catch{return e}}function Dz(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var bx={exports:{}},A0e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},y0e=Object.keys(A0e).join("|"),Ewe=new RegExp(y0e,"g"),Bwe=new RegExp(y0e,"");function Nwe(e){return A0e[e]}var v0e=function(e){return e.replace(Ewe,Nwe)},Lwe=function(e){return!!e.match(Bwe)};bx.exports=v0e;bx.exports.has=Lwe;bx.exports.remove=v0e;var jwe=bx.exports;const Gs=Ao(jwe);function tB(e){return e?Gs(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function $z(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function Z$(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function Pwe(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[Z$(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=fx(n.url);typeof l=="string"&&(s=kt(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=Z$(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],Q$(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],Q$(l,!!r)}return o(n)}}function Q$(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const Iwe=({path:e,url:t,...n},o)=>({...n,url:t&&kt(t,o),path:e&&kt(e,o)}),J$=e=>e.json?e.json():Promise.reject(e),Dwe=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},eF=e=>{const{next:t}=Dwe(e.headers.get("link"));return t},$we=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},x0e=async(e,t)=>{if(e.parse===!1||!$we(e))return t(e);const n=await pt({...Iwe(e,{per_page:100}),parse:!1}),o=await J$(n);if(!Array.isArray(o))return o;let r=eF(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await pt({...e,path:void 0,url:r,parse:!1}),c=await J$(i);s=s.concat(c),r=eF(i)}return s},Fwe=new Set(["PATCH","PUT","DELETE"]),Vwe="GET",Hwe=(e,t)=>{const{method:n=Vwe}=e;return Fwe.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},Uwe=(e,t)=>(typeof e.url=="string"&&!Y$(e.url,"_locale")&&(e.url=kt(e.url,{_locale:"user"})),typeof e.path=="string"&&!Y$(e.path,"_locale")&&(e.path=kt(e.path,{_locale:"user"})),t(e)),Xwe=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,Gwe=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},_0e=(e,t=!0)=>Promise.resolve(Xwe(e,t)).catch(n=>nB(n,t));function nB(e,t=!0){if(!t)throw e;return Gwe(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function Kwe(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const Ywe=(e,t)=>{if(!Kwe(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):nB(s,e.parse)}).then(s=>_0e(s,e.parse))},Zwe=e=>(t,n)=>{if(typeof t.url=="string"){const o=LR(t.url,"wp_theme_preview");o===void 0?t.url=kt(t.url,{wp_theme_preview:e}):o===""&&(t.url=Z4(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=LR(t.path,"wp_theme_preview");o===void 0?t.path=kt(t.path,{wp_theme_preview:e}):o===""&&(t.path=Z4(t.path,"wp_theme_preview"))}return n(t)},Qwe={Accept:"application/json, */*;q=0.1"},Jwe={credentials:"include"},w0e=[Uwe,z0e,Hwe,x0e];function eke(e){w0e.unshift(e)}const k0e=e=>{if(e.status>=200&&e.status<300)return e;throw e},tke=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...Qwe,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...Jwe,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then(k0e).catch(d=>nB(d,r)).then(d=>_0e(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let q0e=tke;function nke(e){q0e=e}function pt(e){return w0e.reduceRight((n,o)=>r=>o(r,n),q0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(pt.nonceEndpoint).then(k0e).then(o=>o.text()).then(o=>(pt.nonceMiddleware.nonce=o,pt(e))))}pt.use=eke;pt.setFetchHandler=nke;pt.createNonceMiddleware=xwe;pt.createPreloadingMiddleware=Pwe;pt.createRootURLMiddleware=_we;pt.fetchAllMiddleware=x0e;pt.mediaUploadMiddleware=Ywe;pt.createThemePreviewMiddleware=Zwe;const tF=Object.create(null);function Ce(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in tF||(g0e("deprecated",e,t,h),console.warn(h),tF[h]=!0)}function Ag(e){"@babel/helpers - typeof";return Ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ag(e)}function oke(e,t){if(Ag(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ag(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rke(e){var t=oke(e,"string");return Ag(t)=="symbol"?t:t+""}function ske(e,t,n){return(t=rke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function oF(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fr(1));return n(S0e)(e,t)}if(typeof e!="function")throw new Error(Fr(2));var r=e,s=t,i=[],c=i,l=!1;function u(){c===i&&(c=i.slice())}function d(){if(l)throw new Error(Fr(3));return s}function p(M){if(typeof M!="function")throw new Error(Fr(4));if(l)throw new Error(Fr(5));var O=!0;return u(),c.push(M),function(){if(O){if(l)throw new Error(Fr(6));O=!1,u();var _=c.indexOf(M);c.splice(_,1),i=null}}}function f(M){if(!ike(M))throw new Error(Fr(7));if(typeof M.type>"u")throw new Error(Fr(8));if(l)throw new Error(Fr(9));try{l=!0,s=r(s,M)}finally{l=!1}for(var O=i=c,y=0;y1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&ep(i)==="object"&&(s=s[1]),n.call(r,s,i,o)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),e}(),fke=pke;const oa=Ao(fke);function bke(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var C0e={},ln={},hx={};Object.defineProperty(hx,"__esModule",{value:!0});var hke={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};hx.default=hke;Object.defineProperty(ln,"__esModule",{value:!0});ln.createChannel=ln.subscribe=ln.cps=ln.apply=ln.call=ln.invoke=ln.delay=ln.race=ln.join=ln.fork=ln.error=ln.all=void 0;var mke=hx,Va=Mke(mke);function Mke(e){return e&&e.__esModule?e:{default:e}}ln.all=function(t){return{type:Va.default.all,value:t}};ln.error=function(t){return{type:Va.default.error,error:t}};ln.fork=function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r2?o-2:0),s=2;s1?n-1:0),r=1;r"u"?"undefined":gke(t))==="object"&&!!t},all:function(t){return Mr.obj(t)&&t.type===Sl.default.all},error:function(t){return Mr.obj(t)&&t.type===Sl.default.error},array:Array.isArray,func:function(t){return typeof t=="function"},promise:function(t){return t&&Mr.func(t.then)},iterator:function(t){return t&&Mr.func(t.next)&&Mr.func(t.throw)},fork:function(t){return Mr.obj(t)&&t.type===Sl.default.fork},join:function(t){return Mr.obj(t)&&t.type===Sl.default.join},race:function(t){return Mr.obj(t)&&t.type===Sl.default.race},call:function(t){return Mr.obj(t)&&t.type===Sl.default.call},cps:function(t){return Mr.obj(t)&&t.type===Sl.default.cps},subscribe:function(t){return Mr.obj(t)&&t.type===Sl.default.subscribe},channel:function(t){return Mr.obj(t)&&Mr.func(t.subscribe)}};ph.default=Mr;Object.defineProperty(Gr,"__esModule",{value:!0});Gr.iterator=Gr.array=Gr.object=Gr.error=Gr.any=void 0;var Ake=ph,g2=yke(Ake);function yke(e){return e&&e.__esModule?e:{default:e}}var vke=Gr.any=function(t,n,o,r){return r(t),!0},xke=Gr.error=function(t,n,o,r,s){return g2.default.error(t)?(s(t.error),!0):!1},_ke=Gr.object=function(t,n,o,r,s){if(!g2.default.all(t)||!g2.default.obj(t.value))return!1;var i={},c=Object.keys(t.value),l=0,u=!1,d=function(b,h){u||(i[b]=h,l++,l===c.length&&r(i))},p=function(b,h){u||(u=!0,s(h))};return c.map(function(f){o(t.value[f],function(b){return d(f,b)},function(b){return p(f,b)})}),!0},wke=Gr.array=function(t,n,o,r,s){if(!g2.default.all(t)||!g2.default.array(t.value))return!1;var i=[],c=0,l=!1,u=function(f,b){l||(i[f]=b,c++,c===t.value.length&&r(i))},d=function(f,b){l||(l=!0,s(b))};return t.value.map(function(p,f){o(p,function(b){return u(f,b)},function(b){return d(f,b)})}),!0},kke=Gr.iterator=function(t,n,o,r,s){return g2.default.iterator(t)?(o(t,n,s),!0):!1};Gr.default=[xke,kke,wke,_ke,vke];Object.defineProperty(oB,"__esModule",{value:!0});var qke=Gr,Ske=R0e(qke),Cke=ph,Rke=R0e(Cke);function R0e(e){return e&&e.__esModule?e:{default:e}}function aF(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t(c,l,u,d,p)=>{if(!Gke(c,s))return!1;const f=i(c);return E0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>PR(s)?(t(s),i(),!0):!1;n.push(o);const r=C0e.create(n);return s=>new Promise((i,c)=>r(s,l=>{PR(l)&&t(l),i(l)},c))}function Yke(e={}){return t=>{const n=Kke(e,t.dispatch);return o=>r=>bke(r)?n(r):o(r)}}function Rn(e,t){return n=>{const o=e(n);return o.displayName=Zke(t,n),o}}const Zke=(e,t)=>{const n=t.displayName||t.name||"Component";return`${Y4(e??"")}(${n})`},Pr=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(C){const T=o,E=r;return o=void 0,r=void 0,u=C,i=e.apply(E,T),i}function h(C,T){c=setTimeout(C,T)}function M(){c!==void 0&&clearTimeout(c)}function O(C){return u=C,h(g,t),d?b(C):i}function y(C){return C-(l||0)}function _(C){const T=y(C),E=C-u,B=t-T;return p?Math.min(B,s-E):B}function v(C){const T=y(C),E=C-u;return l===void 0||T>=t||T<0||p&&E>=s}function g(){const C=Date.now();if(v(C))return x(C);h(g,_(C))}function A(){c=void 0}function x(C){return A(),f&&o?b(C):(o=r=void 0,i)}function w(){M(),u=0,A(),o=l=r=void 0}function k(){return q()?x(Date.now()):i}function q(){return c!==void 0}function S(...C){const T=Date.now(),E=v(T);if(o=C,r=this,l=T,E){if(!q())return O(l);if(p)return h(g,t),b(l)}return q()||h(g,t),i}return S.cancel=w,S.flush=k,S.pending=q,S},sB=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Pr(e,t,{leading:o,trailing:r,maxWait:t})};function z2(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const B0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},Zl=B0e(),x0=B0e(!0);function iB(e){return Rn(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function N0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=e6e(e);return t?`${t}-${o}`:o},[e,n,t])}const t6e=Rn(e=>t=>{const n=He(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),n6e=Rn(e=>class extends z.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function o6e(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function L0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function r6e(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&L0e(n)}function mx(e,{sequential:t=!1}={}){const n=e.querySelectorAll(o6e(t));return Array.from(n).filter(o=>{if(!L0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?r6e(o):!0})}const s6e=Object.freeze(Object.defineProperty({__proto__:null,find:mx},Symbol.toStringTag,{value:"Module"}));function IR(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function j0e(e){return IR(e)!==-1}function i6e(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function a6e(e,t){return{element:e,index:t}}function c6e(e){return e.element}function l6e(e,t){const n=IR(e.element),o=IR(t.element);return n===o?e.index-t.index:n-o}function aB(e){return e.filter(j0e).map(a6e).sort(l6e).map(c6e).reduce(i6e(),[])}function u6e(e){return aB(mx(e))}function d6e(e){return aB(mx(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function p6e(e){return aB(mx(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const f6e=Object.freeze(Object.defineProperty({__proto__:null,find:u6e,findNext:p6e,findPrevious:d6e,isTabbableIndex:j0e},Symbol.toStringTag,{value:"Module"}));function Ty(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function DR(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?Ty(n):null}function P0e(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function cB(e){return e?.nodeName==="INPUT"}function Ru(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return cB(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function b6e(e){if(!cB(e)&&!Ru(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function h6e(e){return P0e(e)||!!e.activeElement&&b6e(e.activeElement)}function m6e(e){return!!e.activeElement&&(cB(e.activeElement)||Ru(e.activeElement)||P0e(e))}function Q4(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function Sr(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=Q4(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=Q4(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:Sr(e.parentNode,t)}}function Mx(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function M6e(e){if(Mx(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return lF(s,e,"firstChild")&&lF(i,e,"lastChild")&&c===0&&l===u}function lF(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function I0e(e){if(!e)return!1;const{tagName:t}=e;return Mx(e)||t==="BUTTON"||t==="SELECT"}function lB(e){return Q4(e).direction==="rtl"}function g6e(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function z6e(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function O6e(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function D0e(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=Q4(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=O6e(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function $0e(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function F0e(e,t,n=!1){if(Mx(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=z6e(s),u=s.isCollapsed;u||c.collapse(!l);const d=Ty(c),p=Ty(i);if(!d||!p)return!1;const f=g6e(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=lB(e)?!t:t,h=e.getBoundingClientRect(),M=b?h.left+1:h.right-1,O=t?h.top+1:h.bottom-1,y=$0e(e,t,()=>D0e(o,M,O,e));if(!y)return!1;const _=Ty(y);if(!_)return!1;const v=t?"top":"bottom",g=b?"left":"right",A=_[v]-p[v],x=_[g]-d[g],w=Math.abs(A)<=1,k=Math.abs(x)<=1;return n?w:w&&k}function _6(e,t){return F0e(e,t)}function uF(e,t){return F0e(e,t,!0)}function A6e(e,t,n){const{ownerDocument:o}=e,r=lB(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return D0e(o,n,i,e)}function V0e(e,t,n){if(!e)return;if(e.focus(),Mx(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}if(!e.isContentEditable)return;const o=$0e(e,t,()=>A6e(e,t,n));if(!o)return;const{ownerDocument:r}=e,{defaultView:s}=r,i=s.getSelection();i.removeAllRanges(),i.addRange(o)}function H0e(e,t){return V0e(e,t,void 0)}function y6e(e,t,n){return V0e(e,t,n?.left)}function U0e(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function qp(e){e.parentNode,e.parentNode.removeChild(e)}function v6e(e,t){e.parentNode,U0e(t,e.parentNode),qp(e)}function RM(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function dF(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function _m(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function gx(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")qp(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function Wr(e){e=gx(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function J4(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(J4):!0;default:return!0}}const WM={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},x6e=["#text","br"];Object.keys(WM).filter(e=>!x6e.includes(e)).forEach(e=>{const{[e]:t,...n}=WM;WM[e].children=n});const _6e={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},FO={...WM,..._6e};function zx(e){if(e!=="paste")return FO;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...FO,ins:{children:FO.ins.children},del:{children:FO.del.children}};return l}function Vb(e){const t=e.nodeName.toLowerCase();return zx().hasOwnProperty(t)||t==="span"}function X0e(e){const t=e.nodeName.toLowerCase();return WM.hasOwnProperty(t)||t==="span"}function w6e(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const k6e=()=>{};function sM(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(w6e(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&J4(r)){qp(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):k6e);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(sM(r.childNodes,t,n,o),RM(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&Vb(r)?(sM(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!Vb(p))&&RM(r)):sM(r.childNodes,t,l,o);else for(;r.firstChild;)qp(r.firstChild)}}}else sM(r.childNodes,t,n,o),o&&!Vb(r)&&r.nextElementSibling&&U0e(t.createElement("br"),r),RM(r)})}function $R(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,sM(o.body.childNodes,o,t,n),o.body.innerHTML}function ev(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const Ln={focusable:s6e,tabbable:f6e};function Lt(e,t){const n=z.useRef();return z.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function uB(){return Lt(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=Ln.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var G0e={exports:{}};/*! +`+n.toString()),e}}var XR,q0e,eM,S0e;XR={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};q0e=["(","?"];eM={")":["("],":":["?","?:"]};S0e=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function kwe(e){for(var t=[],n=[],o,r,s,i;o=e.match(S0e);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(eM[r]){if(eM[r][0]===i){r=eM[r][1]||r;break}}else if(q0e.indexOf(i)>=0||XR[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Swe(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new uB({}),r=new Set,s=()=>{r.forEach(g=>g())},i=g=>(r.add(g),()=>r.delete(g)),c=(g="default")=>o.data[g],l=(g,A="default")=>{o.data[A]={...o.data[A],...g},o.data[A][""]={...JF[""],...o.data[A]?.[""]},delete o.pluralForms[A]},u=(g,A)=>{l(g,A),s()},d=(g,A="default")=>{o.data[A]={...o.data[A],...g,"":{...JF[""],...o.data[A]?.[""],...g?.[""]}},delete o.pluralForms[A],s()},p=(g,A)=>{o.data={},o.pluralForms={},u(g,A)},f=(g="default",A,_,w,k)=>(o.data[g]||l(void 0,g),o.dcnpgettext(g,A,_,w,k)),b=(g="default")=>g,h=(g,A)=>{let _=f(A,void 0,g);return n?(_=n.applyFilters("i18n.gettext",_,g,A),n.applyFilters("i18n.gettext_"+b(A),_,g,A)):_},M=(g,A,_)=>{let w=f(_,A,g);return n?(w=n.applyFilters("i18n.gettext_with_context",w,g,A,_),n.applyFilters("i18n.gettext_with_context_"+b(_),w,g,A,_)):w},z=(g,A,_,w)=>{let k=f(w,void 0,g,A,_);return n?(k=n.applyFilters("i18n.ngettext",k,g,A,_,w),n.applyFilters("i18n.ngettext_"+b(w),k,g,A,_,w)):k},y=(g,A,_,w,k)=>{let q=f(k,w,g,A,_);return n?(q=n.applyFilters("i18n.ngettext_with_context",q,g,A,_,w,k),n.applyFilters("i18n.ngettext_with_context_"+b(k),q,g,A,_,w,k)):q},x=()=>M("ltr","text direction")==="rtl",v=(g,A,_)=>{const w=A?A+""+g:g;let k=!!o.data?.[_??"default"]?.[w];return n&&(k=n.applyFilters("i18n.has_translation",k,g,A,_),k=n.applyFilters("i18n.has_translation_"+b(_),k,g,A,_)),k};if(n){const g=A=>{Twe.test(A)&&s()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:M,_n:z,_nx:y,isRTL:x,hasTranslation:v}};function C0e(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function dB(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function e$(e,t){return function(o,r,s,i=10){const c=e[t];if(!dB(o)||!C0e(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function XO(e,t,n=!1){return function(r,s){const i=e[t];if(!dB(r)||!n&&!C0e(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function t$(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function n$(e,t,n=!1){return function(r,...s){const i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;const c=i[r].handlers;if(!c||!c.length)return n?s[0]:void 0;const l={name:r,currentIndex:0};for(i.__current.push(l);l.currentIndex"u"?typeof r.__current[0]<"u":r.__current[0]?o===r.__current[0].name:!1}}function s$(e,t){return function(o){const r=e[t];if(dB(o))return r[o]&&r[o].runs?r[o].runs:0}}class Bwe{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=e$(this,"actions"),this.addFilter=e$(this,"filters"),this.removeAction=XO(this,"actions"),this.removeFilter=XO(this,"filters"),this.hasAction=t$(this,"actions"),this.hasFilter=t$(this,"filters"),this.removeAllActions=XO(this,"actions",!0),this.removeAllFilters=XO(this,"filters",!0),this.doAction=n$(this,"actions"),this.applyFilters=n$(this,"filters",!0),this.currentAction=o$(this,"actions"),this.currentFilter=o$(this,"filters"),this.doingAction=r$(this,"actions"),this.doingFilter=r$(this,"filters"),this.didAction=s$(this,"actions"),this.didFilter=s$(this,"filters")}}function R0e(){return new Bwe}const W0e=R0e(),{addAction:i$,addFilter:r0,removeAction:a$,removeFilter:c$,hasAction:If0,hasFilter:T0e,removeAllActions:Df0,removeAllFilters:Ff0,doAction:E0e,applyFilters:_n,currentAction:$f0,currentFilter:Vf0,doingAction:Hf0,doingFilter:Uf0,didAction:Xf0,didFilter:Gf0,actions:Kf0,filters:Yf0}=W0e,A1=Ewe(void 0,void 0,W0e);A1.getLocaleData.bind(A1);A1.setLocaleData.bind(A1);A1.resetLocaleData.bind(A1);A1.subscribe.bind(A1);const m=A1.__.bind(A1),Oe=A1._x.bind(A1),a0=A1._n.bind(A1);A1._nx.bind(A1);const ft=A1.isRTL.bind(A1);A1.hasTranslation.bind(A1);function Nwe(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const B0e=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},Lwe=e=>(t,n)=>B0e(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function nf(e){try{return new URL(e),!0}catch{return!1}}const jwe=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function N0e(e){return jwe.test(e)}function zx(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function pB(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function fB(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function Pwe(e){return e?/^[^\s#?]+$/.test(e):!1}function of(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function Iwe(e){return e?/^[^\s#?]+$/.test(e):!1}function bB(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function Ox(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function Dwe(e){return e?/^[^\s#?\/]+$/.test(e):!1}function Fwe(e){const t=of(e),n=bB(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function $we(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function GR(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function zg(e){try{return decodeURIComponent(e)}catch{return e}}function Vwe(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(zg);if(o){const s=o.replace(/\]/g,"").split("[");Vwe(t,s,r)}return t},Object.create(null))}function wt(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(Ax(e),t),n=n.substr(0,o)),n+"?"+Ox(t)}function KR(e,t){return Ax(e)[t]}function l$(e,t){return KR(e,t)!==void 0}function rv(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=Ax(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=Ox(o);return s?r+"?"+s:r}const Hwe=/^(?:[a-z]+:|#|\?|\.|\/)/i;function rf(e){return e&&(e=e.trim(),!Hwe.test(e)&&!N0e(e)?"http://"+e:e)}function Iz(e){try{return decodeURI(e)}catch{return e}}function Dz(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var yx={exports:{}},L0e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},j0e=Object.keys(L0e).join("|"),Uwe=new RegExp(j0e,"g"),Xwe=new RegExp(j0e,"");function Gwe(e){return L0e[e]}var P0e=function(e){return e.replace(Uwe,Gwe)},Kwe=function(e){return!!e.match(Xwe)};yx.exports=P0e;yx.exports.has=Kwe;yx.exports.remove=P0e;var Ywe=yx.exports;const Xs=yo(Ywe);function hB(e){return e?Xs(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function Fz(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function u$(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function Zwe(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[u$(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=Ax(n.url);typeof l=="string"&&(s=wt(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=u$(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],d$(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],d$(l,!!r)}return o(n)}}function d$(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const Qwe=({path:e,url:t,...n},o)=>({...n,url:t&&wt(t,o),path:e&&wt(e,o)}),p$=e=>e.json?e.json():Promise.reject(e),Jwe=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},f$=e=>{const{next:t}=Jwe(e.headers.get("link"));return t},eke=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},I0e=async(e,t)=>{if(e.parse===!1||!eke(e))return t(e);const n=await ct({...Qwe(e,{per_page:100}),parse:!1}),o=await p$(n);if(!Array.isArray(o))return o;let r=f$(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await ct({...e,path:void 0,url:r,parse:!1}),c=await p$(i);s=s.concat(c),r=f$(i)}return s},tke=new Set(["PATCH","PUT","DELETE"]),nke="GET",oke=(e,t)=>{const{method:n=nke}=e;return tke.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},rke=(e,t)=>(typeof e.url=="string"&&!l$(e.url,"_locale")&&(e.url=wt(e.url,{_locale:"user"})),typeof e.path=="string"&&!l$(e.path,"_locale")&&(e.path=wt(e.path,{_locale:"user"})),t(e)),ske=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,ike=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},D0e=(e,t=!0)=>Promise.resolve(ske(e,t)).catch(n=>mB(n,t));function mB(e,t=!0){if(!t)throw e;return ike(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function ake(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const cke=(e,t)=>{if(!ake(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{if(!s.headers)return Promise.reject(s);const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):mB(s,e.parse)}).then(s=>D0e(s,e.parse))},lke=e=>(t,n)=>{if(typeof t.url=="string"){const o=KR(t.url,"wp_theme_preview");o===void 0?t.url=wt(t.url,{wp_theme_preview:e}):o===""&&(t.url=rv(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=KR(t.path,"wp_theme_preview");o===void 0?t.path=wt(t.path,{wp_theme_preview:e}):o===""&&(t.path=rv(t.path,"wp_theme_preview"))}return n(t)},uke={Accept:"application/json, */*;q=0.1"},dke={credentials:"include"},F0e=[rke,B0e,oke,I0e];function pke(e){F0e.unshift(e)}const $0e=e=>{if(e.status>=200&&e.status<300)return e;throw e},fke=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...uke,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...dke,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then($0e).catch(d=>mB(d,r)).then(d=>D0e(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let V0e=fke;function bke(e){V0e=e}function ct(e){return F0e.reduceRight((n,o)=>r=>o(r,n),V0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(ct.nonceEndpoint).then($0e).then(o=>o.text()).then(o=>(ct.nonceMiddleware.nonce=o,ct(e))))}ct.use=pke;ct.setFetchHandler=bke;ct.createNonceMiddleware=Nwe;ct.createPreloadingMiddleware=Zwe;ct.createRootURLMiddleware=Lwe;ct.fetchAllMiddleware=I0e;ct.mediaUploadMiddleware=cke;ct.createThemePreviewMiddleware=lke;const b$=Object.create(null);function Re(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in b$||(E0e("deprecated",e,t,h),console.warn(h),b$[h]=!0)}function Og(e){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Og(e)}function hke(e,t){if(Og(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Og(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mke(e){var t=hke(e,"string");return Og(t)=="symbol"?t:t+""}function Mke(e,t,n){return(t=mke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function m$(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($r(1));return n(H0e)(e,t)}if(typeof e!="function")throw new Error($r(2));var r=e,s=t,i=[],c=i,l=!1;function u(){c===i&&(c=i.slice())}function d(){if(l)throw new Error($r(3));return s}function p(M){if(typeof M!="function")throw new Error($r(4));if(l)throw new Error($r(5));var z=!0;return u(),c.push(M),function(){if(z){if(l)throw new Error($r(6));z=!1,u();var x=c.indexOf(M);c.splice(x,1),i=null}}}function f(M){if(!gke(M))throw new Error($r(7));if(typeof M.type>"u")throw new Error($r(8));if(l)throw new Error($r(9));try{l=!0,s=r(s,M)}finally{l=!1}for(var z=i=c,y=0;y1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&Qd(i)==="object"&&(s=s[1]),n.call(r,s,i,o)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),e}(),_ke=xke;const ia=yo(_ke);function wke(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var U0e={},cn={},vx={};Object.defineProperty(vx,"__esModule",{value:!0});var kke={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};vx.default=kke;Object.defineProperty(cn,"__esModule",{value:!0});cn.createChannel=cn.subscribe=cn.cps=cn.apply=cn.call=cn.invoke=cn.delay=cn.race=cn.join=cn.fork=cn.error=cn.all=void 0;var qke=vx,Xa=Ske(qke);function Ske(e){return e&&e.__esModule?e:{default:e}}cn.all=function(t){return{type:Xa.default.all,value:t}};cn.error=function(t){return{type:Xa.default.error,error:t}};cn.fork=function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r2?o-2:0),s=2;s1?n-1:0),r=1;r"u"?"undefined":Cke(t))==="object"&&!!t},all:function(t){return gr.obj(t)&&t.type===Rl.default.all},error:function(t){return gr.obj(t)&&t.type===Rl.default.error},array:Array.isArray,func:function(t){return typeof t=="function"},promise:function(t){return t&&gr.func(t.then)},iterator:function(t){return t&&gr.func(t.next)&&gr.func(t.throw)},fork:function(t){return gr.obj(t)&&t.type===Rl.default.fork},join:function(t){return gr.obj(t)&&t.type===Rl.default.join},race:function(t){return gr.obj(t)&&t.type===Rl.default.race},call:function(t){return gr.obj(t)&&t.type===Rl.default.call},cps:function(t){return gr.obj(t)&&t.type===Rl.default.cps},subscribe:function(t){return gr.obj(t)&&t.type===Rl.default.subscribe},channel:function(t){return gr.obj(t)&&gr.func(t.subscribe)}};ch.default=gr;Object.defineProperty(Gr,"__esModule",{value:!0});Gr.iterator=Gr.array=Gr.object=Gr.error=Gr.any=void 0;var Tke=ch,m2=Eke(Tke);function Eke(e){return e&&e.__esModule?e:{default:e}}var Bke=Gr.any=function(t,n,o,r){return r(t),!0},Nke=Gr.error=function(t,n,o,r,s){return m2.default.error(t)?(s(t.error),!0):!1},Lke=Gr.object=function(t,n,o,r,s){if(!m2.default.all(t)||!m2.default.obj(t.value))return!1;var i={},c=Object.keys(t.value),l=0,u=!1,d=function(b,h){u||(i[b]=h,l++,l===c.length&&r(i))},p=function(b,h){u||(u=!0,s(h))};return c.map(function(f){o(t.value[f],function(b){return d(f,b)},function(b){return p(f,b)})}),!0},jke=Gr.array=function(t,n,o,r,s){if(!m2.default.all(t)||!m2.default.array(t.value))return!1;var i=[],c=0,l=!1,u=function(f,b){l||(i[f]=b,c++,c===t.value.length&&r(i))},d=function(f,b){l||(l=!0,s(b))};return t.value.map(function(p,f){o(p,function(b){return u(f,b)},function(b){return d(f,b)})}),!0},Pke=Gr.iterator=function(t,n,o,r,s){return m2.default.iterator(t)?(o(t,n,s),!0):!1};Gr.default=[Nke,Pke,jke,Lke,Bke];Object.defineProperty(MB,"__esModule",{value:!0});var Ike=Gr,Dke=X0e(Ike),Fke=ch,$ke=X0e(Fke);function X0e(e){return e&&e.__esModule?e:{default:e}}function O$(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t(c,l,u,d,p)=>{if(!i6e(c,s))return!1;const f=i(c);return Y0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>ZR(s)?(t(s),i(),!0):!1;n.push(o);const r=U0e.create(n);return s=>new Promise((i,c)=>r(s,l=>{ZR(l)&&t(l),i(l)},c))}function c6e(e={}){return t=>{const n=a6e(e,t.dispatch);return o=>r=>wke(r)?n(r):o(r)}}function Cn(e,t){return n=>{const o=e(n);return o.displayName=l6e(t,n),o}}const l6e=(e,t)=>{const n=t.displayName||t.name||"Component";return`${ov(e??"")}(${n})`},Pr=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(C){const T=o,W=r;return o=void 0,r=void 0,u=C,i=e.apply(W,T),i}function h(C,T){c=setTimeout(C,T)}function M(){c!==void 0&&clearTimeout(c)}function z(C){return u=C,h(g,t),d?b(C):i}function y(C){return C-(l||0)}function x(C){const T=y(C),W=C-u,B=t-T;return p?Math.min(B,s-W):B}function v(C){const T=y(C),W=C-u;return l===void 0||T>=t||T<0||p&&W>=s}function g(){const C=Date.now();if(v(C))return _(C);h(g,x(C))}function A(){c=void 0}function _(C){return A(),f&&o?b(C):(o=r=void 0,i)}function w(){M(),u=0,A(),o=l=r=void 0}function k(){return q()?_(Date.now()):i}function q(){return c!==void 0}function S(...C){const T=Date.now(),W=v(T);if(o=C,r=this,l=T,W){if(!q())return z(l);if(p)return h(g,t),b(l)}return q()||h(g,t),i}return S.cancel=w,S.flush=k,S.pending=q,S},zB=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Pr(e,t,{leading:o,trailing:r,maxWait:t})};function M2(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const Z0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},Jl=Z0e(),v0=Z0e(!0);function OB(e){return Cn(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function Q0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=p6e(e);return t?`${t}-${o}`:o},[e,n,t])}const f6e=Cn(e=>t=>{const n=He(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),b6e=Cn(e=>class extends O.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function h6e(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function J0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function m6e(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&J0e(n)}function xx(e,{sequential:t=!1}={}){const n=e.querySelectorAll(h6e(t));return Array.from(n).filter(o=>{if(!J0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?m6e(o):!0})}const M6e=Object.freeze(Object.defineProperty({__proto__:null,find:xx},Symbol.toStringTag,{value:"Module"}));function QR(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function ene(e){return QR(e)!==-1}function g6e(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function z6e(e,t){return{element:e,index:t}}function O6e(e){return e.element}function A6e(e,t){const n=QR(e.element),o=QR(t.element);return n===o?e.index-t.index:n-o}function AB(e){return e.filter(ene).map(z6e).sort(A6e).map(O6e).reduce(g6e(),[])}function y6e(e){return AB(xx(e))}function v6e(e){return AB(xx(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function x6e(e){return AB(xx(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const _6e=Object.freeze(Object.defineProperty({__proto__:null,find:y6e,findNext:x6e,findPrevious:v6e,isTabbableIndex:ene},Symbol.toStringTag,{value:"Module"}));function jy(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function JR(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?jy(n):null}function tne(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function yB(e){return e?.nodeName==="INPUT"}function Wu(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return yB(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function w6e(e){if(!yB(e)&&!Wu(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function k6e(e){return tne(e)||!!e.activeElement&&w6e(e.activeElement)}function q6e(e){return!!e.activeElement&&(yB(e.activeElement)||Wu(e.activeElement)||tne(e))}function sv(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function Cr(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=sv(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=sv(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:Cr(e.parentNode,t)}}function _x(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function S6e(e){if(_x(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return y$(s,e,"firstChild")&&y$(i,e,"lastChild")&&c===0&&l===u}function y$(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function nne(e){if(!e)return!1;const{tagName:t}=e;return _x(e)||t==="BUTTON"||t==="SELECT"}function vB(e){return sv(e).direction==="rtl"}function C6e(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function one(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function R6e(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function rne(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=sv(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=R6e(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function sne(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function ine(e,t,n=!1){if(_x(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=one(s),u=s.isCollapsed;u||c.collapse(!l);const d=jy(c),p=jy(i);if(!d||!p)return!1;const f=C6e(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=vB(e)?!t:t,h=e.getBoundingClientRect(),M=b?h.left+1:h.right-1,z=t?h.top+1:h.bottom-1,y=sne(e,t,()=>rne(o,M,z,e));if(!y)return!1;const x=jy(y);if(!x)return!1;const v=t?"top":"bottom",g=b?"left":"right",A=x[v]-p[v],_=x[g]-d[g],w=Math.abs(A)<=1,k=Math.abs(_)<=1;return n?w:w&&k}function B6(e,t){return ine(e,t)}function v$(e,t){return ine(e,t,!0)}function W6e(e,t,n){const{ownerDocument:o}=e,r=vB(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return rne(o,n,i,e)}function ane(e,t,n){if(!e)return;if(e.focus(),_x(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!e.isContentEditable){s.removeAllRanges();return}const i=sne(e,t,()=>W6e(e,t,n));i&&(s.removeAllRanges(),s.addRange(i))}function cne(e,t){return ane(e,t,void 0)}function T6e(e,t,n){return ane(e,t,n?.left)}function lne(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function wp(e){e.parentNode,e.parentNode.removeChild(e)}function E6e(e,t){e.parentNode,lne(t,e.parentNode),wp(e)}function SM(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function x$(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function Am(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function wx(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")wp(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function Wr(e){e=wx(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function iv(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(iv):!0;default:return!0}}const CM={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},B6e=["#text","br"];Object.keys(CM).filter(e=>!B6e.includes(e)).forEach(e=>{const{[e]:t,...n}=CM;CM[e].children=n});const N6e={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},GO={...CM,...N6e};function kx(e){if(e!=="paste")return GO;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...GO,ins:{children:GO.ins.children},del:{children:GO.del.children}};return l}function Fb(e){const t=e.nodeName.toLowerCase();return kx().hasOwnProperty(t)||t==="span"}function une(e){const t=e.nodeName.toLowerCase();return CM.hasOwnProperty(t)||t==="span"}function L6e(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const j6e=()=>{};function tM(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(L6e(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&iv(r)){wp(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):j6e);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(tM(r.childNodes,t,n,o),SM(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&Fb(r)?(tM(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!Fb(p))&&SM(r)):tM(r.childNodes,t,l,o);else for(;r.firstChild;)wp(r.firstChild)}}}else tM(r.childNodes,t,n,o),o&&!Fb(r)&&r.nextElementSibling&&lne(t.createElement("br"),r),SM(r)})}function e8(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,tM(o.body.childNodes,o,t,n),o.body.innerHTML}function av(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const Ln={focusable:M6e,tabbable:_6e};function Et(e,t){const n=O.useRef();return O.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function xB(){return Et(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=Ln.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var dne={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha - */(function(e,t){(function(o,r){e.exports=r()})(c0,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return X}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(H){try{return document.execCommand(H)}catch{return!1}}var M=function(Z){var oe=b()(Z);return h("cut"),oe},O=M;function y(H){var Z=document.documentElement.getAttribute("dir")==="rtl",oe=document.createElement("textarea");oe.style.fontSize="12pt",oe.style.border="0",oe.style.padding="0",oe.style.margin="0",oe.style.position="absolute",oe.style[Z?"right":"left"]="-9999px";var ee=window.pageYOffset||document.documentElement.scrollTop;return oe.style.top="".concat(ee,"px"),oe.setAttribute("readonly",""),oe.value=H,oe}var _=function(Z,oe){var ee=y(Z);oe.container.appendChild(ee);var K=b()(ee);return h("copy"),ee.remove(),K},v=function(Z){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ee="";return typeof Z=="string"?ee=_(Z,oe):Z instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Z?.type)?ee=_(Z.value,oe):(ee=b()(Z),h("copy")),ee},g=v;function A(H){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(oe){return typeof oe}:A=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},A(H)}var x=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.action,ee=oe===void 0?"copy":oe,K=Z.container,ne=Z.target,se=Z.text;if(ee!=="copy"&&ee!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ne!==void 0)if(ne&&A(ne)==="object"&&ne.nodeType===1){if(ee==="copy"&&ne.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ee==="cut"&&(ne.hasAttribute("readonly")||ne.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(se)return g(se,{container:K});if(ne)return ee==="cut"?O(ne):g(ne,{container:K})},w=x;function k(H){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(oe){return typeof oe}:k=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},k(H)}function q(H,Z){if(!(H instanceof Z))throw new TypeError("Cannot call a class as a function")}function S(H,Z){for(var oe=0;oe"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(H){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},I(H)}function P(H,Z){var oe="data-clipboard-".concat(H);if(Z.hasAttribute(oe))return Z.getAttribute(oe)}var U=function(H){T(oe,H);var Z=B(oe);function oe(ee,K){var ne;return q(this,oe),ne=Z.call(this),ne.resolveOptions(K),ne.listenClick(ee),ne}return C(oe,[{key:"resolveOptions",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof K.action=="function"?K.action:this.defaultAction,this.target=typeof K.target=="function"?K.target:this.defaultTarget,this.text=typeof K.text=="function"?K.text:this.defaultText,this.container=k(K.container)==="object"?K.container:document.body}},{key:"listenClick",value:function(K){var ne=this;this.listener=p()(K,"click",function(se){return ne.onClick(se)})}},{key:"onClick",value:function(K){var ne=K.delegateTarget||K.currentTarget,se=this.action(ne)||"copy",ae=w({action:se,container:this.container,target:this.target(ne),text:this.text(ne)});this.emit(ae?"success":"error",{action:se,text:ae,trigger:ne,clearSelection:function(){ne&&ne.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(K){return P("action",K)}},{key:"defaultTarget",value:function(K){var ne=P("target",K);if(ne)return document.querySelector(ne)}},{key:"defaultText",value:function(K){return P("text",K)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(K){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return g(K,ne)}},{key:"cut",value:function(K){return O(K)}},{key:"isSupported",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ne=typeof K=="string"?[K]:K,se=!!document.queryCommandSupported;return ne.forEach(function(ae){se=se&&!!document.queryCommandSupported(ae)}),se}}]),oe}(u()),X=U},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,M,O){var y=p.apply(this,arguments);return f.addEventListener(h,y,O),{destroy:function(){f.removeEventListener(h,y,O)}}}function d(f,b,h,M,O){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(y){return u(y,b,h,M,O)}))}function p(f,b,h,M){return function(O){O.delegateTarget=l(O.target,b),O.delegateTarget&&M.call(f,O)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,M,O){if(!h&&!M&&!O)throw new Error("Missing required arguments");if(!l.string(M))throw new TypeError("Second argument must be a String");if(!l.fn(O))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,M,O);if(l.nodeList(h))return f(h,M,O);if(l.string(h))return b(h,M,O);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,M,O){return h.addEventListener(M,O),{destroy:function(){h.removeEventListener(M,O)}}}function f(h,M,O){return Array.prototype.forEach.call(h,function(y){y.addEventListener(M,O)}),{destroy:function(){Array.prototype.forEach.call(h,function(y){y.removeEventListener(M,O)})}}}function b(h,M,O){return u(document.body,h,M,O)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{const s=new S6e(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function Ca(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const qi=8,Sp=9,O1=13,Ra=27,Ox=32,C6e=33,R6e=34,yg=35,Hb=36,Ns=37,vi=38,Ls=39,Vo=40,ya=46,W6e=121,ui="alt",ia="ctrl",tp="meta",di="shift";function K0e(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function Fz(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const Ax={primary:e=>e()?[tp]:[ia],primaryShift:e=>e()?[di,tp]:[ia,di],primaryAlt:e=>e()?[ui,tp]:[ia,ui],secondary:e=>e()?[di,ui,tp]:[ia,di,ui],access:e=>e()?[ia,ui]:[di,ui],ctrl:()=>[ia],alt:()=>[ui],ctrlShift:()=>[ia,di],shift:()=>[di],shiftAlt:()=>[di,ui],undefined:()=>[]},T6e=Fz(Ax,e=>(t,n=Ca)=>[...e(n),t.toLowerCase()].join("+")),Y0e=Fz(Ax,e=>(t,n=Ca)=>{const o=n(),r={[ui]:o?"⌥":"Alt",[ia]:o?"⌃":"Ctrl",[tp]:"⌘",[di]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),K0e(t)]}),or=Fz(Y0e,e=>(t,n=Ca)=>e(t,n).join("")),Z0e=Fz(Ax,e=>(t,n=Ca)=>{const o=n(),r={[di]:"Shift",[tp]:o?"Command":"Control",[ia]:"Control",[ui]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return K0e((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function E6e(e){return[ui,ia,tp,di].filter(t=>e[`${t}Key`])}const Fs=Fz(Ax,e=>(t,n,o=Ca)=>{const r=e(o),s=E6e(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function yx(e="firstElement"){const t=z.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=z.useRef();return z.useEffect(()=>{t.current=e},[e]),Lt(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current==="firstElement"){o.current=setTimeout(()=>{const i=Ln.tabbable.find(r)[0];i&&n(i)},0);return}return n(r),()=>{o.current&&clearTimeout(o.current)}}},[])}let VO=null;function dB(e){const t=z.useRef(null),n=z.useRef(null),o=z.useRef(e);return z.useEffect(()=>{o.current=e},[e]),z.useCallback(r=>{if(r){if(t.current=r,n.current)return;n.current=r.ownerDocument.activeElement}else if(n.current){const i=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!i){var s;(s=VO)!==null&&s!==void 0||(VO=n.current);return}o.current?o.current():(n.current.isConnected?n.current:VO)?.focus(),VO=null}},[])}const B6e=["button","submit"];function N6e(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return B6e.includes(e.type)}return!1}function Q0e(e){const t=z.useRef(e);z.useEffect(()=>{t.current=e},[e]);const n=z.useRef(!1),o=z.useRef(),r=z.useCallback(()=>{clearTimeout(o.current)},[]);z.useEffect(()=>()=>r(),[]),z.useEffect(()=>{e||r()},[e,r]);const s=z.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:N6e(u)&&(n.current=!0)},[]),i=z.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function HO(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Kt(e){const t=z.useRef(),n=z.useRef(!1),o=z.useRef(!1),r=z.useRef([]),s=z.useRef(e);return s.current=e,z.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(HO(l,null),HO(i,t.current))}),r.current=e},e),z.useLayoutEffect(()=>{o.current=!1}),z.useCallback(i=>{HO(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)HO(l,i)},[])}function J0e(e){const t=z.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;z.useEffect(()=>{t.current=e},Object.values(e));const o=uB(),r=yx(e.focusOnMount),s=dB(),i=Q0e(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=z.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===Ra&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[Kt([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function pB({isDisabled:e=!1}={}){return Lt(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=Pr(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}const fB=typeof window<"u"?z.useLayoutEffect:z.useEffect;function ene({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=z.useState(!1),s=z.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});fB(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=z.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=z.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=z.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return z.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const fF=new Map;function L6e(e){if(!e)return null;let t=fF.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),fF.set(e,t),t):null)}function bB(e){const t=z.useMemo(()=>{const n=L6e(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return z.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function n1(e){const t=z.useRef();return z.useEffect(()=>{t.current=e},[e]),t.current}const Zs=()=>bB("(prefers-reduced-motion: reduce)");function j6e(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const bF=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:Jr(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:j6e(o[n].changes,t.changes)}:o.push(t),o};function P6e(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=bF(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!Jr(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=bF(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const hF={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},I6e={">=":"min-width","<":"max-width"},D6e={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=z.useContext(tne),o=!n&&`(${I6e[t]}: ${hF[e]}px)`,r=bB(o||void 0);return n?D6e[t](hF[e],n):r};m0.__experimentalWidthProvider=tne.Provider;function $6e(e,t){const n=z.useRef(null),o=z.useRef(null),r=z.useRef(),s=z.useCallback(()=>{let i=null;n.current?i=n.current:t&&(t instanceof HTMLElement?i=t:i=t.current),!(o.current&&o.current.element===i&&o.current.reporter===s)&&(r.current&&(r.current(),r.current=null),o.current={reporter:s,element:i},i&&(r.current=e(i)))},[t,e]);return z.useEffect(()=>{s()},[s]),z.useCallback(i=>{n.current=i,s()},[s])}const mF=(e,t,n)=>e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0;function F6e(e={}){const t=e.onResize,n=z.useRef(void 0);n.current=t;const o=e.round||Math.round,r=z.useRef(),[s,i]=z.useState({width:void 0,height:void 0}),c=z.useRef(!1);z.useEffect(()=>(c.current=!1,()=>{c.current=!0}),[]);const l=z.useRef({width:void 0,height:void 0}),u=$6e(z.useCallback(d=>((!r.current||r.current.box!==e.box||r.current.round!==o)&&(r.current={box:e.box,round:o,instance:new ResizeObserver(p=>{const f=p[0];let b="borderBoxSize";e.box==="border-box"?b="borderBoxSize":b=e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize";const h=mF(f,b,"inlineSize"),M=mF(f,b,"blockSize"),O=h?o(h):void 0,y=M?o(M):void 0;if(l.current.width!==O||l.current.height!==y){const _={width:O,height:y};l.current.width=O,l.current.height=y,n.current?n.current(_):c.current||i(_)}})}),r.current.instance.observe(d,{box:e.box}),()=>{r.current&&r.current.instance.unobserve(d)}),[e.box,o]),e.ref);return z.useMemo(()=>({ref:u,width:s.width,height:s.height}),[u,s?s.width:null,s?s.height:null])}function Wa(){const{ref:e,width:t,height:n}=F6e(),o=z.useMemo(()=>({width:t??null,height:n??null}),[t,n]);return[a.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1},"aria-hidden":"true",ref:e}),o]}var V6e={exports:{}};(function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof c0!=null?c0:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,M=0,O=0,y={get didTimeout(){return!1},timeRemaining:function(){var T=p-(Date.now()-M);return T<0?0:T}},_=v(function(){p=22,b=66,f=0});function v(T){var E,B,N=99,W=function(){var j=Date.now()-B;j9?o=setTimeout(w,n):(n=0,w()))}function q(){var T,E,B,N=p>9?9:1;if(M=Date.now(),d=!1,o=null,u>2||M-n-50N;E++)T=l.shift(),O++,T&&T(y);l.length?k():u=0}function S(T){return h++,l.push(T),k(),h}function C(T){var E=T-1-O;l[E]&&(l[E]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=S,s.cancelIdleCallback=C,s.document&&document.addEventListener&&(s.addEventListener("scroll",A,!0),s.addEventListener("resize",A),document.addEventListener("focus",A,!0),document.addEventListener("mouseover",A,!0),["click","keypress","touchstart","mousedown"].forEach(function(T){document.addEventListener(T,A,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(A).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(E){var B,N;if(s.requestIdleCallback=function(W,j){return j&&typeof j.timeout=="number"?E(W,j.timeout):E(W)},s.IdleCallbackDeadline&&(B=IdleCallbackDeadline.prototype)){if(N=Object.getOwnPropertyDescriptor(B,"timeRemaining"),!N||!N.configurable||!N.get)return;Object.defineProperty(B,"timeRemaining",{value:function(){return N.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:S,cancel:C}})})(V6e);function H6e(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const MF=H6e(),nne=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}MF(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,MF(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function U6e(e,t){const n=[];for(let o=0;o{let s=U6e(e,o);s.length{Rr.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function X6e(e,t){if(e.length!==t.length)return!1;for(var n=0;nPr(e,t??0,n),[e,t,n]);return z.useEffect(()=>()=>o.cancel(),[o]),o}function rne(e=""){const[t,n]=z.useState(e),[o,r]=z.useState(e),s=Ko(r,250);return z.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function FR(e,t,n){const o=one(()=>sB(e,t??0,n),[e,t,n]);return z.useEffect(()=>()=>o.cancel(),[o]),o}function If(e){const t=z.useRef();return t.current=e,t}function vx({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=If(n),u=If(o),d=If(r),p=If(s),f=If(i),b=If(c);return Lt(h=>{if(t)return;const M=e??h;let O=!1;const{ownerDocument:y}=M;function _(q){const{defaultView:S}=y;if(!q||!S||!(q instanceof S.HTMLElement)||!M.contains(q))return!1;let C=q;do if(C.dataset.isDropZone)return C===M;while(C=C.parentElement);return!1}function v(q){O||(O=!0,y.addEventListener("dragend",k),y.addEventListener("mousemove",k),u.current&&u.current(q))}function g(q){q.preventDefault(),!M.contains(q.relatedTarget)&&d.current&&d.current(q)}function A(q){!q.defaultPrevented&&b.current&&b.current(q),q.preventDefault()}function x(q){_(q.relatedTarget)||p.current&&p.current(q)}function w(q){q.defaultPrevented||(q.preventDefault(),q.dataTransfer&&q.dataTransfer.files.length,l.current&&l.current(q),k(q))}function k(q){O&&(O=!1,y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),f.current&&f.current(q))}return M.dataset.isDropZone="true",M.addEventListener("drop",w),M.addEventListener("dragenter",g),M.addEventListener("dragover",A),M.addEventListener("dragleave",x),y.addEventListener("dragenter",v),()=>{delete M.dataset.isDropZone,M.removeEventListener("drop",w),M.removeEventListener("dragenter",g),M.removeEventListener("dragover",A),M.removeEventListener("dragleave",x),y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),y.removeEventListener("dragenter",v)}},[t,e])}function sne(){return Lt(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const G6e=30;function K6e(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:G6e,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=z.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return z.useLayoutEffect(()=>{if(!c)return;const d=Sr(e.current),p=b=>{var h;if(!d)return;const M=Math.ceil(d.clientHeight/t),O=b?M:(h=o?.windowOverscan)!==null&&h!==void 0?h:M,y=Math.floor(d.scrollTop/t),_=Math.max(0,y-O),v=Math.min(n-1,y+M+O);u(g=>{const A={visibleItems:M,start:_,end:v,itemInView:x=>_<=x&&x<=v};return g.start!==A.start||g.end!==A.end||g.visibleItems!==A.visibleItems?A:g})};p(!0);const f=Pr(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),z.useLayoutEffect(()=>{if(!c)return;const d=Sr(e.current),p=f=>{switch(f.keyCode){case Hb:return d?.scrollTo({top:0});case yg:return d?.scrollTo({top:n*t});case C6e:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case R6e:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function ine(e,t){const[n,o]=z.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return z.useSyncExternalStore(n,o,o)}function ane(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function nt(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function w6(e){return e.isRegistryControl=!0,e}const Y6e="@@data/SELECT",Z6e="@@data/RESOLVE_SELECT",Q6e="@@data/DISPATCH",J6e={[Y6e]:w6(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[Z6e]:w6(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[Q6e]:w6(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},eqe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews"],gF=[];let VR;try{VR=!globalThis.IS_WORDPRESS_CORE}catch{VR=!0}const ur=(e,t)=>{if(!eqe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!VR&&gF.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return gF.push(t),{lock:tqe,unlock:nqe}};function tqe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");TM in e||(e[TM]={}),cne.set(e[TM],t)}function nqe(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(TM in e))throw new Error("Cannot unlock an object that was not locked before. ");return cne.get(e[TM])}const cne=new WeakMap,TM=Symbol("Private API ID"),{lock:iM,unlock:Df}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),oqe=()=>e=>t=>E0e(t)?t.then(n=>{if(n)return e(n)}):e(t),rqe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function sqe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const iqe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function Ll(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const aqe=iqe("selectorName")((e=new oa,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new oa(e);return n.set(Ll(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new oa(e);for(const o of t.args)n.set(Ll(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new oa(e);for(const o of t.args)n.set(Ll(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new oa(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(Ll(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new oa(e);return n.delete(Ll(t.args)),n}}return e}),cqe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return aqe(e,t)}return e};var k6={};function lqe(e){return[e]}function uqe(e){return!!e&&typeof e=="object"}function dqe(){var e={clear:function(){e.head=null}};return e}function zF(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const zqe=ot(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),Oqe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:zqe,getCachedResolvers:Mqe,getIsResolving:pqe,getResolutionError:hqe,getResolutionState:cf,hasFinishedResolution:fqe,hasResolutionFailed:bqe,hasResolvingSelectors:gqe,hasStartedResolution:lne,isResolving:mqe},Symbol.toStringTag,{value:"Module"}));function une(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function dne(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function pne(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function Aqe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function yqe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function vqe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function xqe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function _qe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function wqe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const kqe=Object.freeze(Object.defineProperty({__proto__:null,failResolution:pne,failResolutions:vqe,finishResolution:dne,finishResolutions:yqe,invalidateResolution:xqe,invalidateResolutionForStore:_qe,invalidateResolutionForStoreSelector:wqe,startResolution:une,startResolutions:Aqe},Symbol.toStringTag,{value:"Module"})),q6=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},Ql=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),qqe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function Sqe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(q6(n))},clear(t,n){e[t]&&e[t].delete(q6(n))},markAsRunning(t,n){e[t]||(e[t]=new oa),e[t].set(q6(n),!0)}}}function OF(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function rr(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=Cqe(e,t,i,{registry:i,get dispatch(){return O},get select(){return w},get resolveSelect(){return T()}});iM(d,r);const p=Sqe();function f(W){return(...j)=>Promise.resolve(d.dispatch(W(...j)))}const b={...Ql(kqe,f),...Ql(t.actions,f)},h=OF(f),M=new Proxy(()=>{},{get:(W,j)=>{const I=n[j];return I?h.get(I,j):b[j]}}),O=new Proxy(M,{apply:(W,j,[I])=>d.dispatch(I)});iM(b,M);const y=t.resolvers?Tqe(t.resolvers):{};function _(W,j){W.isRegistrySelector&&(W.registry=i);const I=(...U)=>{U=HR(W,U);const X=d.__unstableOriginalGetState();return W.isRegistrySelector&&(W.registry=i),W(X.root,...U)};I.__unstableNormalizeArgs=W.__unstableNormalizeArgs;const P=y[j];return P?Eqe(I,j,P,d,p):(I.hasResolver=!1,I)}function v(W){const j=(...I)=>{const P=d.__unstableOriginalGetState(),U=I&&I[0],X=I&&I[1],H=t?.selectors?.[U];return U&&H&&(I[1]=HR(H,X)),W(P.metadata,...I)};return j.hasResolver=!1,j}const g={...Ql(Oqe,v),...Ql(t.selectors,_)},A=OF(_);for(const[W,j]of Object.entries(o))A.get(j,W);const x=new Proxy(()=>{},{get:(W,j)=>{const I=o[j];return I?A.get(I,j):g[j]}}),w=new Proxy(x,{apply:(W,j,[I])=>I(d.__unstableOriginalGetState())});iM(g,x);const k=Rqe(g,d),q=Wqe(g,d),S=()=>g,C=()=>b,T=()=>k,E=()=>q;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const B=d&&(W=>(c.add(W),()=>c.delete(W)));let N=d.__unstableOriginalGetState();return d.subscribe(()=>{const W=d.__unstableOriginalGetState(),j=W!==N;if(N=W,j)for(const I of c)I()}),{reducer:l,store:d,actions:b,selectors:g,resolvers:y,getSelectors:S,getResolveSelectors:T,getSuspendSelectors:E,getActions:C,subscribe:B}}};return iM(s,r),s}function Cqe(e,t,n,o){const r={...t.controls,...J6e},s=Ql(r,p=>p.isRegistryControl?p(n):p),i=[rqe(n,e),oqe,Yke(s),sqe(o)],c=[cke(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:qqe}}));const{reducer:l,initialState:u}=t,d=ane({metadata:cqe,root:l});return S0e(d,{root:u},x0(c))}function Rqe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return Ql(f,(b,h)=>b.hasResolver?(...M)=>new Promise((O,y)=>{const _=()=>e.hasFinishedResolution(h,M),v=w=>{if(e.hasResolutionFailed(h,M)){const q=e.getResolutionError(h,M);y(q)}else O(w)},g=()=>b.apply(null,M),A=g();if(_())return v(A);const x=t.subscribe(()=>{_()&&(x(),v(g()))})}):async(...M)=>b.apply(null,M))}function Wqe(e,t){return Ql(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function Tqe(e){return Ql(e,t=>t.fulfill?t:{...t,fulfill:t})}function Eqe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();lne(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(une(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(dne(t,c))}catch(d){o.dispatch(pne(t,c,d))}},0))}const i=(...c)=>(c=HR(e,c),s(c),e(...c));return i.hasResolver=!0,i}function HR(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const Bqe={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function AF(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function wm(e){return typeof e=="string"?e:e.name}function hB(e={},t=null){const n={},o=AF();let r=null;function s(){o.emit()}const i=(A,x)=>{if(!x)return o.subscribe(A);const w=wm(x),k=n[w];return k?k.subscribe(A):t?t.subscribe(A,x):o.subscribe(A)};function c(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getSelectors():t?.select(x)}function l(A,x){r=new Set;try{return A.call(this)}finally{x.current=Array.from(r),r=null}}function u(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getResolveSelectors():t&&t.resolveSelect(x)}function d(A){const x=wm(A);r?.add(x);const w=n[x];return w?w.getSuspendSelectors():t&&t.suspendSelect(x)}function p(A){const x=wm(A),w=n[x];return w?w.getActions():t&&t.dispatch(x)}function f(A){return Object.fromEntries(Object.entries(A).map(([x,w])=>typeof w!="function"?[x,w]:[x,function(){return _[x].apply(null,arguments)}]))}function b(A,x){if(n[A])return console.error('Store "'+A+'" is already registered.'),n[A];const w=x();if(typeof w.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof w.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof w.subscribe!="function")throw new TypeError("store.subscribe must be a function");w.emitter=AF();const k=w.subscribe;if(w.subscribe=q=>{const S=w.emitter.subscribe(q),C=k(()=>{if(w.emitter.isPaused){w.emitter.emit();return}q()});return()=>{C?.(),S?.()}},n[A]=w,w.subscribe(s),t)try{Df(w.store).registerPrivateActions(Df(t).privateActionsOf(A)),Df(w.store).registerPrivateSelectors(Df(t).privateSelectorsOf(A))}catch{}return w}function h(A){b(A.name,()=>A.instantiate(_))}function M(A,x){Ce("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(A,()=>x)}function O(A,x){if(!x.reducer)throw new TypeError("Must specify store reducer");return b(A,()=>rr(A,x).instantiate(_)).store}function y(A){if(o.isPaused){A();return}o.pause(),Object.values(n).forEach(x=>x.emitter.pause());try{A()}finally{o.resume(),Object.values(n).forEach(x=>x.emitter.resume())}}let _={batch:y,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:M,registerStore:O,__unstableMarkListeningStores:l};function v(A,x){if(A)return _={..._,...A(_,x)},_}_.register(Bqe);for(const[A,x]of Object.entries(e))_.register(rr(A,x));t&&t.subscribe(s);const g=f(_);return iM(g,{privateActionsOf:A=>{try{return Df(n[A].store).privateActions}catch{return{}}},privateSelectorsOf:A=>{try{return Df(n[A].store).privateSelectors}catch{return{}}}}),g}const Ha=hB();var Nqe=function(t){return Lqe(t)&&!jqe(t)};function Lqe(e){return!!e&&typeof e=="object"}function jqe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Dqe(e)}var Pqe=typeof Symbol=="function"&&Symbol.for,Iqe=Pqe?Symbol.for("react.element"):60103;function Dqe(e){return e.$$typeof===Iqe}function $qe(e){return Array.isArray(e)?[]:{}}function vg(e,t){return t.clone!==!1&&t.isMergeableObject(e)?O2($qe(e),e,t):e}function Fqe(e,t,n){return e.concat(t).map(function(o){return vg(o,n)})}function Vqe(e,t){if(!t.customMerge)return O2;var n=t.customMerge(e);return typeof n=="function"?n:O2}function Hqe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function yF(e){return Object.keys(e).concat(Hqe(e))}function fne(e,t){try{return t in e}catch{return!1}}function Uqe(e,t){return fne(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Xqe(e,t,n){var o={};return n.isMergeableObject(e)&&yF(e).forEach(function(r){o[r]=vg(e[r],n)}),yF(t).forEach(function(r){Uqe(e,r)||(fne(e,r)&&n.isMergeableObject(t[r])?o[r]=Vqe(r,n)(e[r],t[r],n):o[r]=vg(t[r],n))}),o}function O2(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Fqe,n.isMergeableObject=n.isMergeableObject||Nqe,n.cloneUnlessOtherwiseSpecified=vg;var o=Array.isArray(t),r=Array.isArray(e),s=o===r;return s?o?n.arrayMerge(e,t,n):Xqe(e,t,n):vg(t,n)}O2.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,r){return O2(o,r,n)},{})};var Gqe=O2,Kqe=Gqe;const bne=Ao(Kqe),hne=z.createContext(Ha),{Consumer:qb0,Provider:mne}=hne;function O0(){return z.useContext(hne)}const Mne=z.createContext(!1),{Consumer:Sb0,Provider:Yqe}=Mne,xx=Yqe;function Zqe(){return z.useContext(Mne)}const S6=nne();function Qqe(e,t){const n=e.select,o={};let r,s,i=!1,c,l;const u=new Map;function d(f){var b;return(b=e.stores[f]?.store?.getState?.())!==null&&b!==void 0?b:{}}const p=f=>{const b=[...f],h=new Set;function M(y){if(i)for(const x of b)u.get(x)!==d(x)&&(i=!1);u.clear();const _=()=>{i=!1,y()},v=()=>{c?S6.add(o,_):_()},g=[];function A(x){g.push(e.subscribe(v,x))}for(const x of b)A(x);return h.add(A),()=>{h.delete(A);for(const x of g.values())x?.();S6.cancel(o)}}function O(y){for(const _ of y)if(!b.includes(_)){b.push(_);for(const v of h)v(_)}}return{subscribe:M,updateStores:O}};return(f,b)=>{function h(){if(i&&f===r)return s;const O={current:null},y=e.__unstableMarkListeningStores(()=>f(n,e),O);if(l)l.updateStores(O.current);else{for(const _ of O.current)u.set(_,d(_));l=p(O.current)}Jr(s,y)||(s=y),r=f,i=!0}function M(){return h(),s}return c&&!b&&(i=!1,S6.cancel(o)),h(),c=b,{subscribe:l.subscribe,getValue:M}}}function Jqe(e){return O0().select(e)}function eSe(e,t,n){const o=O0(),r=Zqe(),s=z.useMemo(()=>Qqe(o),[o,e]),i=z.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=z.useSyncExternalStore(c,l,l);return z.useDebugValue(u),u}function D(e,t){const n=typeof e!="function",o=z.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?Jqe(e):eSe(!1,e,t)}const Yo=e=>Rn(t=>Jke(n=>{const r=D((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),ie=e=>{const{dispatch:t}=O0();return e===void 0?t:t(e)},tSe=(e,t)=>{const n=O0(),o=z.useRef(e);return fB(()=>{o.current=e}),z.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Ii=e=>Rn(t=>n=>{const r=tSe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function sr(e){return Ha.dispatch(e)}function U0(e){return Ha.select(e)}const go=ane,nSe=Ha.resolveSelect;Ha.suspendSelect;Ha.subscribe;Ha.registerGenericStore;const oSe=Ha.registerStore;Ha.use;const Qs=Ha.register;var rSe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const G1=Ao(rSe);function sSe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)G1(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Wu(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const gne=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,mB=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},vF=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},zne=e=>t=>(n,o)=>t(n,e(o));function iSe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function aSe(e,t){return(e.rawAttributes||[]).includes(t)}function _x(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function cSe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function lSe(e){return/^\s*\d+\s*$/.test(e)}const Ey=["create","read","update","delete"];function One(e){const t={},n=e.headers?.get("allow")||"",o={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[r,s]of Object.entries(o))t[r]=n.includes(s);return t}function MB(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}function Ane(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function uSe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function dSe(e,t={},n,o){return{...Ane(e,n,o),query:t}}function pSe(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{_=_?.[v]}),_x(M,y,_)}}else{if(!e.itemIsComplete[c]?.[b])return null;M=h}p.push(M)}return p}const yne=ot((e,t={})=>{let n=xF.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new oa,xF.set(e,n);const o=fSe(e,t);return n.set(t,o),o});function vne(e,t={}){var n;const{stableKey:o,context:r}=fh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function bSe(e,t={}){var n;const{stableKey:o,context:r}=fh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function hSe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const mSe=go({formatTypes:hSe}),gB=ot(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function MSe(e,t){return e.formatTypes[t]}function gSe(e,t){const n=gB(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function zSe(e,t){return gB(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const OSe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:MSe,getFormatTypeForBareElement:gSe,getFormatTypeForClassName:zSe,getFormatTypes:gB},Symbol.toStringTag,{value:"Module"}));function ASe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function ySe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const vSe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:ASe,removeFormatTypes:ySe},Symbol.toStringTag,{value:"Module"})),xSe="core/rich-text",yc=rr(xSe,{reducer:mSe,selectors:OSe,actions:vSe});Qs(yc);function tv(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];tv(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function _F(e,t,n){return e=e.slice(),e[t]=n,e}function xi(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=_F(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=_F(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function vc({implementation:e},t){return vc.body||(vc.body=e.createHTMLDocument("").body),vc.body.innerHTML=t,vc.body}const gu="",xne="\uFEFF";function zB(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthtv(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function _ne(e){return U0(yc).getFormatType(e)}function wF(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function UO({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=_ne(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:wF(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:wF(l,i)}}function _Se(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function wne({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:M,text:O,start:y,end:_}=e,v=h.length+1,g=n(),A=zB(e),x=A[A.length-1];let w,k;o(g,"");for(let q=0;q{if(E&&w&&_Se(T,w,N)){E=r(E);return}const{type:W,tagName:j,attributes:I,unregisteredAttributes:P}=B,U=f&&B===x,X=s(E),H=o(X,UO({type:W,tagName:j,attributes:I,unregisteredAttributes:P,boundaryClass:U,isEditableTree:f}));i(E)&&c(E).length===0&&l(E),E=o(H,"")}),q===0&&(d&&y===0&&d(g,E),p&&_===0&&p(g,E)),S===gu){const B=M[q];if(!B)continue;const{type:N,attributes:W,innerHTML:j}=B,I=_ne(N);!f&&N==="script"?(E=o(s(E),UO({type:"script",isEditableTree:f})),o(E,{html:decodeURIComponent(W["data-rich-text-script"])})):I?.contentEditable===!1?(E=o(s(E),UO({...B,isEditableTree:f,boundaryClass:y===q&&_===q+1})),j&&o(E,{html:j})):E=o(s(E),UO({...B,object:!0,isEditableTree:f})),E=o(s(E),"")}else!t&&S===` -`?(E=o(s(E),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),E=o(s(E),"")):i(E)?u(E,S):E=o(s(E),S);d&&y===q+1&&d(g,E),p&&_===q+1&&p(g,E),C&&q===O.length&&(o(s(E),xne),b&&O.length===0&&o(s(E),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),w=T,k=S}return g}function S1({value:e,preserveWhiteSpace:t}){const n=wne({value:e,preserveWhiteSpace:t,createEmpty:wSe,append:qSe,getLastChild:kSe,getParent:CSe,isText:RSe,getText:WSe,remove:TSe,appendText:SSe});return kne(n.children)}function wSe(){return{}}function kSe({children:e}){return e&&e[e.length-1]}function qSe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function SSe(e,t){e.text+=t}function CSe({parent:e}){return e}function RSe({text:e}){return typeof e=="string"}function WSe({text:e}){return e}function TSe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function ESe({type:e,attributes:t,object:n,children:o}){let r="";for(const s in t)l0e(s)&&(r+=` ${s}="${ux(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${kne(o)}`}function kne(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?ESe(t):Y_e(t.text)).join("")}function lp({text:e}){return e.replace(gu,"")}function Ud(){return{formats:[],replacements:[],text:""}}function BSe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=U0(yc).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=U0(yc).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class dn{#e;static empty(){return new dn}static fromPlainText(t){return new dn(b0({text:t}))}static fromHTMLString(t){return new dn(b0({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:qne(t),s=new dn(b0({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=Ud()){this.#e=t}toPlainText(){return lp(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||S1({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))dn.prototype.hasOwnProperty(e)||Object.defineProperty(dn.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function b0({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof dn?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=vc(document,n)),typeof e!="object"?Ud():Sne({element:e,range:o,isEditableTree:r}))}function Rd(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function NSe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function qne(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&qne(o,!1)}),n}const LSe="\r";function kF(e){return e.replace(new RegExp(`[${xne}${gu}${LSe}]`,"gu"),"")}function Sne({element:e,range:t,isEditableTree:n}){const o=Ud();if(!e)return o;if(!e.hasChildNodes())return Rd(o,e,t,Ud()),o;const r=e.childNodes.length;for(let i=0;in===t)}function ISe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==gu))return n[e]}function ld({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function UR({text:e}){return e.length===0}function DSe(e,t=""){return typeof t=="string"&&(t=b0({text:t})),bh(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function Cne(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(U0(yc).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=U0(yc).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=U0(yc).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return sr(yc).addFormatTypes(t),t}function ud(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)C6(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)C6(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function C6(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function H1(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=b0({text:t}));const c=n+t.text.length;return bh({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function Si(e,t,n){return H1(e,b0(),t,n)}function $Se({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),bh({formats:e,replacements:t,text:n,start:o,end:r})}function Rne(e,t,n,o){return H1(e,{formats:[,],replacements:[t],text:gu},n,o)}function A2(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function AB({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return FSe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function FSe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function Wne(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function XR(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=XR(o,t,n)),n}function qF(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function VSe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n){t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function HSe(e,t){e.appendData(t)}function USe({lastChild:e}){return e}function XSe({parentNode:e}){return e}function GSe(e){return e.nodeType===e.TEXT_NODE}function KSe({nodeValue:e}){return e}function YSe(e){return e.parentNode.removeChild(e)}function ZSe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:wne({value:e,createEmpty:()=>vc(r,""),append:VSe,getLastChild:USe,getParent:XSe,isText:GSe,getText:KSe,remove:YSe,appendText:HSe,onStartIndex(u,d){s=XR(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=XR(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function QSe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=ZSe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});Tne(s,t),e.start!==void 0&&!o&&JSe(i,t)}function Tne(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(Wne(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function eCe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function tCe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function SF(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function nCe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),CF===e&&(e+=" "),CF=e,e}function rCe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&tCe(),t===null&&SF("assertive"),n===null&&SF("polite")}eCe(rCe);function At(e,t){nCe(),e=oCe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function Ta(e,t){return OB(e,t.type)?(t.title&&At(le(m("%s removed."),t.title),"assertive"),ud(e,t.type)):(t.title&&At(le(m("%s applied."),t.title),"assertive"),xi(e,t))}function sCe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function iCe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function R6(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=sCe(i,e,t,n);return c||iCe(i,e)}function Vz({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=z.useState(()=>R6(e,n,o)),c=n1(r);return z.useLayoutEffect(()=>{if(!e)return;function l(){i(R6(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(R6(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const aCe="pre-wrap",cCe="1px";function lCe(){return z.useCallback(e=>{e&&(e.style.whiteSpace=aCe,e.style.minWidth=cCe)},[])}function uCe({record:e}){const t=z.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return z.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,M="rich-text-boundary-style";let O=l.getElementById(M);O||(O=l.createElement("style"),O.id=M,l.head.appendChild(O)),O.innerHTML!==h&&(O.innerHTML=h)},[n,s]),t}const dCe=e=>t=>{function n(r){const{record:s}=e.current,{ownerDocument:i}=t;if(ld(s.current)||!t.contains(i.activeElement))return;const c=A2(s.current),l=lp(c),u=S1({value:c});r.clipboardData.setData("text/plain",l),r.clipboardData.setData("text/html",u),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&i.execCommand("delete")}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},pCe=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},RF=[],fCe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==Ns&&r!==Ls)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:M,activeFormats:O=[]}=u.current,y=ld(u.current),{ownerDocument:_}=t,{defaultView:v}=_,{direction:g}=v.getComputedStyle(t),A=g==="rtl"?Ls:Ns,x=o.keyCode===A;if(y&&O.length===0&&(h===0&&x||M===f.length&&!x)||!y)return;const w=b[h-1]||RF,k=b[h]||RF,q=x?w:k,S=O.every((W,j)=>W===q[j]);let C=O.length;if(S?C{t.removeEventListener("keydown",n)}},bCe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==ya&&r!==qi)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(Si(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function hCe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(tv(l,i[u]))return i[u]}else if(c[u]&&tv(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const mCe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),WF=[],Ene="data-rich-text-placeholder";function MCe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(Ene)||t.collapseToStart()}const gCe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:M}=e.current;if(p&&(p.indexOf("format")===0||mCe.has(p))){b(f.current);return}const O=h(),{start:y,activeFormats:_=[]}=f.current,v=hCe({value:O,start:y,end:O.start,formats:_});M(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;if(n.activeElement!==t){n.removeEventListener("selectionchange",i);return}if(r)return;const{start:h,end:M,text:O}=f(),y=d.current;if(O!==y.text){s();return}if(h===y.start&&M===y.end){y.text.length===0&&h===0&&MCe(o);return}const _={...y,start:h,end:M,activeFormats:y._newActiveFormats,_newActiveFormats:void 0},v=zB(_,WF);_.activeFormats=v,d.current=_,p(_,{domOnly:!0}),b(h,M)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${Ene}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:WF},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u)}},zCe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!Wne(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}},OCe=[dCe,pCe,fCe,bCe,gCe,zCe];function ACe(e){const t=z.useRef(e);t.current=e;const n=z.useMemo(()=>OCe.map(o=>o(t)),[t]);return Lt(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function Bne({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=O0(),[,h]=z.useReducer(()=>({})),M=z.useRef();function O(){const{ownerDocument:{defaultView:S}}=M.current,C=S.getSelection(),T=C.rangeCount>0?C.getRangeAt(0):null;return b0({element:M.current,range:T,__unstableIsEditableTree:!0})}function y(S,{domOnly:C}={}){QSe({value:S,current:M.current,prepareEditableTree:f,__unstableDomOnly:C,placeholder:o})}const _=z.useRef(e),v=z.useRef();function g(){_.current=e,v.current=e,e instanceof dn||(v.current=e?dn.fromHTMLString(e,{preserveWhiteSpace:s}):dn.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const A=z.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(A.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(A.current=l,g());function x(S){if(v.current=S,y(S),c)_.current=S.text;else{const N=p?p(S):S.formats;S={...S,formats:N},typeof e=="string"?_.current=S1({value:S,preserveWhiteSpace:s}):_.current=new dn(S)}const{start:C,end:T,formats:E,text:B}=v.current;b.batch(()=>{r(C,T),i(_.current,{__unstableFormats:E,__unstableText:B})}),h()}function w(){g(),y(v.current)}const k=z.useRef(!1);z.useLayoutEffect(()=>{k.current&&e!==_.current&&(w(),h())},[e]),z.useLayoutEffect(()=>{A.current&&(M.current.ownerDocument.activeElement!==M.current&&M.current.focus(),y(v.current),A.current=!1)},[A.current]);const q=Kt([M,lCe(),uCe({record:v}),ACe({record:v,handleChange:x,applyRecord:y,createRecord:O,isSelected:l,onSelectionChange:r,forceRender:h}),Lt(()=>{w(),k.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:x,ref:q}}let XO;const yCe=new Uint8Array(16);function vCe(){if(!XO&&(XO=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!XO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return XO(yCe)}const no=[];for(let e=0;e<256;++e)no.push((e+256).toString(16).slice(1));function xCe(e,t=0){return no[e[t+0]]+no[e[t+1]]+no[e[t+2]]+no[e[t+3]]+"-"+no[e[t+4]]+no[e[t+5]]+"-"+no[e[t+6]]+no[e[t+7]]+"-"+no[e[t+8]]+no[e[t+9]]+"-"+no[e[t+10]]+no[e[t+11]]+no[e[t+12]]+no[e[t+13]]+no[e[t+14]]+no[e[t+15]]}const _Ce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TF={randomUUID:_Ce};function Uc(e,t,n){if(TF.randomUUID&&!t&&!e)return TF.randomUUID();e=e||{};const o=e.random||(e.rng||vCe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,xCe(o)}let W6=null;function wCe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function kCe(e){W6===null&&(W6=(await pt({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of wCe(e,W6)){const o=await pt({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function qCe(e=kCe){let t=0,n=[];const o=new SCe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class SCe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const fo="core",Cr=()=>new Map,GR=e=>{const t=Cr();return e.forEach((n,o)=>{t.set(o,n)}),t},Ho=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},CCe=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},RCe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},Tu=()=>new Set,T6=e=>e[e.length-1],WCe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Xc((this._observers.get(t)||Cr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Cr()}}class Hz{constructor(){this._observers=Cr()}on(t,n){Ho(this._observers,t,Tu).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Xc((this._observers.get(t)||Cr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Cr()}}const Ea=Math.floor,By=Math.abs,BCe=Math.log10,yB=(e,t)=>ee>t?e:t,Nne=e=>e!==0?e<0:1/e<0,EF=1,BF=2,E6=4,B6=8,xg=32,Rc=64,es=128,wx=31,KR=63,up=127,NCe=2147483647,Lne=Number.MAX_SAFE_INTEGER,LCe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Ea(e)===e),jCe=String.fromCharCode,PCe=e=>e.toLowerCase(),ICe=/^\s*/g,DCe=e=>e.replace(ICe,""),$Ce=/([A-Z])/g,NF=(e,t)=>DCe(e.replace($Ce,n=>`${t}${PCe(n)}`)),FCe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;r_g.encode(e),YR=_g?VCe:FCe;let EM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});EM&&EM.decode(new Uint8Array).length===1&&(EM=null);class Uz{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const P1=()=>new Uz,HCe=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(HCe(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},wg=B1,Wt=(e,t)=>{for(;t>up;)B1(e,es|up&t),t=Ea(t/128);B1(e,up&t)},vB=(e,t)=>{const n=Nne(t);for(n&&(t=-t),B1(e,(t>KR?es:0)|(n?Rc:0)|KR&t),t=Ea(t/64);t>0;)B1(e,(t>up?es:0)|up&t),t=Ea(t/128)},ZR=new Uint8Array(3e4),XCe=ZR.length/3,GCe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;Wt(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=yB(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(lf(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},Jn=(e,t)=>{Wt(e,t.byteLength),kx(e,t)},xB=(e,t)=>{UCe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},YCe=(e,t)=>xB(e,4).setFloat32(0,t,!1),ZCe=(e,t)=>xB(e,8).setFloat64(0,t,!1),QCe=(e,t)=>xB(e,8).setBigInt64(0,t,!1),LF=new DataView(new ArrayBuffer(4)),JCe=e=>(LF.setFloat32(0,e),LF.getFloat32(0)===e),y2=(e,t)=>{switch(typeof t){case"string":B1(e,119),va(e,t);break;case"number":LCe(t)&&By(t)<=NCe?(B1(e,125),vB(e,t)):JCe(t)?(B1(e,124),YCe(e,t)):(B1(e,123),ZCe(e,t));break;case"bigint":B1(e,122),QCe(e,t);break;case"object":if(t===null)B1(e,126);else if(TCe(t)){B1(e,117),Wt(e,t.length);for(let n=0;n0&&Wt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const PF=e=>{e.count>0&&(vB(e.encoder,e.count===1?e.s:-e.s),e.count>1&&Wt(e.encoder,e.count-2))};class Ny{constructor(){this.encoder=new Uz,this.s=0,this.count=0}write(t){this.s===t?this.count++:(PF(this),this.count=1,this.s=t)}toUint8Array(){return PF(this),Fn(this.encoder)}}const IF=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);vB(e.encoder,t),e.count>1&&Wt(e.encoder,e.count-2)}};class N6{constructor(){this.encoder=new Uz,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(IF(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return IF(this),Fn(this.encoder)}}class eRe{constructor(){this.sarr=[],this.s="",this.lensE=new Ny}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Uz;return this.sarr.push(this.s),this.s="",va(t,this.sarr.join("")),kx(t,this.lensE.toUint8Array()),Fn(t)}}const Ci=e=>new Error(e),xa=()=>{throw Ci("Method unimplemented")},Ba=()=>{throw Ci("Unexpected case")},jne=Ci("Unexpected end of array"),Pne=Ci("Integer out of Range");class qx{constructor(t){this.arr=t,this.pos=0}}const Ua=e=>new qx(e),tRe=e=>e.pos!==e.arr.length,nRe=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},N1=e=>nRe(e,Qt(e)),Cp=e=>e.arr[e.pos++],Qt=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posLne)throw Pne}throw jne},_B=e=>{let t=e.arr[e.pos++],n=t&KR,o=64;const r=(t&Rc)>0?-1:1;if(!(t&es))return r*n;const s=e.arr.length;for(;e.posLne)throw Pne}throw jne},oRe=e=>{let t=Qt(e);if(t===0)return"";{let n=String.fromCodePoint(Cp(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Cp(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},rRe=e=>EM.decode(N1(e)),Wc=EM?rRe:oRe,wB=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},sRe=e=>wB(e,4).getFloat32(0,!1),iRe=e=>wB(e,8).getFloat64(0,!1),aRe=e=>wB(e,8).getBigInt64(0,!1),cRe=[e=>{},e=>null,_B,sRe,iRe,aRe,e=>!1,e=>!0,Wc,e=>{const t=Qt(e),n={};for(let o=0;o{const t=Qt(e),n=[];for(let o=0;ocRe[127-Cp(e)](e);class DF extends qx{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),tRe(this)?this.count=Qt(this)+1:this.count=-1),this.count--,this.s}}class Ly extends qx{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=_B(this);const t=Nne(this.s);this.count=1,t&&(this.s=-this.s,this.count=Qt(this)+2)}return this.count--,this.s}}class L6 extends qx{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=_B(this),n=t&1;this.diff=Ea(t/2),this.count=1,n&&(this.count=Qt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class lRe{constructor(t){this.decoder=new Ly(t),this.str=Wc(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const uRe=crypto.getRandomValues.bind(crypto),dRe=Math.random,Ine=()=>uRe(new Uint32Array(1))[0],pRe="10000000-1000-4000-8000"+-1e11,Dne=()=>pRe.replace(/[018]/g,e=>(e^Ine()&15>>e/4).toString(16)),Gc=Date.now,x2=e=>new Promise(e);Promise.all.bind(Promise);const fRe=e=>Promise.reject(e),kB=e=>Promise.resolve(e),$F=e=>e===void 0?null:e;class bRe{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let $ne=new bRe,qB=!0;try{typeof localStorage<"u"&&localStorage&&($ne=localStorage,qB=!1)}catch{}const Fne=$ne,hRe=e=>qB||addEventListener("storage",e),mRe=e=>qB||removeEventListener("storage",e),MRe=Object.assign,Vne=Object.keys,gRe=(e,t)=>{for(const n in e)t(e[n],n)},FF=e=>Vne(e).length,VF=e=>Vne(e).length,zRe=e=>{for(const t in e)return!1;return!0},ORe=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},Hne=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ARe=(e,t)=>e===t||VF(e)===VF(t)&&ORe(e,(n,o)=>(n!==void 0||Hne(t,o))&&t[o]===n),SB=(e,t,n=0)=>{try{for(;n{},vRe=e=>e,xRe=(e,t)=>e===t,BM=(e,t)=>{if(e==null||t==null)return xRe(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var Une={};const _2=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Xne=typeof window<"u"&&typeof document<"u"&&!_2;let Ki;const wRe=()=>{if(Ki===void 0)if(_2){Ki=Cr();const e=process.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Ki.set(`--${NF(t,"-")}`,n),Ki.set(`-${NF(t,"-")}`,n)}})):Ki=Cr();return Ki},QR=e=>wRe().has(e),nv=e=>$F(_2?Une[e.toUpperCase().replaceAll("-","_")]:Fne.getItem(e)),Gne=e=>QR("--"+e)||nv(e)!==null;Gne("production");const kRe=_2&&_Re(Une.FORCE_COLOR,["true","1","2"]),qRe=kRe||!QR("--no-colors")&&!Gne("no-color")&&(!_2||process.stdout.isTTY)&&(!_2||QR("--color")||nv("COLORTERM")!==null||(nv("TERM")||"").includes("color")),Kne=e=>new Uint8Array(e),SRe=(e,t,n)=>new Uint8Array(e,t,n),CRe=e=>new Uint8Array(e),RRe=e=>{let t="";for(let n=0;nBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),TRe=e=>{const t=atob(e),n=Kne(t.length);for(let o=0;o{const t=Buffer.from(e,"base64");return SRe(t.buffer,t.byteOffset,t.byteLength)},Yne=Xne?RRe:WRe,CB=Xne?TRe:ERe,BRe=e=>{const t=Kne(e.byteLength);return t.set(e),t};class NRe{constructor(t,n){this.left=t,this.right=n}}const sc=(e,t)=>new NRe(e,t);typeof DOMParser<"u"&&new DOMParser;const LRe=e=>CCe(e,(t,n)=>`${n}:${t};`).join(""),jRe=JSON.stringify,pl=Symbol,js=pl(),Rp=pl(),Zne=pl(),RB=pl(),Qne=pl(),Jne=pl(),e1e=pl(),WB=pl(),Sx=pl(),PRe=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=HF[j6],o=nv("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return j6=(j6+1)%HF.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=Gc(),c=i-UF;UF=i,e(n,t,Sx,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return jRe(l)}}),n," +"+c+"ms")}:yRe},DRe={[js]:sc("font-weight","bold"),[Rp]:sc("font-weight","normal"),[Zne]:sc("color","blue"),[Qne]:sc("color","green"),[RB]:sc("color","grey"),[Jne]:sc("color","red"),[e1e]:sc("color","purple"),[WB]:sc("color","orange"),[Sx]:sc("color","black")},$Re=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=Cr();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...FRe(e)),VRe.forEach(t=>t.print(e))},VRe=Tu(),HRe=e=>IRe(t1e,e),n1e=e=>({[Symbol.iterator](){return this},next:e}),URe=(e,t)=>n1e(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),P6=(e,t)=>n1e(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class TB{constructor(t,n){this.clock=t,this.len=n}}class Xz{constructor(){this.clients=new Map}}const o1e=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=Ea((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&XRe(n,t.clock)!==null},EB=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=lf(r.len,s.clock+s.len-r.clock):(o{const t=new Xz;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{Ho(e.clients,t,()=>[]).push(new TB(n,o))},KRe=()=>new Xz,YRe=e=>{const t=KRe();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},hh=(e,t)=>{Wt(e.restEncoder,t.clients.size),Xc(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),Wt(e.restEncoder,n);const r=o.length;Wt(e.restEncoder,r);for(let s=0;s{const t=new Xz,n=Qt(e.restDecoder);for(let o=0;o0){const i=Ho(t.clients,r,()=>[]);for(let c=0;c{const o=new Xz,r=Qt(e.restDecoder);for(let s=0;s0){const s=new Wp;return Wt(s.restEncoder,0),hh(s,o),s.toUint8Array()}return null},s1e=Ine;class mh extends ECe{constructor({guid:t=Dne(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=s1e(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new h1e,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.whenLoaded=x2(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>x2(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&un(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Xc(this.subdocs).map(t=>t.guid))}transact(t,n=null){return un(this,t,n)}get(t,n=bo){const o=Ho(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==bo&&r!==n)if(r===bo){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,Xb)}getText(t=""){return this.get(t,q2)}getMap(t=""){return this.get(t,k2)}getXmlElement(t=""){return this.get(t,S2)}getXmlFragment(t=""){return this.get(t,Tp)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){Xc(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new mh({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,un(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class i1e{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Qt(this.restDecoder)}readDsLen(){return Qt(this.restDecoder)}}class a1e extends i1e{readLeftID(){return M0(Qt(this.restDecoder),Qt(this.restDecoder))}readRightID(){return M0(Qt(this.restDecoder),Qt(this.restDecoder))}readClient(){return Qt(this.restDecoder)}readInfo(){return Cp(this.restDecoder)}readString(){return Wc(this.restDecoder)}readParentInfo(){return Qt(this.restDecoder)===1}readTypeRef(){return Qt(this.restDecoder)}readLen(){return Qt(this.restDecoder)}readAny(){return v2(this.restDecoder)}readBuf(){return BRe(N1(this.restDecoder))}readJSON(){return JSON.parse(Wc(this.restDecoder))}readKey(){return Wc(this.restDecoder)}}class ZRe{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Qt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Qt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class w2 extends ZRe{constructor(t){super(t),this.keys=[],Qt(t),this.keyClockDecoder=new L6(N1(t)),this.clientDecoder=new Ly(N1(t)),this.leftClockDecoder=new L6(N1(t)),this.rightClockDecoder=new L6(N1(t)),this.infoDecoder=new DF(N1(t),Cp),this.stringDecoder=new lRe(N1(t)),this.parentInfoDecoder=new DF(N1(t),Cp),this.typeRefDecoder=new Ly(N1(t)),this.lenDecoder=new Ly(N1(t))}readLeftID(){return new Ub(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Ub(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return v2(this.restDecoder)}readBuf(){return N1(this.restDecoder)}readJSON(){return v2(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=lf(o,t[0].id.clock);const r=Na(t,o);Wt(e.restEncoder,t.length-r),e.writeClient(n),Wt(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{D1(t,s)>r&&o.set(s,r)}),Cx(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),Wt(e.restEncoder,o.size),Xc(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{QRe(e,t.clients.get(r),r,s)})},JRe=(e,t)=>{const n=Cr(),o=Qt(e.restDecoder);for(let r=0;r{const o=[];let r=Xc(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new h1e,l=new Map,u=(b,h)=>{const M=l.get(b);(M==null||M>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,M=n.get(h);M?(M.i--,c.clients.set(h,M.refs.slice(M.i)),n.delete(h),M.i=0,M.refs=[]):c.clients.set(h,[b]),r=r.filter(O=>O!==h)}o.length=0};for(;;){if(d.constructor!==Ws){const h=Ho(p,d.id.client,()=>D1(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const M=d.getMissing(e,t);if(M!==null){o.push(d);const O=n.get(M)||{refs:[],i:0};if(O.refs.length===O.i)u(M,D1(t,M)),f();else{d=O.refs[O.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new Wp;return NB(b,c,new Map),Wt(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},t8e=(e,t)=>NB(e,t.doc.store,t.beforeState),n8e=(e,t,n,o=new w2(e))=>un(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=JRe(o,i),u=e8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=rv([d.update,u.update])}}else c.pendingStructs=u;const p=XF(o,r,c);if(c.pendingDs){const f=new w2(Ua(c.pendingDs));Qt(f.restDecoder);const b=XF(f,r,c);p&&b?c.pendingDs=rv([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,u1e(r.doc,f)}},n,!1),u1e=(e,t,n,o=w2)=>{const r=Ua(t);n8e(r,e,n,new o(r))},d1e=(e,t,n)=>u1e(e,t,n,a1e),o8e=(e,t,n=new Map)=>{NB(e,t.store,n),hh(e,YRe(t.store))},r8e=(e,t=new Uint8Array([0]),n=new Wp)=>{const o=p1e(t);o8e(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(z8e(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===Gz)return M8e(r.map((s,i)=>i===0?s:A8e(s)));if(n.constructor===Wp)return rv(r)}return r[0]},LB=(e,t)=>r8e(e,t,new Gz),s8e=e=>{const t=new Map,n=Qt(e.restDecoder);for(let o=0;os8e(new i1e(Ua(e))),f1e=(e,t)=>(Wt(e.restEncoder,t.size),Xc(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{Wt(e.restEncoder,n),Wt(e.restEncoder,o)}),e),i8e=(e,t)=>f1e(e,Cx(t.store)),a8e=(e,t=new l1e)=>(e instanceof Map?f1e(t,e):i8e(t,e),t.toUint8Array()),c8e=e=>a8e(e,new c1e);class l8e{constructor(){this.l=[]}}const GF=()=>new l8e,KF=(e,t)=>e.l.push(t),YF=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},b1e=(e,t,n)=>SB(e.l,[t,n]);class Ub{constructor(t,n){this.client=t,this.clock=n}}const GO=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,M0=(e,t)=>new Ub(e,t),u8e=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw Ba()},ob=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!r1e(t.ds,e.id),JR=(e,t)=>{const n=Ho(e.meta,JR,Tu),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class h1e{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Cx=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},D1=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},m1e=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw Ba()}n.push(t)},Na=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=Ea(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[Na(n,t.clock)]},I6=d8e,e8=(e,t,n)=>{const o=Na(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[e8(e,n,t.clock)]},ZF=(e,t,n)=>{const o=t.clients.get(n.client),r=Na(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==Rs&&o.splice(r+1,0,uv(e,s,n.clock-s.id.clock+1)),s},p8e=(e,t,n)=>{const o=e.clients.get(t.id.client);o[Na(o,t.id.clock)]=n},M1e=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=e8(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!RCe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(EB(t.deleteSet),t8e(e,t),hh(e,t.deleteSet),!0),JF=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&Ho(e.changed,t,Tu).add(n)},jy=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof Bo&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},b8e=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=Na(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=yB(r.length-1,1+Na(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+jy(r,l)}})},g1e=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),b1e(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),SB(c,[]),n._needFormattingCleanup&&B8e(n)}finally{o.gc&&b8e(s,r,o.gcFilter),h8e(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=lf(Na(b,f),1);for(let M=b.length-1;M>=h;)M-=1+jy(b,M)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=Na(b,f);h+11||h>0&&jy(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(t1e(WB,js,"[yjs] ",Rp,Jne,"Changed the client-id because another client seems to be using it."),o.clientID=s1e()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new Gz;QF(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new Wp;QF(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):g1e(e,t+1)}}},un=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new f8e(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&g1e(r,0)}}return i};function*m8e(e){const t=Qt(e.restDecoder);for(let n=0;nrv(e,a1e,Gz),g8e=(e,t)=>{if(e.constructor===Rs){const{client:n,clock:o}=e.id;return new Rs(M0(n,o+t),e.length-t)}else if(e.constructor===Ws){const{client:n,clock:o}=e.id;return new Ws(M0(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new Bo(M0(o,r+t),null,M0(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},rv=(e,t=w2,n=Wp)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Ua(d)));let r=o.map(d=>new jB(d,!0)),s=null;const i=new n,c=new PB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ws?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Ul(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ws?s.struct.length-=h:f=g8e(f,h)),s.struct.mergeWith(f)||(Ul(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ws;f=d.next())Ul(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Ul(c,s.struct,s.offset),s=null),IB(c);const l=o.map(d=>BB(d)),u=GRe(l);return hh(i,u),i.toUint8Array()},z8e=(e,t,n=w2,o=Wp)=>{const r=p1e(t),s=new o,i=new PB(s),c=new n(Ua(e)),l=new jB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ws){l.next();continue}if(d.id.clock+d.length>f)for(Ul(i,d,lf(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Ul(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}IB(i);const u=BB(c);return hh(s,u),s.toUint8Array()},z1e=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:Fn(e.encoder.restEncoder)}),e.encoder.restEncoder=P1(),e.written=0)},Ul=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&z1e(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),Wt(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},IB=e=>{z1e(e);const t=e.encoder.restEncoder;Wt(t,e.clientStructs.length);for(let n=0;n{const r=new n(Ua(e)),s=new jB(r,!1),i=new o,c=new PB(i);for(let u=s.curr;u!==null;u=s.next())Ul(c,t(u),0);IB(c);const l=BB(r);return hh(i,l),i.toUint8Array()},A8e=e=>O8e(e,vRe,w2,Gz),eV="You must not compute changes after the event-handler fired.";class Rx{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=y8e(this.currentTarget,this.target))}deletes(t){return r1e(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(eV);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=T6(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=T6(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=T6(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(eV);const n=this.target,o=Tu(),r=Tu(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const y8e=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},O1e=80;let DB=0;class v8e{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=DB++}}const x8e=e=>{e.timestamp=DB++},A1e=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=DB++},_8e=(e,t,n)=>{if(e.length>=O1e){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>By(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&By(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=lf(t,r.index+n))}},Tx=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;Ho(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;b1e(o._eH,n,t)};class bo{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=GF(),this._dEH=GF(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw xa()}clone(){throw xa()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){KF(this._eH,t)}observeDeep(t){KF(this._dEH,t)}unobserve(t){YF(this._eH,t)}unobserveDeep(t){YF(this._dEH,t)}toJSON(){}}const y1e=(e,t,n)=>{t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},v1e=e=>{const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(;o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return qg(e,(o,r)=>{n.push(t(o,r,e))}),n},w8e=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},_1e=(e,t)=>{const n=Wx(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Ep(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Kz(new Uint8Array(p))),r.integrate(e,0);break;case mh:r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Yz(p)),r.integrate(e,0);break;default:if(p instanceof bo)r=new Bo(M0(i,D1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new fl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},w1e=()=>Ci("Length exceeded!"),k1e=(e,t,n,o)=>{if(n>t._length)throw w1e();if(n===0)return t._searchMarker&&kg(t._searchMarker,n,o.length),sv(e,t,null,o);const r=n,s=Wx(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return sv(e,t,r,n)},q1e=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=Wx(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw w1e();t._searchMarker&&kg(t._searchMarker,r,-s+o)},iv=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},$B=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new Ep([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new Ep([o]);break;case Uint8Array:c=new Kz(o);break;case mh:c=new Yz(o);break;default:if(o instanceof bo)c=new fl(o);else throw new Error("Unexpected content type")}new Bo(M0(i,D1(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},FB=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},S1e=e=>{const t={};return e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},C1e=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted},q8e=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&ob(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},KO=e=>URe(e.entries(),t=>!t[1].deleted);class S8e extends Rx{}class Xb extends bo{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new Xb;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Xb}clone(){const t=new Xb;return t.insert(0,this.toArray().map(n=>n instanceof bo?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}_callObserver(t,n){super._callObserver(t,n),Tx(this,t,new S8e(this,t))}insert(t,n){this.doc!==null?un(this.doc,o=>{k1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?un(this.doc,n=>{k8e(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?un(this.doc,o=>{q1e(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return _1e(this,t)}toArray(){return v1e(this)}slice(t=0,n=this.length){return y1e(this,t,n)}toJSON(){return this.map(t=>t instanceof bo?t.toJSON():t)}map(t){return x1e(this,t)}forEach(t){qg(this,t)}[Symbol.iterator](){return w8e(this)}_write(t){t.writeTypeRef(J8e)}}const C8e=e=>new Xb;class R8e extends Rx{constructor(t,n,o){super(t,n),this.keysChanged=o}}class k2 extends bo{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new k2}clone(){const t=new k2;return this.forEach((n,o)=>{t.set(o,n instanceof bo?n.clone():n)}),t}_callObserver(t,n){Tx(this,t,new R8e(this,t,n))}toJSON(){const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof bo?r.toJSON():r}}),t}get size(){return[...KO(this._map)].length}keys(){return P6(KO(this._map),t=>t[0])}values(){return P6(KO(this._map),t=>t[1].content.getContent()[t[1].length-1])}entries(){return P6(KO(this._map),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return FB(this,t)}has(t){return C1e(this,t)}clear(){this.doc!==null?un(this.doc,t=>{this.forEach(function(n,o,r){iv(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(eWe)}}const W8e=e=>new k2,Jl=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&ARe(e,t);class t8{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&Ba(),this.right.content.constructor){case R1:this.right.deleted||Mh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const tV=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case R1:t.right.deleted||Mh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?Wx(t,n):null;if(s){const i=new t8(s.p.left,s.p,s.index,r);return tV(e,i,n-s.index)}else{const i=new t8(null,t._start,0,r);return tV(e,i,n)}},R1e=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===R1&&Jl(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new Bo(M0(s,D1(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new R1(c,i));d.integrate(e,0),n.right=d,n.forward()})},Mh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},W1e=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===R1&&Jl(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},T1e=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!Jl(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new Bo(M0(s,D1(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new R1(c,l)),n.right.integrate(e,0),n.forward()}}return i},D6=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;W1e(n,r);const c=T1e(e,t,n,r),l=o.constructor===String?new La(o):o instanceof bo?new fl(o):new uf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&kg(t._searchMarker,n.index,l.getLength()),d=new Bo(M0(i,D1(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),R1e(e,t,n,c)},nV=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;W1e(n,r);const c=T1e(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===R1));){if(!n.right.deleted)switch(n.right.content.constructor){case R1:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(Jl(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` -`;n.right=new Bo(M0(i,D1(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new La(l)),n.right.integrate(e,0),n.forward()}R1e(e,t,n,c)},E1e=(e,t,n,o,r)=>{let s=t;const i=Cr();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===R1){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case R1:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&Mh(r,u);break}}}t=t.right}return c},T8e=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===R1){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},E8e=e=>{let t=0;return un(e.doc,n=>{let o=e._start,r=e._start,s=Cr();const i=GR(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case R1:Mh(i,r.content);break;default:t+=E1e(n,o,r,s,i),s=GR(i),o=r;break}r=r.right}}),t},B8e=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&M1e(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===R1&&i.constructor!==Rs&&t.add(i.parent)})}un(n,o=>{o1e(e,e.deleteSet,r=>{if(r instanceof Rs||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===R1?t.add(s):T8e(o,r)});for(const r of t)E8e(r)})},oV=(e,t,n)=>{const o=n,r=GR(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case fl:case uf:case La:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,n=[];un(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,M)=>{h!==null&&(b.attributes[M]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},zRe(l)||(b.attributes=MRe({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case fl:case uf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case La:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case R1:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const M=r.get(b)??null;Jl(M,h)?h!==null&&i.delete(o):(c==="retain"&&f(),Jl(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const M=r.get(b)??null;Jl(M,h)||(c==="retain"&&f(),l[b]=M)}else if(!i.deleted){s.set(b,h);const M=l[b];M!==void 0&&(Jl(M,h)?M!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),Mh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class q2 extends bo{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new q2}clone(){const t=new q2;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new N8e(this,t,n);Tx(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===La&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?un(this.doc,o=>{const r=new t8(null,this._start,0,new Map);for(let s=0;s0)&&D6(o,this,r,c,i.attributes||{})}else i.retain!==void 0?nV(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&oV(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,M)=>{f=!0,p[M]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(ob(l,t)||n!==void 0&&ob(l,n))switch(l.content.constructor){case La:{const p=s.get("ychange");t!==void 0&&!ob(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!ob(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case fl:case uf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case R1:ob(l,t)&&(u(),Mh(s,l.content));break}l=l.right}u()};return t||n?un(i,p=>{t&&JR(p,t),n&&JR(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),D6(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!o);D6(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?un(o,r=>{oV(r,YO(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?un(r,s=>{const i=YO(s,this,t,!1);i.right!==null&&nV(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return FB(this,t)}getAttributes(){return S1e(this)}_write(t){t.writeTypeRef(tWe)}}const L8e=e=>new q2;class $6{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===S2||n.constructor===Tp)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;break}else t.parent===this._root?t=null:t=t.parent._item;while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Tp extends bo{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Tp}clone(){const t=new Tp;return t.insert(0,this.toArray().map(n=>n instanceof bo?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new $6(this,t)}querySelector(t){t=t.toUpperCase();const o=new $6(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Xc(new $6(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){Tx(this,t,new I8e(this,n,t))}toString(){return x1e(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),qg(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?un(this.doc,o=>{k1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)un(this.doc,o=>{const r=t&&t instanceof bo?t._item:t;sv(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw Ci("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?un(this.doc,o=>{q1e(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return v1e(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return _1e(this,t)}slice(t=0,n=this.length){return y1e(this,t,n)}forEach(t){qg(this,t)}_write(t){t.writeTypeRef(oWe)}}const j8e=e=>new Tp;class S2 extends Tp{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new S2(this.nodeName)}clone(){const t=new S2(this.nodeName),n=this.getAttributes();return gRe(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof bo?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?un(this.doc,n=>{iv(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?un(this.doc,o=>{$B(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return FB(this,t)}hasAttribute(t){return C1e(this,t)}getAttributes(t){return t?q8e(this,t):S1e(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return qg(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(nWe),t.writeKey(this.nodeName)}}const P8e=e=>new S2(e.readKey());class I8e extends Rx{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class av extends k2{constructor(t){super(),this.hookName=t}_copy(){return new av(this.hookName)}clone(){const t=new av(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef(rWe),t.writeKey(this.hookName)}}const D8e=e=>new av(e.readKey());class cv extends q2{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new cv}clone(){const t=new cv;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(sWe)}}const $8e=e=>new cv;class VB{constructor(t,n){this.id=t,this.length=n}get deleted(){throw xa()}mergeWith(t){return!1}write(t,n,o){throw xa()}integrate(t,n){throw xa()}}const F8e=0;class Rs extends VB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),m1e(t.doc.store,this)}write(t,n){t.writeInfo(F8e),t.writeLen(this.length-n)}getMissing(t,n){return null}}class Kz{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Kz(this.content)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const V8e=e=>new Kz(e.readBuf());class Sg{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Sg(this.len)}splice(t){const n=new Sg(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){ov(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const H8e=e=>new Sg(e.readLen()),B1e=(e,t)=>new mh({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Yz{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Yz(B1e(this.doc.guid,this.opts))}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const U8e=e=>new Yz(B1e(e.readString(),e.readAny()));class uf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new uf(this.embed)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const X8e=e=>new uf(e.readJSON());class R1{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new R1(this.key,this.value)}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const G8e=e=>new R1(e.readKey(),e.readJSON());class lv{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new lv(this.arr)}splice(t){const n=new lv(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const Z8e=e=>new La(e.readString()),Q8e=[C8e,W8e,L8e,P8e,j8e,D8e,$8e],J8e=0,eWe=1,tWe=2,nWe=3,oWe=4,rWe=5,sWe=6;class fl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new fl(this.type._copy())}splice(t){throw xa()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const iWe=e=>new fl(Q8e[e.readTypeRef()](e)),uv=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new Bo(M0(o,r+n),t,M0(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=M0(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let Bo=class n8 extends VB{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?BF:0}set marker(t){(this.info&B6)>0!==t&&(this.info^=B6)}get marker(){return(this.info&B6)>0}get keep(){return(this.info&EF)>0}set keep(t){this.keep!==t&&(this.info^=EF)}get countable(){return(this.info&BF)>0}get deleted(){return(this.info&E6)>0}set deleted(t){this.deleted!==t&&(this.info^=E6)}markDeleted(){this.info|=E6}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=D1(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=D1(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Ub&&this.id.client!==this.parent.client&&this.parent.clock>=D1(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ZF(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Eu(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Rs||this.right&&this.right.constructor===Rs)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===n8&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===n8&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Ub){const o=I6(n,this.parent);o.constructor===Rs?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=ZF(t,t.doc.store,M0(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),GO(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),ov(t.deleteSet,this.id.client,this.id.clock,this.length),JF(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw Ba();this.content.gc(t),n?p8e(t,this,new Rs(this.id,this.length)):this.content=new Sg(this.length)}write(t,n){const o=n>0?M0(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&wx|(o===null?0:es)|(r===null?0:Rc)|(s===null?0:xg);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=u8e(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===Ub?(t.writeParentInfo(!1),t.writeLeftID(c)):Ba();s!==null&&t.writeString(s)}this.content.write(t,n)}};const N1e=(e,t)=>aWe[t&wx](e),aWe=[()=>{Ba()},H8e,K8e,V8e,Z8e,X8e,G8e,iWe,Y8e,U8e,()=>{Ba()}],cWe=10;class Ws extends VB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){Ba()}write(t,n){t.writeInfo(cWe),Wt(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const L1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},j1e="__ $YJS$ __";L1e[j1e]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");L1e[j1e]=!0;const df=e=>x2((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),lWe=(e,t)=>x2((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(Ci(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),uWe=e=>df(indexedDB.deleteDatabase(e)),dWe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),aM=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>zWe(o,r))},P1e=(e,t)=>df(e.count(t)),pWe=(e,t)=>df(e.get(t)),I1e=(e,t)=>df(e.delete(t)),fWe=(e,t,n)=>df(e.put(t,n)),o8=(e,t)=>df(e.add(t)),bWe=(e,t,n)=>df(e.getAll(t,n)),hWe=(e,t,n)=>{let o=null;return gWe(e,t,r=>(o=r,!1),n).then(()=>o)},mWe=(e,t=null)=>hWe(e,t,"prev"),MWe=(e,t)=>x2((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),gWe=(e,t,n,o="next")=>MWe(e.openKeyCursor(t,o),r=>n(r.key)),zWe=(e,t)=>e.objectStore(t),OWe=(e,t)=>IDBKeyRange.upperBound(e,t),AWe=(e,t)=>IDBKeyRange.lowerBound(e,t),F6="custom",D1e="updates",$1e=500,F1e=(e,t=()=>{},n=()=>{})=>{const[o]=aM(e.db,[D1e]);return bWe(o,AWe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),un(e.doc,()=>{r.forEach(s=>d1e(e.doc,s))},e,!1),n(o))}).then(()=>mWe(o).then(r=>{e._dbref=r+1})).then(()=>P1e(o).then(r=>{e._dbsize=r})).then(()=>o)},yWe=(e,t=!0)=>F1e(e).then(n=>{(t||e._dbsize>=$1e)&&o8(n,LB(e.doc)).then(()=>I1e(n,OWe(e._dbref,!0))).then(()=>P1e(n).then(o=>{e._dbsize=o}))});class vWe extends Hz{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=lWe(t,o=>dWe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=x2(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,F1e(this,i=>o8(i,LB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=aM(this.db,[D1e]);o8(s,o),++this._dbsize>=$1e&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{yWe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{uWe(this.name)})}get(t){return this._db.then(n=>{const[o]=aM(n,[F6],"readonly");return pWe(o,t)})}set(t,n){return this._db.then(o=>{const[r]=aM(o,[F6]);return fWe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=aM(n,[F6]);return I1e(o,t)})}}function xWe(e,t,n){const o=`${t}-${e}`,r=new vWe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const _We=1200,wWe=2500,dv=3e4,r8=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=Gc();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,dv/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout(r8,yB(BCe(e.unsuccessfulReconnects+1)*_We,wWe),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=Gc(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,dv/2)}}};class kWe extends Hz{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&dvn.key===t&&this.onmessage!==null&&this.onmessage({data:CB(n.newValue||"")}),hRe(this._onChange)}postMessage(t){Fne.setItem(this.room,Yne(CRe(t)))}close(){mRe(this._onChange)}}const SWe=typeof BroadcastChannel>"u"?qWe:BroadcastChannel,HB=e=>Ho(V1e,e,()=>{const t=Tu(),n=new SWe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),CWe=(e,t)=>(HB(e).subs.add(t),t),RWe=(e,t)=>{const n=HB(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),V1e.delete(e)),o},WWe=(e,t,n=null)=>{const o=HB(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},TWe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function ZO(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H1e={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof ZO=="function"&&ZO;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var M=new Error("Cannot find module '"+f+"'");throw M.code="MODULE_NOT_FOUND",M}var O=c[f]={exports:{}};i[f][0].call(O.exports,function(y){var _=i[f][1][y];return u(_||y)},O,O.exports,s,i,c,l)}return c[f].exports}for(var d=typeof ZO=="function"&&ZO,p=0;p>16,S[C++]=255&A>>8,S[C++]=255&A;return q===2&&(A=M[g.charCodeAt(x)]<<2|M[g.charCodeAt(x+1)]>>4,S[C++]=255&A),q===1&&(A=M[g.charCodeAt(x)]<<10|M[g.charCodeAt(x+1)]<<4|M[g.charCodeAt(x+2)]>>2,S[C++]=255&A>>8,S[C++]=255&A),S}function p(g){return h[63&g>>18]+h[63&g>>12]+h[63&g>>6]+h[63&g]}function f(g,A,x){for(var w,k=[],q=A;qC?C:S+q));return w===1?(A=g[x-1],k.push(h[A>>2]+h[63&A<<4]+"==")):w===2&&(A=(g[x-2]<<8)+g[x-1],k.push(h[A>>10]+h[63&A>>4]+h[63&A<<2]+"=")),k.join("")}c.byteLength=function(g){var A=l(g),x=A[0],w=A[1];return 3*(x+w)/4-w},c.toByteArray=d,c.fromByteArray=b;for(var h=[],M=[],O=typeof Uint8Array>"u"?Array:Uint8Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,v=y.length;_R)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function h(R,L,V){return b(R),0>=R||L===void 0?d(R):typeof V=="string"?d(R).fill(L,V):d(R).fill(L)}function M(R){return b(R),d(0>R?0:0|g(R))}function O(R,L){if((typeof L!="string"||L==="")&&(L="utf8"),!p.isEncoding(L))throw new TypeError("Unknown encoding: "+L);var V=0|A(R,L),de=d(V),ge=de.write(R,L);return ge!==V&&(de=de.slice(0,ge)),de}function y(R){for(var L=0>R.length?0:0|g(R.length),V=d(L),de=0;deL||R.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|R}function A(R,L){if(p.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Y(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var V=R.length,de=2>>1;case"base64":return G(R).length;default:if(ge)return de?-1:be(R).length;L=(""+L).toLowerCase(),ge=!0}}function x(R,L,V){var de=!1;if((L===void 0||0>L)&&(L=0),L>this.length||((V===void 0||V>this.length)&&(V=this.length),0>=V)||(V>>>=0,L>>>=0,V<=L))return"";for(R||(R="utf8");;)switch(R){case"hex":return X(this,L,V);case"utf8":case"utf-8":return j(this,L,V);case"ascii":return P(this,L,V);case"latin1":case"binary":return U(this,L,V);case"base64":return W(this,L,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,L,V);default:if(de)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),de=!0}}function w(R,L,V){var de=R[L];R[L]=R[V],R[V]=de}function k(R,L,V,de,ge){if(R.length===0)return-1;if(typeof V=="string"?(de=V,V=0):2147483647V&&(V=-2147483648),V=+V,re(V)&&(V=ge?0:R.length-1),0>V&&(V=R.length+V),V>=R.length){if(ge)return-1;V=R.length-1}else if(0>V)if(ge)V=0;else return-1;if(typeof L=="string"&&(L=p.from(L,de)),p.isBuffer(L))return L.length===0?-1:q(R,L,V,de,ge);if(typeof L=="number")return L&=255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(R,L,V):Uint8Array.prototype.lastIndexOf.call(R,L,V):q(R,[L],V,de,ge);throw new TypeError("val must be string, number or Buffer")}function q(R,L,V,de,ge){function ve(Ye,Ue){return Pe===1?Ye[Ue]:Ye.readUInt16BE(Ue*Pe)}var Pe=1,rt=R.length,ht=L.length;if(de!==void 0&&(de=(de+"").toLowerCase(),de==="ucs2"||de==="ucs-2"||de==="utf16le"||de==="utf-16le")){if(2>R.length||2>L.length)return-1;Pe=2,rt/=2,ht/=2,V/=2}var ft;if(ge){var Xe=-1;for(ft=V;ftrt&&(V=rt-ht),ft=V;0<=ft;ft--){for(var et=!0,Bt=0;Btge&&(de=ge)):de=ge;var ve=L.length;de>ve/2&&(de=ve/2);for(var Pe,rt=0;rtve&&(Pe=ve):rt===2?(ht=R[ge+1],(192&ht)==128&&(et=(31&ve)<<6|63&ht,127et||57343et&&(Pe=et)))}Pe===null?(Pe=65533,rt=1):65535>>10),Pe=56320|1023&Pe),de.push(Pe),ge+=rt}return I(de)}function I(R){var L=R.length;if(L<=4096)return l.apply(String,R);for(var V="",de=0;deL)&&(L=0),(!V||0>V||V>de)&&(V=de);for(var ge="",ve=L;veR)throw new RangeError("offset is not uint");if(R+L>V)throw new RangeError("Trying to access beyond buffer length")}function oe(R,L,V,de,ge,ve){if(!p.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>ge||LR.length)throw new RangeError("Index out of range")}function ee(R,L,V,de){if(V+de>R.length)throw new RangeError("Index out of range");if(0>V)throw new RangeError("Index out of range")}function K(R,L,V,de,ge){return L=+L,V>>>=0,ge||ee(R,L,V,4),he.write(R,L,V,de,23,4),V+4}function ne(R,L,V,de,ge){return L=+L,V>>>=0,ge||ee(R,L,V,8),he.write(R,L,V,de,52,8),V+8}function se(R){if(R=R.split("=")[0],R=R.trim().replace(Q,""),2>R.length)return"";for(;R.length%4!=0;)R+="=";return R}function ae(R){return 16>R?"0"+R.toString(16):R.toString(16)}function be(R,L){L=L||1/0;for(var V,de=R.length,ge=null,ve=[],Pe=0;PeV){if(!ge){if(56319V){-1<(L-=3)&&ve.push(239,191,189),ge=V;continue}V=(ge-55296<<10|V-56320)+65536}else ge&&-1<(L-=3)&&ve.push(239,191,189);if(ge=null,128>V){if(0>(L-=1))break;ve.push(V)}else if(2048>V){if(0>(L-=2))break;ve.push(192|V>>6,128|63&V)}else if(65536>V){if(0>(L-=3))break;ve.push(224|V>>12,128|63&V>>6,128|63&V)}else if(1114112>V){if(0>(L-=4))break;ve.push(240|V>>18,128|63&V>>12,128|63&V>>6,128|63&V)}else throw new Error("Invalid code point")}return ve}function Oe(R){for(var L=[],V=0;V(L-=2));++Pe)V=R.charCodeAt(Pe),de=V>>8,ge=V%256,ve.push(ge),ve.push(de);return ve}function G(R){return Me.toByteArray(se(R))}function fe(R,L,V,de){for(var ge=0;ge=L.length||ge>=R.length);++ge)L[ge+V]=R[ge];return ge}function Y(R,L){return R instanceof L||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===L.name}function re(R){return R!==R}var Me=s("base64-js"),he=s("ieee754");c.Buffer=p,c.SlowBuffer=function(R){return+R!=R&&(R=0),p.alloc(+R)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var R=new Uint8Array(1);return R.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},R.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(R,L,V){return f(R,L,V)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(R,L,V){return h(R,L,V)},p.allocUnsafe=function(R){return M(R)},p.allocUnsafeSlow=function(R){return M(R)},p.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==p.prototype},p.compare=function(R,L){if(Y(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),Y(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),!p.isBuffer(R)||!p.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===L)return 0;for(var V=R.length,de=L.length,ge=0,ve=u(V,de);geL&&(R+=" ... "),""},p.prototype.compare=function(R,L,V,de,ge){if(Y(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),!p.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(L===void 0&&(L=0),V===void 0&&(V=R?R.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),0>L||V>R.length||0>de||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&L>=V)return 0;if(de>=ge)return-1;if(L>=V)return 1;if(L>>>=0,V>>>=0,de>>>=0,ge>>>=0,this===R)return 0;for(var ve=ge-de,Pe=V-L,rt=u(ve,Pe),ht=this.slice(de,ge),ft=R.slice(L,V),Xe=0;Xe>>=0,isFinite(V)?(V>>>=0,de===void 0&&(de="utf8")):(de=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-L;if((V===void 0||V>ge)&&(V=ge),0V||0>L)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var ve=!1;;)switch(de){case"hex":return S(this,R,L,V);case"utf8":case"utf-8":return C(this,R,L,V);case"ascii":return T(this,R,L,V);case"latin1":case"binary":return E(this,R,L,V);case"base64":return B(this,R,L,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,R,L,V);default:if(ve)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),ve=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(R,L){var V=this.length;R=~~R,L=L===void 0?V:~~L,0>R?(R+=V,0>R&&(R=0)):R>V&&(R=V),0>L?(L+=V,0>L&&(L=0)):L>V&&(L=V),L>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R],ge=1,ve=0;++ve>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R+--L],ge=1;0>>=0,L||Z(R,1,this.length),this[R]},p.prototype.readUInt16LE=function(R,L){return R>>>=0,L||Z(R,2,this.length),this[R]|this[R+1]<<8},p.prototype.readUInt16BE=function(R,L){return R>>>=0,L||Z(R,2,this.length),this[R]<<8|this[R+1]},p.prototype.readUInt32LE=function(R,L){return R>>>=0,L||Z(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+16777216*this[R+3]},p.prototype.readUInt32BE=function(R,L){return R>>>=0,L||Z(R,4,this.length),16777216*this[R]+(this[R+1]<<16|this[R+2]<<8|this[R+3])},p.prototype.readIntLE=function(R,L,V){R>>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=this[R],ge=1,ve=0;++ve=ge&&(de-=r(2,8*L)),de},p.prototype.readIntBE=function(R,L,V){R>>>=0,L>>>=0,V||Z(R,L,this.length);for(var de=L,ge=1,ve=this[R+--de];0=ge&&(ve-=r(2,8*L)),ve},p.prototype.readInt8=function(R,L){return R>>>=0,L||Z(R,1,this.length),128&this[R]?-1*(255-this[R]+1):this[R]},p.prototype.readInt16LE=function(R,L){R>>>=0,L||Z(R,2,this.length);var V=this[R]|this[R+1]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt16BE=function(R,L){R>>>=0,L||Z(R,2,this.length);var V=this[R+1]|this[R]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt32LE=function(R,L){return R>>>=0,L||Z(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},p.prototype.readInt32BE=function(R,L){return R>>>=0,L||Z(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},p.prototype.readFloatLE=function(R,L){return R>>>=0,L||Z(R,4,this.length),he.read(this,R,!0,23,4)},p.prototype.readFloatBE=function(R,L){return R>>>=0,L||Z(R,4,this.length),he.read(this,R,!1,23,4)},p.prototype.readDoubleLE=function(R,L){return R>>>=0,L||Z(R,8,this.length),he.read(this,R,!0,52,8)},p.prototype.readDoubleBE=function(R,L){return R>>>=0,L||Z(R,8,this.length),he.read(this,R,!1,52,8)},p.prototype.writeUIntLE=function(R,L,V,de){if(R=+R,L>>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;oe(this,R,L,V,ge,0)}var ve=1,Pe=0;for(this[L]=255&R;++Pe>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;oe(this,R,L,V,ge,0)}var ve=V-1,Pe=1;for(this[L+ve]=255&R;0<=--ve&&(Pe*=256);)this[L+ve]=255&R/Pe;return L+V},p.prototype.writeUInt8=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,1,255,0),this[L]=255&R,L+1},p.prototype.writeUInt16LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,65535,0),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeUInt16BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,65535,0),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeUInt32LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,4294967295,0),this[L+3]=R>>>24,this[L+2]=R>>>16,this[L+1]=R>>>8,this[L]=255&R,L+4},p.prototype.writeUInt32BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,4294967295,0),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeIntLE=function(R,L,V,de){if(R=+R,L>>>=0,!de){var ge=r(2,8*V-1);oe(this,R,L,V,ge-1,-ge)}var ve=0,Pe=1,rt=0;for(this[L]=255&R;++veR&&rt===0&&this[L+ve-1]!==0&&(rt=1),this[L+ve]=255&(R/Pe>>0)-rt;return L+V},p.prototype.writeIntBE=function(R,L,V,de){if(R=+R,L>>>=0,!de){var ge=r(2,8*V-1);oe(this,R,L,V,ge-1,-ge)}var ve=V-1,Pe=1,rt=0;for(this[L+ve]=255&R;0<=--ve&&(Pe*=256);)0>R&&rt===0&&this[L+ve+1]!==0&&(rt=1),this[L+ve]=255&(R/Pe>>0)-rt;return L+V},p.prototype.writeInt8=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,1,127,-128),0>R&&(R=255+R+1),this[L]=255&R,L+1},p.prototype.writeInt16LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,32767,-32768),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeInt16BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,2,32767,-32768),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeInt32LE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,2147483647,-2147483648),this[L]=255&R,this[L+1]=R>>>8,this[L+2]=R>>>16,this[L+3]=R>>>24,L+4},p.prototype.writeInt32BE=function(R,L,V){return R=+R,L>>>=0,V||oe(this,R,L,4,2147483647,-2147483648),0>R&&(R=4294967295+R+1),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeFloatLE=function(R,L,V){return K(this,R,L,!0,V)},p.prototype.writeFloatBE=function(R,L,V){return K(this,R,L,!1,V)},p.prototype.writeDoubleLE=function(R,L,V){return ne(this,R,L,!0,V)},p.prototype.writeDoubleBE=function(R,L,V){return ne(this,R,L,!1,V)},p.prototype.copy=function(R,L,V,de){if(!p.isBuffer(R))throw new TypeError("argument should be a Buffer");if(V||(V=0),de||de===0||(de=this.length),L>=R.length&&(L=R.length),L||(L=0),0L)throw new RangeError("targetStart out of bounds");if(0>V||V>=this.length)throw new RangeError("Index out of range");if(0>de)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),R.length-Lge||de==="latin1")&&(R=ge)}}else typeof R=="number"&&(R&=255);if(0>L||this.length>>=0,V=V===void 0?this.length:V>>>0,R||(R=0);var ve;if(typeof R=="number")for(ve=L;ve{M==="%%"||(b++,M==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...M){if(!f.enabled)return;const O=f,y=+new Date,_=y-(b||y);O.diff=_,O.prev=b,O.curr=y,b=y,M[0]=l.coerce(M[0]),typeof M[0]!="string"&&M.unshift("%O");let v=0;M[0]=M[0].replace(/%([a-zA-Z%])/g,(A,x)=>{if(A==="%%")return"%";v++;const w=l.formatters[x];if(typeof w=="function"){const k=M[v];A=w.call(O,k),M.splice(v,1),v--}return A}),l.formatArgs.call(O,M),(O.log||l.log).apply(O,M)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:M=>{h=M}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bB&&!W.warned){W.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+W.length+" "+(C+" listeners added. Use emitter.setMaxListeners() to increase limit"));j.name="MaxListenersExceededWarning",j.emitter=S,j.type=C,j.count=W.length,c(j)}return S}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(S,C,T){var E={fired:!1,wrapFn:void 0,target:S,type:C,listener:T},B=f.bind(E);return B.listener=T,E.wrapFn=B,B}function h(S,C,T){var E=S._events;if(E===void 0)return[];var B=E[C];return B===void 0?[]:typeof B=="function"?T?[B.listener||B]:[B]:T?_(B):O(B,B.length)}function M(S){var C=this._events;if(C!==void 0){var T=C[S];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}function O(S,C){for(var T=Array(C),E=0;ES||k(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");q=S}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(S){if(typeof S!="number"||0>S||k(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(S){for(var C=[],T=1;TB)return this;B===0?T.shift():y(T,B),T.length===1&&(E[S]=T[0]),E.removeListener!==void 0&&this.emit("removeListener",S,W||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(S){var C,T,E;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[S]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete T[S]),this;if(arguments.length===0){var B,N=Object.keys(T);for(E=0;E"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,M=8*f-p-1,O=(1<>1,_=-7,v=d?f-1:0,g=d?-1:1,A=l[u+v];for(v+=g,b=A&(1<<-_)-1,A>>=-_,_+=M;0<_;b=256*b+l[u+v],v+=g,_-=8);for(h=b&(1<<-_)-1,b>>=-_,_+=p;0<_;h=256*h+l[u+v],v+=g,_-=8);if(b===0)b=1-y;else{if(b===O)return h?NaN:(A?-1:1)*(1/0);h+=r(2,p),b-=y}return(A?-1:1)*h*r(2,b-p)},c.write=function(l,u,d,p,f,b){var h,M,O,y=Math.LN2,_=Math.log,v=8*b-f-1,g=(1<>1,x=f===23?r(2,-24)-r(2,-77):0,w=p?0:b-1,k=p?1:-1,q=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(M=isNaN(u)?1:0,h=g):(h=n(_(u)/y),1>u*(O=r(2,-h))&&(h--,O*=2),u+=1<=h+A?x/O:x*r(2,1-A),2<=u*O&&(h++,O/=2),h+A>=g?(M=0,h=g):1<=h+A?(M=(u*O-1)*r(2,f),h+=A):(M=u*r(2,A-1)*r(2,f),h=0));8<=f;l[d+w]=255&M,w+=k,M/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof c0>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,M){h.prototype=Object.create(M.prototype),h.prototype.constructor=h,h.__proto__=M}function l(h,M,O){function y(v,g,A){return typeof M=="string"?M:M(v,g,A)}O||(O=Error);var _=function(v){function g(A,x,w){return v.call(this,y(A,x,w))||this}return c(g,v),g}(O);_.prototype.name=O.name,_.prototype.code=h,b[h]=_}function u(h,M){if(Array.isArray(h)){var O=h.length;return h=h.map(function(y){return y+""}),2h.length)&&(O=h.length),h.substring(O-M.length,O)===M}function f(h,M,O){return typeof O!="number"&&(O=0),!(O+M.length>h.length)&&h.indexOf(M,O)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,M){return'The value "'+M+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,M,O){var y;typeof M=="string"&&d(M,"not ")?(y="must not be",M=M.replace(/^not /,"")):y="must be";var _;if(p(h," argument"))_="The ".concat(h," ").concat(y," ").concat(u(M,"type"));else{var v=f(h,".")?"property":"argument";_='The "'.concat(h,'" ').concat(v," ").concat(y," ").concat(u(M,"type"))}return _+=". Received type ".concat(typeof O),_},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(y){return this instanceof l?(f.call(this,y),b.call(this,y),this.allowHalfOpen=!0,void(y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(y)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(y){y.end()}var p=Object.keys||function(y){var _=[];for(var v in y)_.push(v);return _};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,M=p(b.prototype),O=0;O>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function _(Q,R){return 0>=Q||R.length===0&&R.ended?0:R.objectMode?1:Q===Q?(Q>R.highWaterMark&&(R.highWaterMark=y(Q)),Q<=R.length?Q:R.ended?R.length:(R.needReadable=!0,0)):R.flowing&&R.length?R.buffer.head.data.length:R.length}function v(Q,R){if(P("onEofChunk"),!R.ended){if(R.decoder){var L=R.decoder.end();L&&L.length&&(R.buffer.push(L),R.length+=R.objectMode?1:L.length)}R.ended=!0,R.sync?g(Q):(R.needReadable=!1,!R.emittedReadable&&(R.emittedReadable=!0,A(Q)))}}function g(Q){var R=Q._readableState;P("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(P("emitReadable",R.flowing),R.emittedReadable=!0,c.nextTick(A,Q))}function A(Q){var R=Q._readableState;P("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(Q.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,E(Q)}function x(Q,R){R.readingMore||(R.readingMore=!0,c.nextTick(w,Q,R))}function w(Q,R){for(;!R.reading&&!R.ended&&(R.length=R.length?(L=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):L=R.buffer.consume(Q,R.decoder),L}function N(Q){var R=Q._readableState;P("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,c.nextTick(W,R,Q))}function W(Q,R){if(P("endReadableNT",Q.endEmitted,Q.length),!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,R.readable=!1,R.emit("end"),Q.autoDestroy)){var L=R._writableState;(!L||L.autoDestroy&&L.finished)&&R.destroy()}}function j(Q,R){for(var L=0,V=Q.length;L=R.highWaterMark)||R.ended))return P("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?N(this):g(this),null;if(Q=_(Q,R),Q===0&&R.ended)return R.length===0&&N(this),null;var V=R.needReadable;P("need readable",V),(R.length===0||R.length-Q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(y,_){var v=this._transformState;v.transforming=!1;var g=v.writecb;if(g===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,_!=null&&this.push(_),g(y);var A=this._readableState;A.reading=!1,(A.needReadable||A.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(k,q,S){return q in k?Object.defineProperty(k,q,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[q]=S,k}function u(k,q){return{value:k,done:q}}function d(k){var q=k[M];if(q!==null){var S=k[A].read();S!==null&&(k[v]=null,k[M]=null,k[O]=null,q(u(S,!1)))}}function p(k){c.nextTick(d,k)}function f(k,q){return function(S,C){k.then(function(){return q[_]?void S(u(void 0,!0)):void q[g](S,C)},C)}}var b,h=s("./end-of-stream"),M=Symbol("lastResolve"),O=Symbol("lastReject"),y=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),g=Symbol("handlePromise"),A=Symbol("stream"),x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((b={get stream(){return this[A]},next:function(){var k=this,q=this[y];if(q!==null)return Promise.reject(q);if(this[_])return Promise.resolve(u(void 0,!0));if(this[A].destroyed)return new Promise(function(E,B){c.nextTick(function(){k[y]?B(k[y]):E(u(void 0,!0))})});var S,C=this[v];if(C)S=new Promise(f(C,this));else{var T=this[A].read();if(T!==null)return Promise.resolve(u(T,!1));S=new Promise(this[g])}return this[v]=S,S}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var k=this;return new Promise(function(q,S){k[A].destroy(null,function(C){return C?void S(C):void q(u(void 0,!0))})})}),b),x);i.exports=function(k){var q,S=Object.create(w,(q={},l(q,A,{value:k,writable:!0}),l(q,M,{value:null,writable:!0}),l(q,O,{value:null,writable:!0}),l(q,y,{value:null,writable:!0}),l(q,_,{value:k._readableState.endEmitted,writable:!0}),l(q,g,{value:function(C,T){var E=S[A].read();E?(S[v]=null,S[M]=null,S[O]=null,C(u(E,!1))):(S[M]=C,S[O]=T)},writable:!0}),q));return S[v]=null,h(k,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var T=S[O];return T!==null&&(S[v]=null,S[M]=null,S[O]=null,T(C)),void(S[y]=C)}var E=S[M];E!==null&&(S[v]=null,S[M]=null,S[O]=null,E(u(void 0,!0))),S[_]=!0}),k.on("readable",p.bind(null,S)),S}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,g){var A=Object.keys(v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(v);g&&(x=x.filter(function(w){return Object.getOwnPropertyDescriptor(v,w).enumerable})),A.push.apply(A,x)}return A}function l(v){for(var g,A=1;A>>0),x=this.head,w=0;x;)b(x.data,A,w),w+=x.data.length,x=x.next;return A}},{key:"consume",value:function(g,A){var x;return gk.length?k.length:g;if(w+=q===k.length?k:k.slice(0,g),g-=q,g===0){q===k.length?(++x,this.head=A.next?A.next:this.tail=null):(this.head=A,A.data=k.slice(q));break}++x}return this.length-=x,w}},{key:"_getBuffer",value:function(g){var A=M.allocUnsafe(g),x=this.head,w=1;for(x.data.copy(A),g-=x.data.length;x=x.next;){var k=x.data,q=g>k.length?k.length:g;if(k.copy(A,A.length-g,0,q),g-=q,g===0){q===k.length?(++w,this.head=x.next?x.next:this.tail=null):(this.head=x,x.data=k.slice(q));break}++w}return this.length-=w,A}},{key:_,value:function(g,A){return y(this,l({},A,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return h||M?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(O){!f&&O?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,O)):c.nextTick(l,b,O):f?(c.nextTick(u,b),f(O)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,M=Array(h),O=0;Ov.length)throw new O("streams");var x,w=v.map(function(k,q){var S=qb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var M=p(f);return b===void 0?M.fill(0):typeof h=="string"?M.fill(b,h):M.fill(b),M},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(w){if(!w)return"utf8";for(var k;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}function u(w){var k=l(w);if(typeof k!="string"&&(A.isEncoding===x||!x(w)))throw new Error("Unknown encoding: "+w);return k||w}function d(w){this.encoding=u(w);var k;switch(this.encoding){case"utf16le":this.text=M,this.end=O,k=4;break;case"utf8":this.fillLast=h,k=4;break;case"base64":this.text=y,this.end=_,k=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(k)}function p(w){return 127>=w?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function f(w,k,q){var S=k.length-1;if(S=S)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],q.slice(0,-1)}return q}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",k,w.length-1)}function O(w){var k=w&&w.length?this.write(w):"";if(this.lastNeed){var q=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,q)}return k}function y(w,k){var q=(w.length-k)%3;return q==0?w.toString("base64",k):(this.lastNeed=3-q,this.lastTotal=3,q==1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",k,w.length-q))}function _(w){var k=w&&w.length?this.write(w):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function v(w){return w.toString(this.encoding)}function g(w){return w&&w.length?this.write(w):""}var A=s("safe-buffer").Buffer,x=A.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(w){if(w.length===0)return"";var k,q;if(this.lastNeed){if(k=this.fillLast(w),k===void 0)return"";q=this.lastNeed,this.lastNeed=0}else q=0;return q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:c0)},{}],"/":[function(s,i){function c(_){return _.replace(/a=ice-options:trickle\s\n/g,"")}function l(_){console.warn(_)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:M}=s("buffer"),O=65536;class y extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||y.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},y.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(g=>g),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(g){return void this.destroy(h(g,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=g=>{this._onIceCandidate(g)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(g=>{this.destroy(h(g,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=g=>{this._setupData(g)},this.streams&&this.streams.forEach(g=>{this.addStream(g)}),this._pc.ontrack=g=>{this._onTrack(g)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(g=>{this._addIceCandidate(g)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(g=>{this.destroy(h(g,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const g=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(g).catch(A=>{!g.address||g.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(A,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,g),this._needsNegotiation()}catch(A){this.destroy(h(A,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:g}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(g=>{this.addTrack(g,v)})}}addTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const A=this._senderMap.get(v)||new Map;let x=A.get(g);if(!x)x=this._pc.addTrack(v,g),A.set(g,x),this._senderMap.set(v,A),this._needsNegotiation();else throw x.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,g,A){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const x=this._senderMap.get(v),w=x?x.get(A):null;if(!w)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");g&&this._senderMap.set(g,x),w.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):w.replaceTrack(g)}removeTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const A=this._senderMap.get(v),x=A?A.get(g):null;if(!x)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{x.removed=!0,this._pc.removeTrack(x)}catch(w){w.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(x):this.destroy(h(w,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(g=>{this.removeTrack(g,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,g){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),g()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=O),this.channelName=this._channel.label,this._channel.onmessage=A=>{this._onChannelMessage(A)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=A=>{const x=A.error instanceof Error?A.error:new Error(`Datachannel error: ${A.message} ${A.filename}:${A.lineno}:${A.colno}`);this.destroy(h(x,"ERR_DATA_CHANNEL"))};let g=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(g&&this._onChannelClose(),g=!0):g=!1},5e3)}_read(){}_write(v,g,A){if(this.destroyed)return A(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(x){return this.destroy(h(x,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>O?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=A):A(null)}else this._debug("write before connect"),this._chunk=v,this._cb=A}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,g=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,g),this.emit("iceStateChange",v,g),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const g=A=>(Object.prototype.toString.call(A.values)==="[object Array]"&&A.values.forEach(x=>{Object.assign(A,x)}),A);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(A=>{const x=[];A.forEach(w=>{x.push(g(w))}),v(null,x)},A=>v(A)):0{if(this.destroyed)return;const x=[];A.result().forEach(w=>{const k={};w.names().forEach(q=>{k[q]=w.stat(q)}),k.id=w.id,k.type=w.type,k.timestamp=w.timestamp,x.push(g(k))}),v(null,x)},A=>v(A)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((g,A)=>{if(this.destroyed)return;g&&(A=[]);const x={},w={},k={};let q=!1;A.forEach(C=>{(C.type==="remotecandidate"||C.type==="remote-candidate")&&(x[C.id]=C),(C.type==="localcandidate"||C.type==="local-candidate")&&(w[C.id]=C),(C.type==="candidatepair"||C.type==="candidate-pair")&&(k[C.id]=C)});const S=C=>{q=!0;let T=w[C.localCandidateId];T&&(T.ip||T.address)?(this.localAddress=T.ip||T.address,this.localPort=+T.port):T&&T.ipAddress?(this.localAddress=T.ipAddress,this.localPort=+T.portNumber):typeof C.googLocalAddress=="string"&&(T=C.googLocalAddress.split(":"),this.localAddress=T[0],this.localPort=+T[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let E=x[C.remoteCandidateId];E&&(E.ip||E.address)?(this.remoteAddress=E.ip||E.address,this.remotePort=+E.port):E&&E.ipAddress?(this.remoteAddress=E.ipAddress,this.remotePort=+E.portNumber):typeof C.googRemoteAddress=="string"&&(E=C.googRemoteAddress.split(":"),this.remoteAddress=E[0],this.remotePort=+E[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(A.forEach(C=>{C.type==="transport"&&C.selectedCandidatePairId&&S(k[C.selectedCandidatePairId]),(C.type==="googCandidatePair"&&C.googActiveConnection==="true"||(C.type==="candidatepair"||C.type==="candidate-pair")&&C.selected)&&S(C)}),!q&&(!Object.keys(k).length||Object.keys(w).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(T){return this.destroy(h(T,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const C=this._cb;this._cb=null,C(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>O)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let g=v.data;g instanceof ArrayBuffer&&(g=M.from(g)),this.push(g)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(g=>{this._debug("on track"),this.emit("track",v.track,g),this._remoteTracks.push({track:v.track,stream:g}),this._remoteStreams.some(A=>A.id===g.id)||(this._remoteStreams.push(g),b(()=>{this._debug("on stream"),this.emit("stream",g)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}y.WEBRTC_SUPPORT=!!d(),y.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},y.channelConfig={},i.exports=y},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(H1e);var EWe=H1e.exports;const BWe=Ao(EWe),UB=0,XB=1,U1e=2,X1e=(e,t)=>{Wt(e,UB);const n=c8e(t);Jn(e,n)},G1e=(e,t,n)=>{Wt(e,XB),Jn(e,LB(t,n))},NWe=(e,t,n)=>G1e(t,n,N1(e)),K1e=(e,t,n)=>{try{d1e(t,N1(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},LWe=(e,t)=>{Wt(e,U1e),Jn(e,t)},jWe=K1e,PWe=(e,t,n,o)=>{const r=Qt(e);switch(r){case UB:NWe(e,t,n);break;case XB:K1e(e,n,o);break;case U1e:jWe(e,n,o);break;default:throw new Error("Unknown message type")}return r},V6=3e4;class IWe extends Hz{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=Gc();this.getLocalState()!==null&&V6/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&V6<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&s8(this,o,"timeout")},Ea(V6/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:Gc()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),BM(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const s8=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},pv=(e,t,n=e.states)=>{const o=t.length,r=P1();Wt(r,o);for(let s=0;s{const o=Ua(t),r=Gc(),s=[],i=[],c=[],l=[],u=Qt(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},$We=(e,t)=>{const n=YR(e).buffer,o=YR(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},Y1e=(e,t)=>{if(!t)return kB(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=P1();return va(r,"AES-GCM"),Jn(r,n),Jn(r,new Uint8Array(o)),Fn(r)})},FWe=(e,t)=>{const n=P1();return y2(n,e),Y1e(Fn(n),t)},Z1e=(e,t)=>{if(!t)return kB(e);const n=Ua(e);Wc(n)!=="AES-GCM"&&fRe(Ci("Unknown encryption algorithm"));const r=N1(n),s=N1(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},Q1e=(e,t)=>Z1e(e,t).then(n=>v2(Ua(new Uint8Array(n)))),$1=HRe("y-webrtc"),Gb=0,J1e=3,Cg=1,GB=4,Rg=new Map,_a=new Map,eoe=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),$1("synced ",js,e.name,Rp," with all peers"))},toe=(e,t,n)=>{const o=Ua(t),r=P1(),s=Qt(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case Gb:{Wt(r,Gb);const u=PWe(o,r,c,e);u===XB&&!e.synced&&n(),u===UB&&(l=!0);break}case J1e:Wt(r,Cg),Jn(r,pv(i,Array.from(i.getStates().keys()))),l=!0;break;case Cg:DWe(i,N1(o),e);break;case GB:{const u=Cp(o)===1,d=Wc(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),noe(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},VWe=(e,t)=>{const n=e.room;return $1("received message from ",js,e.remotePeerId,RB," (",n.name,")",Rp,Sx),toe(n,t,()=>{e.synced=!0,$1("synced ",js,n.name,Rp," with ",js,e.remotePeerId),eoe(n)})},H6=(e,t)=>{$1("send message to ",js,e.remotePeerId,Rp,RB," (",e.room.name,")",Sx);try{e.peer.send(Fn(t))}catch{}},HWe=(e,t)=>{$1("broadcast message in ",js,e.name,Rp),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class fv{constructor(t,n,o,r){$1("establishing connection to ",js,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new BWe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),Ex(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{$1("connected to ",js,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=P1();Wt(l,Gb),X1e(l,i),H6(this,l);const u=c.getStates();if(u.size>0){const d=P1();Wt(d,Cg),Jn(d,pv(c,Array.from(u.keys()))),H6(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),eoe(r),this.peer.destroy(),$1("closed connection to ",js,o),i8(r)}),this.peer.on("error",s=>{$1("Error in connection to ",js,o,": ",s),i8(r)}),this.peer.on("data",s=>{const i=VWe(this,s);i!==null&&H6(this,i)})}destroy(){this.peer.destroy()}}const $l=(e,t)=>Y1e(t,e.key).then(n=>e.mux(()=>WWe(e.name,n))),rV=(e,t)=>{e.bcconnected&&$l(e,t),HWe(e,t)},i8=e=>{Rg.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=P1();Wt(t,GB),wg(t,1),va(t,e.peerId),$l(e,Fn(t))}};class UWe{constructor(t,n,o,r){this.peerId=Dne(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=TWe(),this.bcconnected=!1,this._bcSubscriber=s=>Z1e(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=toe(this,i,()=>{});c&&$l(this,Fn(c))})),this._docUpdateHandler=(s,i)=>{const c=P1();Wt(c,Gb),LWe(c,s),rV(this,Fn(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=P1();Wt(d,Cg),Jn(d,pv(this.awareness,u)),rV(this,Fn(d))},this._beforeUnloadHandler=()=>{s8(this.awareness,[t.clientID],"window unload"),_a.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),i8(this);const t=this.name;CWe(t,this._bcSubscriber),this.bcconnected=!0,noe(this);const n=P1();Wt(n,Gb),X1e(n,this.doc),$l(this,Fn(n));const o=P1();Wt(o,Gb),G1e(o,this.doc),$l(this,Fn(o));const r=P1();Wt(r,J1e),$l(this,Fn(r));const s=P1();Wt(s,Cg),Jn(s,pv(this.awareness,[this.doc.clientID])),$l(this,Fn(s))}disconnect(){Rg.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),s8(this.awareness,[this.doc.clientID],"disconnect");const t=P1();Wt(t,GB),wg(t,0),va(t,this.peerId),$l(this,Fn(t)),RWe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.off("exit",this._beforeUnloadHandler)}}const XWe=(e,t,n,o)=>{if(_a.has(n))throw Ci(`A Yjs Doc connected to room "${n}" already exists!`);const r=new UWe(e,t,n,o);return _a.set(n,r),r},Ex=(e,t,n)=>{t.key?FWe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:Yne(o)})}):e.send({type:"publish",topic:t.name,data:n})};class ooe extends kWe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{$1(`connected (${t})`);const n=Array.from(_a.keys());this.send({type:"subscribe",topics:n}),_a.forEach(o=>Ex(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=_a.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew fv(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$1("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(Ho(c,i.from,()=>new fv(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Q1e(CB(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>$1(`disconnect (${t})`))}}class GWe extends Hz{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new IWe(n),maxConns:i=20+Ea(dRe()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?$We(r,t):kB(null),this.room=null,this.key.then(u=>{this.room=XWe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=Ho(Rg,t,()=>new ooe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),Rg.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),_a.delete(this.roomName)}),super.destroy()}}function KWe(e,t){e.on("connect",()=>{$1(`connected (${t})`);const n=Array.from(_a.keys());e.send({type:"subscribe",topics:n}),_a.forEach(o=>Ex(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=_a.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew fv(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$1("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(Ho(c,i.from,()=>new fv(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&Q1e(CB(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>$1(`disconnect (${t})`))}function sV(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(kt(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,bv/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{$1("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,bv/2))}}}const bv=3e4;class YWe extends Hz{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&bv{const n=Ho(Rg,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new ooe(t):()=>new YWe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function QWe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new ZWe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const JWe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new mh;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const O=n[u].fromCRDTDoc(f);p(O)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const M=n[u].fetch;M&&M(d).then(O=>{f.transact(()=>{n[u].applyChangesToDoc(f,O)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let U6;function Wg(){return U6||(U6=JWe(xWe,QWe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),U6}function eTe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function tTe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function roe(e){return{type:"ADD_ENTITIES",entities:e}}function nTe(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=dSe(n,o,s,i):c=Ane(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function oTe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function rTe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function sTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function iTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function aTe(){return Ce("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function cTe(e,t){return Ce("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function lTe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const soe=(e,t,n,o,{__unstableFetch:r=pt,throwOnError:s=!1}={})=>async({dispatch:i})=>{const l=(await i(Xa(e,t))).find(f=>f.kind===e&&f.name===t);let u,d=!1;if(!l)return;const p=await i.__unstableAcquireStoreLock(fo,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let f=!1;try{let b=`${l.baseURL}/${n}`;o&&(b=kt(b,o)),d=await r({path:b,method:"DELETE"}),await i(uSe(e,t,n,!0))}catch(b){f=!0,u=b}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:u}),f&&s)throw u;return d}finally{i.__unstableReleaseStoreLock(p)}},uTe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],M=d[b],O=l[b]?{...M,...o[b]}:o[b];return f[b]=G1(h,O)?void 0:O,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);Wg().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},dTe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},pTe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},fTe=()=>({select:e})=>{e.getUndoManager().addRecord()},ioe=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=pt,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await l(Xa(e,t))).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||zo,f=n[p],b=await l.__unstableAcquireStoreLock(fo,["entities","records",e,t,f||Uc()],{exclusive:!0});try{for(const[y,_]of Object.entries(n))if(typeof _=="function"){const v=_(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[y]:v},{undoIgnore:!0}),n[y]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,M,O=!1;try{const y=`${d.baseURL}${f?"/"+f:""}`,_=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),g=v?v.id:void 0,A=await c.getAutosave(_.type,_.id,g);let x={..._,...A,...n};if(x=Object.keys(x).reduce((w,k)=>(["title","excerpt","content","meta"].includes(k)&&(w[k]=x[k]),w),{status:x.status==="auto-draft"?"draft":void 0}),h=await r({path:`${y}/autosaves`,method:"POST",data:x}),_.id===h.id){let w={..._,...x,...h};w=Object.keys(w).reduce((k,q)=>(["title","excerpt","content"].includes(q)?k[q]=w[q]:q==="status"?k[q]=_.status==="auto-draft"&&w.status==="draft"?w.status:_.status:k[q]=_[q],k),{}),l.receiveEntityRecords(e,t,w,void 0,!0)}else l.receiveAutosaves(_.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(_,v)}),h=await r({path:y,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(y){O=!0,M=y}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:M,isAutosave:o}),O&&s)throw M;return h}finally{l.__unstableReleaseStoreLock(b)}},bTe=e=>async({dispatch:t})=>{const n=qCe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},hTe=(e,t,n,o)=>async({select:r,dispatch:s})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const c=(await s(Xa(e,t))).find(p=>p.kind===e&&p.name===t);if(!c)return;const l=c.key||zo,u=r.getEntityRecordNonTransientEdits(e,t,n),d={[l]:n,...u};return await s.saveEntityRecord(e,t,d,o)},mTe=(e,t,n,o,r)=>async({select:s,dispatch:i})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const c=s.getEntityRecordNonTransientEdits(e,t,n),l={};for(const f of o)_x(l,f,cSe(c,f));const p=(await i(Xa(e,t))).find(f=>f.kind===e&&f.name===t)?.key||zo;return n&&(l[p]=n),await i.saveEntityRecord(e,t,l,r)};function MTe(e){return Ce("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),aoe("create/media",e)}function aoe(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function gTe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function zTe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function OTe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const ATe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c})=>{const u=(await c(Xa(e,t))).find(p=>p.kind===e&&p.name===t),d=u&&u?.revisionKey?u.revisionKey:zo;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},yTe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:bTe,__experimentalReceiveCurrentGlobalStylesId:rTe,__experimentalReceiveThemeBaseGlobalStyles:sTe,__experimentalReceiveThemeGlobalStyleVariations:iTe,__experimentalSaveSpecifiedEntityEdits:mTe,__unstableCreateUndoLevel:fTe,addEntities:roe,deleteEntityRecord:soe,editEntityRecord:uTe,receiveAutosaves:gTe,receiveCurrentTheme:oTe,receiveCurrentUser:tTe,receiveDefaultTemplateId:OTe,receiveEmbedPreview:lTe,receiveEntityRecords:nTe,receiveNavigationFallbackId:zTe,receiveRevisions:ATe,receiveThemeGlobalStyleRevisions:cTe,receiveThemeSupports:aTe,receiveUploadPermissions:MTe,receiveUserPermission:aoe,receiveUserQuery:eTe,redo:pTe,saveEditedEntityRecord:hTe,saveEntityRecord:ioe,undo:dTe},Symbol.toStringTag,{value:"Module"})),zo="id",vTe=["title","excerpt","content"],coe=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>pt({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>pt({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],loe=[{kind:"postType",loadEntities:wTe},{kind:"taxonomy",loadEntities:kTe},{kind:"root",name:"site",plural:"sites",loadEntities:qTe}],xTe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},X6=new WeakMap;function _Te(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof dn&&(t[n]=o.valueOf());return t}function uoe(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:_Te(o),innerBlocks:uoe(n)}})}async function wTe(){const e=await pt({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:vTe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?i0e((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:xTe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>pt({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(X6.has(d)||X6.set(d,uoe(d)),d=X6.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":zo}})}async function kTe(){const e=await pt({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function qTe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>pt({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await pt({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const C2=(e,t,n="get")=>{const o=e==="root"?"":Y4(e),r=Y4(t);return`${n}${o}${r}`};function iV(e){e.forEach(({syncObjectType:t,syncConfig:n})=>{Wg().register(t,n);const o={...n};delete o.fetch,Wg().register(t+"--edit",o)})}const Xa=(e,t)=>async({select:n,dispatch:o})=>{let r=n.getEntitiesConfig(e);const s=!!n.getEntityConfig(e,t);if(r?.length>0&&s)return window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&iV(r),r;const i=loe.find(c=>!t||!c.name?c.kind===e:c.kind===e&&c.name===t);return i?(r=await i.loadEntities(),window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&iV(r),o(roe(r)),r):[]};function doe(e){const{query:t}=e;return t?fh(t).context:"default"}function STe(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function CTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=doe(t),o=t.key||zo;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=sSe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,poe(o,t.itemIds)]))}return e}function RTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=doe(t),{query:o,key:r=zo}=t,s=o?fh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,poe(o,t.itemIds)]))}return e}const WTe=x0([gne(e=>"query"in e),zne(e=>e.query?{...e,...fh(e.query)}:e),vF("context"),vF("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=zo}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:STe(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),TTe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return WTe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},aV=go({items:CTe,itemIsComplete:RTe,queries:TTe});function ETe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function BTe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function NTe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function LTe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function jTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function PTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function ITe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function DTe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const $Te=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function FTe(e){return x0([$Te,gne(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),zne(t=>({key:e.key||zo,...t}))])(go({queriedData:aV,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!G1(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!G1(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=aV(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function VTe(e=coe,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const HTe=(e={},t)=>{const n=VTe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=go(Object.entries(s).reduce((i,[c,l])=>{const u=go(l.reduce((d,p)=>({...d,[p.name]:FTe(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function UTe(e=P6e()){return e}function XTe(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function GTe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function KTe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed}}return e}function YTe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function ZTe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function QTe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function JTe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function eEe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function tEe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function nEe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}const oEe=go({terms:ETe,users:BTe,currentTheme:jTe,currentGlobalStylesId:PTe,currentUser:NTe,themeGlobalStyleVariations:DTe,themeBaseGlobalStyles:ITe,themeGlobalStyleRevisions:tEe,taxonomies:LTe,entities:HTe,editsReference:XTe,undoManager:UTe,embedPreviews:GTe,userPermissions:KTe,autosaves:YTe,blockPatterns:ZTe,blockPatternCategories:QTe,userPatternCategories:JTe,navigationFallbackId:eEe,defaultTemplates:nEe}),rEe={},sEe=nt(e=>(t,n)=>e(fo).isResolving("getEmbedPreview",[n]));function iEe(e,t){Ce("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=kt("/wp/v2/users/?who=authors&per_page=100",t);return foe(e,n)}function aEe(e){return e.currentUser}const foe=ot((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function cEe(e,t){return Ce("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),boe(e,t)}const boe=ot((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function lEe(e,t,n){return Ce("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),gh(e,t,n)}function gh(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const pf=ot((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Wu(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[M]}),_x(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});pf.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=lSe(n)?Number(n):n,t};function uEe(e,t,n,o){return pf(e,t,n,o)}const hoe=ot((e,t,n,o)=>{const r=pf(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(aSe(gh(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function dEe(e,t,n,o){return Array.isArray(Bx(e,t,n,o))}const Bx=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?yne(r,o):null},pEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?vne(r,o):null},fEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=vne(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):bSe(r,o))},bEe=ot(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>pf(e,o,r,i)&&Moe(e,o,r,i));if(s.length){const i=gh(e,o,r);s.forEach(c=>{const l=Nx(e,o,r,c);n.push({key:l?l[i.key||zo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),hEe=ot(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>YB(e,o,r,i));if(s.length){const i=gh(e,o,r);s.forEach(c=>{const l=Nx(e,o,r,c);n.push({key:l?l[i.key||zo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function KB(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const moe=ot((e,t,n,o)=>{const{transientEdits:r}=gh(e,t,n)||{},s=KB(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function Moe(e,t,n,o){return YB(e,t,n,o)||Object.keys(moe(e,t,n,o)).length>0}const Nx=ot((e,t,n,o)=>{const r=hoe(e,t,n,o),s=KB(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function mEe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function YB(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function MEe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function gEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function zEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function OEe(e){Ce("select( 'core' ).getUndoEdit()",{since:"6.3"})}function AEe(e){Ce("select( 'core' ).getRedoEdit()",{since:"6.3"})}function yEe(e){return e.undoManager.hasUndo()}function vEe(e){return e.undoManager.hasRedo()}function Lx(e){return e.currentTheme?pf(e,"root","theme",e.currentTheme):null}function goe(e){return e.currentGlobalStylesId}function xEe(e){var t;return(t=Lx(e)?.theme_supports)!==null&&t!==void 0?t:rEe}function _Ee(e,t){return e.embedPreviews[t]}function wEe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function zoe(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=MB(t,n,o);return e.userPermissions[s]}function kEe(e,t,n,o){return Ce("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),zoe(e,"update",{kind:t,name:n,id:o})}function qEe(e,t,n){return e.autosaves[n]}function SEe(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const CEe=nt(e=>(t,n,o)=>e(fo).hasFinishedResolution("getAutosaves",[n,o]));function REe(e){return e.editsReference}function WEe(e,t){const n=Bx(e,"postType","wp_template",{"find-template":t});return n?.length?Nx(e,"postType","wp_template",n[0].id):null}function TEe(e){const t=Lx(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function EEe(e){const t=Lx(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function BEe(e){return e.blockPatterns}function NEe(e){return e.blockPatternCategories}function LEe(e){return e.userPatternCategories}function jEe(e){Ce("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=goe(e);return t?e.themeGlobalStyleRevisions[t]:null}function PEe(e,t){return e.defaultTemplates[JSON.stringify(t)]}const IEe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?yne(s,r):null},DEe=ot((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Wu(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{M=M?.[O]}),_x(p,h,M)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),$Ee=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:goe,__experimentalGetCurrentThemeBaseGlobalStyles:TEe,__experimentalGetCurrentThemeGlobalStylesVariations:EEe,__experimentalGetDirtyEntityRecords:bEe,__experimentalGetEntitiesBeingSaved:hEe,__experimentalGetEntityRecordNoResolver:uEe,__experimentalGetTemplateForLink:WEe,canUser:zoe,canUserEditEntityRecord:kEe,getAuthors:iEe,getAutosave:SEe,getAutosaves:qEe,getBlockPatternCategories:NEe,getBlockPatterns:BEe,getCurrentTheme:Lx,getCurrentThemeGlobalStylesRevisions:jEe,getCurrentUser:aEe,getDefaultTemplateId:PEe,getEditedEntityRecord:Nx,getEmbedPreview:_Ee,getEntitiesByKind:cEe,getEntitiesConfig:boe,getEntity:lEe,getEntityConfig:gh,getEntityRecord:pf,getEntityRecordEdits:KB,getEntityRecordNonTransientEdits:moe,getEntityRecords:Bx,getEntityRecordsTotalItems:pEe,getEntityRecordsTotalPages:fEe,getLastEntityDeleteError:zEe,getLastEntitySaveError:gEe,getRawEntityRecord:hoe,getRedoEdit:AEe,getReferenceByDistinctEdits:REe,getRevision:DEe,getRevisions:IEe,getThemeSupports:xEe,getUndoEdit:OEe,getUserPatternCategories:LEe,getUserQueryResults:foe,hasEditsForEntityRecord:Moe,hasEntityRecords:dEe,hasFetchedAutosaves:CEe,hasRedo:vEe,hasUndo:yEe,isAutosavingEntityRecord:mEe,isDeletingEntityRecord:MEe,isPreviewEmbedFallback:wEe,isRequestingEmbedPreview:sEe,isSavingEntityRecord:YB},Symbol.toStringTag,{value:"Module"}));function FEe(e){return e.undoManager}function VEe(e){return e.navigationFallbackId}const HEe=nt(e=>ot((t,n)=>e(fo).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(fo).getBlockPatterns()])),Ooe=nt(e=>ot((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(fo).canUser("delete",{kind:n,name:o,id:i}),update:e(fo).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function UEe(e,t,n,o){return Ooe(e,t,n,o)[0]}const XEe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:HEe,getEntityRecordPermissions:UEe,getEntityRecordsPermissions:Ooe,getNavigationFallbackId:VEe,getUndoManager:FEe},Symbol.toStringTag,{value:"Module"}));let $f;function qt(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;$f===void 0&&(document.implementation&&document.implementation.createHTMLDocument?$f=document.implementation.createHTMLDocument("").createElement("textarea"):$f=document.createElement("textarea")),$f.innerHTML=e;const t=$f.textContent;return $f.innerHTML="",t}async function GEe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(pt({path:kt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:qt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(pt({path:kt("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:qt(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=KEe(p,e),p=p.slice(0,c),p}function KEe(e,t){const n=cV(t),o={};for(const r of e)if(r.title){const s=cV(r.title),i=s.filter(c=>n.some(l=>c.includes(l)));o[r.id]=i.length/s.length}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function cV(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const G6=new Map,YEe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:sf(e)};if(!of(e))return Promise.reject(`${e} is not a valid URL.`);const r=dx(e);return!r||!QE(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):G6.has(e)?G6.get(e):pt({path:kt(n,o),...t}).then(s=>(G6.set(e,s),s))};async function ZEe(){const e=await pt({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[KE(n),o]))):[]}const QEe=e=>async({dispatch:t})=>{const n=kt("/wp/v2/users/?who=authors&per_page=100",e),o=await pt({path:n});t.receiveUserQuery(n,o)},JEe=()=>async({dispatch:e})=>{const t=await pt({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},Aoe=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i})=>{const l=(await s(Xa(e,t))).find(d=>d.name===t&&d.kind===e);if(!l)return;const u=await s.__unstableAcquireStoreLock(fo,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&l.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const d=l.getSyncObjectId(n);await Wg().bootstrap(l.syncObjectType,d,p=>{s.receiveEntityRecords(e,t,p,o)}),await Wg().bootstrap(l.syncObjectType+"--edit",d,p=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:p,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],l.key||zo])].join()});const d=kt(l.baseURL+(n?"/"+n:""),{...l.baseURLParams,...o});if(o!==void 0&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const p=await pt({path:d,parse:!1}),f=await p.json(),b=One(p);i.batch(()=>{s.receiveEntityRecords(e,t,f,o);for(const h of Ey){const M=MB(h,{kind:e,name:t,id:n});s.receiveUserPermission(M,b[h]),s.finishResolution("canUser",[h,{kind:e,name:t,id:n}])}})}}finally{s.__unstableReleaseStoreLock(u)}},eBe=mB("getEntityRecord"),tBe=mB("getEntityRecord"),hv=(e,t,n={})=>async({dispatch:o,registry:r})=>{const i=(await o(Xa(e,t))).find(l=>l.name===t&&l.kind===e);if(!i)return;const c=await o.__unstableAcquireStoreLock(fo,["entities","records",e,t],{exclusive:!1});try{n._fields&&(n={...n,_fields:[...new Set([...Wu(n._fields)||[],i.key||zo])].join()});const l=kt(i.baseURL,{...i.baseURLParams,...n});let u,d;if(i.supportsPagination&&n.per_page!==-1){const p=await pt({path:l,parse:!1});u=Object.values(await p.json()),d={totalItems:parseInt(p.headers.get("X-WP-Total")),totalPages:parseInt(p.headers.get("X-WP-TotalPages"))}}else u=Object.values(await pt({path:l}));n._fields&&(u=u.map(p=>(n._fields.split(",").forEach(f=>{p.hasOwnProperty(f)||(p[f]=void 0)}),p))),r.batch(()=>{if(o.receiveEntityRecords(e,t,u,n,!1,void 0,d),!n?._fields&&!n.context){const p=i.key||zo,f=u.filter(b=>b?.[p]).map(b=>[e,t,b[p]]);o.finishResolutions("getEntityRecord",f)}o.__unstableReleaseStoreLock(c)})}catch{o.__unstableReleaseStoreLock(c)}};hv.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const nBe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},oBe=mB("getCurrentTheme"),rBe=e=>async({dispatch:t})=>{try{const n=await pt({path:kt("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},yoe=(e,t,n)=>async({dispatch:o,registry:r})=>{if(!Ey.includes(e))throw new Error(`'${e}' is not a valid action.`);let s=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const d=(await o(Xa(t.kind,t.name))).find(p=>p.name===t.name&&p.kind===t.kind);if(!d)return;s=d.baseURL+(t.id?"/"+t.id:"")}else s=`/wp/v2/${t}`+(n?"/"+n:"");const{hasStartedResolution:i}=r.select(fo);for(const u of Ey){if(u===e)continue;if(i("canUser",[u,t,n]))return}let c;try{c=await pt({path:s,method:"OPTIONS",parse:!1})}catch{return}const l=One(c);r.batch(()=>{for(const u of Ey){const d=MB(u,t,n);o.receiveUserPermission(d,l[u]),u!==e&&o.finishResolution("canUser",[u,t,n])}})},sBe=(e,t,n)=>async({dispatch:o})=>{await o(yoe("update",{kind:e,name:t,id:n}))},iBe=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2"}=await o.getPostType(e),i=await pt({path:`/${s}/${r}/${t}/autosaves?context=edit`});i&&i.length&&n.receiveAutosaves(t,i)},aBe=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},voe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{o=await pt({url:kt(e,{"_wp-find-template":!0})}).then(({data:s})=>s)}catch{}if(!o)return;const r=await n.getEntityRecord("postType","wp_template",o.id);r&&t.receiveEntityRecords("postType","wp_template",[r],{"find-template":e})};voe.shouldInvalidate=e=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&e.kind==="postType"&&e.name==="wp_template";const cBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},lBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await pt({path:`/wp/v2/global-styles/themes/${n.stylesheet}`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},uBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await pt({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},xoe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await pt({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[KE(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};xoe.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const dBe=()=>async({dispatch:e})=>{const t=await ZEe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},pBe=()=>async({dispatch:e})=>{const t=await pt({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},fBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:qt(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},bBe=()=>async({dispatch:e,select:t})=>{const n=await pt({path:kt("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),o=n?._embedded?.self;if(e.receiveNavigationFallbackId(n?.id),o){const s=!t.getEntityRecord("postType","wp_navigation",n.id);e.receiveEntityRecords("postType","wp_navigation",o,void 0,s),e.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])}},hBe=e=>async({dispatch:t})=>{const n=await pt({path:kt("/wp/v2/templates/lookup",e)});n?.id&&t.receiveDefaultTemplateId(e,n.id)},_oe=(e,t,n,o={})=>async({dispatch:r})=>{const i=(await r(Xa(e,t))).find(f=>f.name===t&&f.kind===e);if(!i)return;o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],i.revisionKey||zo])].join()});const c=kt(i.getRevisionsUrl(n),o);let l,u;const d={},p=i.supportsPagination&&o.per_page!==-1;try{u=await pt({path:c,parse:!p})}catch{return}if(u&&(p?(l=Object.values(await u.json()),d.totalItems=parseInt(u.headers.get("X-WP-Total"))):l=Object.values(u),o._fields&&(l=l.map(f=>(o._fields.split(",").forEach(b=>{f.hasOwnProperty(b)||(f[b]=void 0)}),f))),r.receiveRevisions(e,t,n,l,o,!1,d),!o?._fields&&!o.context)){const f=i.key||zo,b=l.filter(h=>h[f]).map(h=>[e,t,n,h[f]]);r.startResolutions("getRevision",b),r.finishResolutions("getRevision",b)}};_oe.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const mBe=(e,t,n,o,r)=>async({dispatch:s})=>{const c=(await s(Xa(e,t))).find(d=>d.name===t&&d.kind===e);if(!c)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Wu(r._fields)||[],c.revisionKey||zo])].join()});const l=kt(c.getRevisionsUrl(n,o),r);let u;try{u=await pt({path:l})}catch{return}u&&s.receiveRevisions(e,t,n,u,r)},MBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:cBe,__experimentalGetCurrentThemeBaseGlobalStyles:lBe,__experimentalGetCurrentThemeGlobalStylesVariations:uBe,__experimentalGetTemplateForLink:voe,canUser:yoe,canUserEditEntityRecord:sBe,getAuthors:QEe,getAutosave:aBe,getAutosaves:iBe,getBlockPatternCategories:pBe,getBlockPatterns:dBe,getCurrentTheme:nBe,getCurrentThemeGlobalStylesRevisions:xoe,getCurrentUser:JEe,getDefaultTemplateId:hBe,getEditedEntityRecord:tBe,getEmbedPreview:rBe,getEntityRecord:Aoe,getEntityRecords:hv,getNavigationFallbackId:bBe,getRawEntityRecord:eBe,getRevision:mBe,getRevisions:_oe,getThemeSupports:oBe,getUserPatternCategories:fBe},Symbol.toStringTag,{value:"Module"}));function lV(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function a8(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*gBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*zBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function uV({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const OBe={requests:[],tree:{locks:[],children:{}}};function QO(e=OBe,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=lV(e.tree,i),l=a8(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=lV(e.tree,o),s=a8(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function ABe(e){return e.requests}function yBe(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of gBe(s,r))if(uV({exclusive:o},c.locks))return!1;const i=a8(s,r);if(!i)return!0;for(const c of zBe(i))if(uV({exclusive:o},c.locks))return!1;return!0}function vBe(){let e=QO(void 0,{type:"@@INIT"});function t(){for(const r of ABe(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if(yBe(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=QO(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=QO(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=QO(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function xBe(){const e=vBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}const{lock:Cb0,unlock:woe}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data"),c8=z.createContext({});function l8({kind:e,type:t,id:n,children:o}){const r=z.useContext(c8),s=z.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(c8.Provider,{value:s,children:o})}let Or=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const _Be=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function ZB(e,t){return D((n,o)=>e(s=>wBe(n(s)),o),t)}const wBe=ps(e=>{const t={};for(const n in e)_Be.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=Or.Resolving;break;case"finished":i=Or.Success;break;case"error":i=Or.Error;break;case void 0:i=Or.Idle;break}return{data:r,status:i,isResolving:i===Or.Resolving,hasStarted:i!==Or.Idle,hasResolved:i===Or.Success||i===Or.Error}}});return t}),dV={};function koe(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=ie(ce),i=z.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=D(f=>o.enabled?{editedRecord:f(ce).getEditedEntityRecord(e,t,n),hasEdits:f(ce).hasEditsForEntityRecord(e,t,n),edits:f(ce).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:dV,hasEdits:!1,edits:dV},[e,t,n,o.enabled]),{data:d,...p}=ZB(f=>o.enabled?f(ce).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const kBe=[];function Kb(e,t,n={},o={enabled:!0}){const r=kt("",n),{data:s,...i}=ZB(u=>o.enabled?u(ce).getEntityRecords(e,t,n):{data:kBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=D(u=>o.enabled?{totalItems:u(ce).getEntityRecordsTotalItems(e,t,n),totalPages:u(ce).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}const pV=new Set;function qBe(){return globalThis.SCRIPT_DEBUG===!0}function Xt(e){if(qBe()&&!pV.has(e)){console.warn(e);try{throw Error(e)}catch{}pV.add(e)}}function qoe(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&Xt("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),ZB(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(ce),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),M=c.isResolving||h.isResolving,O=c.hasResolved&&h.hasResolved;let y=Or.Idle;return M?y=Or.Resolving:O&&(y=Or.Success),{status:y,isResolving:M,hasResolved:O,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=Or.Idle;return p?b=Or.Resolving:f&&(b=Or.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var SBe={grad:.9,turn:360,rad:360/(2*Math.PI)},ic=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},j1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ps=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Soe=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},fV=function(e){return{r:Ps(e.r,0,255),g:Ps(e.g,0,255),b:Ps(e.b,0,255),a:Ps(e.a)}},K6=function(e){return{r:j1(e.r),g:j1(e.g),b:j1(e.b),a:j1(e.a,3)}},CBe=/^#([0-9a-f]{3,8})$/i,JO=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Coe=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},Roe=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},bV=function(e){return{h:Soe(e.h),s:Ps(e.s,0,100),l:Ps(e.l,0,100),a:Ps(e.a)}},hV=function(e){return{h:j1(e.h),s:j1(e.s),l:j1(e.l),a:j1(e.a,3)}},mV=function(e){return Roe((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},NM=function(e){return{h:(t=Coe(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},RBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,WBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,TBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,EBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,u8={string:[[function(e){var t=CBe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?j1(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?j1(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=TBe.exec(e)||EBe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:fV({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=RBe.exec(e)||WBe.exec(e);if(!t)return null;var n,o,r=bV({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(SBe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return mV(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return ic(t)&&ic(n)&&ic(o)?fV({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!ic(t)||!ic(n)||!ic(o))return null;var i=bV({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return mV(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!ic(t)||!ic(n)||!ic(o))return null;var i=function(c){return{h:Soe(c.h),s:Ps(c.s,0,100),v:Ps(c.v,0,100),a:Ps(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return Roe(i)},"hsv"]]},MV=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=K6(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?JO(j1(255*s)):"","#"+JO(n)+JO(o)+JO(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return K6(this.rgba)},e.prototype.toRgbString=function(){return t=K6(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return hV(NM(this.rgba))},e.prototype.toHslString=function(){return t=hV(NM(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=Coe(this.rgba),{h:j1(t.h),s:j1(t.s),v:j1(t.v),a:j1(t.a,3)};var t},e.prototype.invert=function(){return Tt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Tt(Y6(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tt(Y6(this.rgba,-t))},e.prototype.grayscale=function(){return Tt(Y6(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tt(gV(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tt(gV(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Tt({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):j1(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=NM(this.rgba);return typeof t=="number"?Tt({h:t,s:n.s,l:n.l,a:n.a}):j1(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tt(t).toHex()},e}(),Tt=function(e){return e instanceof d8?e:new d8(e)},zV=[],fs=function(e){e.forEach(function(t){zV.indexOf(t)<0&&(t(d8,u8),zV.push(t))})};function bs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var M=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));Ml?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const Woe="block-default",p8=["attributes","supports","save","migrate","isEligible","apiVersion"],Id={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},aa={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},NBe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:LBe,unlock:Bu}=ur("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),OV={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function mv(e){return e!==null&&typeof e=="object"}function jBe({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(OV).forEach(r=>{o[r]&&(o[r]=f8(OV[r],o[r],e))}),o}function PBe(e,t){const n=mv(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(U0(Ve).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Bu(sr(Ve));if(mv(e)){const s=jBe(e);o(n,s)}return r(n,t),U0(Ve).getBlockType(n)}function f8(e,t,n){return typeof e=="string"&&typeof t=="string"?ye(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>f8(e[0],o,n)):mv(e)&&Object.entries(e).length&&mv(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=f8(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function IBe(e){const t=U0(Ve).getBlockType(e);if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+e+'" is not registered.');return}return sr(Ve).removeBlockTypes(e),t}function DBe(e){sr(Ve).setFreeformFallbackBlockName(e)}function Nu(){return U0(Ve).getFreeformFallbackBlockName()}function Toe(){return U0(Ve).getGroupingBlockName()}function $Be(e){sr(Ve).setUnregisteredFallbackBlockName(e)}function Zz(){return U0(Ve).getUnregisteredFallbackBlockName()}function FBe(e){sr(Ve).setDefaultBlockName(e)}function VBe(e){sr(Ve).setGroupingBlockName(e)}function Pn(){return U0(Ve).getDefaultBlockName()}function Nt(e){return U0(Ve)?.getBlockType(e)}function ir(){return U0(Ve).getBlockTypes()}function Yt(e,t,n){return U0(Ve).getBlockSupport(e,t,n)}function it(e,t,n){return U0(Ve).hasBlockSupport(e,t,n)}function dd(e){return e?.name==="core/block"}function zh(e){return e?.name==="core/template-part"}const jx=(e,t)=>U0(Ve).getBlockVariations(e,t),HBe=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,getPlaceholder:i,canUserEditValue:c,getFieldsList:l}=e,u=Bu(U0(Ve)).getBlockBindingsSource(t);if(u?.getValues){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(n&&u?.label){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings "'+t+'" source label is already defined in the server.');return}if(!n&&!u?.label){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source label must be a string.");return}if(o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getPlaceholder must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source canUserEditValue must be a function.");return}if(l&&typeof l!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getFieldsList must be a function.");return}return Bu(sr(Ve)).addBlockBindingsSource(e)};function UBe(e){if(!Eoe(e)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+e+'" is not registered.');return}Bu(sr(Ve)).removeBlockBindingsSource(e)}function Eoe(e){return Bu(U0(Ve)).getBlockBindingsSource(e)}function XBe(){return Bu(U0(Ve)).getAllBlockBindingsSources()}fs([bs,ff]);const AV=["#191e23","#f8f9f9"];function Yb(e){var t;return Object.entries((t=Nt(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return o.hasOwnProperty("default")?r===o.default:o.type==="rich-text"?!r?.length:r===void 0})}function Kc(e){return e.name===Pn()&&Yb(e)}function Boe(e){return!!e&&(typeof e=="string"||z.isValidElement(e)||typeof e=="function"||e instanceof z.Component)}function GBe(e){if(e=e||Woe,Boe(e))return{src:e};if("background"in e){const t=Tt(e.background),n=r=>t.contrast(r),o=Math.max(...AV.map(n));return{...e,foreground:e.foreground?e.foreground:AV.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function Qz(e){return typeof e=="string"?Nt(e):e}function QB(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():Wr(s):r}function KBe(e,t,n,o="vertical"){const r=e?.title,s=e?QB(e,t,"accessibility"):"",i=n!==void 0,c=s&&s!==r;return i&&o==="vertical"?c?le(m("%1$s Block. Row %2$d. %3$s"),r,n,s):le(m("%1$s Block. Row %2$d"),r,n):i&&o==="horizontal"?c?le(m("%1$s Block. Column %2$d. %3$s"),r,n,s):le(m("%1$s Block. Column %2$d"),r,n):c?le(m("%1$s Block. %2$s"),r,s):le(m("%s Block"),r)}function Noe(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new dn}function JB(e,t){const n=Nt(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof dn?o[r]=i:typeof i=="string"&&(o[r]=dn.fromHTMLString(i)):s.type==="string"&&i instanceof dn?o[r]=i.toHTMLString():o[r]=i;else{const c=Noe(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function YBe(e,t){const n=Nt(e)?.attributes;return n?Object.keys(n).filter(r=>n[r]?.__experimentalRole===t):[]}function bf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const ZBe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function eN(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function Mv(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function QBe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[KE(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function JBe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function eNe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...eN(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function tNe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(eN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Mv([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=Mv([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function nNe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(eN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Mv([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:Mv([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function Px(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const oNe=Px("SET_DEFAULT_BLOCK_NAME"),rNe=Px("SET_FREEFORM_FALLBACK_BLOCK_NAME"),sNe=Px("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),iNe=Px("SET_GROUPING_BLOCK_NAME");function aNe(e=ZBe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function cNe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return bf(e,t.namespace)}return e}function yV(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function lNe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{label:e[t.name]?.label||t.label,usesContext:yV(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,getPlaceholder:t.getPlaceholder,canUserEditValue:t.canUserEditValue,getFieldsList:t.getFieldsList}};case"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{...e[t.name],label:t.label,usesContext:yV(e[t.name]?.usesContext,t.usesContext)}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return bf(e,t.name)}return e}const uNe=go({bootstrappedBlockTypes:QBe,unprocessedBlockTypes:JBe,blockTypes:eNe,blockStyles:tNe,blockVariations:nNe,defaultBlockName:oNe,freeformFallbackBlockName:rNe,unregisteredFallbackBlockName:sNe,groupingBlockName:iNe,categories:aNe,collections:cNe,blockBindingsSources:lNe}),Tg=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function vV(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function Loe(e,t){return vV(e)&&vV(t)?Object.entries(t).every(([n,o])=>Loe(e?.[n],o)):e===t}const joe=(e,t)=>typeof t=="string"?Jz(e,t):t,Poe=ot(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function Jz(e,t){return e.blockTypes[t]}function dNe(e,t){return e.blockStyles[t]}const tN=ot((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function pNe(e,t,n,o){const r=tN(e,t,o);if(!r)return r;const s=Jz(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=Tg(u.attributes,b);if(h===void 0)return!1;let M=Tg(n,b);return M instanceof dn&&(M=M.toHTMLString()),Loe(M,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function fNe(e,t,n){const o=tN(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function bNe(e){return e.categories}function hNe(e){return e.collections}function mNe(e){return e.defaultBlockName}function MNe(e){return e.freeformFallbackBlockName}function gNe(e){return e.unregisteredFallbackBlockName}function zNe(e){return e.groupingBlockName}const nN=ot((e,t)=>Poe(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),Ioe=(e,t,n,o)=>{const r=joe(e,t);return r?.supports?Tg(r.supports,n,o):o};function Doe(e,t,n,o){return!!Ioe(e,t,n,o)}function xV(e){return Gs(e??"").toLowerCase().trim()}function ONe(e,t,n=""){const o=joe(e,t),r=xV(n),s=i=>xV(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const ANe=(e,t)=>nN(e,t).length>0,yNe=(e,t)=>nN(e,t).some(n=>Doe(e,n,"inserter",!0)),vNe=ot((e,t)=>{const n=Jz(e,t);return n?Object.entries(n.attributes).some(([,{__experimentalRole:o}])=>o==="content"):!1},(e,t)=>[e.blockTypes[t]?.attributes]),xNe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:vNe,getActiveBlockVariation:pNe,getBlockStyles:dNe,getBlockSupport:Ioe,getBlockType:Jz,getBlockTypes:Poe,getBlockVariations:tN,getCategories:bNe,getChildBlockNames:nN,getCollections:hNe,getDefaultBlockName:mNe,getDefaultBlockVariation:fNe,getFreeformFallbackBlockName:MNe,getGroupingBlockName:zNe,getUnregisteredFallbackBlockName:gNe,hasBlockSupport:Doe,hasChildBlocks:ANe,hasChildBlocksWithInserterSupport:yNe,isMatchingSearchTerm:ONe},Symbol.toStringTag,{value:"Module"})),_Ne=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function _V(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const wNe=ot((e,t,n)=>{if(!t)return _V(_Ne,t,n);const o=Jz(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Id).forEach(s=>{if(Id[s].support){if(Id[s].requiresOptOut&&Id[s].support[0]in o.supports&&Tg(o.supports,Id[s].support)!==!1){r.push(s);return}Tg(o.supports,Id[s].support,!1)&&r.push(s)}}),_V(r,t,n)},(e,t)=>[e.blockTypes[t]]);function kNe(e,t){return e.bootstrappedBlockTypes[t]}function qNe(e){return e.unprocessedBlockTypes}function SNe(e){return e.blockBindingsSources}function CNe(e,t){return e.blockBindingsSources[t]}const RNe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:SNe,getBlockBindingsSource:CNe,getBootstrappedBlockType:kNe,getSupportedStyles:wNe,getUnprocessedBlockTypes:qNe},Symbol.toStringTag,{value:"Module"}));var $oe={exports:{}},on={};/** + */(function(e,t){(function(o,r){e.exports=r()})(Dn,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return U}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(X){try{return document.execCommand(X)}catch{return!1}}var M=function(Z){var ne=b()(Z);return h("cut"),ne},z=M;function y(X){var Z=document.documentElement.getAttribute("dir")==="rtl",ne=document.createElement("textarea");ne.style.fontSize="12pt",ne.style.border="0",ne.style.padding="0",ne.style.margin="0",ne.style.position="absolute",ne.style[Z?"right":"left"]="-9999px";var oe=window.pageYOffset||document.documentElement.scrollTop;return ne.style.top="".concat(oe,"px"),ne.setAttribute("readonly",""),ne.value=X,ne}var x=function(Z,ne){var oe=y(Z);ne.container.appendChild(oe);var Y=b()(oe);return h("copy"),oe.remove(),Y},v=function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},oe="";return typeof Z=="string"?oe=x(Z,ne):Z instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Z?.type)?oe=x(Z.value,ne):(oe=b()(Z),h("copy")),oe},g=v;function A(X){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(ne){return typeof ne}:A=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},A(X)}var _=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=Z.action,oe=ne===void 0?"copy":ne,Y=Z.container,ee=Z.target,ie=Z.text;if(oe!=="copy"&&oe!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ee!==void 0)if(ee&&A(ee)==="object"&&ee.nodeType===1){if(oe==="copy"&&ee.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(oe==="cut"&&(ee.hasAttribute("readonly")||ee.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ie)return g(ie,{container:Y});if(ee)return oe==="cut"?z(ee):g(ee,{container:Y})},w=_;function k(X){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(ne){return typeof ne}:k=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},k(X)}function q(X,Z){if(!(X instanceof Z))throw new TypeError("Cannot call a class as a function")}function S(X,Z){for(var ne=0;ne"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(X){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},I(X)}function P(X,Z){var ne="data-clipboard-".concat(X);if(Z.hasAttribute(ne))return Z.getAttribute(ne)}var H=function(X){T(ne,X);var Z=B(ne);function ne(oe,Y){var ee;return q(this,ne),ee=Z.call(this),ee.resolveOptions(Y),ee.listenClick(oe),ee}return C(ne,[{key:"resolveOptions",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Y.action=="function"?Y.action:this.defaultAction,this.target=typeof Y.target=="function"?Y.target:this.defaultTarget,this.text=typeof Y.text=="function"?Y.text:this.defaultText,this.container=k(Y.container)==="object"?Y.container:document.body}},{key:"listenClick",value:function(Y){var ee=this;this.listener=p()(Y,"click",function(ie){return ee.onClick(ie)})}},{key:"onClick",value:function(Y){var ee=Y.delegateTarget||Y.currentTarget,ie=this.action(ee)||"copy",se=w({action:ie,container:this.container,target:this.target(ee),text:this.text(ee)});this.emit(se?"success":"error",{action:ie,text:se,trigger:ee,clearSelection:function(){ee&&ee.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Y){return P("action",Y)}},{key:"defaultTarget",value:function(Y){var ee=P("target",Y);if(ee)return document.querySelector(ee)}},{key:"defaultText",value:function(Y){return P("text",Y)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Y){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return g(Y,ee)}},{key:"cut",value:function(Y){return z(Y)}},{key:"isSupported",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ee=typeof Y=="string"?[Y]:Y,ie=!!document.queryCommandSupported;return ee.forEach(function(se){ie=ie&&!!document.queryCommandSupported(se)}),ie}}]),ne}(u()),U=H},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,M,z){var y=p.apply(this,arguments);return f.addEventListener(h,y,z),{destroy:function(){f.removeEventListener(h,y,z)}}}function d(f,b,h,M,z){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(y){return u(y,b,h,M,z)}))}function p(f,b,h,M){return function(z){z.delegateTarget=l(z.target,b),z.delegateTarget&&M.call(f,z)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,M,z){if(!h&&!M&&!z)throw new Error("Missing required arguments");if(!l.string(M))throw new TypeError("Second argument must be a String");if(!l.fn(z))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,M,z);if(l.nodeList(h))return f(h,M,z);if(l.string(h))return b(h,M,z);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,M,z){return h.addEventListener(M,z),{destroy:function(){h.removeEventListener(M,z)}}}function f(h,M,z){return Array.prototype.forEach.call(h,function(y){y.addEventListener(M,z)}),{destroy:function(){Array.prototype.forEach.call(h,function(y){y.removeEventListener(M,z)})}}}function b(h,M,z){return u(document.body,h,M,z)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{const s=new I6e(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function Ta(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const Si=8,kp=9,y1=13,Ea=27,qx=32,D6e=33,F6e=34,Ag=35,$b=36,Bs=37,xi=38,Ns=39,Do=40,_a=46,$6e=121,ui="alt",la="ctrl",Jd="meta",di="shift";function pne(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function $z(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const Sx={primary:e=>e()?[Jd]:[la],primaryShift:e=>e()?[di,Jd]:[la,di],primaryAlt:e=>e()?[ui,Jd]:[la,ui],secondary:e=>e()?[di,ui,Jd]:[la,di,ui],access:e=>e()?[la,ui]:[di,ui],ctrl:()=>[la],alt:()=>[ui],ctrlShift:()=>[la,di],shift:()=>[di],shiftAlt:()=>[di,ui],undefined:()=>[]},V6e=$z(Sx,e=>(t,n=Ta)=>[...e(n),t.toLowerCase()].join("+")),fne=$z(Sx,e=>(t,n=Ta)=>{const o=n(),r={[ui]:o?"⌥":"Alt",[la]:o?"⌃":"Ctrl",[Jd]:"⌘",[di]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),pne(t)]}),er=$z(fne,e=>(t,n=Ta)=>e(t,n).join("")),bne=$z(Sx,e=>(t,n=Ta)=>{const o=n(),r={[di]:"Shift",[Jd]:o?"Command":"Control",[la]:"Control",[ui]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return pne((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function H6e(e){return[ui,la,Jd,di].filter(t=>e[`${t}Key`])}const Fs=$z(Sx,e=>(t,n,o=Ta)=>{const r=e(o),s=H6e(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function Cx(e="firstElement"){const t=O.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=O.useRef();return O.useEffect(()=>{t.current=e},[e]),Et(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current==="firstElement"){o.current=setTimeout(()=>{const i=Ln.tabbable.find(r)[0];i&&n(i)},0);return}return n(r),()=>{o.current&&clearTimeout(o.current)}}},[])}let KO=null;function _B(e){const t=O.useRef(null),n=O.useRef(null),o=O.useRef(e);return O.useEffect(()=>{o.current=e},[e]),O.useCallback(r=>{if(r){if(t.current=r,n.current)return;n.current=r.ownerDocument.activeElement}else if(n.current){const i=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!i){var s;(s=KO)!==null&&s!==void 0||(KO=n.current);return}o.current?o.current():(n.current.isConnected?n.current:KO)?.focus(),KO=null}},[])}const U6e=["button","submit"];function X6e(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return U6e.includes(e.type)}return!1}function hne(e){const t=O.useRef(e);O.useEffect(()=>{t.current=e},[e]);const n=O.useRef(!1),o=O.useRef(),r=O.useCallback(()=>{clearTimeout(o.current)},[]);O.useEffect(()=>()=>r(),[]),O.useEffect(()=>{e||r()},[e,r]);const s=O.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:X6e(u)&&(n.current=!0)},[]),i=O.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function YO(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Gt(e){const t=O.useRef(),n=O.useRef(!1),o=O.useRef(!1),r=O.useRef([]),s=O.useRef(e);return s.current=e,O.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(YO(l,null),YO(i,t.current))}),r.current=e},e),O.useLayoutEffect(()=>{o.current=!1}),O.useCallback(i=>{YO(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)YO(l,i)},[])}function mne(e){const t=O.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;O.useEffect(()=>{t.current=e},Object.values(e));const o=xB(),r=Cx(e.focusOnMount),s=_B(),i=hne(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=O.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===Ea&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[Gt([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function wB({isDisabled:e=!1}={}){return Et(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=Pr(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}const kB=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Mne({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=O.useState(!1),s=O.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});kB(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=O.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=O.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=O.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return O.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const w$=new Map;function G6e(e){if(!e)return null;let t=w$.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),w$.set(e,t),t):null)}function qB(e){const t=O.useMemo(()=>{const n=G6e(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return O.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function t1(e){const t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}const Zs=()=>qB("(prefers-reduced-motion: reduce)");function K6e(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const k$=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:Jr(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:K6e(o[n].changes,t.changes)}:o.push(t),o};function Y6e(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=k$(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!Jr(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=k$(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const q$={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},Z6e={">=":"min-width","<":"max-width"},Q6e={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=O.useContext(gne),o=!n&&`(${Z6e[t]}: ${q$[e]}px)`,r=qB(o||void 0);return n?Q6e[t](q$[e],n):r};g0.__experimentalWidthProvider=gne.Provider;const J6e=e=>{let t;if(!e.contentBoxSize)t=[e.contentRect.width,e.contentRect.height];else if(e.contentBoxSize[0]){const r=e.contentBoxSize[0];t=[r.inlineSize,r.blockSize]}else{const r=e.contentBoxSize;t=[r.inlineSize,r.blockSize]}const[n,o]=t.map(r=>Math.round(r));return{width:n,height:o}},eqe={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1};function tqe({onResize:e}){const t=O.useRef(null),n=O.useRef(e);return O.useLayoutEffect(()=>{n.current=e},[e]),O.useLayoutEffect(()=>{const o=t.current,r=new ResizeObserver(s=>{for(const i of s){const c=J6e(i);n.current(c)}});return r.observe(o),()=>{r.unobserve(o)}},[]),a.jsx("div",{ref:t,style:eqe,"aria-hidden":"true"})}function nqe(e,t){return e.width===t.width&&e.height===t.height}const S$={width:null,height:null};function Ci(){const[e,t]=O.useState(S$),n=O.useRef(S$),o=O.useCallback(s=>{nqe(n.current,s)||(n.current=s,t(s))},[]);return[a.jsx(tqe,{onResize:o}),e]}var oqe={exports:{}};(function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof Dn!=null?Dn:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,M=0,z=0,y={get didTimeout(){return!1},timeRemaining:function(){var T=p-(Date.now()-M);return T<0?0:T}},x=v(function(){p=22,b=66,f=0});function v(T){var W,B,N=99,E=function(){var L=Date.now()-B;L9?o=setTimeout(w,n):(n=0,w()))}function q(){var T,W,B,N=p>9?9:1;if(M=Date.now(),d=!1,o=null,u>2||M-n-50N;W++)T=l.shift(),z++,T&&T(y);l.length?k():u=0}function S(T){return h++,l.push(T),k(),h}function C(T){var W=T-1-z;l[W]&&(l[W]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=S,s.cancelIdleCallback=C,s.document&&document.addEventListener&&(s.addEventListener("scroll",A,!0),s.addEventListener("resize",A),document.addEventListener("focus",A,!0),document.addEventListener("mouseover",A,!0),["click","keypress","touchstart","mousedown"].forEach(function(T){document.addEventListener(T,A,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(A).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(W){var B,N;if(s.requestIdleCallback=function(E,L){return L&&typeof L.timeout=="number"?W(E,L.timeout):W(E)},s.IdleCallbackDeadline&&(B=IdleCallbackDeadline.prototype)){if(N=Object.getOwnPropertyDescriptor(B,"timeRemaining"),!N||!N.configurable||!N.get)return;Object.defineProperty(B,"timeRemaining",{value:function(){return N.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:S,cancel:C}})})(oqe);function rqe(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const C$=rqe(),zne=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}C$(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,C$(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function sqe(e,t){const n=[];for(let o=0;o{let s=sqe(e,o);s.length{Jo.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function iqe(e,t){if(e.length!==t.length)return!1;for(var n=0;nPr(e,t??0,n),[e,t,n]);return O.useEffect(()=>()=>o.cancel(),[o]),o}function Ane(e=""){const[t,n]=O.useState(e),[o,r]=O.useState(e),s=Xo(r,250);return O.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function t8(e,t,n){const o=One(()=>zB(e,t??0,n),[e,t,n]);return O.useEffect(()=>()=>o.cancel(),[o]),o}function Lf(e){const t=O.useRef();return t.current=e,t}function Rx({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=Lf(n),u=Lf(o),d=Lf(r),p=Lf(s),f=Lf(i),b=Lf(c);return Et(h=>{if(t)return;const M=e??h;let z=!1;const{ownerDocument:y}=M;function x(q){const{defaultView:S}=y;if(!q||!S||!(q instanceof S.HTMLElement)||!M.contains(q))return!1;let C=q;do if(C.dataset.isDropZone)return C===M;while(C=C.parentElement);return!1}function v(q){z||(z=!0,y.addEventListener("dragend",k),y.addEventListener("mousemove",k),u.current&&u.current(q))}function g(q){q.preventDefault(),!M.contains(q.relatedTarget)&&d.current&&d.current(q)}function A(q){!q.defaultPrevented&&b.current&&b.current(q),q.preventDefault()}function _(q){x(q.relatedTarget)||p.current&&p.current(q)}function w(q){q.defaultPrevented||(q.preventDefault(),q.dataTransfer&&q.dataTransfer.files.length,l.current&&l.current(q),k(q))}function k(q){z&&(z=!1,y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),f.current&&f.current(q))}return M.dataset.isDropZone="true",M.addEventListener("drop",w),M.addEventListener("dragenter",g),M.addEventListener("dragover",A),M.addEventListener("dragleave",_),y.addEventListener("dragenter",v),()=>{delete M.dataset.isDropZone,M.removeEventListener("drop",w),M.removeEventListener("dragenter",g),M.removeEventListener("dragover",A),M.removeEventListener("dragleave",_),y.removeEventListener("dragend",k),y.removeEventListener("mousemove",k),y.removeEventListener("dragenter",v)}},[t,e])}function yne(){return Et(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const aqe=30;function cqe(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:aqe,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=O.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return O.useLayoutEffect(()=>{if(!c)return;const d=Cr(e.current),p=b=>{var h;if(!d)return;const M=Math.ceil(d.clientHeight/t),z=b?M:(h=o?.windowOverscan)!==null&&h!==void 0?h:M,y=Math.floor(d.scrollTop/t),x=Math.max(0,y-z),v=Math.min(n-1,y+M+z);u(g=>{const A={visibleItems:M,start:x,end:v,itemInView:_=>x<=_&&_<=v};return g.start!==A.start||g.end!==A.end||g.visibleItems!==A.visibleItems?A:g})};p(!0);const f=Pr(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),O.useLayoutEffect(()=>{if(!c)return;const d=Cr(e.current),p=f=>{switch(f.keyCode){case $b:return d?.scrollTo({top:0});case Ag:return d?.scrollTo({top:n*t});case D6e:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case F6e:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function vne(e,t){const[n,o]=O.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return O.useSyncExternalStore(n,o,o)}function xne(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function nt(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function N6(e){return e.isRegistryControl=!0,e}const lqe="@@data/SELECT",uqe="@@data/RESOLVE_SELECT",dqe="@@data/DISPATCH",pqe={[lqe]:N6(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[uqe]:N6(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[dqe]:N6(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},fqe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews"],R$=[];let n8;try{n8=!globalThis.IS_WORDPRESS_CORE}catch{n8=!0}const cr=(e,t)=>{if(!fqe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!n8&&R$.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return R$.push(t),{lock:bqe,unlock:hqe}};function bqe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");RM in e||(e[RM]={}),_ne.set(e[RM],t)}function hqe(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(RM in e))throw new Error("Cannot unlock an object that was not locked before. ");return _ne.get(e[RM])}const _ne=new WeakMap,RM=Symbol("Private API ID"),{lock:nM,unlock:jf}=cr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),mqe=()=>e=>t=>Y0e(t)?t.then(n=>{if(n)return e(n)}):e(t),Mqe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function gqe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const zqe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function Pl(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const Oqe=zqe("selectorName")((e=new ia,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new ia(e);return n.set(Pl(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new ia(e);return n.set(Pl(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new ia(e);return n.set(Pl(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new ia(e);for(const o of t.args)n.set(Pl(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new ia(e);for(const o of t.args)n.set(Pl(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new ia(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(Pl(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new ia(e);return n.delete(Pl(t.args)),n}}return e}),Aqe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return Oqe(e,t)}return e};var L6={};function yqe(e){return[e]}function vqe(e){return!!e&&typeof e=="object"}function xqe(){var e={clear:function(){e.head=null}};return e}function W$(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const Wqe=at(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),Tqe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:Wqe,getCachedResolvers:Cqe,getIsResolving:_qe,getResolutionError:qqe,getResolutionState:af,hasFinishedResolution:wqe,hasResolutionFailed:kqe,hasResolvingSelectors:Rqe,hasStartedResolution:wne,isResolving:Sqe},Symbol.toStringTag,{value:"Module"}));function kne(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function qne(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Sne(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function Eqe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function Bqe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function Nqe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function Lqe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function jqe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function Pqe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const Iqe=Object.freeze(Object.defineProperty({__proto__:null,failResolution:Sne,failResolutions:Nqe,finishResolution:qne,finishResolutions:Bqe,invalidateResolution:Lqe,invalidateResolutionForStore:jqe,invalidateResolutionForStoreSelector:Pqe,startResolution:kne,startResolutions:Eqe},Symbol.toStringTag,{value:"Module"})),j6=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},eu=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),Dqe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function Fqe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(j6(n))},clear(t,n){e[t]&&e[t].delete(j6(n))},markAsRunning(t,n){e[t]||(e[t]=new ia),e[t].set(j6(n),!0)}}}function T$(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function tr(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=$qe(e,t,i,{registry:i,get dispatch(){return z},get select(){return w},get resolveSelect(){return T()}});nM(d,r);const p=Fqe();function f(E){return(...L)=>Promise.resolve(d.dispatch(E(...L)))}const b={...eu(Iqe,f),...eu(t.actions,f)},h=T$(f),M=new Proxy(()=>{},{get:(E,L)=>{const I=n[L];return I?h.get(I,L):b[L]}}),z=new Proxy(M,{apply:(E,L,[I])=>d.dispatch(I)});nM(b,M);const y=t.resolvers?Uqe(t.resolvers):{};function x(E,L){E.isRegistrySelector&&(E.registry=i);const I=(...H)=>{H=o8(E,H);const U=d.__unstableOriginalGetState();return E.isRegistrySelector&&(E.registry=i),E(U.root,...H)};I.__unstableNormalizeArgs=E.__unstableNormalizeArgs;const P=y[L];return P?Xqe(I,L,P,d,p):(I.hasResolver=!1,I)}function v(E){const L=(...I)=>{const P=d.__unstableOriginalGetState(),H=I&&I[0],U=I&&I[1],X=t?.selectors?.[H];return H&&X&&(I[1]=o8(X,U)),E(P.metadata,...I)};return L.hasResolver=!1,L}const g={...eu(Tqe,v),...eu(t.selectors,x)},A=T$(x);for(const[E,L]of Object.entries(o))A.get(L,E);const _=new Proxy(()=>{},{get:(E,L)=>{const I=o[L];return I?A.get(I,L):g[L]}}),w=new Proxy(_,{apply:(E,L,[I])=>I(d.__unstableOriginalGetState())});nM(g,_);const k=Vqe(g,d),q=Hqe(g,d),S=()=>g,C=()=>b,T=()=>k,W=()=>q;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const B=d&&(E=>(c.add(E),()=>c.delete(E)));let N=d.__unstableOriginalGetState();return d.subscribe(()=>{const E=d.__unstableOriginalGetState(),L=E!==N;if(N=E,L)for(const I of c)I()}),{reducer:l,store:d,actions:b,selectors:g,resolvers:y,getSelectors:S,getResolveSelectors:T,getSuspendSelectors:W,getActions:C,subscribe:B}}};return nM(s,r),s}function $qe(e,t,n,o){const r={...t.controls,...pqe},s=eu(r,p=>p.isRegistryControl?p(n):p),i=[Mqe(n,e),mqe,c6e(s),gqe(o)],c=[Oke(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:Dqe}}));const{reducer:l,initialState:u}=t,d=xne({metadata:Aqe,root:l});return H0e(d,{root:u},v0(c))}function Vqe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return eu(f,(b,h)=>b.hasResolver?(...M)=>new Promise((z,y)=>{const x=()=>e.hasFinishedResolution(h,M),v=w=>{if(e.hasResolutionFailed(h,M)){const q=e.getResolutionError(h,M);y(q)}else z(w)},g=()=>b.apply(null,M),A=g();if(x())return v(A);const _=t.subscribe(()=>{x()&&(_(),v(g()))})}):async(...M)=>b.apply(null,M))}function Hqe(e,t){return eu(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function Uqe(e){return eu(e,t=>t.fulfill?t:{...t,fulfill:t})}function Xqe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();wne(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(kne(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(qne(t,c))}catch(d){o.dispatch(Sne(t,c,d))}},0))}const i=(...c)=>(c=o8(e,c),s(c),e(...c));return i.hasResolver=!0,i}function o8(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const Gqe={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function E$(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function ym(e){return typeof e=="string"?e:e.name}function SB(e={},t=null){const n={},o=E$();let r=null;function s(){o.emit()}const i=(A,_)=>{if(!_)return o.subscribe(A);const w=ym(_),k=n[w];return k?k.subscribe(A):t?t.subscribe(A,_):o.subscribe(A)};function c(A){const _=ym(A);r?.add(_);const w=n[_];return w?w.getSelectors():t?.select(_)}function l(A,_){r=new Set;try{return A.call(this)}finally{_.current=Array.from(r),r=null}}function u(A){const _=ym(A);r?.add(_);const w=n[_];return w?w.getResolveSelectors():t&&t.resolveSelect(_)}function d(A){const _=ym(A);r?.add(_);const w=n[_];return w?w.getSuspendSelectors():t&&t.suspendSelect(_)}function p(A){const _=ym(A),w=n[_];return w?w.getActions():t&&t.dispatch(_)}function f(A){return Object.fromEntries(Object.entries(A).map(([_,w])=>typeof w!="function"?[_,w]:[_,function(){return x[_].apply(null,arguments)}]))}function b(A,_){if(n[A])return console.error('Store "'+A+'" is already registered.'),n[A];const w=_();if(typeof w.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof w.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof w.subscribe!="function")throw new TypeError("store.subscribe must be a function");w.emitter=E$();const k=w.subscribe;if(w.subscribe=q=>{const S=w.emitter.subscribe(q),C=k(()=>{if(w.emitter.isPaused){w.emitter.emit();return}q()});return()=>{C?.(),S?.()}},n[A]=w,w.subscribe(s),t)try{jf(w.store).registerPrivateActions(jf(t).privateActionsOf(A)),jf(w.store).registerPrivateSelectors(jf(t).privateSelectorsOf(A))}catch{}return w}function h(A){b(A.name,()=>A.instantiate(x))}function M(A,_){Re("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(A,()=>_)}function z(A,_){if(!_.reducer)throw new TypeError("Must specify store reducer");return b(A,()=>tr(A,_).instantiate(x)).store}function y(A){if(o.isPaused){A();return}o.pause(),Object.values(n).forEach(_=>_.emitter.pause());try{A()}finally{o.resume(),Object.values(n).forEach(_=>_.emitter.resume())}}let x={batch:y,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:M,registerStore:z,__unstableMarkListeningStores:l};function v(A,_){if(A)return x={...x,...A(x,_)},x}x.register(Gqe);for(const[A,_]of Object.entries(e))x.register(tr(A,_));t&&t.subscribe(s);const g=f(x);return nM(g,{privateActionsOf:A=>{try{return jf(n[A].store).privateActions}catch{return{}}},privateSelectorsOf:A=>{try{return jf(n[A].store).privateSelectors}catch{return{}}}}),g}const Ga=SB();var Kqe=function(t){return Yqe(t)&&!Zqe(t)};function Yqe(e){return!!e&&typeof e=="object"}function Zqe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||eSe(e)}var Qqe=typeof Symbol=="function"&&Symbol.for,Jqe=Qqe?Symbol.for("react.element"):60103;function eSe(e){return e.$$typeof===Jqe}function tSe(e){return Array.isArray(e)?[]:{}}function yg(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g2(tSe(e),e,t):e}function nSe(e,t,n){return e.concat(t).map(function(o){return yg(o,n)})}function oSe(e,t){if(!t.customMerge)return g2;var n=t.customMerge(e);return typeof n=="function"?n:g2}function rSe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function B$(e){return Object.keys(e).concat(rSe(e))}function Cne(e,t){try{return t in e}catch{return!1}}function sSe(e,t){return Cne(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function iSe(e,t,n){var o={};return n.isMergeableObject(e)&&B$(e).forEach(function(r){o[r]=yg(e[r],n)}),B$(t).forEach(function(r){sSe(e,r)||(Cne(e,r)&&n.isMergeableObject(t[r])?o[r]=oSe(r,n)(e[r],t[r],n):o[r]=yg(t[r],n))}),o}function g2(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||nSe,n.isMergeableObject=n.isMergeableObject||Kqe,n.cloneUnlessOtherwiseSpecified=yg;var o=Array.isArray(t),r=Array.isArray(e),s=o===r;return s?o?n.arrayMerge(e,t,n):iSe(e,t,n):yg(t,n)}g2.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,r){return g2(o,r,n)},{})};var aSe=g2,cSe=aSe;const Rne=yo(cSe),Wne=O.createContext(Ga),{Consumer:Qf0,Provider:Tne}=Wne;function h0(){return O.useContext(Wne)}const Ene=O.createContext(!1),{Consumer:Jf0,Provider:lSe}=Ene,Wx=lSe;function uSe(){return O.useContext(Ene)}const P6=zne();function dSe(e,t){const n=e.select,o={};let r,s,i=!1,c,l;const u=new Map;function d(f){var b;return(b=e.stores[f]?.store?.getState?.())!==null&&b!==void 0?b:{}}const p=f=>{const b=[...f],h=new Set;function M(y){if(i)for(const _ of b)u.get(_)!==d(_)&&(i=!1);u.clear();const x=()=>{i=!1,y()},v=()=>{c?P6.add(o,x):x()},g=[];function A(_){g.push(e.subscribe(v,_))}for(const _ of b)A(_);return h.add(A),()=>{h.delete(A);for(const _ of g.values())_?.();P6.cancel(o)}}function z(y){for(const x of y)if(!b.includes(x)){b.push(x);for(const v of h)v(x)}}return{subscribe:M,updateStores:z}};return(f,b)=>{function h(){if(i&&f===r)return s;const z={current:null},y=e.__unstableMarkListeningStores(()=>f(n,e),z);if(l)l.updateStores(z.current);else{for(const x of z.current)u.set(x,d(x));l=p(z.current)}Jr(s,y)||(s=y),r=f,i=!0}function M(){return h(),s}return c&&!b&&(i=!1,P6.cancel(o)),h(),c=b,{subscribe:l.subscribe,getValue:M}}}function pSe(e){return h0().select(e)}function fSe(e,t,n){const o=h0(),r=uSe(),s=O.useMemo(()=>dSe(o),[o,e]),i=O.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=O.useSyncExternalStore(c,l,l);return O.useDebugValue(u),u}function D(e,t){const n=typeof e!="function",o=O.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?pSe(e):fSe(!1,e,t)}const Go=e=>Cn(t=>d6e(n=>{const r=D((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),ae=e=>{const{dispatch:t}=h0();return e===void 0?t:t(e)},bSe=(e,t)=>{const n=h0(),o=O.useRef(e);return kB(()=>{o.current=e}),O.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Fi=e=>Cn(t=>n=>{const r=bSe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function nr(e){return Ga.dispatch(e)}function V0(e){return Ga.select(e)}const zo=xne,hSe=Ga.resolveSelect;Ga.suspendSelect;Ga.subscribe;Ga.registerGenericStore;const mSe=Ga.registerStore;Ga.use;const Qs=Ga.register;var MSe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const J1=yo(MSe);function gSe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)J1(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Tu(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const Bne=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,CB=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},N$=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},Nne=e=>t=>(n,o)=>t(n,e(o));function zSe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function OSe(e,t){return(e.rawAttributes||[]).includes(t)}function Tx(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function ASe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function ySe(e){return/^\s*\d+\s*$/.test(e)}const WM=["create","read","update","delete"];function RB(e){const t={};if(!e)return t;const n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[o,r]of Object.entries(n))t[o]=e.includes(r);return t}function Ex(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}function Lne(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function vSe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function xSe(e,t={},n,o){return{...Lne(e,n,o),query:t}}function _Se(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{x=x?.[v]}),Tx(M,y,x)}}else{if(!e.itemIsComplete[c]?.[b])return null;M=h}p.push(M)}return p}const jne=at((e,t={})=>{let n=L$.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new ia,L$.set(e,n);const o=wSe(e,t);return n.set(t,o),o});function Pne(e,t={}){var n;const{stableKey:o,context:r}=lh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function kSe(e,t={}){var n;const{stableKey:o,context:r}=lh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function qSe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const SSe=zo({formatTypes:qSe}),WB=at(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function CSe(e,t){return e.formatTypes[t]}function RSe(e,t){const n=WB(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function WSe(e,t){return WB(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const TSe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:CSe,getFormatTypeForBareElement:RSe,getFormatTypeForClassName:WSe,getFormatTypes:WB},Symbol.toStringTag,{value:"Module"}));function ESe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function BSe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const NSe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:ESe,removeFormatTypes:BSe},Symbol.toStringTag,{value:"Module"})),LSe="core/rich-text",xc=tr(LSe,{reducer:SSe,selectors:TSe,actions:NSe});Qs(xc);function cv(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];cv(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function j$(e,t,n){return e=e.slice(),e[t]=n,e}function _i(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=j$(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=j$(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function _c({implementation:e},t){return _c.body||(_c.body=e.createHTMLDocument("").body),_c.body.innerHTML=t,_c.body}const Ou="",Ine="\uFEFF";function TB(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthcv(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function Dne(e){return V0(xc).getFormatType(e)}function P$(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function ZO({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=Dne(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:P$(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:P$(l,i)}}function jSe(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function Fne({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:M,text:z,start:y,end:x}=e,v=h.length+1,g=n(),A=TB(e),_=A[A.length-1];let w,k;o(g,"");for(let q=0;q{if(W&&w&&jSe(T,w,N)){W=r(W);return}const{type:E,tagName:L,attributes:I,unregisteredAttributes:P}=B,H=f&&B===_,U=s(W),X=o(U,ZO({type:E,tagName:L,attributes:I,unregisteredAttributes:P,boundaryClass:H,isEditableTree:f}));i(W)&&c(W).length===0&&l(W),W=o(X,"")}),q===0&&(d&&y===0&&d(g,W),p&&x===0&&p(g,W)),S===Ou){const B=M[q];if(!B)continue;const{type:N,attributes:E,innerHTML:L}=B,I=Dne(N);!f&&N==="script"?(W=o(s(W),ZO({type:"script",isEditableTree:f})),o(W,{html:decodeURIComponent(E["data-rich-text-script"])})):I?.contentEditable===!1?(W=o(s(W),ZO({...B,isEditableTree:f,boundaryClass:y===q&&x===q+1})),L&&o(W,{html:L})):W=o(s(W),ZO({...B,object:!0,isEditableTree:f})),W=o(s(W),"")}else!t&&S===` +`?(W=o(s(W),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),W=o(s(W),"")):i(W)?u(W,S):W=o(s(W),S);d&&y===q+1&&d(g,W),p&&x===q+1&&p(g,W),C&&q===z.length&&(o(s(W),Ine),b&&z.length===0&&o(s(W),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),w=T,k=S}return g}function K1({value:e,preserveWhiteSpace:t}){const n=Fne({value:e,preserveWhiteSpace:t,createEmpty:PSe,append:DSe,getLastChild:ISe,getParent:$Se,isText:VSe,getText:HSe,remove:USe,appendText:FSe});return $ne(n.children)}function PSe(){return{}}function ISe({children:e}){return e&&e[e.length-1]}function DSe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function FSe(e,t){e.text+=t}function $Se({parent:e}){return e}function VSe({text:e}){return typeof e=="string"}function HSe({text:e}){return e}function USe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function XSe({type:e,attributes:t,object:n,children:o}){let r="";for(const s in t)_0e(s)&&(r+=` ${s}="${gx(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${$ne(o)}`}function $ne(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?XSe(t):cwe(t.text)).join("")}function ap({text:e}){return e.replace(Ou,"")}function Vd(){return{formats:[],replacements:[],text:""}}function GSe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=V0(xc).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=V0(xc).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class un{#e;static empty(){return new un}static fromPlainText(t){return new un(m0({text:t}))}static fromHTMLString(t){return new un(m0({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:Vne(t),s=new un(m0({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=Vd()){this.#e=t}toPlainText(){return ap(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||K1({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))un.prototype.hasOwnProperty(e)||Object.defineProperty(un.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function m0({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof un?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=_c(document,n)),typeof e!="object"?Vd():Hne({element:e,range:o,isEditableTree:r}))}function qd(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function KSe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function Vne(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&Vne(o,!1)}),n}const YSe="\r";function I$(e){return e.replace(new RegExp(`[${Ine}${Ou}${YSe}]`,"gu"),"")}function Hne({element:e,range:t,isEditableTree:n}){const o=Vd();if(!e)return o;if(!e.hasChildNodes())return qd(o,e,t,Vd()),o;const r=e.childNodes.length;for(let i=0;in===t)}function JSe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==Ou))return n[e]}function cf({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function r8({text:e}){return e.length===0}function eCe(e,t=""){return typeof t=="string"&&(t=m0({text:t})),uh(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function Une(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(V0(xc).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=V0(xc).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=V0(xc).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return nr(xc).addFormatTypes(t),t}function ud(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)I6(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)I6(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function I6(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function Y1(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=m0({text:t}));const c=n+t.text.length;return uh({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function Ks(e,t,n){return Y1(e,m0(),t,n)}function tCe({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),uh({formats:e,replacements:t,text:n,start:o,end:r})}function Xne(e,t,n,o){return Y1(e,{formats:[,],replacements:[t],text:Ou},n,o)}function z2(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function BB({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return nCe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function nCe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function Gne(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function s8(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=s8(o,t,n)),n}function D$(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function oCe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n){t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function rCe(e,t){e.appendData(t)}function sCe({lastChild:e}){return e}function iCe({parentNode:e}){return e}function aCe(e){return e.nodeType===e.TEXT_NODE}function cCe({nodeValue:e}){return e}function lCe(e){return e.parentNode.removeChild(e)}function uCe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:Fne({value:e,createEmpty:()=>_c(r,""),append:oCe,getLastChild:sCe,getParent:iCe,isText:aCe,getText:cCe,remove:lCe,appendText:rCe,onStartIndex(u,d){s=s8(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=s8(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function dCe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=uCe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});Kne(s,t),e.start!==void 0&&!o&&pCe(i,t)}function Kne(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(Gne(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function fCe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function bCe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function F$(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function hCe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),$$===e&&(e+=" "),$$=e,e}function MCe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&bCe(),t===null&&F$("assertive"),n===null&&F$("polite")}fCe(MCe);function At(e,t){hCe(),e=mCe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function Ba(e,t){return EB(e,t.type)?(t.title&&At(le(m("%s removed."),t.title),"assertive"),ud(e,t.type)):(t.title&&At(le(m("%s applied."),t.title),"assertive"),_i(e,t))}function gCe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function zCe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function D6(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=gCe(i,e,t,n);return c||zCe(i,e)}function Vz({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=O.useState(()=>D6(e,n,o)),c=t1(r);return O.useLayoutEffect(()=>{if(!e)return;function l(){i(D6(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(D6(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const OCe="pre-wrap",ACe="1px";function yCe(){return O.useCallback(e=>{e&&(e.style.whiteSpace=OCe,e.style.minWidth=ACe)},[])}function vCe({record:e}){const t=O.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return O.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,M="rich-text-boundary-style";let z=l.getElementById(M);z||(z=l.createElement("style"),z.id=M,l.head.appendChild(z)),z.innerHTML!==h&&(z.innerHTML=h)},[n,s]),t}const xCe=e=>t=>{function n(r){const{record:s,createRecord:i,handleChange:c}=e.current,{ownerDocument:l}=t,{defaultView:u}=l,{anchorNode:d,focusNode:p,isCollapsed:f}=u.getSelection(),b=t.contains(d)&&t.contains(p);if(f||!b)return;const h=z2(s.current),M=ap(h),z=K1({value:h});r.clipboardData.setData("text/plain",M),r.clipboardData.setData("text/html",z),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&c(Ks(i()))}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},_Ce=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},V$=[],wCe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==Bs&&r!==Ns)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:M,activeFormats:z=[]}=u.current,y=cf(u.current),{ownerDocument:x}=t,{defaultView:v}=x,{direction:g}=v.getComputedStyle(t),A=g==="rtl"?Ns:Bs,_=o.keyCode===A;if(y&&z.length===0&&(h===0&&_||M===f.length&&!_)||!y)return;const w=b[h-1]||V$,k=b[h]||V$,q=_?w:k,S=z.every((E,L)=>E===q[L]);let C=z.length;if(S?C{t.removeEventListener("keydown",n)}},kCe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==_a&&r!==Si)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(Ks(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function qCe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(cv(l,i[u]))return i[u]}else if(c[u]&&cv(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const SCe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),H$=[],Yne="data-rich-text-placeholder";function CCe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(Yne)||t.collapseToStart()}const RCe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:M}=e.current;if(p&&(p.indexOf("format")===0||SCe.has(p))){b(f.current);return}const z=h(),{start:y,activeFormats:x=[]}=f.current,v=qCe({value:z,start:y,end:z.start,formats:x});M(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;const{anchorNode:h,focusNode:M}=o.getSelection();if(!(t.contains(h)&&t.contains(M)&&n.activeElement.contains(t))||r)return;const{start:y,end:x,text:v}=f(),g=d.current;if(v!==g.text){s();return}if(y===g.start&&x===g.end){g.text.length===0&&y===0&&CCe(o);return}const A={...g,start:y,end:x,activeFormats:g._newActiveFormats,_newActiveFormats:void 0},_=TB(A,H$);A.activeFormats=_,d.current=A,p(A,{domOnly:!0}),b(y,x)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${Yne}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:H$},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u),n.removeEventListener("selectionchange",i)}},WCe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!Gne(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}},TCe=[xCe,_Ce,wCe,kCe,RCe,WCe];function ECe(e){const t=O.useRef(e);t.current=e;const n=O.useMemo(()=>TCe.map(o=>o(t)),[t]);return Et(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function Zne({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=h0(),[,h]=O.useReducer(()=>({})),M=O.useRef();function z(){const{ownerDocument:{defaultView:S}}=M.current,C=S.getSelection(),T=C.rangeCount>0?C.getRangeAt(0):null;return m0({element:M.current,range:T,__unstableIsEditableTree:!0})}function y(S,{domOnly:C}={}){dCe({value:S,current:M.current,prepareEditableTree:f,__unstableDomOnly:C,placeholder:o})}const x=O.useRef(e),v=O.useRef();function g(){x.current=e,v.current=e,e instanceof un||(v.current=e?un.fromHTMLString(e,{preserveWhiteSpace:s}):un.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const A=O.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(A.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(A.current=l,g());function _(S){if(v.current=S,y(S),c)x.current=S.text;else{const N=p?p(S):S.formats;S={...S,formats:N},typeof e=="string"?x.current=K1({value:S,preserveWhiteSpace:s}):x.current=new un(S)}const{start:C,end:T,formats:W,text:B}=v.current;b.batch(()=>{r(C,T),i(x.current,{__unstableFormats:W,__unstableText:B})}),h()}function w(){g(),y(v.current)}const k=O.useRef(!1);O.useLayoutEffect(()=>{k.current&&e!==x.current&&(w(),h())},[e]),O.useLayoutEffect(()=>{A.current&&(M.current.ownerDocument.activeElement!==M.current&&M.current.focus(),y(v.current),A.current=!1)},[A.current]);const q=Gt([M,yCe(),vCe({record:v}),ECe({record:v,handleChange:_,applyRecord:y,createRecord:z,isSelected:l,onSelectionChange:r,forceRender:h}),Et(()=>{w(),k.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:_,ref:q}}let QO;const BCe=new Uint8Array(16);function NCe(){if(!QO&&(QO=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!QO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return QO(BCe)}const so=[];for(let e=0;e<256;++e)so.push((e+256).toString(16).slice(1));function LCe(e,t=0){return so[e[t+0]]+so[e[t+1]]+so[e[t+2]]+so[e[t+3]]+"-"+so[e[t+4]]+so[e[t+5]]+"-"+so[e[t+6]]+so[e[t+7]]+"-"+so[e[t+8]]+so[e[t+9]]+"-"+so[e[t+10]]+so[e[t+11]]+so[e[t+12]]+so[e[t+13]]+so[e[t+14]]+so[e[t+15]]}const jCe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U$={randomUUID:jCe};function Xc(e,t,n){if(U$.randomUUID&&!t&&!e)return U$.randomUUID();e=e||{};const o=e.random||(e.rng||NCe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,LCe(o)}let F6=null;function PCe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function ICe(e){F6===null&&(F6=(await ct({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of PCe(e,F6)){const o=await ct({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function DCe(e=ICe){let t=0,n=[];const o=new FCe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class FCe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const bo="core",Rr=()=>new Map,i8=e=>{const t=Rr();return e.forEach((n,o)=>{t.set(o,n)}),t},Fo=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},$Ce=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},VCe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},Eu=()=>new Set,$6=e=>e[e.length-1],HCe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Gc((this._observers.get(t)||Rr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Rr()}}class Hz{constructor(){this._observers=Rr()}on(t,n){Fo(this._observers,t,Eu).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Gc((this._observers.get(t)||Rr()).values()).forEach(o=>o(...n))}destroy(){this._observers=Rr()}}const Na=Math.floor,Py=Math.abs,GCe=Math.log10,NB=(e,t)=>ee>t?e:t,Qne=e=>e!==0?e<0:1/e<0,X$=1,G$=2,V6=4,H6=8,vg=32,Wc=64,es=128,Bx=31,a8=63,cp=127,KCe=2147483647,Jne=Number.MAX_SAFE_INTEGER,YCe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Na(e)===e),ZCe=String.fromCharCode,QCe=e=>e.toLowerCase(),JCe=/^\s*/g,eRe=e=>e.replace(JCe,""),tRe=/([A-Z])/g,K$=(e,t)=>eRe(e.replace(tRe,n=>`${t}${QCe(n)}`)),nRe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;rxg.encode(e),c8=xg?oRe:nRe;let TM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});TM&&TM.decode(new Uint8Array).length===1&&(TM=null);class Uz{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const F1=()=>new Uz,rRe=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(rRe(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},_g=L1,Wt=(e,t)=>{for(;t>cp;)L1(e,es|cp&t),t=Na(t/128);L1(e,cp&t)},LB=(e,t)=>{const n=Qne(t);for(n&&(t=-t),L1(e,(t>a8?es:0)|(n?Wc:0)|a8&t),t=Na(t/64);t>0;)L1(e,(t>cp?es:0)|cp&t),t=Na(t/128)},l8=new Uint8Array(3e4),iRe=l8.length/3,aRe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;Wt(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=NB(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(lf(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},Qn=(e,t)=>{Wt(e,t.byteLength),Nx(e,t)},jB=(e,t)=>{sRe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},lRe=(e,t)=>jB(e,4).setFloat32(0,t,!1),uRe=(e,t)=>jB(e,8).setFloat64(0,t,!1),dRe=(e,t)=>jB(e,8).setBigInt64(0,t,!1),Y$=new DataView(new ArrayBuffer(4)),pRe=e=>(Y$.setFloat32(0,e),Y$.getFloat32(0)===e),O2=(e,t)=>{switch(typeof t){case"string":L1(e,119),wa(e,t);break;case"number":YCe(t)&&Py(t)<=KCe?(L1(e,125),LB(e,t)):pRe(t)?(L1(e,124),lRe(e,t)):(L1(e,123),uRe(e,t));break;case"bigint":L1(e,122),dRe(e,t);break;case"object":if(t===null)L1(e,126);else if(UCe(t)){L1(e,117),Wt(e,t.length);for(let n=0;n0&&Wt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const Q$=e=>{e.count>0&&(LB(e.encoder,e.count===1?e.s:-e.s),e.count>1&&Wt(e.encoder,e.count-2))};class Iy{constructor(){this.encoder=new Uz,this.s=0,this.count=0}write(t){this.s===t?this.count++:(Q$(this),this.count=1,this.s=t)}toUint8Array(){return Q$(this),$n(this.encoder)}}const J$=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);LB(e.encoder,t),e.count>1&&Wt(e.encoder,e.count-2)}};class U6{constructor(){this.encoder=new Uz,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(J$(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return J$(this),$n(this.encoder)}}class fRe{constructor(){this.sarr=[],this.s="",this.lensE=new Iy}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new Uz;return this.sarr.push(this.s),this.s="",wa(t,this.sarr.join("")),Nx(t,this.lensE.toUint8Array()),$n(t)}}const Ri=e=>new Error(e),ka=()=>{throw Ri("Method unimplemented")},La=()=>{throw Ri("Unexpected case")},e1e=Ri("Unexpected end of array"),t1e=Ri("Integer out of Range");class Lx{constructor(t){this.arr=t,this.pos=0}}const Ka=e=>new Lx(e),bRe=e=>e.pos!==e.arr.length,hRe=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},P1=e=>hRe(e,Jt(e)),qp=e=>e.arr[e.pos++],Jt=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posJne)throw t1e}throw e1e},PB=e=>{let t=e.arr[e.pos++],n=t&a8,o=64;const r=(t&Wc)>0?-1:1;if(!(t&es))return r*n;const s=e.arr.length;for(;e.posJne)throw t1e}throw e1e},mRe=e=>{let t=Jt(e);if(t===0)return"";{let n=String.fromCodePoint(qp(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(qp(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},MRe=e=>TM.decode(P1(e)),Tc=TM?MRe:mRe,IB=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},gRe=e=>IB(e,4).getFloat32(0,!1),zRe=e=>IB(e,8).getFloat64(0,!1),ORe=e=>IB(e,8).getBigInt64(0,!1),ARe=[e=>{},e=>null,PB,gRe,zRe,ORe,e=>!1,e=>!0,Tc,e=>{const t=Jt(e),n={};for(let o=0;o{const t=Jt(e),n=[];for(let o=0;oARe[127-qp(e)](e);class eV extends Lx{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),bRe(this)?this.count=Jt(this)+1:this.count=-1),this.count--,this.s}}class Dy extends Lx{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=PB(this);const t=Qne(this.s);this.count=1,t&&(this.s=-this.s,this.count=Jt(this)+2)}return this.count--,this.s}}class X6 extends Lx{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=PB(this),n=t&1;this.diff=Na(t/2),this.count=1,n&&(this.count=Jt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class yRe{constructor(t){this.decoder=new Dy(t),this.str=Tc(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const vRe=crypto.getRandomValues.bind(crypto),xRe=Math.random,n1e=()=>vRe(new Uint32Array(1))[0],_Re="10000000-1000-4000-8000"+-1e11,o1e=()=>_Re.replace(/[018]/g,e=>(e^n1e()&15>>e/4).toString(16)),Kc=Date.now,y2=e=>new Promise(e);Promise.all.bind(Promise);const wRe=e=>Promise.reject(e),DB=e=>Promise.resolve(e),tV=e=>e===void 0?null:e;class kRe{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let r1e=new kRe,FB=!0;try{typeof localStorage<"u"&&localStorage&&(r1e=localStorage,FB=!1)}catch{}const s1e=r1e,qRe=e=>FB||addEventListener("storage",e),SRe=e=>FB||removeEventListener("storage",e),CRe=Object.assign,i1e=Object.keys,RRe=(e,t)=>{for(const n in e)t(e[n],n)},nV=e=>i1e(e).length,oV=e=>i1e(e).length,WRe=e=>{for(const t in e)return!1;return!0},TRe=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},a1e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ERe=(e,t)=>e===t||oV(e)===oV(t)&&TRe(e,(n,o)=>(n!==void 0||a1e(t,o))&&t[o]===n),$B=(e,t,n=0)=>{try{for(;n{},NRe=e=>e,LRe=(e,t)=>e===t,EM=(e,t)=>{if(e==null||t==null)return LRe(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var c1e={};const v2=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",l1e=typeof window<"u"&&typeof document<"u"&&!v2;let Qi;const PRe=()=>{if(Qi===void 0)if(v2){Qi=Rr();const e=process.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Qi.set(`--${K$(t,"-")}`,n),Qi.set(`-${K$(t,"-")}`,n)}})):Qi=Rr();return Qi},u8=e=>PRe().has(e),lv=e=>tV(v2?c1e[e.toUpperCase().replaceAll("-","_")]:s1e.getItem(e)),u1e=e=>u8("--"+e)||lv(e)!==null;u1e("production");const IRe=v2&&jRe(c1e.FORCE_COLOR,["true","1","2"]),DRe=IRe||!u8("--no-colors")&&!u1e("no-color")&&(!v2||process.stdout.isTTY)&&(!v2||u8("--color")||lv("COLORTERM")!==null||(lv("TERM")||"").includes("color")),d1e=e=>new Uint8Array(e),FRe=(e,t,n)=>new Uint8Array(e,t,n),$Re=e=>new Uint8Array(e),VRe=e=>{let t="";for(let n=0;nBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),URe=e=>{const t=atob(e),n=d1e(t.length);for(let o=0;o{const t=Buffer.from(e,"base64");return FRe(t.buffer,t.byteOffset,t.byteLength)},p1e=l1e?VRe:HRe,VB=l1e?URe:XRe,GRe=e=>{const t=d1e(e.byteLength);return t.set(e),t};class KRe{constructor(t,n){this.left=t,this.right=n}}const ac=(e,t)=>new KRe(e,t);typeof DOMParser<"u"&&new DOMParser;const YRe=e=>$Ce(e,(t,n)=>`${n}:${t};`).join(""),ZRe=JSON.stringify,fl=Symbol,Ls=fl(),Sp=fl(),f1e=fl(),HB=fl(),b1e=fl(),h1e=fl(),m1e=fl(),UB=fl(),jx=fl(),QRe=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=rV[G6],o=lv("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return G6=(G6+1)%rV.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=Kc(),c=i-sV;sV=i,e(n,t,jx,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return ZRe(l)}}),n," +"+c+"ms")}:BRe},e8e={[Ls]:ac("font-weight","bold"),[Sp]:ac("font-weight","normal"),[f1e]:ac("color","blue"),[b1e]:ac("color","green"),[HB]:ac("color","grey"),[h1e]:ac("color","red"),[m1e]:ac("color","purple"),[UB]:ac("color","orange"),[jx]:ac("color","black")},t8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=Rr();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...n8e(e)),o8e.forEach(t=>t.print(e))},o8e=Eu(),r8e=e=>JRe(M1e,e),g1e=e=>({[Symbol.iterator](){return this},next:e}),s8e=(e,t)=>g1e(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),K6=(e,t)=>g1e(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class XB{constructor(t,n){this.clock=t,this.len=n}}class Xz{constructor(){this.clients=new Map}}const z1e=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=Na((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&i8e(n,t.clock)!==null},GB=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=lf(r.len,s.clock+s.len-r.clock):(o{const t=new Xz;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{Fo(e.clients,t,()=>[]).push(new XB(n,o))},c8e=()=>new Xz,l8e=e=>{const t=c8e();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},dh=(e,t)=>{Wt(e.restEncoder,t.clients.size),Gc(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),Wt(e.restEncoder,n);const r=o.length;Wt(e.restEncoder,r);for(let s=0;s{const t=new Xz,n=Jt(e.restDecoder);for(let o=0;o0){const i=Fo(t.clients,r,()=>[]);for(let c=0;c{const o=new Xz,r=Jt(e.restDecoder);for(let s=0;s0){const s=new Cp;return Wt(s.restEncoder,0),dh(s,o),s.toUint8Array()}return null},A1e=n1e;class ph extends XCe{constructor({guid:t=o1e(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=A1e(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new R1e,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=y2(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>y2(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&ln(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Gc(this.subdocs).map(t=>t.guid))}transact(t,n=null){return ln(this,t,n)}get(t,n=ho){const o=Fo(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==ho&&r!==n)if(r===ho){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,Hb)}getText(t=""){return this.get(t,w2)}getMap(t=""){return this.get(t,_2)}getXmlElement(t=""){return this.get(t,k2)}getXmlFragment(t=""){return this.get(t,Rp)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){this.isDestroyed=!0,Gc(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new ph({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,ln(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class y1e{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Jt(this.restDecoder)}readDsLen(){return Jt(this.restDecoder)}}class v1e extends y1e{readLeftID(){return M0(Jt(this.restDecoder),Jt(this.restDecoder))}readRightID(){return M0(Jt(this.restDecoder),Jt(this.restDecoder))}readClient(){return Jt(this.restDecoder)}readInfo(){return qp(this.restDecoder)}readString(){return Tc(this.restDecoder)}readParentInfo(){return Jt(this.restDecoder)===1}readTypeRef(){return Jt(this.restDecoder)}readLen(){return Jt(this.restDecoder)}readAny(){return A2(this.restDecoder)}readBuf(){return GRe(P1(this.restDecoder))}readJSON(){return JSON.parse(Tc(this.restDecoder))}readKey(){return Tc(this.restDecoder)}}class u8e{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Jt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Jt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class x2 extends u8e{constructor(t){super(t),this.keys=[],Jt(t),this.keyClockDecoder=new X6(P1(t)),this.clientDecoder=new Dy(P1(t)),this.leftClockDecoder=new X6(P1(t)),this.rightClockDecoder=new X6(P1(t)),this.infoDecoder=new eV(P1(t),qp),this.stringDecoder=new yRe(P1(t)),this.parentInfoDecoder=new eV(P1(t),qp),this.typeRefDecoder=new Dy(P1(t)),this.lenDecoder=new Dy(P1(t))}readLeftID(){return new Vb(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Vb(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return A2(this.restDecoder)}readBuf(){return P1(this.restDecoder)}readJSON(){return A2(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=lf(o,t[0].id.clock);const r=ja(t,o);Wt(e.restEncoder,t.length-r),e.writeClient(n),Wt(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{H1(t,s)>r&&o.set(s,r)}),Px(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),Wt(e.restEncoder,o.size),Gc(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{d8e(e,t.clients.get(r),r,s)})},p8e=(e,t)=>{const n=Rr(),o=Jt(e.restDecoder);for(let r=0;r{const o=[];let r=Gc(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new R1e,l=new Map,u=(b,h)=>{const M=l.get(b);(M==null||M>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,M=n.get(h);M?(M.i--,c.clients.set(h,M.refs.slice(M.i)),n.delete(h),M.i=0,M.refs=[]):c.clients.set(h,[b]),r=r.filter(z=>z!==h)}o.length=0};for(;;){if(d.constructor!==Ws){const h=Fo(p,d.id.client,()=>H1(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const M=d.getMissing(e,t);if(M!==null){o.push(d);const z=n.get(M)||{refs:[],i:0};if(z.refs.length===z.i)u(M,H1(t,M)),f();else{d=z.refs[z.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new Cp;return YB(b,c,new Map),Wt(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},b8e=(e,t)=>YB(e,t.doc.store,t.beforeState),h8e=(e,t,n,o=new x2(e))=>ln(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=p8e(o,i),u=f8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=dv([d.update,u.update])}}else c.pendingStructs=u;const p=iV(o,r,c);if(c.pendingDs){const f=new x2(Ka(c.pendingDs));Jt(f.restDecoder);const b=iV(f,r,c);p&&b?c.pendingDs=dv([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,w1e(r.doc,f)}},n,!1),w1e=(e,t,n,o=x2)=>{const r=Ka(t);h8e(r,e,n,new o(r))},k1e=(e,t,n)=>w1e(e,t,n,v1e),m8e=(e,t,n=new Map)=>{YB(e,t.store,n),dh(e,l8e(t.store))},M8e=(e,t=new Uint8Array([0]),n=new Cp)=>{const o=q1e(t);m8e(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(W8e(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===Gz)return C8e(r.map((s,i)=>i===0?s:E8e(s)));if(n.constructor===Cp)return dv(r)}return r[0]},ZB=(e,t)=>M8e(e,t,new Gz),g8e=e=>{const t=new Map,n=Jt(e.restDecoder);for(let o=0;og8e(new y1e(Ka(e))),S1e=(e,t)=>(Wt(e.restEncoder,t.size),Gc(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{Wt(e.restEncoder,n),Wt(e.restEncoder,o)}),e),z8e=(e,t)=>S1e(e,Px(t.store)),O8e=(e,t=new _1e)=>(e instanceof Map?S1e(t,e):z8e(t,e),t.toUint8Array()),A8e=e=>O8e(e,new x1e);class y8e{constructor(){this.l=[]}}const aV=()=>new y8e,cV=(e,t)=>e.l.push(t),lV=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},C1e=(e,t,n)=>$B(e.l,[t,n]);class Vb{constructor(t,n){this.client=t,this.clock=n}}const JO=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,M0=(e,t)=>new Vb(e,t),v8e=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw La()},eb=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!O1e(t.ds,e.id),d8=(e,t)=>{const n=Fo(e.meta,d8,Eu),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class R1e{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Px=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},H1=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},W1e=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw La()}n.push(t)},ja=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=Na(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[ja(n,t.clock)]},Y6=x8e,p8=(e,t,n)=>{const o=ja(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[p8(e,n,t.clock)]},uV=(e,t,n)=>{const o=t.clients.get(n.client),r=ja(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==Rs&&o.splice(r+1,0,Mv(e,s,n.clock-s.id.clock+1)),s},_8e=(e,t,n)=>{const o=e.clients.get(t.id.client);o[ja(o,t.id.clock)]=n},T1e=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=p8(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!VCe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(GB(t.deleteSet),b8e(e,t),dh(e,t.deleteSet),!0),pV=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&Fo(e.changed,t,Eu).add(n)},Fy=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof Wo&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},k8e=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=ja(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=NB(r.length-1,1+ja(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+Fy(r,l)}})},E1e=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),C1e(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),$B(c,[]),n._needFormattingCleanup&&G8e(n)}finally{o.gc&&k8e(s,r,o.gcFilter),q8e(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=lf(ja(b,f),1);for(let M=b.length-1;M>=h;)M-=1+Fy(b,M)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=ja(b,f);h+11||h>0&&Fy(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(M1e(UB,Ls,"[yjs] ",Sp,h1e,"Changed the client-id because another client seems to be using it."),o.clientID=A1e()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new Gz;dV(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new Cp;dV(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):E1e(e,t+1)}}},ln=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new w8e(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&E1e(r,0)}}return i};function*S8e(e){const t=Jt(e.restDecoder);for(let n=0;ndv(e,v1e,Gz),R8e=(e,t)=>{if(e.constructor===Rs){const{client:n,clock:o}=e.id;return new Rs(M0(n,o+t),e.length-t)}else if(e.constructor===Ws){const{client:n,clock:o}=e.id;return new Ws(M0(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new Wo(M0(o,r+t),null,M0(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},dv=(e,t=x2,n=Cp)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Ka(d)));let r=o.map(d=>new QB(d,!0)),s=null;const i=new n,c=new JB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ws?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Gl(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ws?s.struct.length-=h:f=R8e(f,h)),s.struct.mergeWith(f)||(Gl(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ws;f=d.next())Gl(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Gl(c,s.struct,s.offset),s=null),eN(c);const l=o.map(d=>KB(d)),u=a8e(l);return dh(i,u),i.toUint8Array()},W8e=(e,t,n=x2,o=Cp)=>{const r=q1e(t),s=new o,i=new JB(s),c=new n(Ka(e)),l=new QB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ws){l.next();continue}if(d.id.clock+d.length>f)for(Gl(i,d,lf(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Gl(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}eN(i);const u=KB(c);return dh(s,u),s.toUint8Array()},B1e=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:$n(e.encoder.restEncoder)}),e.encoder.restEncoder=F1(),e.written=0)},Gl=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&B1e(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),Wt(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},eN=e=>{B1e(e);const t=e.encoder.restEncoder;Wt(t,e.clientStructs.length);for(let n=0;n{const r=new n(Ka(e)),s=new QB(r,!1),i=new o,c=new JB(i);for(let u=s.curr;u!==null;u=s.next())Gl(c,t(u),0);eN(c);const l=KB(r);return dh(i,l),i.toUint8Array()},E8e=e=>T8e(e,NRe,x2,Gz),fV="You must not compute changes after the event-handler fired.";class Ix{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=B8e(this.currentTarget,this.target))}deletes(t){return O1e(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ri(fV);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=$6(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=$6(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=$6(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ri(fV);const n=this.target,o=Eu(),r=Eu(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const B8e=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},N1e=80;let tN=0;class N8e{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=tN++}}const L8e=e=>{e.timestamp=tN++},L1e=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=tN++},j8e=(e,t,n)=>{if(e.length>=N1e){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>Py(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&Py(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=lf(t,r.index+n))}},Fx=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;Fo(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;C1e(o._eH,n,t)};class ho{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=aV(),this._dEH=aV(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw ka()}clone(){throw ka()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){cV(this._eH,t)}observeDeep(t){cV(this._dEH,t)}unobserve(t){lV(this._eH,t)}unobserveDeep(t){lV(this._dEH,t)}toJSON(){}}const j1e=(e,t,n)=>{t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},P1e=e=>{const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(;o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return kg(e,(o,r)=>{n.push(t(o,r,e))}),n},P8e=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},D1e=(e,t)=>{const n=Dx(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new Wo(M0(i,H1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Wp(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new Wo(M0(i,H1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Kz(new Uint8Array(p))),r.integrate(e,0);break;case ph:r=new Wo(M0(i,H1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Yz(p)),r.integrate(e,0);break;default:if(p instanceof ho)r=new Wo(M0(i,H1(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new bl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},F1e=()=>Ri("Length exceeded!"),$1e=(e,t,n,o)=>{if(n>t._length)throw F1e();if(n===0)return t._searchMarker&&wg(t._searchMarker,n,o.length),pv(e,t,null,o);const r=n,s=Dx(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return pv(e,t,r,n)},V1e=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=Dx(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw F1e();t._searchMarker&&wg(t._searchMarker,r,-s+o)},fv=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},nN=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new Wp([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new Wp([o]);break;case Uint8Array:c=new Kz(o);break;case ph:c=new Yz(o);break;default:if(o instanceof ho)c=new bl(o);else throw new Error("Unexpected content type")}new Wo(M0(i,H1(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},oN=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},H1e=e=>{const t={};return e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},U1e=(e,t)=>{const n=e._map.get(t);return n!==void 0&&!n.deleted},D8e=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&eb(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},eA=e=>s8e(e.entries(),t=>!t[1].deleted);class F8e extends Ix{}class Hb extends ho{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new Hb;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Hb}clone(){const t=new Hb;return t.insert(0,this.toArray().map(n=>n instanceof ho?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}_callObserver(t,n){super._callObserver(t,n),Fx(this,t,new F8e(this,t))}insert(t,n){this.doc!==null?ln(this.doc,o=>{$1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?ln(this.doc,n=>{I8e(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?ln(this.doc,o=>{V1e(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return D1e(this,t)}toArray(){return P1e(this)}slice(t=0,n=this.length){return j1e(this,t,n)}toJSON(){return this.map(t=>t instanceof ho?t.toJSON():t)}map(t){return I1e(this,t)}forEach(t){kg(this,t)}[Symbol.iterator](){return P8e(this)}_write(t){t.writeTypeRef(pWe)}}const $8e=e=>new Hb;class V8e extends Ix{constructor(t,n,o){super(t,n),this.keysChanged=o}}class _2 extends ho{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new _2}clone(){const t=new _2;return this.forEach((n,o)=>{t.set(o,n instanceof ho?n.clone():n)}),t}_callObserver(t,n){Fx(this,t,new V8e(this,t,n))}toJSON(){const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof ho?r.toJSON():r}}),t}get size(){return[...eA(this._map)].length}keys(){return K6(eA(this._map),t=>t[0])}values(){return K6(eA(this._map),t=>t[1].content.getContent()[t[1].length-1])}entries(){return K6(eA(this._map),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?ln(this.doc,n=>{fv(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?ln(this.doc,o=>{nN(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return oN(this,t)}has(t){return U1e(this,t)}clear(){this.doc!==null?ln(this.doc,t=>{this.forEach(function(n,o,r){fv(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(fWe)}}const H8e=e=>new _2,tu=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&ERe(e,t);class f8{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&La(),this.right.content.constructor){case R1:this.right.deleted||fh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const bV=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case R1:t.right.deleted||fh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?Dx(t,n):null;if(s){const i=new f8(s.p.left,s.p,s.index,r);return bV(e,i,n-s.index)}else{const i=new f8(null,t._start,0,r);return bV(e,i,n)}},X1e=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===R1&&tu(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new Wo(M0(s,H1(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new R1(c,i));d.integrate(e,0),n.right=d,n.forward()})},fh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},G1e=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===R1&&tu(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},K1e=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!tu(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new Wo(M0(s,H1(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new R1(c,l)),n.right.integrate(e,0),n.forward()}}return i},Z6=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;G1e(n,r);const c=K1e(e,t,n,r),l=o.constructor===String?new Pa(o):o instanceof ho?new bl(o):new uf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&wg(t._searchMarker,n.index,l.getLength()),d=new Wo(M0(i,H1(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),X1e(e,t,n,c)},hV=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;G1e(n,r);const c=K1e(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===R1));){if(!n.right.deleted)switch(n.right.content.constructor){case R1:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(tu(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` +`;n.right=new Wo(M0(i,H1(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new Pa(l)),n.right.integrate(e,0),n.forward()}X1e(e,t,n,c)},Y1e=(e,t,n,o,r)=>{let s=t;const i=Rr();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===R1){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case R1:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&fh(r,u);break}}}t=t.right}return c},U8e=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===R1){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},X8e=e=>{let t=0;return ln(e.doc,n=>{let o=e._start,r=e._start,s=Rr();const i=i8(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case R1:fh(i,r.content);break;default:t+=Y1e(n,o,r,s,i),s=i8(i),o=r;break}r=r.right}}),t},G8e=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&T1e(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===R1&&i.constructor!==Rs&&t.add(i.parent)})}ln(n,o=>{z1e(e,e.deleteSet,r=>{if(r instanceof Rs||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===R1?t.add(s):U8e(o,r)});for(const r of t)X8e(r)})},mV=(e,t,n)=>{const o=n,r=i8(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case bl:case uf:case Pa:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,n=[];ln(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,M)=>{h!==null&&(b.attributes[M]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},WRe(l)||(b.attributes=CRe({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case bl:case uf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case Pa:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case R1:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const M=r.get(b)??null;tu(M,h)?h!==null&&i.delete(o):(c==="retain"&&f(),tu(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const M=r.get(b)??null;tu(M,h)||(c==="retain"&&f(),l[b]=M)}else if(!i.deleted){s.set(b,h);const M=l[b];M!==void 0&&(tu(M,h)?M!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),fh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class w2 extends ho{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new w2}clone(){const t=new w2;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new K8e(this,t,n);Fx(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===Pa&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?ln(this.doc,o=>{const r=new f8(null,this._start,0,new Map);for(let s=0;s0)&&Z6(o,this,r,c,i.attributes||{})}else i.retain!==void 0?hV(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&mV(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,M)=>{f=!0,p[M]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(eb(l,t)||n!==void 0&&eb(l,n))switch(l.content.constructor){case Pa:{const p=s.get("ychange");t!==void 0&&!eb(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!eb(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case bl:case uf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case R1:eb(l,t)&&(u(),fh(s,l.content));break}l=l.right}u()};return t||n?ln(i,p=>{t&&d8(p,t),n&&d8(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?ln(r,s=>{const i=tA(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),Z6(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?ln(r,s=>{const i=tA(s,this,t,!o);Z6(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?ln(o,r=>{mV(r,tA(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?ln(r,s=>{const i=tA(s,this,t,!1);i.right!==null&&hV(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?ln(this.doc,n=>{fv(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?ln(this.doc,o=>{nN(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return oN(this,t)}getAttributes(){return H1e(this)}_write(t){t.writeTypeRef(bWe)}}const Y8e=e=>new w2;class Q6{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===k2||n.constructor===Rp)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;break}else t.parent===this._root?t=null:t=t.parent._item;while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Rp extends ho{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Rp}clone(){const t=new Rp;return t.insert(0,this.toArray().map(n=>n instanceof ho?n.clone():n)),t}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Q6(this,t)}querySelector(t){t=t.toUpperCase();const o=new Q6(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Gc(new Q6(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){Fx(this,t,new J8e(this,n,t))}toString(){return I1e(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),kg(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?ln(this.doc,o=>{$1e(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)ln(this.doc,o=>{const r=t&&t instanceof ho?t._item:t;pv(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw Ri("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?ln(this.doc,o=>{V1e(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return P1e(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return D1e(this,t)}slice(t=0,n=this.length){return j1e(this,t,n)}forEach(t){kg(this,t)}_write(t){t.writeTypeRef(mWe)}}const Z8e=e=>new Rp;class k2 extends Rp{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new k2(this.nodeName)}clone(){const t=new k2(this.nodeName),n=this.getAttributes();return RRe(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof ho?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?ln(this.doc,n=>{fv(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?ln(this.doc,o=>{nN(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return oN(this,t)}hasAttribute(t){return U1e(this,t)}getAttributes(t){return t?D8e(this,t):H1e(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return kg(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(hWe),t.writeKey(this.nodeName)}}const Q8e=e=>new k2(e.readKey());class J8e extends Ix{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class bv extends _2{constructor(t){super(),this.hookName=t}_copy(){return new bv(this.hookName)}clone(){const t=new bv(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef(MWe),t.writeKey(this.hookName)}}const eWe=e=>new bv(e.readKey());class hv extends w2{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new hv}clone(){const t=new hv;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(gWe)}}const tWe=e=>new hv;class rN{constructor(t,n){this.id=t,this.length=n}get deleted(){throw ka()}mergeWith(t){return!1}write(t,n,o){throw ka()}integrate(t,n){throw ka()}}const nWe=0;class Rs extends rN{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),W1e(t.doc.store,this)}write(t,n){t.writeInfo(nWe),t.writeLen(this.length-n)}getMissing(t,n){return null}}class Kz{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Kz(this.content)}splice(t){throw ka()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const oWe=e=>new Kz(e.readBuf());class qg{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new qg(this.len)}splice(t){const n=new qg(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){uv(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const rWe=e=>new qg(e.readLen()),Z1e=(e,t)=>new ph({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Yz{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Yz(Z1e(this.doc.guid,this.opts))}splice(t){throw ka()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const sWe=e=>new Yz(Z1e(e.readString(),e.readAny()));class uf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new uf(this.embed)}splice(t){throw ka()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const iWe=e=>new uf(e.readJSON());class R1{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new R1(this.key,this.value)}splice(t){throw ka()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const aWe=e=>new R1(e.readKey(),e.readJSON());class mv{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new mv(this.arr)}splice(t){const n=new mv(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const uWe=e=>new Pa(e.readString()),dWe=[$8e,H8e,Y8e,Q8e,Z8e,eWe,tWe],pWe=0,fWe=1,bWe=2,hWe=3,mWe=4,MWe=5,gWe=6;class bl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new bl(this.type._copy())}splice(t){throw ka()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const zWe=e=>new bl(dWe[e.readTypeRef()](e)),Mv=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new Wo(M0(o,r+n),t,M0(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=M0(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let Wo=class b8 extends rN{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?G$:0}set marker(t){(this.info&H6)>0!==t&&(this.info^=H6)}get marker(){return(this.info&H6)>0}get keep(){return(this.info&X$)>0}set keep(t){this.keep!==t&&(this.info^=X$)}get countable(){return(this.info&G$)>0}get deleted(){return(this.info&V6)>0}set deleted(t){this.deleted!==t&&(this.info^=V6)}markDeleted(){this.info|=V6}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=H1(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=H1(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Vb&&this.id.client!==this.parent.client&&this.parent.clock>=H1(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=uV(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Bu(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Rs||this.right&&this.right.constructor===Rs)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===b8&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===b8&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Vb){const o=Y6(n,this.parent);o.constructor===Rs?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=uV(t,t.doc.store,M0(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),JO(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),uv(t.deleteSet,this.id.client,this.id.clock,this.length),pV(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw La();this.content.gc(t),n?_8e(t,this,new Rs(this.id,this.length)):this.content=new qg(this.length)}write(t,n){const o=n>0?M0(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&Bx|(o===null?0:es)|(r===null?0:Wc)|(s===null?0:vg);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=v8e(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===Vb?(t.writeParentInfo(!1),t.writeLeftID(c)):La();s!==null&&t.writeString(s)}this.content.write(t,n)}};const Q1e=(e,t)=>OWe[t&Bx](e),OWe=[()=>{La()},rWe,cWe,oWe,uWe,iWe,aWe,zWe,lWe,sWe,()=>{La()}],AWe=10;class Ws extends rN{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){La()}write(t,n){t.writeInfo(AWe),Wt(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const J1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},eoe="__ $YJS$ __";J1e[eoe]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");J1e[eoe]=!0;const df=e=>y2((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),yWe=(e,t)=>y2((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(Ri(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),vWe=e=>df(indexedDB.deleteDatabase(e)),xWe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),oM=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>WWe(o,r))},toe=(e,t)=>df(e.count(t)),_We=(e,t)=>df(e.get(t)),noe=(e,t)=>df(e.delete(t)),wWe=(e,t,n)=>df(e.put(t,n)),h8=(e,t)=>df(e.add(t)),kWe=(e,t,n)=>df(e.getAll(t,n)),qWe=(e,t,n)=>{let o=null;return RWe(e,t,r=>(o=r,!1),n).then(()=>o)},SWe=(e,t=null)=>qWe(e,t,"prev"),CWe=(e,t)=>y2((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),RWe=(e,t,n,o="next")=>CWe(e.openKeyCursor(t,o),r=>n(r.key)),WWe=(e,t)=>e.objectStore(t),TWe=(e,t)=>IDBKeyRange.upperBound(e,t),EWe=(e,t)=>IDBKeyRange.lowerBound(e,t),J6="custom",ooe="updates",roe=500,soe=(e,t=()=>{},n=()=>{})=>{const[o]=oM(e.db,[ooe]);return kWe(o,EWe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),ln(e.doc,()=>{r.forEach(s=>k1e(e.doc,s))},e,!1),n(o))}).then(()=>SWe(o).then(r=>{e._dbref=r+1})).then(()=>toe(o).then(r=>{e._dbsize=r})).then(()=>o)},BWe=(e,t=!0)=>soe(e).then(n=>{(t||e._dbsize>=roe)&&h8(n,ZB(e.doc)).then(()=>noe(n,TWe(e._dbref,!0))).then(()=>toe(n).then(o=>{e._dbsize=o}))});class NWe extends Hz{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=yWe(t,o=>xWe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=y2(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,soe(this,i=>h8(i,ZB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=oM(this.db,[ooe]);h8(s,o),++this._dbsize>=roe&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{BWe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{vWe(this.name)})}get(t){return this._db.then(n=>{const[o]=oM(n,[J6],"readonly");return _We(o,t)})}set(t,n){return this._db.then(o=>{const[r]=oM(o,[J6]);return wWe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=oM(n,[J6]);return noe(o,t)})}}function LWe(e,t,n){const o=`${t}-${e}`,r=new NWe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const jWe=1200,PWe=2500,gv=3e4,m8=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=Kc();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,gv/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout(m8,NB(GCe(e.unsuccessfulReconnects+1)*jWe,PWe),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=Kc(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,gv/2)}}};class IWe extends Hz{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&gvn.key===t&&this.onmessage!==null&&this.onmessage({data:VB(n.newValue||"")}),qRe(this._onChange)}postMessage(t){s1e.setItem(this.room,p1e($Re(t)))}close(){SRe(this._onChange)}}const FWe=typeof BroadcastChannel>"u"?DWe:BroadcastChannel,sN=e=>Fo(ioe,e,()=>{const t=Eu(),n=new FWe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),$We=(e,t)=>(sN(e).subs.add(t),t),VWe=(e,t)=>{const n=sN(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),ioe.delete(e)),o},HWe=(e,t,n=null)=>{const o=sN(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},UWe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function nA(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var aoe={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof nA=="function"&&nA;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var M=new Error("Cannot find module '"+f+"'");throw M.code="MODULE_NOT_FOUND",M}var z=c[f]={exports:{}};i[f][0].call(z.exports,function(y){var x=i[f][1][y];return u(x||y)},z,z.exports,s,i,c,l)}return c[f].exports}for(var d=typeof nA=="function"&&nA,p=0;p>16,S[C++]=255&A>>8,S[C++]=255&A;return q===2&&(A=M[g.charCodeAt(_)]<<2|M[g.charCodeAt(_+1)]>>4,S[C++]=255&A),q===1&&(A=M[g.charCodeAt(_)]<<10|M[g.charCodeAt(_+1)]<<4|M[g.charCodeAt(_+2)]>>2,S[C++]=255&A>>8,S[C++]=255&A),S}function p(g){return h[63&g>>18]+h[63&g>>12]+h[63&g>>6]+h[63&g]}function f(g,A,_){for(var w,k=[],q=A;q<_;q+=3)w=(16711680&g[q]<<16)+(65280&g[q+1]<<8)+(255&g[q+2]),k.push(p(w));return k.join("")}function b(g){for(var A,_=g.length,w=_%3,k=[],q=16383,S=0,C=_-w;SC?C:S+q));return w===1?(A=g[_-1],k.push(h[A>>2]+h[63&A<<4]+"==")):w===2&&(A=(g[_-2]<<8)+g[_-1],k.push(h[A>>10]+h[63&A>>4]+h[63&A<<2]+"=")),k.join("")}c.byteLength=function(g){var A=l(g),_=A[0],w=A[1];return 3*(_+w)/4-w},c.toByteArray=d,c.fromByteArray=b;for(var h=[],M=[],z=typeof Uint8Array>"u"?Array:Uint8Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0,v=y.length;xR)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function h(R,j,V){return b(R),0>=R||j===void 0?d(R):typeof V=="string"?d(R).fill(j,V):d(R).fill(j)}function M(R){return b(R),d(0>R?0:0|g(R))}function z(R,j){if((typeof j!="string"||j==="")&&(j="utf8"),!p.isEncoding(j))throw new TypeError("Unknown encoding: "+j);var V=0|A(R,j),de=d(V),ge=de.write(R,j);return ge!==V&&(de=de.slice(0,ge)),de}function y(R){for(var j=0>R.length?0:0|g(R.length),V=d(j),de=0;dej||R.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|R}function A(R,j){if(p.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||G(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var V=R.length,de=2>>1;case"base64":return K(R).length;default:if(ge)return de?-1:be(R).length;j=(""+j).toLowerCase(),ge=!0}}function _(R,j,V){var de=!1;if((j===void 0||0>j)&&(j=0),j>this.length||((V===void 0||V>this.length)&&(V=this.length),0>=V)||(V>>>=0,j>>>=0,V<=j))return"";for(R||(R="utf8");;)switch(R){case"hex":return U(this,j,V);case"utf8":case"utf-8":return L(this,j,V);case"ascii":return P(this,j,V);case"latin1":case"binary":return H(this,j,V);case"base64":return E(this,j,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,j,V);default:if(de)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),de=!0}}function w(R,j,V){var de=R[j];R[j]=R[V],R[V]=de}function k(R,j,V,de,ge){if(R.length===0)return-1;if(typeof V=="string"?(de=V,V=0):2147483647V&&(V=-2147483648),V=+V,re(V)&&(V=ge?0:R.length-1),0>V&&(V=R.length+V),V>=R.length){if(ge)return-1;V=R.length-1}else if(0>V)if(ge)V=0;else return-1;if(typeof j=="string"&&(j=p.from(j,de)),p.isBuffer(j))return j.length===0?-1:q(R,j,V,de,ge);if(typeof j=="number")return j&=255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(R,j,V):Uint8Array.prototype.lastIndexOf.call(R,j,V):q(R,[j],V,de,ge);throw new TypeError("val must be string, number or Buffer")}function q(R,j,V,de,ge){function ve(Ue,Xe){return Ne===1?Ue[Xe]:Ue.readUInt16BE(Xe*Ne)}var Ne=1,et=R.length,mt=j.length;if(de!==void 0&&(de=(de+"").toLowerCase(),de==="ucs2"||de==="ucs-2"||de==="utf16le"||de==="utf-16le")){if(2>R.length||2>j.length)return-1;Ne=2,et/=2,mt/=2,V/=2}var Mt;if(ge){var Ke=-1;for(Mt=V;Mtet&&(V=et-mt),Mt=V;0<=Mt;Mt--){for(var Nt=!0,zt=0;ztge&&(de=ge)):de=ge;var ve=j.length;de>ve/2&&(de=ve/2);for(var Ne,et=0;etve&&(Ne=ve):et===2?(mt=R[ge+1],(192&mt)==128&&(Nt=(31&ve)<<6|63&mt,127Nt||57343Nt&&(Ne=Nt)))}Ne===null?(Ne=65533,et=1):65535>>10),Ne=56320|1023&Ne),de.push(Ne),ge+=et}return I(de)}function I(R){var j=R.length;if(j<=4096)return l.apply(String,R);for(var V="",de=0;dej)&&(j=0),(!V||0>V||V>de)&&(V=de);for(var ge="",ve=j;veR)throw new RangeError("offset is not uint");if(R+j>V)throw new RangeError("Trying to access beyond buffer length")}function ne(R,j,V,de,ge,ve){if(!p.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>ge||jR.length)throw new RangeError("Index out of range")}function oe(R,j,V,de){if(V+de>R.length)throw new RangeError("Index out of range");if(0>V)throw new RangeError("Index out of range")}function Y(R,j,V,de,ge){return j=+j,V>>>=0,ge||oe(R,j,V,4),he.write(R,j,V,de,23,4),V+4}function ee(R,j,V,de,ge){return j=+j,V>>>=0,ge||oe(R,j,V,8),he.write(R,j,V,de,52,8),V+8}function ie(R){if(R=R.split("=")[0],R=R.trim().replace(Q,""),2>R.length)return"";for(;R.length%4!=0;)R+="=";return R}function se(R){return 16>R?"0"+R.toString(16):R.toString(16)}function be(R,j){j=j||1/0;for(var V,de=R.length,ge=null,ve=[],Ne=0;NeV){if(!ge){if(56319V){-1<(j-=3)&&ve.push(239,191,189),ge=V;continue}V=(ge-55296<<10|V-56320)+65536}else ge&&-1<(j-=3)&&ve.push(239,191,189);if(ge=null,128>V){if(0>(j-=1))break;ve.push(V)}else if(2048>V){if(0>(j-=2))break;ve.push(192|V>>6,128|63&V)}else if(65536>V){if(0>(j-=3))break;ve.push(224|V>>12,128|63&V>>6,128|63&V)}else if(1114112>V){if(0>(j-=4))break;ve.push(240|V>>18,128|63&V>>12,128|63&V>>6,128|63&V)}else throw new Error("Invalid code point")}return ve}function ye(R){for(var j=[],V=0;V(j-=2));++Ne)V=R.charCodeAt(Ne),de=V>>8,ge=V%256,ve.push(ge),ve.push(de);return ve}function K(R){return Me.toByteArray(ie(R))}function pe(R,j,V,de){for(var ge=0;ge=j.length||ge>=R.length);++ge)j[ge+V]=R[ge];return ge}function G(R,j){return R instanceof j||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===j.name}function re(R){return R!==R}var Me=s("base64-js"),he=s("ieee754");c.Buffer=p,c.SlowBuffer=function(R){return+R!=R&&(R=0),p.alloc(+R)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var R=new Uint8Array(1);return R.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},R.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(R,j,V){return f(R,j,V)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(R,j,V){return h(R,j,V)},p.allocUnsafe=function(R){return M(R)},p.allocUnsafeSlow=function(R){return M(R)},p.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==p.prototype},p.compare=function(R,j){if(G(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),G(j,Uint8Array)&&(j=p.from(j,j.offset,j.byteLength)),!p.isBuffer(R)||!p.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===j)return 0;for(var V=R.length,de=j.length,ge=0,ve=u(V,de);gej&&(R+=" ... "),""},p.prototype.compare=function(R,j,V,de,ge){if(G(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),!p.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(j===void 0&&(j=0),V===void 0&&(V=R?R.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),0>j||V>R.length||0>de||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&j>=V)return 0;if(de>=ge)return-1;if(j>=V)return 1;if(j>>>=0,V>>>=0,de>>>=0,ge>>>=0,this===R)return 0;for(var ve=ge-de,Ne=V-j,et=u(ve,Ne),mt=this.slice(de,ge),Mt=R.slice(j,V),Ke=0;Ke>>=0,isFinite(V)?(V>>>=0,de===void 0&&(de="utf8")):(de=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-j;if((V===void 0||V>ge)&&(V=ge),0V||0>j)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var ve=!1;;)switch(de){case"hex":return S(this,R,j,V);case"utf8":case"utf-8":return C(this,R,j,V);case"ascii":return T(this,R,j,V);case"latin1":case"binary":return W(this,R,j,V);case"base64":return B(this,R,j,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,R,j,V);default:if(ve)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),ve=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(R,j){var V=this.length;R=~~R,j=j===void 0?V:~~j,0>R?(R+=V,0>R&&(R=0)):R>V&&(R=V),0>j?(j+=V,0>j&&(j=0)):j>V&&(j=V),j>>=0,j>>>=0,V||Z(R,j,this.length);for(var de=this[R],ge=1,ve=0;++ve>>=0,j>>>=0,V||Z(R,j,this.length);for(var de=this[R+--j],ge=1;0>>=0,j||Z(R,1,this.length),this[R]},p.prototype.readUInt16LE=function(R,j){return R>>>=0,j||Z(R,2,this.length),this[R]|this[R+1]<<8},p.prototype.readUInt16BE=function(R,j){return R>>>=0,j||Z(R,2,this.length),this[R]<<8|this[R+1]},p.prototype.readUInt32LE=function(R,j){return R>>>=0,j||Z(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+16777216*this[R+3]},p.prototype.readUInt32BE=function(R,j){return R>>>=0,j||Z(R,4,this.length),16777216*this[R]+(this[R+1]<<16|this[R+2]<<8|this[R+3])},p.prototype.readIntLE=function(R,j,V){R>>>=0,j>>>=0,V||Z(R,j,this.length);for(var de=this[R],ge=1,ve=0;++ve=ge&&(de-=r(2,8*j)),de},p.prototype.readIntBE=function(R,j,V){R>>>=0,j>>>=0,V||Z(R,j,this.length);for(var de=j,ge=1,ve=this[R+--de];0=ge&&(ve-=r(2,8*j)),ve},p.prototype.readInt8=function(R,j){return R>>>=0,j||Z(R,1,this.length),128&this[R]?-1*(255-this[R]+1):this[R]},p.prototype.readInt16LE=function(R,j){R>>>=0,j||Z(R,2,this.length);var V=this[R]|this[R+1]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt16BE=function(R,j){R>>>=0,j||Z(R,2,this.length);var V=this[R+1]|this[R]<<8;return 32768&V?4294901760|V:V},p.prototype.readInt32LE=function(R,j){return R>>>=0,j||Z(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},p.prototype.readInt32BE=function(R,j){return R>>>=0,j||Z(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},p.prototype.readFloatLE=function(R,j){return R>>>=0,j||Z(R,4,this.length),he.read(this,R,!0,23,4)},p.prototype.readFloatBE=function(R,j){return R>>>=0,j||Z(R,4,this.length),he.read(this,R,!1,23,4)},p.prototype.readDoubleLE=function(R,j){return R>>>=0,j||Z(R,8,this.length),he.read(this,R,!0,52,8)},p.prototype.readDoubleBE=function(R,j){return R>>>=0,j||Z(R,8,this.length),he.read(this,R,!1,52,8)},p.prototype.writeUIntLE=function(R,j,V,de){if(R=+R,j>>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;ne(this,R,j,V,ge,0)}var ve=1,Ne=0;for(this[j]=255&R;++Ne>>=0,V>>>=0,!de){var ge=r(2,8*V)-1;ne(this,R,j,V,ge,0)}var ve=V-1,Ne=1;for(this[j+ve]=255&R;0<=--ve&&(Ne*=256);)this[j+ve]=255&R/Ne;return j+V},p.prototype.writeUInt8=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,1,255,0),this[j]=255&R,j+1},p.prototype.writeUInt16LE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,2,65535,0),this[j]=255&R,this[j+1]=R>>>8,j+2},p.prototype.writeUInt16BE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,2,65535,0),this[j]=R>>>8,this[j+1]=255&R,j+2},p.prototype.writeUInt32LE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,4,4294967295,0),this[j+3]=R>>>24,this[j+2]=R>>>16,this[j+1]=R>>>8,this[j]=255&R,j+4},p.prototype.writeUInt32BE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,4,4294967295,0),this[j]=R>>>24,this[j+1]=R>>>16,this[j+2]=R>>>8,this[j+3]=255&R,j+4},p.prototype.writeIntLE=function(R,j,V,de){if(R=+R,j>>>=0,!de){var ge=r(2,8*V-1);ne(this,R,j,V,ge-1,-ge)}var ve=0,Ne=1,et=0;for(this[j]=255&R;++veR&&et===0&&this[j+ve-1]!==0&&(et=1),this[j+ve]=255&(R/Ne>>0)-et;return j+V},p.prototype.writeIntBE=function(R,j,V,de){if(R=+R,j>>>=0,!de){var ge=r(2,8*V-1);ne(this,R,j,V,ge-1,-ge)}var ve=V-1,Ne=1,et=0;for(this[j+ve]=255&R;0<=--ve&&(Ne*=256);)0>R&&et===0&&this[j+ve+1]!==0&&(et=1),this[j+ve]=255&(R/Ne>>0)-et;return j+V},p.prototype.writeInt8=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,1,127,-128),0>R&&(R=255+R+1),this[j]=255&R,j+1},p.prototype.writeInt16LE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,2,32767,-32768),this[j]=255&R,this[j+1]=R>>>8,j+2},p.prototype.writeInt16BE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,2,32767,-32768),this[j]=R>>>8,this[j+1]=255&R,j+2},p.prototype.writeInt32LE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,4,2147483647,-2147483648),this[j]=255&R,this[j+1]=R>>>8,this[j+2]=R>>>16,this[j+3]=R>>>24,j+4},p.prototype.writeInt32BE=function(R,j,V){return R=+R,j>>>=0,V||ne(this,R,j,4,2147483647,-2147483648),0>R&&(R=4294967295+R+1),this[j]=R>>>24,this[j+1]=R>>>16,this[j+2]=R>>>8,this[j+3]=255&R,j+4},p.prototype.writeFloatLE=function(R,j,V){return Y(this,R,j,!0,V)},p.prototype.writeFloatBE=function(R,j,V){return Y(this,R,j,!1,V)},p.prototype.writeDoubleLE=function(R,j,V){return ee(this,R,j,!0,V)},p.prototype.writeDoubleBE=function(R,j,V){return ee(this,R,j,!1,V)},p.prototype.copy=function(R,j,V,de){if(!p.isBuffer(R))throw new TypeError("argument should be a Buffer");if(V||(V=0),de||de===0||(de=this.length),j>=R.length&&(j=R.length),j||(j=0),0j)throw new RangeError("targetStart out of bounds");if(0>V||V>=this.length)throw new RangeError("Index out of range");if(0>de)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),R.length-jge||de==="latin1")&&(R=ge)}}else typeof R=="number"&&(R&=255);if(0>j||this.length>>=0,V=V===void 0?this.length:V>>>0,R||(R=0);var ve;if(typeof R=="number")for(ve=j;ve{M==="%%"||(b++,M==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...M){if(!f.enabled)return;const z=f,y=+new Date,x=y-(b||y);z.diff=x,z.prev=b,z.curr=y,b=y,M[0]=l.coerce(M[0]),typeof M[0]!="string"&&M.unshift("%O");let v=0;M[0]=M[0].replace(/%([a-zA-Z%])/g,(A,_)=>{if(A==="%%")return"%";v++;const w=l.formatters[_];if(typeof w=="function"){const k=M[v];A=w.call(z,k),M.splice(v,1),v--}return A}),l.formatArgs.call(z,M),(z.log||l.log).apply(z,M)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:M=>{h=M}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bB&&!E.warned){E.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+(C+" listeners added. Use emitter.setMaxListeners() to increase limit"));L.name="MaxListenersExceededWarning",L.emitter=S,L.type=C,L.count=E.length,c(L)}return S}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(S,C,T){var W={fired:!1,wrapFn:void 0,target:S,type:C,listener:T},B=f.bind(W);return B.listener=T,W.wrapFn=B,B}function h(S,C,T){var W=S._events;if(W===void 0)return[];var B=W[C];return B===void 0?[]:typeof B=="function"?T?[B.listener||B]:[B]:T?x(B):z(B,B.length)}function M(S){var C=this._events;if(C!==void 0){var T=C[S];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}function z(S,C){for(var T=Array(C),W=0;WS||k(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");q=S}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(S){if(typeof S!="number"||0>S||k(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(S){for(var C=[],T=1;TB)return this;B===0?T.shift():y(T,B),T.length===1&&(W[S]=T[0]),W.removeListener!==void 0&&this.emit("removeListener",S,E||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(S){var C,T,W;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[S]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete T[S]),this;if(arguments.length===0){var B,N=Object.keys(T);for(W=0;W"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,M=8*f-p-1,z=(1<>1,x=-7,v=d?f-1:0,g=d?-1:1,A=l[u+v];for(v+=g,b=A&(1<<-x)-1,A>>=-x,x+=M;0>=-x,x+=p;0>1,_=f===23?r(2,-24)-r(2,-77):0,w=p?0:b-1,k=p?1:-1,q=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(M=isNaN(u)?1:0,h=g):(h=n(x(u)/y),1>u*(z=r(2,-h))&&(h--,z*=2),u+=1<=h+A?_/z:_*r(2,1-A),2<=u*z&&(h++,z/=2),h+A>=g?(M=0,h=g):1<=h+A?(M=(u*z-1)*r(2,f),h+=A):(M=u*r(2,A-1)*r(2,f),h=0));8<=f;l[d+w]=255&M,w+=k,M/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof Dn>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Dn)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Dn)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,M){h.prototype=Object.create(M.prototype),h.prototype.constructor=h,h.__proto__=M}function l(h,M,z){function y(v,g,A){return typeof M=="string"?M:M(v,g,A)}z||(z=Error);var x=function(v){function g(A,_,w){return v.call(this,y(A,_,w))||this}return c(g,v),g}(z);x.prototype.name=z.name,x.prototype.code=h,b[h]=x}function u(h,M){if(Array.isArray(h)){var z=h.length;return h=h.map(function(y){return y+""}),2h.length)&&(z=h.length),h.substring(z-M.length,z)===M}function f(h,M,z){return typeof z!="number"&&(z=0),!(z+M.length>h.length)&&h.indexOf(M,z)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,M){return'The value "'+M+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,M,z){var y;typeof M=="string"&&d(M,"not ")?(y="must not be",M=M.replace(/^not /,"")):y="must be";var x;if(p(h," argument"))x="The ".concat(h," ").concat(y," ").concat(u(M,"type"));else{var v=f(h,".")?"property":"argument";x='The "'.concat(h,'" ').concat(v," ").concat(y," ").concat(u(M,"type"))}return x+=". Received type ".concat(typeof z),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(y){return this instanceof l?(f.call(this,y),b.call(this,y),this.allowHalfOpen=!0,void(y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(y)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(y){y.end()}var p=Object.keys||function(y){var x=[];for(var v in y)x.push(v);return x};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,M=p(b.prototype),z=0;z>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function x(Q,R){return 0>=Q||R.length===0&&R.ended?0:R.objectMode?1:Q===Q?(Q>R.highWaterMark&&(R.highWaterMark=y(Q)),Q<=R.length?Q:R.ended?R.length:(R.needReadable=!0,0)):R.flowing&&R.length?R.buffer.head.data.length:R.length}function v(Q,R){if(P("onEofChunk"),!R.ended){if(R.decoder){var j=R.decoder.end();j&&j.length&&(R.buffer.push(j),R.length+=R.objectMode?1:j.length)}R.ended=!0,R.sync?g(Q):(R.needReadable=!1,!R.emittedReadable&&(R.emittedReadable=!0,A(Q)))}}function g(Q){var R=Q._readableState;P("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(P("emitReadable",R.flowing),R.emittedReadable=!0,c.nextTick(A,Q))}function A(Q){var R=Q._readableState;P("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(Q.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,W(Q)}function _(Q,R){R.readingMore||(R.readingMore=!0,c.nextTick(w,Q,R))}function w(Q,R){for(;!R.reading&&!R.ended&&(R.length=R.length?(j=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):j=R.buffer.consume(Q,R.decoder),j}function N(Q){var R=Q._readableState;P("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,c.nextTick(E,R,Q))}function E(Q,R){if(P("endReadableNT",Q.endEmitted,Q.length),!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,R.readable=!1,R.emit("end"),Q.autoDestroy)){var j=R._writableState;(!j||j.autoDestroy&&j.finished)&&R.destroy()}}function L(Q,R){for(var j=0,V=Q.length;j=R.highWaterMark)||R.ended))return P("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?N(this):g(this),null;if(Q=x(Q,R),Q===0&&R.ended)return R.length===0&&N(this),null;var V=R.needReadable;P("need readable",V),(R.length===0||R.length-Q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Dn)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(y,x){var v=this._transformState;v.transforming=!1;var g=v.writecb;if(g===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,x!=null&&this.push(x),g(y);var A=this._readableState;A.reading=!1,(A.needReadable||A.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Dn)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(k,q,S){return q in k?Object.defineProperty(k,q,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[q]=S,k}function u(k,q){return{value:k,done:q}}function d(k){var q=k[M];if(q!==null){var S=k[A].read();S!==null&&(k[v]=null,k[M]=null,k[z]=null,q(u(S,!1)))}}function p(k){c.nextTick(d,k)}function f(k,q){return function(S,C){k.then(function(){return q[x]?void S(u(void 0,!0)):void q[g](S,C)},C)}}var b,h=s("./end-of-stream"),M=Symbol("lastResolve"),z=Symbol("lastReject"),y=Symbol("error"),x=Symbol("ended"),v=Symbol("lastPromise"),g=Symbol("handlePromise"),A=Symbol("stream"),_=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((b={get stream(){return this[A]},next:function(){var k=this,q=this[y];if(q!==null)return Promise.reject(q);if(this[x])return Promise.resolve(u(void 0,!0));if(this[A].destroyed)return new Promise(function(W,B){c.nextTick(function(){k[y]?B(k[y]):W(u(void 0,!0))})});var S,C=this[v];if(C)S=new Promise(f(C,this));else{var T=this[A].read();if(T!==null)return Promise.resolve(u(T,!1));S=new Promise(this[g])}return this[v]=S,S}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var k=this;return new Promise(function(q,S){k[A].destroy(null,function(C){return C?void S(C):void q(u(void 0,!0))})})}),b),_);i.exports=function(k){var q,S=Object.create(w,(q={},l(q,A,{value:k,writable:!0}),l(q,M,{value:null,writable:!0}),l(q,z,{value:null,writable:!0}),l(q,y,{value:null,writable:!0}),l(q,x,{value:k._readableState.endEmitted,writable:!0}),l(q,g,{value:function(C,T){var W=S[A].read();W?(S[v]=null,S[M]=null,S[z]=null,C(u(W,!1))):(S[M]=C,S[z]=T)},writable:!0}),q));return S[v]=null,h(k,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var T=S[z];return T!==null&&(S[v]=null,S[M]=null,S[z]=null,T(C)),void(S[y]=C)}var W=S[M];W!==null&&(S[v]=null,S[M]=null,S[z]=null,W(u(void 0,!0))),S[x]=!0}),k.on("readable",p.bind(null,S)),S}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,g){var A=Object.keys(v);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(v);g&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(v,w).enumerable})),A.push.apply(A,_)}return A}function l(v){for(var g,A=1;A>>0),_=this.head,w=0;_;)b(_.data,A,w),w+=_.data.length,_=_.next;return A}},{key:"consume",value:function(g,A){var _;return gk.length?k.length:g;if(w+=q===k.length?k:k.slice(0,g),g-=q,g===0){q===k.length?(++_,this.head=A.next?A.next:this.tail=null):(this.head=A,A.data=k.slice(q));break}++_}return this.length-=_,w}},{key:"_getBuffer",value:function(g){var A=M.allocUnsafe(g),_=this.head,w=1;for(_.data.copy(A),g-=_.data.length;_=_.next;){var k=_.data,q=g>k.length?k.length:g;if(k.copy(A,A.length-g,0,q),g-=q,g===0){q===k.length?(++w,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=k.slice(q));break}++w}return this.length-=w,A}},{key:x,value:function(g,A){return y(this,l({},A,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return h||M?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(z){!f&&z?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,z)):c.nextTick(l,b,z):f?(c.nextTick(u,b),f(z)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,M=Array(h),z=0;zv.length)throw new z("streams");var _,w=v.map(function(k,q){var S=qb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var M=p(f);return b===void 0?M.fill(0):typeof h=="string"?M.fill(b,h):M.fill(b),M},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(w){if(!w)return"utf8";for(var k;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}function u(w){var k=l(w);if(typeof k!="string"&&(A.isEncoding===_||!_(w)))throw new Error("Unknown encoding: "+w);return k||w}function d(w){this.encoding=u(w);var k;switch(this.encoding){case"utf16le":this.text=M,this.end=z,k=4;break;case"utf8":this.fillLast=h,k=4;break;case"base64":this.text=y,this.end=x,k=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(k)}function p(w){return 127>=w?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function f(w,k,q){var S=k.length-1;if(S=S)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],q.slice(0,-1)}return q}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",k,w.length-1)}function z(w){var k=w&&w.length?this.write(w):"";if(this.lastNeed){var q=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,q)}return k}function y(w,k){var q=(w.length-k)%3;return q==0?w.toString("base64",k):(this.lastNeed=3-q,this.lastTotal=3,q==1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",k,w.length-q))}function x(w){var k=w&&w.length?this.write(w):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function v(w){return w.toString(this.encoding)}function g(w){return w&&w.length?this.write(w):""}var A=s("safe-buffer").Buffer,_=A.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(w){if(w.length===0)return"";var k,q;if(this.lastNeed){if(k=this.fillLast(w),k===void 0)return"";q=this.lastNeed,this.lastNeed=0}else q=0;return q"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Dn)},{}],"/":[function(s,i){function c(x){return x.replace(/a=ice-options:trickle\s\n/g,"")}function l(x){console.warn(x)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:M}=s("buffer"),z=65536;class y extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||y.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},y.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(g=>g),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(g){return void this.destroy(h(g,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=g=>{this._onIceCandidate(g)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(g=>{this.destroy(h(g,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=g=>{this._setupData(g)},this.streams&&this.streams.forEach(g=>{this.addStream(g)}),this._pc.ontrack=g=>{this._onTrack(g)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(g=>{this._addIceCandidate(g)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(g=>{this.destroy(h(g,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const g=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(g).catch(A=>{!g.address||g.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(A,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,g){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,g),this._needsNegotiation()}catch(A){this.destroy(h(A,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:g}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(g=>{this.addTrack(g,v)})}}addTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const A=this._senderMap.get(v)||new Map;let _=A.get(g);if(!_)_=this._pc.addTrack(v,g),A.set(g,_),this._senderMap.set(v,A),this._needsNegotiation();else throw _.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,g,A){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const _=this._senderMap.get(v),w=_?_.get(A):null;if(!w)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");g&&this._senderMap.set(g,_),w.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):w.replaceTrack(g)}removeTrack(v,g){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const A=this._senderMap.get(v),_=A?A.get(g):null;if(!_)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{_.removed=!0,this._pc.removeTrack(_)}catch(w){w.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(_):this.destroy(h(w,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(g=>{this.removeTrack(g,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,g){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),g()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=z),this.channelName=this._channel.label,this._channel.onmessage=A=>{this._onChannelMessage(A)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=A=>{const _=A.error instanceof Error?A.error:new Error(`Datachannel error: ${A.message} ${A.filename}:${A.lineno}:${A.colno}`);this.destroy(h(_,"ERR_DATA_CHANNEL"))};let g=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(g&&this._onChannelClose(),g=!0):g=!1},5e3)}_read(){}_write(v,g,A){if(this.destroyed)return A(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(_){return this.destroy(h(_,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>z?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=A):A(null)}else this._debug("write before connect"),this._chunk=v,this._cb=A}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const g=()=>{if(!this.destroyed){const A=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:A.type,sdp:A.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?g():this.once("_iceComplete",g))}).catch(A=>{this.destroy(h(A,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,g=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,g),this.emit("iceStateChange",v,g),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const g=A=>(Object.prototype.toString.call(A.values)==="[object Array]"&&A.values.forEach(_=>{Object.assign(A,_)}),A);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(A=>{const _=[];A.forEach(w=>{_.push(g(w))}),v(null,_)},A=>v(A)):0{if(this.destroyed)return;const _=[];A.result().forEach(w=>{const k={};w.names().forEach(q=>{k[q]=w.stat(q)}),k.id=w.id,k.type=w.type,k.timestamp=w.timestamp,_.push(g(k))}),v(null,_)},A=>v(A)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((g,A)=>{if(this.destroyed)return;g&&(A=[]);const _={},w={},k={};let q=!1;A.forEach(C=>{(C.type==="remotecandidate"||C.type==="remote-candidate")&&(_[C.id]=C),(C.type==="localcandidate"||C.type==="local-candidate")&&(w[C.id]=C),(C.type==="candidatepair"||C.type==="candidate-pair")&&(k[C.id]=C)});const S=C=>{q=!0;let T=w[C.localCandidateId];T&&(T.ip||T.address)?(this.localAddress=T.ip||T.address,this.localPort=+T.port):T&&T.ipAddress?(this.localAddress=T.ipAddress,this.localPort=+T.portNumber):typeof C.googLocalAddress=="string"&&(T=C.googLocalAddress.split(":"),this.localAddress=T[0],this.localPort=+T[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let W=_[C.remoteCandidateId];W&&(W.ip||W.address)?(this.remoteAddress=W.ip||W.address,this.remotePort=+W.port):W&&W.ipAddress?(this.remoteAddress=W.ipAddress,this.remotePort=+W.portNumber):typeof C.googRemoteAddress=="string"&&(W=C.googRemoteAddress.split(":"),this.remoteAddress=W[0],this.remotePort=+W[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(A.forEach(C=>{C.type==="transport"&&C.selectedCandidatePairId&&S(k[C.selectedCandidatePairId]),(C.type==="googCandidatePair"&&C.googActiveConnection==="true"||(C.type==="candidatepair"||C.type==="candidate-pair")&&C.selected)&&S(C)}),!q&&(!Object.keys(k).length||Object.keys(w).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(T){return this.destroy(h(T,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const C=this._cb;this._cb=null,C(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>z)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let g=v.data;g instanceof ArrayBuffer&&(g=M.from(g)),this.push(g)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(g=>{this._debug("on track"),this.emit("track",v.track,g),this._remoteTracks.push({track:v.track,stream:g}),this._remoteStreams.some(A=>A.id===g.id)||(this._remoteStreams.push(g),b(()=>{this._debug("on stream"),this.emit("stream",g)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}y.WEBRTC_SUPPORT=!!d(),y.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},y.channelConfig={},i.exports=y},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(aoe);var XWe=aoe.exports;const GWe=yo(XWe),iN=0,aN=1,coe=2,loe=(e,t)=>{Wt(e,iN);const n=A8e(t);Qn(e,n)},uoe=(e,t,n)=>{Wt(e,aN),Qn(e,ZB(t,n))},KWe=(e,t,n)=>uoe(t,n,P1(e)),doe=(e,t,n)=>{try{k1e(t,P1(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},YWe=(e,t)=>{Wt(e,coe),Qn(e,t)},ZWe=doe,QWe=(e,t,n,o)=>{const r=Jt(e);switch(r){case iN:KWe(e,t,n);break;case aN:doe(e,n,o);break;case coe:ZWe(e,n,o);break;default:throw new Error("Unknown message type")}return r},eq=3e4;class JWe extends Hz{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=Kc();this.getLocalState()!==null&&eq/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&eq<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&M8(this,o,"timeout")},Na(eq/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:Kc()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),EM(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const M8=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},zv=(e,t,n=e.states)=>{const o=t.length,r=F1();Wt(r,o);for(let s=0;s{const o=Ka(t),r=Kc(),s=[],i=[],c=[],l=[],u=Jt(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},tTe=(e,t)=>{const n=c8(e).buffer,o=c8(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},poe=(e,t)=>{if(!t)return DB(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=F1();return wa(r,"AES-GCM"),Qn(r,n),Qn(r,new Uint8Array(o)),$n(r)})},nTe=(e,t)=>{const n=F1();return O2(n,e),poe($n(n),t)},foe=(e,t)=>{if(!t)return DB(e);const n=Ka(e);Tc(n)!=="AES-GCM"&&wRe(Ri("Unknown encryption algorithm"));const r=P1(n),s=P1(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},boe=(e,t)=>foe(e,t).then(n=>A2(Ka(new Uint8Array(n)))),U1=r8e("y-webrtc"),Ub=0,hoe=3,Sg=1,cN=4,Cg=new Map,qa=new Map,moe=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),U1("synced ",Ls,e.name,Sp," with all peers"))},Moe=(e,t,n)=>{const o=Ka(t),r=F1(),s=Jt(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case Ub:{Wt(r,Ub);const u=QWe(o,r,c,e);u===aN&&!e.synced&&n(),u===iN&&(l=!0);break}case hoe:Wt(r,Sg),Qn(r,zv(i,Array.from(i.getStates().keys()))),l=!0;break;case Sg:eTe(i,P1(o),e);break;case cN:{const u=qp(o)===1,d=Tc(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),goe(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},oTe=(e,t)=>{const n=e.room;return U1("received message from ",Ls,e.remotePeerId,HB," (",n.name,")",Sp,jx),Moe(n,t,()=>{e.synced=!0,U1("synced ",Ls,n.name,Sp," with ",Ls,e.remotePeerId),moe(n)})},tq=(e,t)=>{U1("send message to ",Ls,e.remotePeerId,Sp,HB," (",e.room.name,")",jx);try{e.peer.send($n(t))}catch{}},rTe=(e,t)=>{U1("broadcast message in ",Ls,e.name,Sp),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class Ov{constructor(t,n,o,r){U1("establishing connection to ",Ls,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new GWe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),$x(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{U1("connected to ",Ls,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=F1();Wt(l,Ub),loe(l,i),tq(this,l);const u=c.getStates();if(u.size>0){const d=F1();Wt(d,Sg),Qn(d,zv(c,Array.from(u.keys()))),tq(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),moe(r),this.peer.destroy(),U1("closed connection to ",Ls,o),g8(r)}),this.peer.on("error",s=>{U1("Error in connection to ",Ls,o,": ",s),g8(r)}),this.peer.on("data",s=>{const i=oTe(this,s);i!==null&&tq(this,i)})}destroy(){this.peer.destroy()}}const Vl=(e,t)=>poe(t,e.key).then(n=>e.mux(()=>HWe(e.name,n))),MV=(e,t)=>{e.bcconnected&&Vl(e,t),rTe(e,t)},g8=e=>{Cg.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=F1();Wt(t,cN),_g(t,1),wa(t,e.peerId),Vl(e,$n(t))}};class sTe{constructor(t,n,o,r){this.peerId=o1e(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=UWe(),this.bcconnected=!1,this._bcSubscriber=s=>foe(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=Moe(this,i,()=>{});c&&Vl(this,$n(c))})),this._docUpdateHandler=(s,i)=>{const c=F1();Wt(c,Ub),YWe(c,s),MV(this,$n(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=F1();Wt(d,Sg),Qn(d,zv(this.awareness,u)),MV(this,$n(d))},this._beforeUnloadHandler=()=>{M8(this.awareness,[t.clientID],"window unload"),qa.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),g8(this);const t=this.name;$We(t,this._bcSubscriber),this.bcconnected=!0,goe(this);const n=F1();Wt(n,Ub),loe(n,this.doc),Vl(this,$n(n));const o=F1();Wt(o,Ub),uoe(o,this.doc),Vl(this,$n(o));const r=F1();Wt(r,hoe),Vl(this,$n(r));const s=F1();Wt(s,Sg),Qn(s,zv(this.awareness,[this.doc.clientID])),Vl(this,$n(s))}disconnect(){Cg.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),M8(this.awareness,[this.doc.clientID],"disconnect");const t=F1();Wt(t,cN),_g(t,0),wa(t,this.peerId),Vl(this,$n(t)),VWe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.off("exit",this._beforeUnloadHandler)}}const iTe=(e,t,n,o)=>{if(qa.has(n))throw Ri(`A Yjs Doc connected to room "${n}" already exists!`);const r=new sTe(e,t,n,o);return qa.set(n,r),r},$x=(e,t,n)=>{t.key?nTe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:p1e(o)})}):e.send({type:"publish",topic:t.name,data:n})};class zoe extends IWe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{U1(`connected (${t})`);const n=Array.from(qa.keys());this.send({type:"subscribe",topics:n}),qa.forEach(o=>$x(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=qa.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew Ov(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){U1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){U1("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(Fo(c,i.from,()=>new Ov(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&boe(VB(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>U1(`disconnect (${t})`))}}class aTe extends Hz{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new JWe(n),maxConns:i=20+Na(xRe()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?tTe(r,t):DB(null),this.room=null,this.key.then(u=>{this.room=iTe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=Fo(Cg,t,()=>new zoe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),Cg.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),qa.delete(this.roomName)}),super.destroy()}}function cTe(e,t){e.on("connect",()=>{U1(`connected (${t})`);const n=Array.from(qa.keys());e.send({type:"subscribe",topics:n}),qa.forEach(o=>$x(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=qa.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew Ov(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){U1("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){U1("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(Fo(c,i.from,()=>new Ov(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&boe(VB(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>U1(`disconnect (${t})`))}function gV(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(wt(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,Av/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{U1("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,Av/2))}}}const Av=3e4;class lTe extends Hz{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&Av{const n=Fo(Cg,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new zoe(t):()=>new lTe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function dTe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new uTe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const pTe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new ph;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const z=n[u].fromCRDTDoc(f);p(z)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const M=n[u].fetch;M&&M(d).then(z=>{f.transact(()=>{n[u].applyChangesToDoc(f,z)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let nq;function Rg(){return nq||(nq=pTe(LWe,dTe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),nq}function fTe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function bTe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Ooe(e){return{type:"ADD_ENTITIES",entities:e}}function hTe(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=xSe(n,o,s,i):c=Lne(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function mTe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function MTe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function gTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function zTe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function OTe(){return Re("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function ATe(e,t){return Re("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function yTe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Aoe=(e,t,n,o,{__unstableFetch:r=ct,throwOnError:s=!1}={})=>async({dispatch:i})=>{const l=(await i(Ya(e,t))).find(f=>f.kind===e&&f.name===t);let u,d=!1;if(!l)return;const p=await i.__unstableAcquireStoreLock(bo,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let f=!1;try{let b=`${l.baseURL}/${n}`;o&&(b=wt(b,o)),d=await r({path:b,method:"DELETE"}),await i(vSe(e,t,n,!0))}catch(b){f=!0,u=b}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:u}),f&&s)throw u;return d}finally{i.__unstableReleaseStoreLock(p)}},vTe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],M=d[b],z=l[b]?{...M,...o[b]}:o[b];return f[b]=J1(h,z)?void 0:z,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);Rg().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},xTe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},_Te=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},wTe=()=>({select:e})=>{e.getUndoManager().addRecord()},yoe=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=ct,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await l(Ya(e,t))).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||Oo,f=n[p],b=await l.__unstableAcquireStoreLock(bo,["entities","records",e,t,f||Xc()],{exclusive:!0});try{for(const[y,x]of Object.entries(n))if(typeof x=="function"){const v=x(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[y]:v},{undoIgnore:!0}),n[y]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,M,z=!1;try{const y=`${d.baseURL}${f?"/"+f:""}`,x=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),g=v?v.id:void 0,A=await c.getAutosave(x.type,x.id,g);let _={...x,...A,...n};if(_=Object.keys(_).reduce((w,k)=>(["title","excerpt","content","meta"].includes(k)&&(w[k]=_[k]),w),{status:_.status==="auto-draft"?"draft":void 0}),h=await r({path:`${y}/autosaves`,method:"POST",data:_}),x.id===h.id){let w={...x,..._,...h};w=Object.keys(w).reduce((k,q)=>(["title","excerpt","content"].includes(q)?k[q]=w[q]:q==="status"?k[q]=x.status==="auto-draft"&&w.status==="draft"?w.status:x.status:k[q]=x[q],k),{}),l.receiveEntityRecords(e,t,w,void 0,!0)}else l.receiveAutosaves(x.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(x,v)}),h=await r({path:y,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(y){z=!0,M=y}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:M,isAutosave:o}),z&&s)throw M;return h}finally{l.__unstableReleaseStoreLock(b)}},kTe=e=>async({dispatch:t})=>{const n=DCe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},qTe=(e,t,n,o)=>async({select:r,dispatch:s})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const c=(await s(Ya(e,t))).find(p=>p.kind===e&&p.name===t);if(!c)return;const l=c.key||Oo,u=r.getEntityRecordNonTransientEdits(e,t,n),d={[l]:n,...u};return await s.saveEntityRecord(e,t,d,o)},STe=(e,t,n,o,r)=>async({select:s,dispatch:i})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const c=s.getEntityRecordNonTransientEdits(e,t,n),l={};for(const f of o)Tx(l,f,ASe(c,f));const p=(await i(Ya(e,t))).find(f=>f.kind===e&&f.name===t)?.key||Oo;return n&&(l[p]=n),await i.saveEntityRecord(e,t,l,r)};function CTe(e){return Re("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),voe("create/media",e)}function voe(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function RTe(e){return{type:"RECEIVE_USER_PERMISSIONS",permissions:e}}function WTe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function TTe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function ETe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const BTe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c})=>{const u=(await c(Ya(e,t))).find(p=>p.kind===e&&p.name===t),d=u&&u?.revisionKey?u.revisionKey:Oo;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},NTe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:kTe,__experimentalReceiveCurrentGlobalStylesId:MTe,__experimentalReceiveThemeBaseGlobalStyles:gTe,__experimentalReceiveThemeGlobalStyleVariations:zTe,__experimentalSaveSpecifiedEntityEdits:STe,__unstableCreateUndoLevel:wTe,addEntities:Ooe,deleteEntityRecord:Aoe,editEntityRecord:vTe,receiveAutosaves:WTe,receiveCurrentTheme:mTe,receiveCurrentUser:bTe,receiveDefaultTemplateId:ETe,receiveEmbedPreview:yTe,receiveEntityRecords:hTe,receiveNavigationFallbackId:TTe,receiveRevisions:BTe,receiveThemeGlobalStyleRevisions:ATe,receiveThemeSupports:OTe,receiveUploadPermissions:CTe,receiveUserPermission:voe,receiveUserPermissions:RTe,receiveUserQuery:fTe,redo:_Te,saveEditedEntityRecord:qTe,saveEntityRecord:yoe,undo:xTe},Symbol.toStringTag,{value:"Module"})),Oo="id",LTe=["title","excerpt","content"],xoe=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>ct({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>ct({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],_oe=[{kind:"postType",loadEntities:ITe},{kind:"taxonomy",loadEntities:DTe},{kind:"root",name:"site",plural:"sites",loadEntities:FTe}],jTe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},oq=new WeakMap;function PTe(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof un&&(t[n]=o.valueOf());return t}function woe(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:PTe(o),innerBlocks:woe(n)}})}async function ITe(){const e=await ct({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:LTe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?y0e((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:jTe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>ct({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(oq.has(d)||oq.set(d,woe(d)),d=oq.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":Oo}})}async function DTe(){const e=await ct({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function FTe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>ct({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await ct({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const q2=(e,t,n="get")=>{const o=e==="root"?"":ov(e),r=ov(t);return`${n}${o}${r}`};function zV(e){e.forEach(({syncObjectType:t,syncConfig:n})=>{Rg().register(t,n);const o={...n};delete o.fetch,Rg().register(t+"--edit",o)})}const Ya=(e,t)=>async({select:n,dispatch:o})=>{let r=n.getEntitiesConfig(e);const s=!!n.getEntityConfig(e,t);if(r?.length>0&&s)return window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&zV(r),r;const i=_oe.find(c=>!t||!c.name?c.kind===e:c.kind===e&&c.name===t);return i?(r=await i.loadEntities(),window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&zV(r),o(Ooe(r)),r):[]};function koe(e){const{query:t}=e;return t?lh(t).context:"default"}function $Te(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function VTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=koe(t),o=t.key||Oo;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=gSe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,qoe(o,t.itemIds)]))}return e}function HTe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=koe(t),{query:o,key:r=Oo}=t,s=o?lh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,qoe(o,t.itemIds)]))}return e}const UTe=v0([Bne(e=>"query"in e),Nne(e=>e.query?{...e,...lh(e.query)}:e),N$("context"),N$("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=Oo}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:$Te(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),XTe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return UTe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},OV=zo({items:VTe,itemIsComplete:HTe,queries:XTe});function GTe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function KTe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function YTe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function ZTe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function QTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function JTe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function eEe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function tEe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const nEe=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function oEe(e){return v0([nEe,Bne(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),Nne(t=>({key:e.key||Oo,...t}))])(zo({queriedData:OV,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!J1(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!J1(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=OV(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function rEe(e=xoe,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const sEe=(e={},t)=>{const n=rEe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=zo(Object.entries(s).reduce((i,[c,l])=>{const u=zo(l.reduce((d,p)=>({...d,[p.name]:oEe(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function iEe(e=Y6e()){return e}function aEe(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function cEe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function lEe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...e,...t.permissions}}return e}function uEe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function dEe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function pEe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function fEe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function bEe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function hEe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function mEe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}const MEe=zo({terms:GTe,users:KTe,currentTheme:QTe,currentGlobalStylesId:JTe,currentUser:YTe,themeGlobalStyleVariations:tEe,themeBaseGlobalStyles:eEe,themeGlobalStyleRevisions:hEe,taxonomies:ZTe,entities:sEe,editsReference:aEe,undoManager:iEe,embedPreviews:cEe,userPermissions:lEe,autosaves:uEe,blockPatterns:dEe,blockPatternCategories:pEe,userPatternCategories:fEe,navigationFallbackId:bEe,defaultTemplates:mEe}),gEe={},zEe=nt(e=>(t,n)=>e(bo).isResolving("getEmbedPreview",[n]));function OEe(e,t){Re("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=wt("/wp/v2/users/?who=authors&per_page=100",t);return Soe(e,n)}function AEe(e){return e.currentUser}const Soe=at((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function yEe(e,t){return Re("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),Coe(e,t)}const Coe=at((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function vEe(e,t,n){return Re("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),bh(e,t,n)}function bh(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const pf=at((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Tu(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[M]}),Tx(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});pf.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=ySe(n)?Number(n):n,t};function xEe(e,t,n,o){return pf(e,t,n,o)}const Roe=at((e,t,n,o)=>{const r=pf(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(OSe(bh(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function _Ee(e,t,n,o){return Array.isArray(Vx(e,t,n,o))}const Vx=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?jne(r,o):null},wEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?Pne(r,o):null},kEe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=Pne(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):kSe(r,o))},qEe=at(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>pf(e,o,r,i)&&Toe(e,o,r,i));if(s.length){const i=bh(e,o,r);s.forEach(c=>{const l=Hx(e,o,r,c);n.push({key:l?l[i.key||Oo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),SEe=at(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>uN(e,o,r,i));if(s.length){const i=bh(e,o,r);s.forEach(c=>{const l=Hx(e,o,r,c);n.push({key:l?l[i.key||Oo]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function lN(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const Woe=at((e,t,n,o)=>{const{transientEdits:r}=bh(e,t,n)||{},s=lN(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function Toe(e,t,n,o){return uN(e,t,n,o)||Object.keys(Woe(e,t,n,o)).length>0}const Hx=at((e,t,n,o)=>{const r=Roe(e,t,n,o),s=lN(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function CEe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function uN(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function REe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function WEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function TEe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function EEe(e){Re("select( 'core' ).getUndoEdit()",{since:"6.3"})}function BEe(e){Re("select( 'core' ).getRedoEdit()",{since:"6.3"})}function NEe(e){return e.undoManager.hasUndo()}function LEe(e){return e.undoManager.hasRedo()}function Ux(e){return e.currentTheme?pf(e,"root","theme",e.currentTheme):null}function Eoe(e){return e.currentGlobalStylesId}function jEe(e){var t;return(t=Ux(e)?.theme_supports)!==null&&t!==void 0?t:gEe}function PEe(e,t){return e.embedPreviews[t]}function IEe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function Boe(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=Ex(t,n,o);return e.userPermissions[s]}function DEe(e,t,n,o){return Re("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),Boe(e,"update",{kind:t,name:n,id:o})}function FEe(e,t,n){return e.autosaves[n]}function $Ee(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const VEe=nt(e=>(t,n,o)=>e(bo).hasFinishedResolution("getAutosaves",[n,o]));function HEe(e){return e.editsReference}function UEe(e,t){const n=Vx(e,"postType","wp_template",{"find-template":t});return n?.length?Hx(e,"postType","wp_template",n[0].id):null}function XEe(e){const t=Ux(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function GEe(e){const t=Ux(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function KEe(e){return e.blockPatterns}function YEe(e){return e.blockPatternCategories}function ZEe(e){return e.userPatternCategories}function QEe(e){Re("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=Eoe(e);return t?e.themeGlobalStyleRevisions[t]:null}function JEe(e,t){return e.defaultTemplates[JSON.stringify(t)]}const eBe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?jne(s,r):null},tBe=at((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Tu(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{M=M?.[z]}),Tx(p,h,M)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),nBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:Eoe,__experimentalGetCurrentThemeBaseGlobalStyles:XEe,__experimentalGetCurrentThemeGlobalStylesVariations:GEe,__experimentalGetDirtyEntityRecords:qEe,__experimentalGetEntitiesBeingSaved:SEe,__experimentalGetEntityRecordNoResolver:xEe,__experimentalGetTemplateForLink:UEe,canUser:Boe,canUserEditEntityRecord:DEe,getAuthors:OEe,getAutosave:$Ee,getAutosaves:FEe,getBlockPatternCategories:YEe,getBlockPatterns:KEe,getCurrentTheme:Ux,getCurrentThemeGlobalStylesRevisions:QEe,getCurrentUser:AEe,getDefaultTemplateId:JEe,getEditedEntityRecord:Hx,getEmbedPreview:PEe,getEntitiesByKind:yEe,getEntitiesConfig:Coe,getEntity:vEe,getEntityConfig:bh,getEntityRecord:pf,getEntityRecordEdits:lN,getEntityRecordNonTransientEdits:Woe,getEntityRecords:Vx,getEntityRecordsTotalItems:wEe,getEntityRecordsTotalPages:kEe,getLastEntityDeleteError:TEe,getLastEntitySaveError:WEe,getRawEntityRecord:Roe,getRedoEdit:BEe,getReferenceByDistinctEdits:HEe,getRevision:tBe,getRevisions:eBe,getThemeSupports:jEe,getUndoEdit:EEe,getUserPatternCategories:ZEe,getUserQueryResults:Soe,hasEditsForEntityRecord:Toe,hasEntityRecords:_Ee,hasFetchedAutosaves:VEe,hasRedo:LEe,hasUndo:NEe,isAutosavingEntityRecord:CEe,isDeletingEntityRecord:REe,isPreviewEmbedFallback:IEe,isRequestingEmbedPreview:zEe,isSavingEntityRecord:uN},Symbol.toStringTag,{value:"Module"}));function oBe(e){return e.undoManager}function rBe(e){return e.navigationFallbackId}const sBe=nt(e=>at((t,n)=>e(bo).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(bo).getBlockPatterns()])),Noe=nt(e=>at((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(bo).canUser("delete",{kind:n,name:o,id:i}),update:e(bo).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function iBe(e,t,n,o){return Noe(e,t,n,o)[0]}const aBe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:sBe,getEntityRecordPermissions:iBe,getEntityRecordsPermissions:Noe,getNavigationFallbackId:rBe,getUndoManager:oBe},Symbol.toStringTag,{value:"Module"}));let Pf;function kt(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;Pf===void 0&&(document.implementation&&document.implementation.createHTMLDocument?Pf=document.implementation.createHTMLDocument("").createElement("textarea"):Pf=document.createElement("textarea")),Pf.innerHTML=e;const t=Pf.textContent;return Pf.innerHTML="",t}async function cBe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(ct({path:wt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:kt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(ct({path:wt("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:kt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(ct({path:wt("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:kt(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(ct({path:wt("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:kt(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=lBe(p,e),p=p.slice(0,c),p}function lBe(e,t){const n=AV(t),o={};for(const r of e)if(r.title){const s=AV(r.title),i=s.filter(c=>n.some(l=>c.includes(l)));o[r.id]=i.length/s.length}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function AV(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const rq=new Map,uBe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:rf(e)};if(!nf(e))return Promise.reject(`${e} is not a valid URL.`);const r=zx(e);return!r||!pB(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):rq.has(e)?rq.get(e):ct({path:wt(n,o),...t}).then(s=>(rq.set(e,s),s))};async function dBe(){const e=await ct({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[lB(n),o]))):[]}const pBe=e=>async({dispatch:t})=>{const n=wt("/wp/v2/users/?who=authors&per_page=100",e),o=await ct({path:n});t.receiveUserQuery(n,o)},fBe=()=>async({dispatch:e})=>{const t=await ct({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},Loe=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i})=>{const l=(await s(Ya(e,t))).find(d=>d.name===t&&d.kind===e);if(!l)return;const u=await s.__unstableAcquireStoreLock(bo,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&l.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const d=l.getSyncObjectId(n);await Rg().bootstrap(l.syncObjectType,d,p=>{s.receiveEntityRecords(e,t,p,o)}),await Rg().bootstrap(l.syncObjectType+"--edit",d,p=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:p,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Tu(o._fields)||[],l.key||Oo])].join()});const d=wt(l.baseURL+(n?"/"+n:""),{...l.baseURLParams,...o});if(o!==void 0&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const p=await ct({path:d,parse:!1}),f=await p.json(),b=RB(p.headers?.get("allow")),h=[],M={};for(const z of WM)M[Ex(z,{kind:e,name:t,id:n})]=b[z],h.push([z,{kind:e,name:t,id:n}]);i.batch(()=>{s.receiveEntityRecords(e,t,f,o),s.receiveUserPermissions(M),s.finishResolutions("canUser",h)})}}finally{s.__unstableReleaseStoreLock(u)}},bBe=CB("getEntityRecord"),hBe=CB("getEntityRecord"),yv=(e,t,n={})=>async({dispatch:o,registry:r})=>{const i=(await o(Ya(e,t))).find(l=>l.name===t&&l.kind===e);if(!i)return;const c=await o.__unstableAcquireStoreLock(bo,["entities","records",e,t],{exclusive:!1});try{n._fields&&(n={...n,_fields:[...new Set([...Tu(n._fields)||[],i.key||Oo])].join()});const l=wt(i.baseURL,{...i.baseURLParams,...n});let u,d;if(i.supportsPagination&&n.per_page!==-1){const p=await ct({path:l,parse:!1});u=Object.values(await p.json()),d={totalItems:parseInt(p.headers.get("X-WP-Total")),totalPages:parseInt(p.headers.get("X-WP-TotalPages"))}}else u=Object.values(await ct({path:l})),d={totalItems:u.length,totalPages:1};n._fields&&(u=u.map(p=>(n._fields.split(",").forEach(f=>{p.hasOwnProperty(f)||(p[f]=void 0)}),p))),r.batch(()=>{if(o.receiveEntityRecords(e,t,u,n,!1,void 0,d),!n?._fields&&!n.context){const p=i.key||Oo,f=u.filter(z=>z?.[p]).map(z=>[e,t,z[p]]),b=u.filter(z=>z?.[p]).map(z=>({id:z[p],permissions:RB(z?._links?.self?.[0].targetHints.allow)})),h=[],M={};for(const z of b)for(const y of WM)h.push([y,{kind:e,name:t,id:z.id}]),M[Ex(y,{kind:e,name:t,id:z.id})]=z.permissions[y];o.receiveUserPermissions(M),o.finishResolutions("getEntityRecord",f),o.finishResolutions("canUser",h)}o.__unstableReleaseStoreLock(c)})}catch{o.__unstableReleaseStoreLock(c)}};yv.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const mBe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},MBe=CB("getCurrentTheme"),gBe=e=>async({dispatch:t})=>{try{const n=await ct({path:wt("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},joe=(e,t,n)=>async({dispatch:o,registry:r})=>{if(!WM.includes(e))throw new Error(`'${e}' is not a valid action.`);let s=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const d=(await o(Ya(t.kind,t.name))).find(p=>p.name===t.name&&p.kind===t.kind);if(!d)return;s=d.baseURL+(t.id?"/"+t.id:"")}else s=`/wp/v2/${t}`+(n?"/"+n:"");const{hasStartedResolution:i}=r.select(bo);for(const u of WM){if(u===e)continue;if(i("canUser",[u,t,n]))return}let c;try{c=await ct({path:s,method:"OPTIONS",parse:!1})}catch{return}const l=RB(c.headers?.get("allow"));r.batch(()=>{for(const u of WM){const d=Ex(u,t,n);o.receiveUserPermission(d,l[u]),u!==e&&o.finishResolution("canUser",[u,t,n])}})},zBe=(e,t,n)=>async({dispatch:o})=>{await o(joe("update",{kind:e,name:t,id:n}))},OBe=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2"}=await o.getPostType(e),i=await ct({path:`/${s}/${r}/${t}/autosaves?context=edit`});i&&i.length&&n.receiveAutosaves(t,i)},ABe=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},Poe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{o=await ct({url:wt(e,{"_wp-find-template":!0})}).then(({data:s})=>s)}catch{}if(!o)return;const r=await n.getEntityRecord("postType","wp_template",o.id);r&&t.receiveEntityRecords("postType","wp_template",[r],{"find-template":e})};Poe.shouldInvalidate=e=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&e.kind==="postType"&&e.name==="wp_template";const yBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},vBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await ct({path:`/wp/v2/global-styles/themes/${n.stylesheet}`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},xBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await ct({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},Ioe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await ct({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[lB(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};Ioe.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const _Be=()=>async({dispatch:e})=>{const t=await dBe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},wBe=()=>async({dispatch:e})=>{const t=await ct({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},kBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:kt(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},qBe=()=>async({dispatch:e,select:t})=>{const n=await ct({path:wt("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),o=n?._embedded?.self;if(e.receiveNavigationFallbackId(n?.id),o){const s=!t.getEntityRecord("postType","wp_navigation",n.id);e.receiveEntityRecords("postType","wp_navigation",o,void 0,s),e.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])}},SBe=e=>async({dispatch:t})=>{const n=await ct({path:wt("/wp/v2/templates/lookup",e)});n?.id&&t.receiveDefaultTemplateId(e,n.id)},Doe=(e,t,n,o={})=>async({dispatch:r})=>{const i=(await r(Ya(e,t))).find(f=>f.name===t&&f.kind===e);if(!i)return;o._fields&&(o={...o,_fields:[...new Set([...Tu(o._fields)||[],i.revisionKey||Oo])].join()});const c=wt(i.getRevisionsUrl(n),o);let l,u;const d={},p=i.supportsPagination&&o.per_page!==-1;try{u=await ct({path:c,parse:!p})}catch{return}if(u&&(p?(l=Object.values(await u.json()),d.totalItems=parseInt(u.headers.get("X-WP-Total"))):l=Object.values(u),o._fields&&(l=l.map(f=>(o._fields.split(",").forEach(b=>{f.hasOwnProperty(b)||(f[b]=void 0)}),f))),r.receiveRevisions(e,t,n,l,o,!1,d),!o?._fields&&!o.context)){const f=i.key||Oo,b=l.filter(h=>h[f]).map(h=>[e,t,n,h[f]]);r.startResolutions("getRevision",b),r.finishResolutions("getRevision",b)}};Doe.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const CBe=(e,t,n,o,r)=>async({dispatch:s})=>{const c=(await s(Ya(e,t))).find(d=>d.name===t&&d.kind===e);if(!c)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Tu(r._fields)||[],c.revisionKey||Oo])].join()});const l=wt(c.getRevisionsUrl(n,o),r);let u;try{u=await ct({path:l})}catch{return}u&&s.receiveRevisions(e,t,n,u,r)},RBe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:yBe,__experimentalGetCurrentThemeBaseGlobalStyles:vBe,__experimentalGetCurrentThemeGlobalStylesVariations:xBe,__experimentalGetTemplateForLink:Poe,canUser:joe,canUserEditEntityRecord:zBe,getAuthors:pBe,getAutosave:ABe,getAutosaves:OBe,getBlockPatternCategories:wBe,getBlockPatterns:_Be,getCurrentTheme:mBe,getCurrentThemeGlobalStylesRevisions:Ioe,getCurrentUser:fBe,getDefaultTemplateId:SBe,getEditedEntityRecord:hBe,getEmbedPreview:gBe,getEntityRecord:Loe,getEntityRecords:yv,getNavigationFallbackId:qBe,getRawEntityRecord:bBe,getRevision:CBe,getRevisions:Doe,getThemeSupports:MBe,getUserPatternCategories:kBe},Symbol.toStringTag,{value:"Module"}));function yV(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function z8(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*WBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*TBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function vV({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const EBe={requests:[],tree:{locks:[],children:{}}};function oA(e=EBe,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=yV(e.tree,i),l=z8(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=yV(e.tree,o),s=z8(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function BBe(e){return e.requests}function NBe(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of WBe(s,r))if(vV({exclusive:o},c.locks))return!1;const i=z8(s,r);if(!i)return!0;for(const c of TBe(i))if(vV({exclusive:o},c.locks))return!1;return!0}function LBe(){let e=oA(void 0,{type:"@@INIT"});function t(){for(const r of BBe(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if(NBe(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=oA(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=oA(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=oA(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function jBe(){const e=LBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}const{lock:eb0,unlock:Foe}=cr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data"),O8=O.createContext({});function A8({kind:e,type:t,id:n,children:o}){const r=O.useContext(O8),s=O.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(O8.Provider,{value:s,children:o})}let Ar=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const PBe=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function dN(e,t){return D((n,o)=>e(s=>IBe(n(s)),o),t)}const IBe=ps(e=>{const t={};for(const n in e)PBe.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=Ar.Resolving;break;case"finished":i=Ar.Success;break;case"error":i=Ar.Error;break;case void 0:i=Ar.Idle;break}return{data:r,status:i,isResolving:i===Ar.Resolving,hasStarted:i!==Ar.Idle,hasResolved:i===Ar.Success||i===Ar.Error}}});return t}),xV={};function $oe(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=ae(ce),i=O.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=D(f=>o.enabled?{editedRecord:f(ce).getEditedEntityRecord(e,t,n),hasEdits:f(ce).hasEditsForEntityRecord(e,t,n),edits:f(ce).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:xV,hasEdits:!1,edits:xV},[e,t,n,o.enabled]),{data:d,...p}=dN(f=>o.enabled?f(ce).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const DBe=[];function Xb(e,t,n={},o={enabled:!0}){const r=wt("",n),{data:s,...i}=dN(u=>o.enabled?u(ce).getEntityRecords(e,t,n):{data:DBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=D(u=>o.enabled?{totalItems:u(ce).getEntityRecordsTotalItems(e,t,n),totalPages:u(ce).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}const _V=new Set;function FBe(){return globalThis.SCRIPT_DEBUG===!0}function Xt(e){if(FBe()&&!_V.has(e)){console.warn(e);try{throw Error(e)}catch{}_V.add(e)}}function Voe(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&Xt("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),dN(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(ce),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),M=c.isResolving||h.isResolving,z=c.hasResolved&&h.hasResolved;let y=Ar.Idle;return M?y=Ar.Resolving:z&&(y=Ar.Success),{status:y,isResolving:M,hasResolved:z,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=Ar.Idle;return p?b=Ar.Resolving:f&&(b=Ar.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var $Be={grad:.9,turn:360,rad:360/(2*Math.PI)},cc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},D1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},js=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Hoe=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},wV=function(e){return{r:js(e.r,0,255),g:js(e.g,0,255),b:js(e.b,0,255),a:js(e.a)}},sq=function(e){return{r:D1(e.r),g:D1(e.g),b:D1(e.b),a:D1(e.a,3)}},VBe=/^#([0-9a-f]{3,8})$/i,rA=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uoe=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},Xoe=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},kV=function(e){return{h:Hoe(e.h),s:js(e.s,0,100),l:js(e.l,0,100),a:js(e.a)}},qV=function(e){return{h:D1(e.h),s:D1(e.s),l:D1(e.l),a:D1(e.a,3)}},SV=function(e){return Xoe((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},BM=function(e){return{h:(t=Uoe(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},HBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,UBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,XBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,GBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y8={string:[[function(e){var t=VBe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?D1(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?D1(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=XBe.exec(e)||GBe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:wV({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=HBe.exec(e)||UBe.exec(e);if(!t)return null;var n,o,r=kV({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*($Be[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return SV(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return cc(t)&&cc(n)&&cc(o)?wV({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=kV({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return SV(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=function(c){return{h:Hoe(c.h),s:js(c.s,0,100),v:js(c.v,0,100),a:js(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return Xoe(i)},"hsv"]]},CV=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=sq(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?rA(D1(255*s)):"","#"+rA(n)+rA(o)+rA(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return sq(this.rgba)},e.prototype.toRgbString=function(){return t=sq(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return qV(BM(this.rgba))},e.prototype.toHslString=function(){return t=qV(BM(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=Uoe(this.rgba),{h:D1(t.h),s:D1(t.s),v:D1(t.v),a:D1(t.a,3)};var t},e.prototype.invert=function(){return Tt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Tt(iq(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tt(iq(this.rgba,-t))},e.prototype.grayscale=function(){return Tt(iq(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tt(RV(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tt(RV(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Tt({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):D1(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=BM(this.rgba);return typeof t=="number"?Tt({h:t,s:n.s,l:n.l,a:n.a}):D1(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tt(t).toHex()},e}(),Tt=function(e){return e instanceof v8?e:new v8(e)},WV=[],fs=function(e){e.forEach(function(t){WV.indexOf(t)<0&&(t(v8,y8),WV.push(t))})};function bs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var M=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));Ml?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const Goe="block-default",x8=["attributes","supports","save","migrate","isEligible","apiVersion"],Ld={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},ua={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},YBe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:ZBe,unlock:Nu}=cr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),TV={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function vv(e){return e!==null&&typeof e=="object"}function QBe({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(TV).forEach(r=>{o[r]&&(o[r]=_8(TV[r],o[r],e))}),o}function JBe(e,t){const n=vv(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(V0($e).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Nu(nr($e));if(vv(e)){const s=QBe(e);o(n,s)}return r(n,t),V0($e).getBlockType(n)}function _8(e,t,n){return typeof e=="string"&&typeof t=="string"?Oe(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>_8(e[0],o,n)):vv(e)&&Object.entries(e).length&&vv(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=_8(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function eNe(e){const t=V0($e).getBlockType(e);if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt('Block "'+e+'" is not registered.');return}return nr($e).removeBlockTypes(e),t}function tNe(e){nr($e).setFreeformFallbackBlockName(e)}function Lu(){return V0($e).getFreeformFallbackBlockName()}function Koe(){return V0($e).getGroupingBlockName()}function nNe(e){nr($e).setUnregisteredFallbackBlockName(e)}function Zz(){return V0($e).getUnregisteredFallbackBlockName()}function oNe(e){nr($e).setDefaultBlockName(e)}function rNe(e){nr($e).setGroupingBlockName(e)}function Pn(){return V0($e).getDefaultBlockName()}function Dt(e){return V0($e)?.getBlockType(e)}function or(){return V0($e).getBlockTypes()}function Zt(e,t,n){return V0($e).getBlockSupport(e,t,n)}function st(e,t,n){return V0($e).hasBlockSupport(e,t,n)}function dd(e){return e?.name==="core/block"}function hh(e){return e?.name==="core/template-part"}const Xx=(e,t)=>V0($e).getBlockVariations(e,t),sNe=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,canUserEditValue:i,getFieldsList:c}=e,l=Nu(V0($e)).getBlockBindingsSource(t);if(l?.getValues){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(n&&l?.label){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings "'+t+'" source label is already defined in the server.');return}if(!n&&!l?.label){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source label must be a string.");return}if(o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source canUserEditValue must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block bindings source getFieldsList must be a function.");return}return Nu(nr($e)).addBlockBindingsSource(e)};function iNe(e){if(!Yoe(e)){globalThis.SCRIPT_DEBUG===!0&&Xt('Block bindings source "'+e+'" is not registered.');return}Nu(nr($e)).removeBlockBindingsSource(e)}function Yoe(e){return Nu(V0($e)).getBlockBindingsSource(e)}function aNe(){return Nu(V0($e)).getAllBlockBindingsSources()}fs([bs,ff]);const EV=["#191e23","#f8f9f9"];function Gb(e){var t;return Object.entries((t=Dt(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return o.hasOwnProperty("default")?r===o.default:o.type==="rich-text"?!r?.length:r===void 0})}function Yc(e){return e.name===Pn()&&Gb(e)}function Zoe(e){return!!e&&(typeof e=="string"||O.isValidElement(e)||typeof e=="function"||e instanceof O.Component)}function cNe(e){if(e=e||Goe,Zoe(e))return{src:e};if("background"in e){const t=Tt(e.background),n=r=>t.contrast(r),o=Math.max(...EV.map(n));return{...e,foreground:e.foreground?e.foreground:EV.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function Qz(e){return typeof e=="string"?Dt(e):e}function pN(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():Wr(s):r}function lNe(e,t,n,o="vertical"){const r=e?.title,s=e?pN(e,t,"accessibility"):"",i=n!==void 0,c=s&&s!==r;return i&&o==="vertical"?c?le(m("%1$s Block. Row %2$d. %3$s"),r,n,s):le(m("%1$s Block. Row %2$d"),r,n):i&&o==="horizontal"?c?le(m("%1$s Block. Column %2$d. %3$s"),r,n,s):le(m("%1$s Block. Column %2$d"),r,n):c?le(m("%1$s Block. %2$s"),r,s):le(m("%s Block"),r)}function Qoe(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new un}function fN(e,t){const n=Dt(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof un?o[r]=i:typeof i=="string"&&(o[r]=un.fromHTMLString(i)):s.type==="string"&&i instanceof un?o[r]=i.toHTMLString():o[r]=i;else{const c=Qoe(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function uNe(e,t){const n=Dt(e)?.attributes;return n?Object.keys(n).filter(r=>n[r]?.__experimentalRole===t):[]}function bf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const dNe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function bN(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function xv(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function pNe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[lB(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function fNe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function bNe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...bN(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return bf(e,t.names)}return e}function hNe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(bN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,xv([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=xv([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function mNe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(bN(t.blockTypes)).map(([r,s])=>{var i,c;return[r,xv([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:xv([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function Gx(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const MNe=Gx("SET_DEFAULT_BLOCK_NAME"),gNe=Gx("SET_FREEFORM_FALLBACK_BLOCK_NAME"),zNe=Gx("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),ONe=Gx("SET_GROUPING_BLOCK_NAME");function ANe(e=dNe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function yNe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return bf(e,t.namespace)}return e}function BV(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function vNe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{label:e[t.name]?.label||t.label,usesContext:BV(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,canUserEditValue:t.canUserEditValue,getFieldsList:t.getFieldsList}};case"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{...e[t.name],label:t.label,usesContext:BV(e[t.name]?.usesContext,t.usesContext)}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return bf(e,t.name)}return e}const xNe=zo({bootstrappedBlockTypes:pNe,unprocessedBlockTypes:fNe,blockTypes:bNe,blockStyles:hNe,blockVariations:mNe,defaultBlockName:MNe,freeformFallbackBlockName:gNe,unregisteredFallbackBlockName:zNe,groupingBlockName:ONe,categories:ANe,collections:yNe,blockBindingsSources:vNe}),Wg=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function NV(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function Joe(e,t){return NV(e)&&NV(t)?Object.entries(t).every(([n,o])=>Joe(e?.[n],o)):e===t}const ere=(e,t)=>typeof t=="string"?Jz(e,t):t,tre=at(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function Jz(e,t){return e.blockTypes[t]}function _Ne(e,t){return e.blockStyles[t]}const hN=at((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function wNe(e,t,n,o){const r=hN(e,t,o);if(!r)return r;const s=Jz(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=Wg(u.attributes,b);if(h===void 0)return!1;let M=Wg(n,b);return M instanceof un&&(M=M.toHTMLString()),Joe(M,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function kNe(e,t,n){const o=hN(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function qNe(e){return e.categories}function SNe(e){return e.collections}function CNe(e){return e.defaultBlockName}function RNe(e){return e.freeformFallbackBlockName}function WNe(e){return e.unregisteredFallbackBlockName}function TNe(e){return e.groupingBlockName}const mN=at((e,t)=>tre(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),nre=(e,t,n,o)=>{const r=ere(e,t);return r?.supports?Wg(r.supports,n,o):o};function ore(e,t,n,o){return!!nre(e,t,n,o)}function LV(e){return Xs(e??"").toLowerCase().trim()}function ENe(e,t,n=""){const o=ere(e,t),r=LV(n),s=i=>LV(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const BNe=(e,t)=>mN(e,t).length>0,NNe=(e,t)=>mN(e,t).some(n=>ore(e,n,"inserter",!0)),LNe=at((e,t)=>{const n=Jz(e,t);return n?Object.entries(n.attributes).some(([,{__experimentalRole:o}])=>o==="content"):!1},(e,t)=>[e.blockTypes[t]?.attributes]),jNe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:LNe,getActiveBlockVariation:wNe,getBlockStyles:_Ne,getBlockSupport:nre,getBlockType:Jz,getBlockTypes:tre,getBlockVariations:hN,getCategories:qNe,getChildBlockNames:mN,getCollections:SNe,getDefaultBlockName:CNe,getDefaultBlockVariation:kNe,getFreeformFallbackBlockName:RNe,getGroupingBlockName:TNe,getUnregisteredFallbackBlockName:WNe,hasBlockSupport:ore,hasChildBlocks:BNe,hasChildBlocksWithInserterSupport:NNe,isMatchingSearchTerm:ENe},Symbol.toStringTag,{value:"Module"})),PNe=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function jV(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const INe=at((e,t,n)=>{if(!t)return jV(PNe,t,n);const o=Jz(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Ld).forEach(s=>{if(Ld[s].support){if(Ld[s].requiresOptOut&&Ld[s].support[0]in o.supports&&Wg(o.supports,Ld[s].support)!==!1){r.push(s);return}Wg(o.supports,Ld[s].support,!1)&&r.push(s)}}),jV(r,t,n)},(e,t)=>[e.blockTypes[t]]);function DNe(e,t){return e.bootstrappedBlockTypes[t]}function FNe(e){return e.unprocessedBlockTypes}function $Ne(e){return e.blockBindingsSources}function VNe(e,t){return e.blockBindingsSources[t]}const HNe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:$Ne,getBlockBindingsSource:VNe,getBootstrappedBlockType:DNe,getSupportedStyles:INe,getUnprocessedBlockTypes:FNe},Symbol.toStringTag,{value:"Module"}));var rre={exports:{}},en={};/** * @license React * react-is.production.min.js * @@ -63,7 +63,7 @@ Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,s("_proc * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var oN=Symbol.for("react.element"),rN=Symbol.for("react.portal"),Ix=Symbol.for("react.fragment"),Dx=Symbol.for("react.strict_mode"),$x=Symbol.for("react.profiler"),Fx=Symbol.for("react.provider"),Vx=Symbol.for("react.context"),WNe=Symbol.for("react.server_context"),Hx=Symbol.for("react.forward_ref"),Ux=Symbol.for("react.suspense"),Xx=Symbol.for("react.suspense_list"),Gx=Symbol.for("react.memo"),Kx=Symbol.for("react.lazy"),TNe=Symbol.for("react.offscreen"),Foe;Foe=Symbol.for("react.module.reference");function Js(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case oN:switch(e=e.type,e){case Ix:case $x:case Dx:case Ux:case Xx:return e;default:switch(e=e&&e.$$typeof,e){case WNe:case Vx:case Hx:case Kx:case Gx:case Fx:return e;default:return t}}case rN:return t}}}on.ContextConsumer=Vx;on.ContextProvider=Fx;on.Element=oN;on.ForwardRef=Hx;on.Fragment=Ix;on.Lazy=Kx;on.Memo=Gx;on.Portal=rN;on.Profiler=$x;on.StrictMode=Dx;on.Suspense=Ux;on.SuspenseList=Xx;on.isAsyncMode=function(){return!1};on.isConcurrentMode=function(){return!1};on.isContextConsumer=function(e){return Js(e)===Vx};on.isContextProvider=function(e){return Js(e)===Fx};on.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===oN};on.isForwardRef=function(e){return Js(e)===Hx};on.isFragment=function(e){return Js(e)===Ix};on.isLazy=function(e){return Js(e)===Kx};on.isMemo=function(e){return Js(e)===Gx};on.isPortal=function(e){return Js(e)===rN};on.isProfiler=function(e){return Js(e)===$x};on.isStrictMode=function(e){return Js(e)===Dx};on.isSuspense=function(e){return Js(e)===Ux};on.isSuspenseList=function(e){return Js(e)===Xx};on.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ix||e===$x||e===Dx||e===Ux||e===Xx||e===TNe||typeof e=="object"&&e!==null&&(e.$$typeof===Kx||e.$$typeof===Gx||e.$$typeof===Fx||e.$$typeof===Vx||e.$$typeof===Hx||e.$$typeof===Foe||e.getModuleId!==void 0)};on.typeOf=Js;$oe.exports=on;var ENe=$oe.exports;const wV={common:"text",formatting:"text",layout:"design"};function BNe(e=[],t=[]){const n=[...e];return t.forEach(o=>{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const Voe=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:Woe,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:BNe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=kn("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&Ce("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(kn("blocks.registerBlockType",{...bf(r,p8),...i},r.name,i)).filter(([c])=>p8.includes(c))))),!Pz(s)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt('The "save" property must be a valid function.');return}if("edit"in s&&!ENe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&Xt('The "edit" property must be a valid component.');return}if(wV.hasOwnProperty(s.category)&&(s.category=wV[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block titles must be strings.");return}if(s.icon=GBe(s.icon),!Boe(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&Xt("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}return s};function NNe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function Hoe(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(Voe(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function LNe(){return Ce('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),Hoe()}function jNe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function PNe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function INe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function DNe(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function $Ne(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function FNe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function VNe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function HNe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function UNe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function XNe(e){return{type:"SET_CATEGORIES",categories:e}}function GNe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function KNe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function YNe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const ZNe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:LNe,addBlockCollection:KNe,addBlockStyles:PNe,addBlockTypes:NNe,addBlockVariations:DNe,reapplyBlockTypeFilters:Hoe,removeBlockCollection:YNe,removeBlockStyles:INe,removeBlockTypes:jNe,removeBlockVariations:$Ne,setCategories:XNe,setDefaultBlockName:FNe,setFreeformFallbackBlockName:VNe,setGroupingBlockName:UNe,setUnregisteredFallbackBlockName:HNe,updateCategory:GNe},Symbol.toStringTag,{value:"Module"}));function QNe(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function JNe(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(Voe(e,t));o&&n.addBlockTypes(o)}}function eLe(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,getPlaceholder:e.getPlaceholder,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function tLe(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}function nLe(e){return{type:"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext}}const oLe=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:eLe,addBootstrappedBlockBindingsSource:nLe,addBootstrappedBlockType:QNe,addUnprocessedBlockType:JNe,removeBlockBindingsSource:tLe},Symbol.toStringTag,{value:"Module"})),rLe="core/blocks",Ve=rr(rLe,{reducer:uNe,selectors:xNe,actions:ZNe});Qs(Ve);Bu(Ve).registerPrivateSelectors(RNe);Bu(Ve).registerPrivateActions(oLe);function me(e,t={},n=[]){const o=JB(e,t);return{clientId:Uc(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function Lu(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return me(o,r,Lu(s))})}function Uoe(e,t={},n){const o=Uc(),r=JB(e.name,{...e.attributes,...t});return{...e,clientId:o,attributes:r,innerBlocks:n||e.innerBlocks.map(s=>Uoe(s))}}function gn(e,t={},n){const o=Uc();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>gn(r))}}const Xoe=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(Zb(e)||!o||e.isMultiBlock)||!Zb(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||Zb(e))||!o&&t==="from"&&kV(c.name)&&kV(e.blockName)||!b8(e,n))},sLe=e=>e.length?ir().filter(o=>{const r=Ys("from",o.name);return!!ja(r,s=>Xoe(s,"from",e))}):[],iLe=e=>{if(!e.length)return[];const t=e[0],n=Nt(t.name);return(n?Ys("to",n.name):[]).filter(i=>i&&Xoe(i,"to",e)).map(i=>i.blocks).flat().map(Nt)},Zb=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),kV=e=>e===Toe();function Goe(e){if(!e.length)return[];const t=sLe(e),n=iLe(e);return[...new Set([...t,...n])]}function ja(e,t){const n=h0e();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Ys(e,t){if(t===void 0)return ir().map(({name:c})=>Ys(e,c)).flat();const n=Qz(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:Zb(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function b8(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function u1(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Ys("from",t),c=Ys("to",s),l=ja(c,f=>f.type==="block"&&(Zb(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&b8(f,n))||ja(i,f=>f.type==="block"&&(Zb(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&b8(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!Nt(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>kn("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const sN=(e,t)=>{try{var n;return me(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>sN(o.name,o)))}catch{return me("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""})}};let wa,ca,Bp,eu;const Koe=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function Py(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function iN(e){return Py(null,{},[],e,[e])}function aLe(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const cLe=e=>{wa=e,ca=0,Bp=[],eu=[],Koe.lastIndex=0;do;while(lLe());return Bp};function lLe(){const e=eu.length,t=dLe(),[n,o,r,s,i]=t,c=s>ca?ca:null;switch(n){case"no-more-tokens":if(e===0)return eq(),!1;if(e===1)return tq(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function fLe(e){const t=[];let n=e,o;for(;o=n.match(pLe);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function bLe(e,t){const n=fLe(e);let o=!1;const r=Object.keys(t);for(let s=1;s{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const ire=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:Goe,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:KNe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=_n("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&Re("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(_n("blocks.registerBlockType",{...bf(r,x8),...i},r.name,i)).filter(([c])=>x8.includes(c))))),!Pz(s)){globalThis.SCRIPT_DEBUG===!0&&Xt("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&Xt('The "save" property must be a valid function.');return}if("edit"in s&&!GNe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&Xt('The "edit" property must be a valid component.');return}if(PV.hasOwnProperty(s.category)&&(s.category=PV[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&Xt('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&Xt("Block titles must be strings.");return}if(s.icon=cNe(s.icon),!Zoe(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&Xt("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}return s};function YNe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function are(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(ire(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function ZNe(){return Re('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),are()}function QNe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function JNe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function eLe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function tLe(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function nLe(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function oLe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function rLe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function sLe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function iLe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function aLe(e){return{type:"SET_CATEGORIES",categories:e}}function cLe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function lLe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function uLe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const dLe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:ZNe,addBlockCollection:lLe,addBlockStyles:JNe,addBlockTypes:YNe,addBlockVariations:tLe,reapplyBlockTypeFilters:are,removeBlockCollection:uLe,removeBlockStyles:eLe,removeBlockTypes:QNe,removeBlockVariations:nLe,setCategories:aLe,setDefaultBlockName:oLe,setFreeformFallbackBlockName:rLe,setGroupingBlockName:iLe,setUnregisteredFallbackBlockName:sLe,updateCategory:cLe},Symbol.toStringTag,{value:"Module"}));function pLe(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function fLe(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(ire(e,t));o&&n.addBlockTypes(o)}}function bLe(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function hLe(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}function mLe(e){return{type:"ADD_BOOTSTRAPPED_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext}}const MLe=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:bLe,addBootstrappedBlockBindingsSource:mLe,addBootstrappedBlockType:pLe,addUnprocessedBlockType:fLe,removeBlockBindingsSource:hLe},Symbol.toStringTag,{value:"Module"})),gLe="core/blocks",$e=tr(gLe,{reducer:xNe,selectors:jNe,actions:dLe});Qs($e);Nu($e).registerPrivateSelectors(HNe);Nu($e).registerPrivateActions(MLe);function me(e,t={},n=[]){const o=fN(e,t);return{clientId:Xc(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function ju(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return me(o,r,ju(s))})}function cre(e,t={},n){const o=Xc(),r=fN(e.name,{...e.attributes,...t});return{...e,clientId:o,attributes:r,innerBlocks:n||e.innerBlocks.map(s=>cre(s))}}function pn(e,t={},n){const o=Xc();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>pn(r))}}const lre=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(Kb(e)||!o||e.isMultiBlock)||!Kb(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||Kb(e))||!o&&t==="from"&&IV(c.name)&&IV(e.blockName)||!w8(e,n))},zLe=e=>e.length?or().filter(o=>{const r=Ys("from",o.name);return!!Ia(r,s=>lre(s,"from",e))}):[],OLe=e=>{if(!e.length)return[];const t=e[0],n=Dt(t.name);return(n?Ys("to",n.name):[]).filter(i=>i&&lre(i,"to",e)).map(i=>i.blocks).flat().map(Dt)},Kb=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),IV=e=>e===Koe();function ure(e){if(!e.length)return[];const t=zLe(e),n=OLe(e);return[...new Set([...t,...n])]}function Ia(e,t){const n=R0e();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Ys(e,t){if(t===void 0)return or().map(({name:c})=>Ys(e,c)).flat();const n=Qz(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:Kb(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function w8(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function l1(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Ys("from",t),c=Ys("to",s),l=Ia(c,f=>f.type==="block"&&(Kb(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&w8(f,n))||Ia(i,f=>f.type==="block"&&(Kb(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&w8(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!Dt(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>_n("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const zN=(e,t)=>{try{var n;return me(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>zN(o.name,o)))}catch{return me("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""})}};let Sa,da,Tp,nu;const dre=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function $y(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function ON(e){return $y(null,{},[],e,[e])}function ALe(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const pre=e=>{Sa=e,da=0,Tp=[],nu=[],dre.lastIndex=0;do;while(yLe());return Tp};function yLe(){const e=nu.length,t=xLe(),[n,o,r,s,i]=t,c=s>da?da:null;switch(n){case"no-more-tokens":if(e===0)return uq(),!1;if(e===1)return dq(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function wLe(e){const t=[];let n=e,o;for(;o=n.match(_Le);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function kLe(e,t){const n=wLe(e);let o=!1;const r=Object.keys(t);for(let s=1;s"),i=s.pop();e="";for(let c=0;c";n.push([d,l.substr(u)+""]),e+=l.substr(0,u)+d}e+=i}e=e.replace(/\s*/g,` `);const o="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";e=e.replace(new RegExp("(<"+o+"[\\s/>])","g"),` @@ -71,13 +71,13 @@ Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,s("_proc $1`),e=e.replace(new RegExp("()","g"),`$1 `),e=e.replace(/\r\n|\r/g,` -`),e=bLe(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` +`),e=kLe(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` `);const r=e.split(/\n\s*\n/).filter(Boolean);return e="",r.forEach(s=>{e+="

"+s.replace(/^\n*|\n*$/g,"")+`

`}),e=e.replace(/

\s*<\/p>/g,""),e=e.replace(/

([^<]+)<\/(div|address|form)>/g,"

$1

"),e=e.replace(new RegExp("

\\s*(]*>)\\s*

","g"),"$1"),e=e.replace(/

(/g,"$1"),e=e.replace(/

]*)>/gi,"

"),e=e.replace(/<\/blockquote><\/p>/g,"

"),e=e.replace(new RegExp("

\\s*(]*>)","g"),"$1"),e=e.replace(new RegExp("(]*>)\\s*

","g"),"$1"),t&&(e=e.replace(/<(script|style).*?<\/\\1>/g,s=>s[0].replace(/\n/g,"")),e=e.replace(/
|/g,"
"),e=e.replace(/(
)?\s*\n/g,(s,i)=>i?s:`
`),e=e.replace(//g,` `)),e=e.replace(new RegExp("(]*>)\\s*
","g"),"$1"),e=e.replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1"),e=e.replace(/\n<\/p>$/g,"

"),n.forEach(s=>{const[i,c]=s;e=e.replace(i,c)}),e.indexOf("")!==-1&&(e=e.replace(/\s?\s?/g,` -`)),e}function Zoe(e){const t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",o=t+"|pre",r=[];let s=!1,i=!1;return e?((e.indexOf("]*>[\s\S]*?<\/\1>/g,c=>(r.push(c),""))),e.indexOf("]*>[\s\S]+?<\/pre>/g,c=>(c=c.replace(/
(\r\n|\n)?/g,""),c=c.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,""),c.replace(/\r?\n/g,"")))),e.indexOf("[caption")!==-1&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,c=>c.replace(/]*)>/g,"").replace(/[\r\n\t]+/,""))),e=e.replace(new RegExp("\\s*\\s*","g"),` +`)),e}function bre(e){const t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",o=t+"|pre",r=[];let s=!1,i=!1;return e?((e.indexOf("]*>[\s\S]*?<\/\1>/g,c=>(r.push(c),""))),e.indexOf("]*>[\s\S]+?<\/pre>/g,c=>(c=c.replace(/
(\r\n|\n)?/g,""),c=c.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,""),c.replace(/\r?\n/g,"")))),e.indexOf("[caption")!==-1&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,c=>c.replace(/]*)>/g,"").replace(/[\r\n\t]+/,""))),e=e.replace(new RegExp("\\s*\\s*","g"),` `),e=e.replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),` <$1>`),e=e.replace(/(

]+>[\s\S]*?)<\/p>/g,"$1"),e=e.replace(/]*)?>\s*

/gi,` @@ -108,18 +108,18 @@ $1`),e=e.replace(new RegExp("()","g"),`$1 `)),e.indexOf("/g,c=>c.replace(/[\r\n]+/g,""))),e=e.replace(/<\/p#>/g,`

`),e=e.replace(/\s*(

]+>[\s\S]*?<\/p>)/g,` $1`),e=e.replace(/^\s+/,""),e=e.replace(/[\s\u00a0]+$/,""),s&&(e=e.replace(//g,` -`)),i&&(e=e.replace(/]*)>/g,"")),r.length&&(e=e.replace(//g,()=>r.shift())),e):""}function Eg(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:o,attrs:r={},innerBlocks:s=[],innerContent:i=[]}=e;let c=0;const l=i.map(u=>u!==null?u:Eg(s[c++],t)).join(` +`)),i&&(e=e.replace(/]*)>/g,"")),r.length&&(e=e.replace(//g,()=>r.shift())),e):""}function Tg(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:o,attrs:r={},innerBlocks:s=[],innerContent:i=[]}=e;let c=0;const l=i.map(u=>u!==null?u:Tg(s[c++],t)).join(` `).replace(/\n+/g,` -`).trim();return n?ere(o,r,l):l}function gv(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return kn("blocks.getBlockDefaultClassName",t,e)}function aN(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return kn("blocks.getBlockMenuDefaultClassName",t,e)}const h8={},Qoe={};function zv(e={}){const{blockType:t,attributes:n}=h8;return zv.skipFilters?e:kn("blocks.getSaveContent.extraProps",{...e},t,n)}function hLe(e={}){const{innerBlocks:t}=Qoe;if(!Array.isArray(t))return{...e,children:t};const n=Uo(t,{isInnerBlocks:!0});return{...e,children:a.jsx(C1,{children:n})}}function Joe(e,t,n=[]){const o=Qz(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof z.Component){const i=new r({attributes:t});r=i.render.bind(i)}h8.blockType=o,h8.attributes=t,Qoe.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&M0e("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=kn("blocks.getSaveContent.extraProps",{...s.props},o,t);Jr(i,s.props)||(s=z.cloneElement(s,i))}return kn("blocks.getSaveElement",s,o,t)}function hf(e,t,n){const o=Qz(e);return Po(Joe(o,t,n))}function mLe(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.__experimentalRole==="local"||"default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o},{})}function MLe(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function Yx(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=hf(e.name,e.attributes,e.innerBlocks)}catch{}return t}function ere(e,t,n){const o=t&&Object.entries(t).length?MLe(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` +`).trim();return n?Mre(o,r,l):l}function _v(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return _n("blocks.getBlockDefaultClassName",t,e)}function AN(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return _n("blocks.getBlockMenuDefaultClassName",t,e)}const k8={},hre={};function wv(e={}){const{blockType:t,attributes:n}=k8;return wv.skipFilters?e:_n("blocks.getSaveContent.extraProps",{...e},t,n)}function qLe(e={}){const{innerBlocks:t}=hre;if(!Array.isArray(t))return{...e,children:t};const n=$o(t,{isInnerBlocks:!0});return{...e,children:a.jsx(C1,{children:n})}}function mre(e,t,n=[]){const o=Qz(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof O.Component){const i=new r({attributes:t});r=i.render.bind(i)}k8.blockType=o,k8.attributes=t,hre.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&T0e("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=_n("blocks.getSaveContent.extraProps",{...s.props},o,t);Jr(i,s.props)||(s=O.cloneElement(s,i))}return _n("blocks.getSaveElement",s,o,t)}function hf(e,t,n){const o=Qz(e);return No(mre(o,t,n))}function SLe(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.__experimentalRole==="local"||"default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o},{})}function CLe(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function s_(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=hf(e.name,e.attributes,e.innerBlocks)}catch{}return t}function Mre(e,t,n){const o=t&&Object.entries(t).length?CLe(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` `+n+` -`:``}function gLe(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return Eg(e.__unstableBlockSource);const n=e.name,o=Yx(e);if(n===Zz()||!t&&n===Nu())return o;const r=Nt(n);if(!r)return o;const s=mLe(r,e.attributes);return ere(n,s,o)}function pd(e){e.length===1&&Kc(e[0])&&(e=[]);let t=Uo(e);return e.length===1&&e[0].name===Nu()&&e[0].name==="core/freeform"&&(t=Zoe(t)),t}function Uo(e,t){return(Array.isArray(e)?e:[e]).map(o=>gLe(o,t)).join(` +`:``}function RLe(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return Tg(e.__unstableBlockSource);const n=e.name,o=s_(e);if(n===Zz()||!t&&n===Lu())return o;const r=Dt(n);if(!r)return o;const s=SLe(r,e.attributes);return Mre(n,s,o)}function pd(e){e.length===1&&Yc(e[0])&&(e=[]);let t=$o(e);return e.length===1&&e[0].name===Lu()&&e[0].name==="core/freeform"&&(t=bre(t)),t}function $o(e,t){return(Array.isArray(e)?e:[e]).map(o=>RLe(o,t)).join(` -`)}var zLe=/[\t\n\f ]/,OLe=/[A-Za-z]/,ALe=/\r\n?/g;function Ro(e){return zLe.test(e)}function SV(e){return OLe.test(e)}function yLe(e){return e.replace(ALe,` -`)}var vLe=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` -`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||SV(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();Ro(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();Ro(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();Ro(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!Ro(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();Ro(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();Ro(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();Ro(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();Ro(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();Ro(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();Ro(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(Ro(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();Ro(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(Ro(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();Ro(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();Ro(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();Ro(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||SV(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=yLe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),xLe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new vLe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function _Le(){const e=[],t=Oh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const wLe=e=>e,kLe=/[\t\n\r\v\f ]+/g,qLe=/^[\t\n\r\v\f ]*$/,SLe=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,tre=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],CLe=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],RLe=[...tre,...CLe],CV=[wLe,LLe],WLe=/^[\da-z]+$/i,TLe=/^#\d+$/,ELe=/^#x[\da-f]+$/i;function BLe(e){return WLe.test(e)||TLe.test(e)||ELe.test(e)}class NLe{parse(t){if(BLe(t))return qt("&"+t+";")}}function cN(e){return e.trim().split(kLe)}function LLe(e){return cN(e).join(" ")}function jLe(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||RLe.includes(n)})}function RV(e,t,n=Oh()){let o=e.chars,r=t.chars;for(let s=0;s{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),ILe(s.trim())]});return Object.fromEntries(t)}const $Le={class:(e,t)=>{const[n,o]=[e,t].map(cN),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>G1(...[e,t].map(DLe)),...Object.fromEntries(tre.map(e=>[e,()=>!0]))};function FLe(e,t,n=Oh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):FLe(...[e,t].map(jLe),n),Chars:RV,Comment:RV};function km(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!qLe.test(t.chars))return t}function HLe(e,t=Oh()){try{return new xLe(new NLe).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function WV(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function ULe(e,t,n=Oh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>HLe(c,n));if(!o||!r)return!1;let s,i;for(;s=km(o);){if(i=km(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=VLe[s.type];if(c&&!c(s,i,n))return!1;WV(s,r[0])?km(r):WV(i,o[0])&&km(o)}return(i=km(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function Bg(e,t=e.name){if(e.name===Nu()||e.name===Zz())return[!0,[]];const o=_Le(),r=Qz(t);let s;try{s=hf(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: +`)}var WLe=/[\t\n\f ]/,TLe=/[A-Za-z]/,ELe=/\r\n?/g;function qo(e){return WLe.test(e)}function FV(e){return TLe.test(e)}function BLe(e){return e.replace(ELe,` +`)}var NLe=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` +`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||FV(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();qo(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();qo(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();qo(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!qo(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();qo(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();qo(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();qo(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();qo(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();qo(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();qo(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(qo(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();qo(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(qo(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();qo(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();qo(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();qo(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||FV(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=BLe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),LLe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new NLe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function jLe(){const e=[],t=mh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const PLe=e=>e,ILe=/[\t\n\r\v\f ]+/g,DLe=/^[\t\n\r\v\f ]*$/,FLe=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,gre=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],$Le=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],VLe=[...gre,...$Le],$V=[PLe,YLe],HLe=/^[\da-z]+$/i,ULe=/^#\d+$/,XLe=/^#x[\da-f]+$/i;function GLe(e){return HLe.test(e)||ULe.test(e)||XLe.test(e)}class KLe{parse(t){if(GLe(t))return kt("&"+t+";")}}function yN(e){return e.trim().split(ILe)}function YLe(e){return yN(e).join(" ")}function ZLe(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||VLe.includes(n)})}function VV(e,t,n=mh()){let o=e.chars,r=t.chars;for(let s=0;s<$V.length;s++){const i=$V[s];if(o=i(o),r=i(r),o===r)return!0}return n.warning("Expected text `%s`, saw `%s`.",t.chars,e.chars),!1}function QLe(e){return parseFloat(e)===0?"0":e.indexOf(".")===0?"0"+e:e}function JLe(e){return yN(e).map(QLe).join(" ").replace(FLe,"url($1)")}function e7e(e){const t=e.replace(/;?\s*$/,"").split(";").map(n=>{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),JLe(s.trim())]});return Object.fromEntries(t)}const t7e={class:(e,t)=>{const[n,o]=[e,t].map(yN),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>J1(...[e,t].map(e7e)),...Object.fromEntries(gre.map(e=>[e,()=>!0]))};function n7e(e,t,n=mh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):n7e(...[e,t].map(ZLe),n),Chars:VV,Comment:VV};function vm(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!DLe.test(t.chars))return t}function r7e(e,t=mh()){try{return new LLe(new KLe).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function HV(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function s7e(e,t,n=mh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>r7e(c,n));if(!o||!r)return!1;let s,i;for(;s=vm(o);){if(i=vm(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=o7e[s.type];if(c&&!c(s,i,n))return!1;HV(s,r[0])?vm(r):HV(i,o[0])&&vm(o)}return(i=vm(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function Eg(e,t=e.name){if(e.name===Lu()||e.name===Zz())return[!0,[]];const o=jLe(),r=Qz(t);let s;try{s=hf(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: -%s`,c.toString()),[!1,o.getItems()]}const i=ULe(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). +%s`,c.toString()),[!1,o.getItems()]}const i=s7e(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). Content generated by \`save\` function: @@ -127,7 +127,7 @@ Content generated by \`save\` function: Content retrieved from post body: -%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function nre(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function XLe(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var GLe=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function lN(e,t){if(t){if(typeof e=="string"){var n=GLe();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=lN(e,s),o},{})}}function uN(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return XLe(s,n)}}function KLe(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=uN(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function YLe(e){return uN(e,"textContent")}function ZLe(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return lN(r,t)})}}function QLe(e){return Ce("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function JLe(...e){Ce("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?dN(n.childNodes):[]}}const m8={concat:JLe,getChildrenArray:QLe,fromDOM:dN,toHTML:e7e,matcher:ore};function t7e(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return rre(n)}catch{return null}}}function o7e(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?dn.fromHTMLElement(o,{preserveWhiteSpace:t}):dn.empty()},s7e=e=>t=>e(t)!==void 0;function i7e(e,t){switch(t){case"rich-text":return e instanceof dn;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function a7e(e,t){return t.some(n=>i7e(e,n))}function c7e(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=pN(n,t);break}return(!l7e(s,t.type)||!u7e(s,t.enum))&&(s=void 0),s===void 0&&(s=Noe(t)),s}function l7e(e,t){return t===void 0||a7e(e,Array.isArray(t)?t:[t])}function u7e(e,t){return!Array.isArray(t)||t.includes(e)}const sre=ps(e=>{switch(e.source){case"attribute":{let n=KLe(e.selector,e.attribute);return e.type==="boolean"&&(n=s7e(n)),n}case"html":return o7e(e.selector,e.multiline);case"text":return YLe(e.selector);case"rich-text":return r7e(e.selector,e.__unstablePreserveWhiteSpace);case"children":return ore(e.selector);case"node":return n7e(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,sre(o)]));return ZLe(e.selector,t);case"tag":{const n=uN(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function ire(e){return lN(e,t=>t)}function pN(e,t){return sre(t)(ire(e))}function Yc(e,t,n={}){var o;const r=ire(t),s=Qz(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,c7e(c,l,r,n,t)]));return kn("blocks.getBlockAttributes",i,s,t,n)}const d7e={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function TV(e){const t=pN(`

${e}
`,d7e);return t?t.trim().split(/\s+/):[]}function p7e(e,t,n){if(!it(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=hf(t,s),c=TV(i),u=TV(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}function Ov(e,t){const n=p7e(e.attributes,t,e.originalContent);return{...e,attributes:n}}function f7e(){return!1}function b7e(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sare(d,t)).filter(d=>!!d),i=me(n.blockName,Yc(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=g7e(i,o),{validationIssues:l}=c,u=b7e(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). +%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function zre(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function i7e(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var a7e=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function vN(e,t){if(t){if(typeof e=="string"){var n=a7e();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=vN(e,s),o},{})}}function xN(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return i7e(s,n)}}function c7e(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=xN(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function l7e(e){return xN(e,"textContent")}function u7e(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return vN(r,t)})}}function d7e(e){return Re("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function p7e(...e){Re("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?_N(n.childNodes):[]}}const q8={concat:p7e,getChildrenArray:d7e,fromDOM:_N,toHTML:f7e,matcher:Ore};function b7e(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return Are(n)}catch{return null}}}function m7e(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?un.fromHTMLElement(o,{preserveWhiteSpace:t}):un.empty()},g7e=e=>t=>e(t)!==void 0;function z7e(e,t){switch(t){case"rich-text":return e instanceof un;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function O7e(e,t){return t.some(n=>z7e(e,n))}function A7e(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=wN(n,t);break}return(!y7e(s,t.type)||!v7e(s,t.enum))&&(s=void 0),s===void 0&&(s=Qoe(t)),s}function y7e(e,t){return t===void 0||O7e(e,Array.isArray(t)?t:[t])}function v7e(e,t){return!Array.isArray(t)||t.includes(e)}const yre=ps(e=>{switch(e.source){case"attribute":{let n=c7e(e.selector,e.attribute);return e.type==="boolean"&&(n=g7e(n)),n}case"html":return m7e(e.selector,e.multiline);case"text":return l7e(e.selector);case"rich-text":return M7e(e.selector,e.__unstablePreserveWhiteSpace);case"children":return Ore(e.selector);case"node":return h7e(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,yre(o)]));return u7e(e.selector,t);case"tag":{const n=xN(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function vre(e){return vN(e,t=>t)}function wN(e,t){return yre(t)(vre(e))}function Zc(e,t,n={}){var o;const r=vre(t),s=Qz(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,A7e(c,l,r,n,t)]));return _n("blocks.getBlockAttributes",i,s,t,n)}const x7e={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function UV(e){const t=wN(`
${e}
`,x7e);return t?t.trim().split(/\s+/):[]}function _7e(e,t,n){if(!st(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=hf(t,s),c=UV(i),u=UV(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}function kv(e,t){const n=_7e(e.attributes,t,e.originalContent);return{...e,attributes:n}}function w7e(){return!1}function k7e(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sxre(d,t)).filter(d=>!!d),i=me(n.blockName,Zc(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=R7e(i,o),{validationIssues:l}=c,u=k7e(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). New content generated by \`save\` function: @@ -135,145 +135,145 @@ New content generated by \`save\` function: Content retrieved from post body: -%s`,o.name,o,hf(o,u.attributes),u.originalContent),console.groupEnd()):!c.isValid&&!u.isValid&&l.forEach(({log:d,args:p})=>d(...p)),u}function qn(e,t){return cLe(e).reduce((n,o)=>{const r=are(o,t);return r&&n.push(r),n},[])}function cre(){return Ys("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function lre(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=ja(cre(),({isMatch:c})=>c(o));if(!r)return _1.isNative?qn(`${o.outerHTML}`):me("core/html",Yc("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return me(i,Yc(i,o.outerHTML))})}function Zx(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?J4(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?J4(i)&&!t.raw?r.removeChild(i):s.appendChild(i):Vb(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function ure(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=z7e(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")v6e(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),qp(e.parentNode)}}function z7e(e,t){if(e.nodeValue==="nextpage")return A7e(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,qp(o);break}return O7e(n,r,t)}function O7e(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function A7e(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function EV(e){return e.nodeName==="OL"||e.nodeName==="UL"}function y7e(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function dre(e){if(!EV(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(y7e(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&EV(o)){const r=e.previousElementSibling;r?r.appendChild(e):RM(e)}}function pre(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=Zx(t.innerHTML,e))}}function v7e(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||X0e(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function x7e(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function nq(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function fre(e,t,n){if(!v7e(e,n))return;let o=e;const r=e.parentNode;x7e(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&nq(o,s):nq(o,s):o.parentNode.nodeName==="BODY"&&nq(o)}function fN(e,t,n=0){const o=Ng(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return fN(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:bN(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function _7e(e,t,n){return t.replace(Ng(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(bN(arguments));return p||p===""?r+p+d:o})}function w7e(e){return new hN(e).string()}function Ng(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const BV=ps(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function bN(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new hN({tag:e[2],attrs:e[3],type:t,content:e[5]})}const hN=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=BV(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:fN,replace:_7e,string:w7e,regexp:Ng,attrs:BV,fromMatch:bN});Object.assign(hN.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const NV=e=>Array.isArray(e)?e:[e],LV=/(\n|

)\s*$/,jV=/^\s*(\n|<\/p>)/;function xb(e,t=0,n=[]){const o=Ys("from"),r=ja(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&NV(u.tag).some(d=>Ng(d).test(e)));if(!r)return[e];const i=NV(r.tag).find(u=>Ng(u).test(e));let c;const l=t;if(c=fN(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(LV.test(u)&&jV.test(d)))return xb(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return xb(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,Ov(f,Nt(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,O])=>O.shortcode).map(([O,y])=>[O,y.shortcode(c.shortcode.attrs,c)])),b=Nt(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let M=me(r.blockName,Yc(h,c.shortcode.content,f));M.originalContent=c.shortcode.content,M=Ov(M,h),p=[M]}return[...xb(u.replace(LV,"")),...p,...xb(d.replace(jV,""))]}return[e]}function k7e(e,t){const o={phrasingContentSchema:zx(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=it(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function bre(e){return k7e(cre(),e)}function q7e(e){return!/<(?!br[ />])/i.test(e)}function hre(e,t,n,o){Array.from(e).forEach(r=>{hre(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function dp(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,hre(o.body.childNodes,t,o,n),o.body.innerHTML}function Av(e,t){const n=e[`${t}Sibling`];if(n&&Vb(n))return n;const{parentNode:o}=e;if(!(!o||!Vb(o)))return Av(o,t)}function mre(e){e.nodeType===e.COMMENT_NODE&&qp(e)}function S7e(e,t){if(X0e(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function Mre(e,t){return e.every(n=>S7e(n,t)&&Mre(Array.from(n.children),t))}function C7e(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function R7e(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some(C7e)&&Mre(o,t)}function gre(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&_m(t.createElement("strong"),e),o==="italic"&&_m(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&_m(t.createElement("s"),e),i==="super"?_m(t.createElement("sup"),e):i==="sub"&&_m(t.createElement("sub"),e)}else e.nodeName==="B"?e=dF(e,"strong"):e.nodeName==="I"?e=dF(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function zre(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Ore(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function oq(e){return e.nodeName==="OL"||e.nodeName==="UL"}function W7e(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!oq(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=dp(e.innerHTML,[Ore]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,oq(c)&&(c=c.lastChild||c);oq(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const yv={};function Zc(e){const t=window.URL.createObjectURL(e);return yv[t]=e,t}function Are(e){return yv[e]}function yre(e){return Are(e)?.type.split("/")[0]}function M8(e){yv[e]&&window.URL.revokeObjectURL(e),delete yv[e]}function o1(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function PV(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function T7e(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"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,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(g===!1)return JSON.parse(JSON.stringify(A));var x={};for(var w in A)A.hasOwnProperty(w)&&(x[w]=A[w].defaultValue);return x}function n(){var g=t(!0),A={};for(var x in g)g.hasOwnProperty(x)&&(A[x]=!0);return A}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(g,A){return i[g]=A,this},o.getOption=function(g){return i[g]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(g){if(!l.hasOwnProperty(g))throw Error(g+" flavor was not found");o.resetOptions();var A=l[g];c=g;for(var x in A)A.hasOwnProperty(x)&&(i[x]=A[x])},o.getFlavor=function(){return c},o.getFlavorOptions=function(g){if(l.hasOwnProperty(g))return l[g]},o.getDefaultOptions=function(g){return t(g)},o.subParser=function(g,A){if(o.helper.isString(g))if(typeof A<"u")r[g]=A;else{if(r.hasOwnProperty(g))return r[g];throw Error("SubParser named "+g+" not registered!")}},o.extension=function(g,A){if(!o.helper.isString(g))throw Error("Extension 'name' must be a string");if(g=o.helper.stdExtName(g),o.helper.isUndefined(A)){if(!s.hasOwnProperty(g))throw Error("Extension named "+g+" is not registered!");return s[g]}else{typeof A=="function"&&(A=A()),o.helper.isArray(A)||(A=[A]);var x=u(A,g);if(x.valid)s[g]=A;else throw Error(x.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(g){delete s[g]},o.resetExtensions=function(){s={}};function u(g,A){var x=A?"Error in "+A+" extension->":"Error in unnamed extension",w={valid:!0,error:""};o.helper.isArray(g)||(g=[g]);for(var k=0;k"u"},o.helper.forEach=function(g,A){if(o.helper.isUndefined(g))throw new Error("obj param is required");if(o.helper.isUndefined(A))throw new Error("callback param is required");if(!o.helper.isFunction(A))throw new Error("callback param must be a function/closure");if(typeof g.forEach=="function")g.forEach(A);else if(o.helper.isArray(g))for(var x=0;x").replace(/&/g,"&")};var p=function(g,A,x,w){var k=w||"",q=k.indexOf("g")>-1,S=new RegExp(A+"|"+x,"g"+k.replace(/g/g,"")),C=new RegExp(A,k.replace(/g/g,"")),T=[],E,B,N,W,j;do for(E=0;N=S.exec(g);)if(C.test(N[0]))E++||(B=S.lastIndex,W=B-N[0].length);else if(E&&!--E){j=N.index+N[0].length;var I={left:{start:W,end:B},match:{start:B,end:N.index},right:{start:N.index,end:j},wholeMatch:{start:W,end:j}};if(T.push(I),!q)return T}while(E&&(S.lastIndex=B));return T};o.helper.matchRecursiveRegExp=function(g,A,x,w){for(var k=p(g,A,x,w),q=[],S=0;S0){var E=[];S[0].wholeMatch.start!==0&&E.push(g.slice(0,S[0].wholeMatch.start));for(var B=0;B=0?w+(x||0):w},o.helper.splitAtIndex=function(g,A){if(!o.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,A),g.substring(A)]},o.helper.encodeEmailAddress=function(g){var A=[function(x){return"&#"+x.charCodeAt(0)+";"},function(x){return"&#x"+x.charCodeAt(0).toString(16)+";"},function(x){return x}];return g=g.replace(/./g,function(x){if(x==="@")x=A[Math.floor(Math.random()*2)](x);else{var w=Math.random();x=w>.9?A[2](x):w>.45?A[1](x):A[0](x)}return x}),g},o.helper.padEnd=function(A,x,w){return x=x>>0,w=String(w||" "),A.length>x?String(A):(x=x-A.length,x>w.length&&(w+=w.repeat(x/w.length)),String(A)+w.slice(0,x))},typeof console>"u"&&(console={warn:function(g){alert(g)},log:function(g){alert(g)},error:function(g){throw g}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(g){var A={},x=[],w=[],k={},q=c,S={parsed:{},raw:"",format:""};C();function C(){g=g||{};for(var W in i)i.hasOwnProperty(W)&&(A[W]=i[W]);if(typeof g=="object")for(var j in g)g.hasOwnProperty(j)&&(A[j]=g[j]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof g+" was passed instead.");A.extensions&&o.helper.forEach(A.extensions,T)}function T(W,j){if(j=j||null,o.helper.isString(W))if(W=o.helper.stdExtName(W),j=W,o.extensions[W]){console.warn("DEPRECATION WARNING: "+W+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),E(o.extensions[W],W);return}else if(!o.helper.isUndefined(s[W]))W=s[W];else throw Error('Extension "'+W+'" could not be loaded. It was either not found or is not a valid extension.');typeof W=="function"&&(W=W()),o.helper.isArray(W)||(W=[W]);var I=u(W,j);if(!I.valid)throw Error(I.error);for(var P=0;Pd(...p)),u}function wn(e,t){return pre(e).reduce((n,o)=>{const r=xre(o,t);return r&&n.push(r),n},[])}function _re(){return Ys("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function wre(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=Ia(_re(),({isMatch:c})=>c(o));if(!r)return w1.isNative?wn(`${o.outerHTML}`):me("core/html",Zc("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return me(i,Zc(i,o.outerHTML))})}function i_(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?iv(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?iv(i)&&!t.raw?r.removeChild(i):s.appendChild(i):Fb(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function kre(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=W7e(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")E6e(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),wp(e.parentNode)}}function W7e(e,t){if(e.nodeValue==="nextpage")return E7e(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,wp(o);break}return T7e(n,r,t)}function T7e(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function E7e(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function XV(e){return e.nodeName==="OL"||e.nodeName==="UL"}function B7e(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function qre(e){if(!XV(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(B7e(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&XV(o)){const r=e.previousElementSibling;r?r.appendChild(e):SM(e)}}function Sre(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=i_(t.innerHTML,e))}}function N7e(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||une(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function L7e(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function pq(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function Cre(e,t,n){if(!N7e(e,n))return;let o=e;const r=e.parentNode;L7e(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&pq(o,s):pq(o,s):pq(o)}function kN(e,t,n=0){const o=Bg(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return kN(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:qN(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function j7e(e,t,n){return t.replace(Bg(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(qN(arguments));return p||p===""?r+p+d:o})}function P7e(e){return new SN(e).string()}function Bg(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const GV=ps(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function qN(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new SN({tag:e[2],attrs:e[3],type:t,content:e[5]})}const SN=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=GV(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:kN,replace:j7e,string:P7e,regexp:Bg,attrs:GV,fromMatch:qN});Object.assign(SN.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const KV=e=>Array.isArray(e)?e:[e],YV=/(\n|

)\s*$/,ZV=/^\s*(\n|<\/p>)/;function Ab(e,t=0,n=[]){const o=Ys("from"),r=Ia(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&KV(u.tag).some(d=>Bg(d).test(e)));if(!r)return[e];const i=KV(r.tag).find(u=>Bg(u).test(e));let c;const l=t;if(c=kN(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(YV.test(u)&&ZV.test(d)))return Ab(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return Ab(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,kv(f,Dt(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,z])=>z.shortcode).map(([z,y])=>[z,y.shortcode(c.shortcode.attrs,c)])),b=Dt(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let M=me(r.blockName,Zc(h,c.shortcode.content,f));M.originalContent=c.shortcode.content,M=kv(M,h),p=[M]}return[...Ab(u.replace(YV,"")),...p,...Ab(d.replace(ZV,""))]}return[e]}function I7e(e,t){const o={phrasingContentSchema:kx(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=st(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function Rre(e){return I7e(_re(),e)}function D7e(e){return!/<(?!br[ />])/i.test(e)}function Wre(e,t,n,o){Array.from(e).forEach(r=>{Wre(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function lp(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,Wre(o.body.childNodes,t,o,n),o.body.innerHTML}function qv(e,t){const n=e[`${t}Sibling`];if(n&&Fb(n))return n;const{parentNode:o}=e;if(!(!o||!Fb(o)))return qv(o,t)}function Tre(e){e.nodeType===e.COMMENT_NODE&&wp(e)}function F7e(e,t){if(une(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function Ere(e,t){return e.every(n=>F7e(n,t)&&Ere(Array.from(n.children),t))}function $7e(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function V7e(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some($7e)&&Ere(o,t)}function Bre(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&Am(t.createElement("strong"),e),o==="italic"&&Am(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&Am(t.createElement("s"),e),i==="super"?Am(t.createElement("sup"),e):i==="sub"&&Am(t.createElement("sub"),e)}else e.nodeName==="B"?e=x$(e,"strong"):e.nodeName==="I"?e=x$(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function Nre(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Lre(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function fq(e){return e.nodeName==="OL"||e.nodeName==="UL"}function H7e(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!fq(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=lp(e.innerHTML,[Lre]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,fq(c)&&(c=c.lastChild||c);fq(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const Sv={};function Qc(e){const t=window.URL.createObjectURL(e);return Sv[t]=e,t}function jre(e){return Sv[e]}function Pre(e){return jre(e)?.type.split("/")[0]}function S8(e){Sv[e]&&window.URL.revokeObjectURL(e),delete Sv[e]}function n1(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function QV(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function U7e(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"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,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(g===!1)return JSON.parse(JSON.stringify(A));var _={};for(var w in A)A.hasOwnProperty(w)&&(_[w]=A[w].defaultValue);return _}function n(){var g=t(!0),A={};for(var _ in g)g.hasOwnProperty(_)&&(A[_]=!0);return A}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(g,A){return i[g]=A,this},o.getOption=function(g){return i[g]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(g){if(!l.hasOwnProperty(g))throw Error(g+" flavor was not found");o.resetOptions();var A=l[g];c=g;for(var _ in A)A.hasOwnProperty(_)&&(i[_]=A[_])},o.getFlavor=function(){return c},o.getFlavorOptions=function(g){if(l.hasOwnProperty(g))return l[g]},o.getDefaultOptions=function(g){return t(g)},o.subParser=function(g,A){if(o.helper.isString(g))if(typeof A<"u")r[g]=A;else{if(r.hasOwnProperty(g))return r[g];throw Error("SubParser named "+g+" not registered!")}},o.extension=function(g,A){if(!o.helper.isString(g))throw Error("Extension 'name' must be a string");if(g=o.helper.stdExtName(g),o.helper.isUndefined(A)){if(!s.hasOwnProperty(g))throw Error("Extension named "+g+" is not registered!");return s[g]}else{typeof A=="function"&&(A=A()),o.helper.isArray(A)||(A=[A]);var _=u(A,g);if(_.valid)s[g]=A;else throw Error(_.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(g){delete s[g]},o.resetExtensions=function(){s={}};function u(g,A){var _=A?"Error in "+A+" extension->":"Error in unnamed extension",w={valid:!0,error:""};o.helper.isArray(g)||(g=[g]);for(var k=0;k"u"},o.helper.forEach=function(g,A){if(o.helper.isUndefined(g))throw new Error("obj param is required");if(o.helper.isUndefined(A))throw new Error("callback param is required");if(!o.helper.isFunction(A))throw new Error("callback param must be a function/closure");if(typeof g.forEach=="function")g.forEach(A);else if(o.helper.isArray(g))for(var _=0;_").replace(/&/g,"&")};var p=function(g,A,_,w){var k=w||"",q=k.indexOf("g")>-1,S=new RegExp(A+"|"+_,"g"+k.replace(/g/g,"")),C=new RegExp(A,k.replace(/g/g,"")),T=[],W,B,N,E,L;do for(W=0;N=S.exec(g);)if(C.test(N[0]))W++||(B=S.lastIndex,E=B-N[0].length);else if(W&&!--W){L=N.index+N[0].length;var I={left:{start:E,end:B},match:{start:B,end:N.index},right:{start:N.index,end:L},wholeMatch:{start:E,end:L}};if(T.push(I),!q)return T}while(W&&(S.lastIndex=B));return T};o.helper.matchRecursiveRegExp=function(g,A,_,w){for(var k=p(g,A,_,w),q=[],S=0;S0){var W=[];S[0].wholeMatch.start!==0&&W.push(g.slice(0,S[0].wholeMatch.start));for(var B=0;B=0?w+(_||0):w},o.helper.splitAtIndex=function(g,A){if(!o.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,A),g.substring(A)]},o.helper.encodeEmailAddress=function(g){var A=[function(_){return"&#"+_.charCodeAt(0)+";"},function(_){return"&#x"+_.charCodeAt(0).toString(16)+";"},function(_){return _}];return g=g.replace(/./g,function(_){if(_==="@")_=A[Math.floor(Math.random()*2)](_);else{var w=Math.random();_=w>.9?A[2](_):w>.45?A[1](_):A[0](_)}return _}),g},o.helper.padEnd=function(A,_,w){return _=_>>0,w=String(w||" "),A.length>_?String(A):(_=_-A.length,_>w.length&&(w+=w.repeat(_/w.length)),String(A)+w.slice(0,_))},typeof console>"u"&&(console={warn:function(g){alert(g)},log:function(g){alert(g)},error:function(g){throw g}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(g){var A={},_=[],w=[],k={},q=c,S={parsed:{},raw:"",format:""};C();function C(){g=g||{};for(var E in i)i.hasOwnProperty(E)&&(A[E]=i[E]);if(typeof g=="object")for(var L in g)g.hasOwnProperty(L)&&(A[L]=g[L]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof g+" was passed instead.");A.extensions&&o.helper.forEach(A.extensions,T)}function T(E,L){if(L=L||null,o.helper.isString(E))if(E=o.helper.stdExtName(E),L=E,o.extensions[E]){console.warn("DEPRECATION WARNING: "+E+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),W(o.extensions[E],E);return}else if(!o.helper.isUndefined(s[E]))E=s[E];else throw Error('Extension "'+E+'" could not be loaded. It was either not found or is not a valid extension.');typeof E=="function"&&(E=E()),o.helper.isArray(E)||(E=[E]);var I=u(E,L);if(!I.valid)throw Error(I.error);for(var P=0;P[ \t]+¨NBSP;<"),!j)if(window&&window.document)j=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var I=j.createElement("div");I.innerHTML=W;var P={preList:oe(I)};Z(I);for(var U=I.childNodes,X="",H=0;H'}else ne.push(K[se].innerHTML),K[se].innerHTML="",K[se].setAttribute("prenum",se.toString());return ne}return X},this.setOption=function(W,j){A[W]=j},this.getOption=function(W){return A[W]},this.getOptions=function(){return A},this.addExtension=function(W,j){j=j||null,T(W,j)},this.useExtension=function(W){T(W)},this.setFlavor=function(W){if(!l.hasOwnProperty(W))throw Error(W+" flavor was not found");var j=l[W];q=W;for(var I in j)j.hasOwnProperty(I)&&(A[I]=j[I])},this.getFlavor=function(){return q},this.removeExtension=function(W){o.helper.isArray(W)||(W=[W]);for(var j=0;j? ?(['"].*['"])?\)$/m)>-1)C="";else if(!C)if(S||(S=q.toLowerCase().replace(/ ?\n/g," ")),C="#"+S,!o.helper.isUndefined(x.gUrls[S]))C=x.gUrls[S],o.helper.isUndefined(x.gTitles[S])||(B=x.gTitles[S]);else return k;C=C.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var N='",N};return g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[([^\[\]]+)]()()()()()/g,w),A.ghMentions&&(g=g.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(k,q,S,C,T){if(S==="\\")return q+C;if(!o.helper.isString(A.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var E=A.ghMentionsLink.replace(/\{u}/g,T),B="";return A.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),q+'"+C+""})),g=x.converter._dispatch("anchors.after",g,A,x),g});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,b=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,h=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,M=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,O=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,y=function(g){return function(A,x,w,k,q,S,C){w=w.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var T=w,E="",B="",N=x||"",W=C||"";return/^www\./i.test(w)&&(w=w.replace(/^www\./i,"http://www.")),g.excludeTrailingPunctuationFromURLs&&S&&(E=S),g.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),N+'"+T+""+E+W}},_=function(g,A){return function(x,w,k){var q="mailto:";return w=w||"",k=o.subParser("unescapeSpecialChars")(k,g,A),g.encodeEmails?(q=o.helper.encodeEmailAddress(q+k),k=o.helper.encodeEmailAddress(k)):q=q+k,w+''+k+""}};o.subParser("autoLinks",function(g,A,x){return g=x.converter._dispatch("autoLinks.before",g,A,x),g=g.replace(h,y(A)),g=g.replace(O,_(A,x)),g=x.converter._dispatch("autoLinks.after",g,A,x),g}),o.subParser("simplifiedAutoLinks",function(g,A,x){return A.simplifiedAutoLink&&(g=x.converter._dispatch("simplifiedAutoLinks.before",g,A,x),A.excludeTrailingPunctuationFromURLs?g=g.replace(b,y(A)):g=g.replace(f,y(A)),g=g.replace(M,_(A,x)),g=x.converter._dispatch("simplifiedAutoLinks.after",g,A,x)),g}),o.subParser("blockGamut",function(g,A,x){return g=x.converter._dispatch("blockGamut.before",g,A,x),g=o.subParser("blockQuotes")(g,A,x),g=o.subParser("headers")(g,A,x),g=o.subParser("horizontalRule")(g,A,x),g=o.subParser("lists")(g,A,x),g=o.subParser("codeBlocks")(g,A,x),g=o.subParser("tables")(g,A,x),g=o.subParser("hashHTMLBlocks")(g,A,x),g=o.subParser("paragraphs")(g,A,x),g=x.converter._dispatch("blockGamut.after",g,A,x),g}),o.subParser("blockQuotes",function(g,A,x){g=x.converter._dispatch("blockQuotes.before",g,A,x),g=g+` +`,E=o.subParser("detab")(E,A,L),E=E.replace(/^[ \t]+$/mg,""),o.helper.forEach(_,function(I){E=o.subParser("runExtension")(I,E,A,L)}),E=o.subParser("metadata")(E,A,L),E=o.subParser("hashPreCodeTags")(E,A,L),E=o.subParser("githubCodeBlocks")(E,A,L),E=o.subParser("hashHTMLBlocks")(E,A,L),E=o.subParser("hashCodeTags")(E,A,L),E=o.subParser("stripLinkDefinitions")(E,A,L),E=o.subParser("blockGamut")(E,A,L),E=o.subParser("unhashHTMLSpans")(E,A,L),E=o.subParser("unescapeSpecialChars")(E,A,L),E=E.replace(/¨D/g,"$$"),E=E.replace(/¨T/g,"¨"),E=o.subParser("completeHTMLDocument")(E,A,L),o.helper.forEach(w,function(I){E=o.subParser("runExtension")(I,E,A,L)}),S=L.metadata,E},this.makeMarkdown=this.makeMd=function(E,L){if(E=E.replace(/\r\n/g,` +`),E=E.replace(/\r/g,` +`),E=E.replace(/>[ \t]+¨NBSP;<"),!L)if(window&&window.document)L=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var I=L.createElement("div");I.innerHTML=E;var P={preList:ne(I)};Z(I);for(var H=I.childNodes,U="",X=0;X'}else ee.push(Y[ie].innerHTML),Y[ie].innerHTML="",Y[ie].setAttribute("prenum",ie.toString());return ee}return U},this.setOption=function(E,L){A[E]=L},this.getOption=function(E){return A[E]},this.getOptions=function(){return A},this.addExtension=function(E,L){L=L||null,T(E,L)},this.useExtension=function(E){T(E)},this.setFlavor=function(E){if(!l.hasOwnProperty(E))throw Error(E+" flavor was not found");var L=l[E];q=E;for(var I in L)L.hasOwnProperty(I)&&(A[I]=L[I])},this.getFlavor=function(){return q},this.removeExtension=function(E){o.helper.isArray(E)||(E=[E]);for(var L=0;L? ?(['"].*['"])?\)$/m)>-1)C="";else if(!C)if(S||(S=q.toLowerCase().replace(/ ?\n/g," ")),C="#"+S,!o.helper.isUndefined(_.gUrls[S]))C=_.gUrls[S],o.helper.isUndefined(_.gTitles[S])||(B=_.gTitles[S]);else return k;C=C.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var N='",N};return g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),g=g.replace(/\[([^\[\]]+)]()()()()()/g,w),A.ghMentions&&(g=g.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(k,q,S,C,T){if(S==="\\")return q+C;if(!o.helper.isString(A.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var W=A.ghMentionsLink.replace(/\{u}/g,T),B="";return A.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),q+'"+C+""})),g=_.converter._dispatch("anchors.after",g,A,_),g});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,b=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,h=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,M=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,z=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,y=function(g){return function(A,_,w,k,q,S,C){w=w.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var T=w,W="",B="",N=_||"",E=C||"";return/^www\./i.test(w)&&(w=w.replace(/^www\./i,"http://www.")),g.excludeTrailingPunctuationFromURLs&&S&&(W=S),g.openLinksInNewWindow&&(B=' rel="noopener noreferrer" target="¨E95Eblank"'),N+'"+T+""+W+E}},x=function(g,A){return function(_,w,k){var q="mailto:";return w=w||"",k=o.subParser("unescapeSpecialChars")(k,g,A),g.encodeEmails?(q=o.helper.encodeEmailAddress(q+k),k=o.helper.encodeEmailAddress(k)):q=q+k,w+''+k+""}};o.subParser("autoLinks",function(g,A,_){return g=_.converter._dispatch("autoLinks.before",g,A,_),g=g.replace(h,y(A)),g=g.replace(z,x(A,_)),g=_.converter._dispatch("autoLinks.after",g,A,_),g}),o.subParser("simplifiedAutoLinks",function(g,A,_){return A.simplifiedAutoLink&&(g=_.converter._dispatch("simplifiedAutoLinks.before",g,A,_),A.excludeTrailingPunctuationFromURLs?g=g.replace(b,y(A)):g=g.replace(f,y(A)),g=g.replace(M,x(A,_)),g=_.converter._dispatch("simplifiedAutoLinks.after",g,A,_)),g}),o.subParser("blockGamut",function(g,A,_){return g=_.converter._dispatch("blockGamut.before",g,A,_),g=o.subParser("blockQuotes")(g,A,_),g=o.subParser("headers")(g,A,_),g=o.subParser("horizontalRule")(g,A,_),g=o.subParser("lists")(g,A,_),g=o.subParser("codeBlocks")(g,A,_),g=o.subParser("tables")(g,A,_),g=o.subParser("hashHTMLBlocks")(g,A,_),g=o.subParser("paragraphs")(g,A,_),g=_.converter._dispatch("blockGamut.after",g,A,_),g}),o.subParser("blockQuotes",function(g,A,_){g=_.converter._dispatch("blockQuotes.before",g,A,_),g=g+` -`;var w=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return A.splitAdjacentBlockquotes&&(w=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),g=g.replace(w,function(k){return k=k.replace(/^[ \t]*>[ \t]?/gm,""),k=k.replace(/¨0/g,""),k=k.replace(/^[ \t]+$/gm,""),k=o.subParser("githubCodeBlocks")(k,A,x),k=o.subParser("blockGamut")(k,A,x),k=k.replace(/(^|\n)/g,"$1 "),k=k.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(q,S){var C=S;return C=C.replace(/^  /mg,"¨0"),C=C.replace(/¨0/g,""),C}),o.subParser("hashBlock")(`
+`;var w=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return A.splitAdjacentBlockquotes&&(w=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),g=g.replace(w,function(k){return k=k.replace(/^[ \t]*>[ \t]?/gm,""),k=k.replace(/¨0/g,""),k=k.replace(/^[ \t]+$/gm,""),k=o.subParser("githubCodeBlocks")(k,A,_),k=o.subParser("blockGamut")(k,A,_),k=k.replace(/(^|\n)/g,"$1 "),k=k.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(q,S){var C=S;return C=C.replace(/^  /mg,"¨0"),C=C.replace(/¨0/g,""),C}),o.subParser("hashBlock")(`
`+k+` -
`,A,x)}),g=x.converter._dispatch("blockQuotes.after",g,A,x),g}),o.subParser("codeBlocks",function(g,A,x){g=x.converter._dispatch("codeBlocks.before",g,A,x),g+="¨0";var w=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return g=g.replace(w,function(k,q,S){var C=q,T=S,E=` -`;return C=o.subParser("outdent")(C,A,x),C=o.subParser("encodeCode")(C,A,x),C=o.subParser("detab")(C,A,x),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),A.omitExtraWLInCodeBlocks&&(E=""),C="
"+C+E+"
",o.subParser("hashBlock")(C,A,x)+T}),g=g.replace(/¨0/,""),g=x.converter._dispatch("codeBlocks.after",g,A,x),g}),o.subParser("codeSpans",function(g,A,x){return g=x.converter._dispatch("codeSpans.before",g,A,x),typeof g>"u"&&(g=""),g=g.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(w,k,q,S){var C=S;return C=C.replace(/^([ \t]*)/g,""),C=C.replace(/[ \t]*$/g,""),C=o.subParser("encodeCode")(C,A,x),C=k+""+C+"",C=o.subParser("hashHTMLSpans")(C,A,x),C}),g=x.converter._dispatch("codeSpans.after",g,A,x),g}),o.subParser("completeHTMLDocument",function(g,A,x){if(!A.completeHTMLDocument)return g;g=x.converter._dispatch("completeHTMLDocument.before",g,A,x);var w="html",k=` +
`,A,_)}),g=_.converter._dispatch("blockQuotes.after",g,A,_),g}),o.subParser("codeBlocks",function(g,A,_){g=_.converter._dispatch("codeBlocks.before",g,A,_),g+="¨0";var w=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return g=g.replace(w,function(k,q,S){var C=q,T=S,W=` +`;return C=o.subParser("outdent")(C,A,_),C=o.subParser("encodeCode")(C,A,_),C=o.subParser("detab")(C,A,_),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),A.omitExtraWLInCodeBlocks&&(W=""),C="
"+C+W+"
",o.subParser("hashBlock")(C,A,_)+T}),g=g.replace(/¨0/,""),g=_.converter._dispatch("codeBlocks.after",g,A,_),g}),o.subParser("codeSpans",function(g,A,_){return g=_.converter._dispatch("codeSpans.before",g,A,_),typeof g>"u"&&(g=""),g=g.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(w,k,q,S){var C=S;return C=C.replace(/^([ \t]*)/g,""),C=C.replace(/[ \t]*$/g,""),C=o.subParser("encodeCode")(C,A,_),C=k+""+C+"",C=o.subParser("hashHTMLSpans")(C,A,_),C}),g=_.converter._dispatch("codeSpans.after",g,A,_),g}),o.subParser("completeHTMLDocument",function(g,A,_){if(!A.completeHTMLDocument)return g;g=_.converter._dispatch("completeHTMLDocument.before",g,A,_);var w="html",k=` `,q="",S=` -`,C="",T="";typeof x.metadata.parsed.doctype<"u"&&(k=" -`,w=x.metadata.parsed.doctype.toString().toLowerCase(),(w==="html"||w==="html5")&&(S=''));for(var E in x.metadata.parsed)if(x.metadata.parsed.hasOwnProperty(E))switch(E.toLowerCase()){case"doctype":break;case"title":q=""+x.metadata.parsed.title+` -`;break;case"charset":w==="html"||w==="html5"?S=' -`:S=' -`;break;case"language":case"lang":C=' lang="'+x.metadata.parsed[E]+'"',T+=' -`;break;default:T+=' +`,C="",T="";typeof _.metadata.parsed.doctype<"u"&&(k=" +`,w=_.metadata.parsed.doctype.toString().toLowerCase(),(w==="html"||w==="html5")&&(S=''));for(var W in _.metadata.parsed)if(_.metadata.parsed.hasOwnProperty(W))switch(W.toLowerCase()){case"doctype":break;case"title":q=""+_.metadata.parsed.title+` +`;break;case"charset":w==="html"||w==="html5"?S=' +`:S=' +`;break;case"language":case"lang":C=' lang="'+_.metadata.parsed[W]+'"',T+=' +`;break;default:T+=' `}return g=k+" `+q+S+T+` `+g.trim()+` -`,g=x.converter._dispatch("completeHTMLDocument.after",g,A,x),g}),o.subParser("detab",function(g,A,x){return g=x.converter._dispatch("detab.before",g,A,x),g=g.replace(/\t(?=\t)/g," "),g=g.replace(/\t/g,"¨A¨B"),g=g.replace(/¨B(.+?)¨A/g,function(w,k){for(var q=k,S=4-q.length%4,C=0;C/g,">"),g=x.converter._dispatch("encodeAmpsAndAngles.after",g,A,x),g}),o.subParser("encodeBackslashEscapes",function(g,A,x){return g=x.converter._dispatch("encodeBackslashEscapes.before",g,A,x),g=g.replace(/\\(\\)/g,o.helper.escapeCharactersCallback),g=g.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("encodeBackslashEscapes.after",g,A,x),g}),o.subParser("encodeCode",function(g,A,x){return g=x.converter._dispatch("encodeCode.before",g,A,x),g=g.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("encodeCode.after",g,A,x),g}),o.subParser("escapeSpecialCharsWithinTagAttributes",function(g,A,x){g=x.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",g,A,x);var w=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,k=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return g=g.replace(w,function(q){return q.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=g.replace(k,function(q){return q.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=x.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",g,A,x),g}),o.subParser("githubCodeBlocks",function(g,A,x){return A.ghCodeBlocks?(g=x.converter._dispatch("githubCodeBlocks.before",g,A,x),g+="¨0",g=g.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(w,k,q,S){var C=A.omitExtraWLInCodeBlocks?"":` -`;return S=o.subParser("encodeCode")(S,A,x),S=o.subParser("detab")(S,A,x),S=S.replace(/^\n+/g,""),S=S.replace(/\n+$/g,""),S="
"+S+C+"
",S=o.subParser("hashBlock")(S,A,x),` +`,g=_.converter._dispatch("completeHTMLDocument.after",g,A,_),g}),o.subParser("detab",function(g,A,_){return g=_.converter._dispatch("detab.before",g,A,_),g=g.replace(/\t(?=\t)/g," "),g=g.replace(/\t/g,"¨A¨B"),g=g.replace(/¨B(.+?)¨A/g,function(w,k){for(var q=k,S=4-q.length%4,C=0;C/g,">"),g=_.converter._dispatch("encodeAmpsAndAngles.after",g,A,_),g}),o.subParser("encodeBackslashEscapes",function(g,A,_){return g=_.converter._dispatch("encodeBackslashEscapes.before",g,A,_),g=g.replace(/\\(\\)/g,o.helper.escapeCharactersCallback),g=g.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),g=_.converter._dispatch("encodeBackslashEscapes.after",g,A,_),g}),o.subParser("encodeCode",function(g,A,_){return g=_.converter._dispatch("encodeCode.before",g,A,_),g=g.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),g=_.converter._dispatch("encodeCode.after",g,A,_),g}),o.subParser("escapeSpecialCharsWithinTagAttributes",function(g,A,_){g=_.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",g,A,_);var w=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,k=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return g=g.replace(w,function(q){return q.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=g.replace(k,function(q){return q.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),g=_.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",g,A,_),g}),o.subParser("githubCodeBlocks",function(g,A,_){return A.ghCodeBlocks?(g=_.converter._dispatch("githubCodeBlocks.before",g,A,_),g+="¨0",g=g.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(w,k,q,S){var C=A.omitExtraWLInCodeBlocks?"":` +`;return S=o.subParser("encodeCode")(S,A,_),S=o.subParser("detab")(S,A,_),S=S.replace(/^\n+/g,""),S=S.replace(/\n+$/g,""),S="
"+S+C+"
",S=o.subParser("hashBlock")(S,A,_),` -¨G`+(x.ghCodeBlocks.push({text:w,codeblock:S})-1)+`G +¨G`+(_.ghCodeBlocks.push({text:w,codeblock:S})-1)+`G -`}),g=g.replace(/¨0/,""),x.converter._dispatch("githubCodeBlocks.after",g,A,x)):g}),o.subParser("hashBlock",function(g,A,x){return g=x.converter._dispatch("hashBlock.before",g,A,x),g=g.replace(/(^\n+|\n+$)/g,""),g=` +`}),g=g.replace(/¨0/,""),_.converter._dispatch("githubCodeBlocks.after",g,A,_)):g}),o.subParser("hashBlock",function(g,A,_){return g=_.converter._dispatch("hashBlock.before",g,A,_),g=g.replace(/(^\n+|\n+$)/g,""),g=` -¨K`+(x.gHtmlBlocks.push(g)-1)+`K +¨K`+(_.gHtmlBlocks.push(g)-1)+`K -`,g=x.converter._dispatch("hashBlock.after",g,A,x),g}),o.subParser("hashCodeTags",function(g,A,x){g=x.converter._dispatch("hashCodeTags.before",g,A,x);var w=function(k,q,S,C){var T=S+o.subParser("encodeCode")(q,A,x)+C;return"¨C"+(x.gHtmlSpans.push(T)-1)+"C"};return g=o.helper.replaceRecursiveRegExp(g,w,"]*>","","gim"),g=x.converter._dispatch("hashCodeTags.after",g,A,x),g}),o.subParser("hashElement",function(g,A,x){return function(w,k){var q=k;return q=q.replace(/\n\n/g,` +`,g=_.converter._dispatch("hashBlock.after",g,A,_),g}),o.subParser("hashCodeTags",function(g,A,_){g=_.converter._dispatch("hashCodeTags.before",g,A,_);var w=function(k,q,S,C){var T=S+o.subParser("encodeCode")(q,A,_)+C;return"¨C"+(_.gHtmlSpans.push(T)-1)+"C"};return g=o.helper.replaceRecursiveRegExp(g,w,"]*>","","gim"),g=_.converter._dispatch("hashCodeTags.after",g,A,_),g}),o.subParser("hashElement",function(g,A,_){return function(w,k){var q=k;return q=q.replace(/\n\n/g,` `),q=q.replace(/^\n/,""),q=q.replace(/\n+$/g,""),q=` -¨K`+(x.gHtmlBlocks.push(q)-1)+`K +¨K`+(_.gHtmlBlocks.push(q)-1)+`K -`,q}}),o.subParser("hashHTMLBlocks",function(g,A,x){g=x.converter._dispatch("hashHTMLBlocks.before",g,A,x);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(W,j,I,P){var U=W;return I.search(/\bmarkdown\b/)!==-1&&(U=I+x.converter.makeHtml(j)+P),` +`,q}}),o.subParser("hashHTMLBlocks",function(g,A,_){g=_.converter._dispatch("hashHTMLBlocks.before",g,A,_);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(E,L,I,P){var H=E;return I.search(/\bmarkdown\b/)!==-1&&(H=I+_.converter.makeHtml(L)+P),` -¨K`+(x.gHtmlBlocks.push(U)-1)+`K +¨K`+(_.gHtmlBlocks.push(H)-1)+`K -`};A.backslashEscapesHTMLTags&&(g=g.replace(/\\<(\/?[^>]+?)>/g,function(W,j){return"<"+j+">"}));for(var q=0;q]*>)","im"),T="<"+w[q]+"\\b[^>]*>",E="";(S=o.helper.regexIndexOf(g,C))!==-1;){var B=o.helper.splitAtIndex(g,S),N=o.helper.replaceRecursiveRegExp(B[1],k,T,E,"im");if(N===B[1])break;g=B[0].concat(N)}return g=g.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,x)),g=o.helper.replaceRecursiveRegExp(g,function(W){return` +`};A.backslashEscapesHTMLTags&&(g=g.replace(/\\<(\/?[^>]+?)>/g,function(E,L){return"<"+L+">"}));for(var q=0;q]*>)","im"),T="<"+w[q]+"\\b[^>]*>",W="";(S=o.helper.regexIndexOf(g,C))!==-1;){var B=o.helper.splitAtIndex(g,S),N=o.helper.replaceRecursiveRegExp(B[1],k,T,W,"im");if(N===B[1])break;g=B[0].concat(N)}return g=g.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,_)),g=o.helper.replaceRecursiveRegExp(g,function(E){return` -¨K`+(x.gHtmlBlocks.push(W)-1)+`K +¨K`+(_.gHtmlBlocks.push(E)-1)+`K -`},"^ {0,3}","gm"),g=g.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,x)),g=x.converter._dispatch("hashHTMLBlocks.after",g,A,x),g}),o.subParser("hashHTMLSpans",function(g,A,x){g=x.converter._dispatch("hashHTMLSpans.before",g,A,x);function w(k){return"¨C"+(x.gHtmlSpans.push(k)-1)+"C"}return g=g.replace(/<[^>]+?\/>/gi,function(k){return w(k)}),g=g.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<[^>]+?>/gi,function(k){return w(k)}),g=x.converter._dispatch("hashHTMLSpans.after",g,A,x),g}),o.subParser("unhashHTMLSpans",function(g,A,x){g=x.converter._dispatch("unhashHTMLSpans.before",g,A,x);for(var w=0;w","gm"),g=g.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(g,A,_)),g=_.converter._dispatch("hashHTMLBlocks.after",g,A,_),g}),o.subParser("hashHTMLSpans",function(g,A,_){g=_.converter._dispatch("hashHTMLSpans.before",g,A,_);function w(k){return"¨C"+(_.gHtmlSpans.push(k)-1)+"C"}return g=g.replace(/<[^>]+?\/>/gi,function(k){return w(k)}),g=g.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(k){return w(k)}),g=g.replace(/<[^>]+?>/gi,function(k){return w(k)}),g=_.converter._dispatch("hashHTMLSpans.after",g,A,_),g}),o.subParser("unhashHTMLSpans",function(g,A,_){g=_.converter._dispatch("unhashHTMLSpans.before",g,A,_);for(var w=0;w<_.gHtmlSpans.length;++w){for(var k=_.gHtmlSpans[w],q=0;/¨C(\d+)C/.test(k);){var S=RegExp.$1;if(k=k.replace("¨C"+S+"C",_.gHtmlSpans[S]),q===10){console.error("maximum nesting of 10 spans reached!!!");break}++q}g=g.replace("¨C"+w+"C",k)}return g=_.converter._dispatch("unhashHTMLSpans.after",g,A,_),g}),o.subParser("hashPreCodeTags",function(g,A,_){g=_.converter._dispatch("hashPreCodeTags.before",g,A,_);var w=function(k,q,S,C){var T=S+o.subParser("encodeCode")(q,A,_)+C;return` -¨G`+(x.ghCodeBlocks.push({text:k,codeblock:T})-1)+`G +¨G`+(_.ghCodeBlocks.push({text:k,codeblock:T})-1)+`G -`};return g=o.helper.replaceRecursiveRegExp(g,w,"^ {0,3}]*>\\s*]*>","^ {0,3}\\s*
","gim"),g=x.converter._dispatch("hashPreCodeTags.after",g,A,x),g}),o.subParser("headers",function(g,A,x){g=x.converter._dispatch("headers.before",g,A,x);var w=isNaN(parseInt(A.headerLevelStart))?1:parseInt(A.headerLevelStart),k=A.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,q=A.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;g=g.replace(k,function(T,E){var B=o.subParser("spanGamut")(E,A,x),N=A.noHeaderId?"":' id="'+C(E)+'"',W=w,j=""+B+"";return o.subParser("hashBlock")(j,A,x)}),g=g.replace(q,function(T,E){var B=o.subParser("spanGamut")(E,A,x),N=A.noHeaderId?"":' id="'+C(E)+'"',W=w+1,j=""+B+"";return o.subParser("hashBlock")(j,A,x)});var S=A.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;g=g.replace(S,function(T,E,B){var N=B;A.customizedHeaderId&&(N=B.replace(/\s?\{([^{]+?)}\s*$/,""));var W=o.subParser("spanGamut")(N,A,x),j=A.noHeaderId?"":' id="'+C(B)+'"',I=w-1+E.length,P=""+W+"";return o.subParser("hashBlock")(P,A,x)});function C(T){var E,B;if(A.customizedHeaderId){var N=T.match(/\{([^{]+?)}\s*$/);N&&N[1]&&(T=N[1])}return E=T,o.helper.isString(A.prefixHeaderId)?B=A.prefixHeaderId:A.prefixHeaderId===!0?B="section-":B="",A.rawPrefixHeaderId||(E=B+E),A.ghCompatibleHeaderId?E=E.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():A.rawHeaderId?E=E.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():E=E.replace(/[^\w]/g,"").toLowerCase(),A.rawPrefixHeaderId&&(E=B+E),x.hashLinkCounts[E]?E=E+"-"+x.hashLinkCounts[E]++:x.hashLinkCounts[E]=1,E}return g=x.converter._dispatch("headers.after",g,A,x),g}),o.subParser("horizontalRule",function(g,A,x){g=x.converter._dispatch("horizontalRule.before",g,A,x);var w=o.subParser("hashBlock")("
",A,x);return g=g.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,w),g=x.converter._dispatch("horizontalRule.after",g,A,x),g}),o.subParser("images",function(g,A,x){g=x.converter._dispatch("images.before",g,A,x);var w=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\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,q=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,S=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,C=/!\[([^\[\]]+)]()()()()()/g;function T(B,N,W,j,I,P,U,X){return j=j.replace(/\s/g,""),E(B,N,W,j,I,P,U,X)}function E(B,N,W,j,I,P,U,X){var H=x.gUrls,Z=x.gTitles,oe=x.gDimensions;if(W=W.toLowerCase(),X||(X=""),B.search(/\(? ?(['"].*['"])?\)$/m)>-1)j="";else if(j===""||j===null)if((W===""||W===null)&&(W=N.toLowerCase().replace(/ ?\n/g," ")),j="#"+W,!o.helper.isUndefined(H[W]))j=H[W],o.helper.isUndefined(Z[W])||(X=Z[W]),o.helper.isUndefined(oe[W])||(I=oe[W].width,P=oe[W].height);else return B;N=N.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),j=j.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var ee=''+N+'","
")}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(k,q){return w(q,"","")}),g=g.replace(/\b_(\S[\s\S]*?)_\b/g,function(k,q){return w(q,"","")})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/__(\S[\s\S]*?)__/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/_([^\s_][\s\S]*?)_/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),A.literalMidWordAsterisks?(g=g.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")})):(g=g.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*([^\s*][\s\S]*?)\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),g=x.converter._dispatch("italicsAndBold.after",g,A,x),g}),o.subParser("lists",function(g,A,x){function w(S,C){x.gListLevel++,S=S.replace(/\n{2,}$/,` -`),S+="¨0";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,E=/\n[ \t]*\n(?!¨0)/.test(S);return A.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),S=S.replace(T,function(B,N,W,j,I,P,U){U=U&&U.trim()!=="";var X=o.subParser("outdent")(I,A,x),H="";return P&&A.tasklists&&(H=' class="task-list-item" style="list-style-type: none;"',X=X.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Z='-1?(X=o.subParser("githubCodeBlocks")(X,A,x),X=o.subParser("blockGamut")(X,A,x)):(X=o.subParser("lists")(X,A,x),X=X.replace(/\n$/,""),X=o.subParser("hashHTMLBlocks")(X,A,x),X=X.replace(/\n\n+/g,` +`};return g=o.helper.replaceRecursiveRegExp(g,w,"^ {0,3}]*>\\s*]*>","^ {0,3}\\s*","gim"),g=_.converter._dispatch("hashPreCodeTags.after",g,A,_),g}),o.subParser("headers",function(g,A,_){g=_.converter._dispatch("headers.before",g,A,_);var w=isNaN(parseInt(A.headerLevelStart))?1:parseInt(A.headerLevelStart),k=A.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,q=A.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;g=g.replace(k,function(T,W){var B=o.subParser("spanGamut")(W,A,_),N=A.noHeaderId?"":' id="'+C(W)+'"',E=w,L=""+B+"";return o.subParser("hashBlock")(L,A,_)}),g=g.replace(q,function(T,W){var B=o.subParser("spanGamut")(W,A,_),N=A.noHeaderId?"":' id="'+C(W)+'"',E=w+1,L=""+B+"";return o.subParser("hashBlock")(L,A,_)});var S=A.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;g=g.replace(S,function(T,W,B){var N=B;A.customizedHeaderId&&(N=B.replace(/\s?\{([^{]+?)}\s*$/,""));var E=o.subParser("spanGamut")(N,A,_),L=A.noHeaderId?"":' id="'+C(B)+'"',I=w-1+W.length,P=""+E+"";return o.subParser("hashBlock")(P,A,_)});function C(T){var W,B;if(A.customizedHeaderId){var N=T.match(/\{([^{]+?)}\s*$/);N&&N[1]&&(T=N[1])}return W=T,o.helper.isString(A.prefixHeaderId)?B=A.prefixHeaderId:A.prefixHeaderId===!0?B="section-":B="",A.rawPrefixHeaderId||(W=B+W),A.ghCompatibleHeaderId?W=W.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():A.rawHeaderId?W=W.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():W=W.replace(/[^\w]/g,"").toLowerCase(),A.rawPrefixHeaderId&&(W=B+W),_.hashLinkCounts[W]?W=W+"-"+_.hashLinkCounts[W]++:_.hashLinkCounts[W]=1,W}return g=_.converter._dispatch("headers.after",g,A,_),g}),o.subParser("horizontalRule",function(g,A,_){g=_.converter._dispatch("horizontalRule.before",g,A,_);var w=o.subParser("hashBlock")("
",A,_);return g=g.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,w),g=g.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,w),g=_.converter._dispatch("horizontalRule.after",g,A,_),g}),o.subParser("images",function(g,A,_){g=_.converter._dispatch("images.before",g,A,_);var w=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\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,q=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,S=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,C=/!\[([^\[\]]+)]()()()()()/g;function T(B,N,E,L,I,P,H,U){return L=L.replace(/\s/g,""),W(B,N,E,L,I,P,H,U)}function W(B,N,E,L,I,P,H,U){var X=_.gUrls,Z=_.gTitles,ne=_.gDimensions;if(E=E.toLowerCase(),U||(U=""),B.search(/\(? ?(['"].*['"])?\)$/m)>-1)L="";else if(L===""||L===null)if((E===""||E===null)&&(E=N.toLowerCase().replace(/ ?\n/g," ")),L="#"+E,!o.helper.isUndefined(X[E]))L=X[E],o.helper.isUndefined(Z[E])||(U=Z[E]),o.helper.isUndefined(ne[E])||(I=ne[E].width,P=ne[E].height);else return B;N=N.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),L=L.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var oe=''+N+'","
")}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(k,q){return w(q,"","")}),g=g.replace(/\b_(\S[\s\S]*?)_\b/g,function(k,q){return w(q,"","")})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/__(\S[\s\S]*?)__/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/_([^\s_][\s\S]*?)_/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),A.literalMidWordAsterisks?(g=g.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")}),g=g.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(k,q,S){return w(S,q+"","")})):(g=g.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k}),g=g.replace(/\*([^\s*][\s\S]*?)\*/g,function(k,q){return/\S$/.test(q)?w(q,"",""):k})),g=_.converter._dispatch("italicsAndBold.after",g,A,_),g}),o.subParser("lists",function(g,A,_){function w(S,C){_.gListLevel++,S=S.replace(/\n{2,}$/,` +`),S+="¨0";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,W=/\n[ \t]*\n(?!¨0)/.test(S);return A.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),S=S.replace(T,function(B,N,E,L,I,P,H){H=H&&H.trim()!=="";var U=o.subParser("outdent")(I,A,_),X="";return P&&A.tasklists&&(X=' class="task-list-item" style="list-style-type: none;"',U=U.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Z='-1?(U=o.subParser("githubCodeBlocks")(U,A,_),U=o.subParser("blockGamut")(U,A,_)):(U=o.subParser("lists")(U,A,_),U=U.replace(/\n$/,""),U=o.subParser("hashHTMLBlocks")(U,A,_),U=U.replace(/\n\n+/g,` -`),E?X=o.subParser("paragraphs")(X,A,x):X=o.subParser("spanGamut")(X,A,x)),X=X.replace("¨A",""),X=""+X+` -`,X}),S=S.replace(/¨0/g,""),x.gListLevel--,C&&(S=S.replace(/\s+$/,"")),S}function k(S,C){if(C==="ol"){var T=S.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function q(S,C,T){var E=A.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,B=A.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,N=C==="ul"?E:B,W="";if(S.search(N)!==-1)(function I(P){var U=P.search(N),X=k(S,C);U!==-1?(W+=` +`),W?U=o.subParser("paragraphs")(U,A,_):U=o.subParser("spanGamut")(U,A,_)),U=U.replace("¨A",""),U=""+U+` +`,U}),S=S.replace(/¨0/g,""),_.gListLevel--,C&&(S=S.replace(/\s+$/,"")),S}function k(S,C){if(C==="ol"){var T=S.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function q(S,C,T){var W=A.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,B=A.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,N=C==="ul"?W:B,E="";if(S.search(N)!==-1)(function I(P){var H=P.search(N),U=k(S,C);H!==-1?(E+=` -<`+C+X+`> -`+w(P.slice(0,U),!!T)+" -`,C=C==="ul"?"ol":"ul",N=C==="ul"?E:B,I(P.slice(U))):W+=` +<`+C+U+`> +`+w(P.slice(0,H),!!T)+" +`,C=C==="ul"?"ol":"ul",N=C==="ul"?W:B,I(P.slice(H))):E+=` -<`+C+X+`> +<`+C+U+`> `+w(P,!!T)+" -`})(S);else{var j=k(S,C);W=` +`})(S);else{var L=k(S,C);E=` -<`+C+j+`> +<`+C+L+`> `+w(S,!!T)+" -`}return W}return g=x.converter._dispatch("lists.before",g,A,x),g+="¨0",x.gListLevel?g=g.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T){var E=T.search(/[*+-]/g)>-1?"ul":"ol";return q(C,E,!0)}):g=g.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T,E){var B=E.search(/[*+-]/g)>-1?"ul":"ol";return q(T,B,!1)}),g=g.replace(/¨0/,""),g=x.converter._dispatch("lists.after",g,A,x),g}),o.subParser("metadata",function(g,A,x){if(!A.metadata)return g;g=x.converter._dispatch("metadata.before",g,A,x);function w(k){x.metadata.raw=k,k=k.replace(/&/g,"&").replace(/"/g,"""),k=k.replace(/\n {4}/g," "),k.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(q,S,C){return x.metadata.parsed[S]=C,""})}return g=g.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(k,q,S){return w(S),"¨M"}),g=g.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(k,q,S){return q&&(x.metadata.format=q),w(S),"¨M"}),g=g.replace(/¨M/g,""),g=x.converter._dispatch("metadata.after",g,A,x),g}),o.subParser("outdent",function(g,A,x){return g=x.converter._dispatch("outdent.before",g,A,x),g=g.replace(/^(\t|[ ]{1,4})/gm,"¨0"),g=g.replace(/¨0/g,""),g=x.converter._dispatch("outdent.after",g,A,x),g}),o.subParser("paragraphs",function(g,A,x){g=x.converter._dispatch("paragraphs.before",g,A,x),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,"");for(var w=g.split(/\n{2,}/g),k=[],q=w.length,S=0;S=0?k.push(C):C.search(/\S/)>=0&&(C=o.subParser("spanGamut")(C,A,x),C=C.replace(/^([ \t]*)/g,"

"),C+="

",k.push(C))}for(q=k.length,S=0;S]*>\s*]*>/.test(E)&&(B=!0)}k[S]=E}return g=k.join(` -`),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),x.converter._dispatch("paragraphs.after",g,A,x)}),o.subParser("runExtension",function(g,A,x,w){if(g.filter)A=g.filter(A,w.converter,x);else if(g.regex){var k=g.regex;k instanceof RegExp||(k=new RegExp(k,"g")),A=A.replace(k,g.replace)}return A}),o.subParser("spanGamut",function(g,A,x){return g=x.converter._dispatch("spanGamut.before",g,A,x),g=o.subParser("codeSpans")(g,A,x),g=o.subParser("escapeSpecialCharsWithinTagAttributes")(g,A,x),g=o.subParser("encodeBackslashEscapes")(g,A,x),g=o.subParser("images")(g,A,x),g=o.subParser("anchors")(g,A,x),g=o.subParser("autoLinks")(g,A,x),g=o.subParser("simplifiedAutoLinks")(g,A,x),g=o.subParser("emoji")(g,A,x),g=o.subParser("underline")(g,A,x),g=o.subParser("italicsAndBold")(g,A,x),g=o.subParser("strikethrough")(g,A,x),g=o.subParser("ellipsis")(g,A,x),g=o.subParser("hashHTMLSpans")(g,A,x),g=o.subParser("encodeAmpsAndAngles")(g,A,x),A.simpleLineBreaks?/\n\n¨K/.test(g)||(g=g.replace(/\n+/g,`
+`}return E}return g=_.converter._dispatch("lists.before",g,A,_),g+="¨0",_.gListLevel?g=g.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T){var W=T.search(/[*+-]/g)>-1?"ul":"ol";return q(C,W,!0)}):g=g.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(S,C,T,W){var B=W.search(/[*+-]/g)>-1?"ul":"ol";return q(T,B,!1)}),g=g.replace(/¨0/,""),g=_.converter._dispatch("lists.after",g,A,_),g}),o.subParser("metadata",function(g,A,_){if(!A.metadata)return g;g=_.converter._dispatch("metadata.before",g,A,_);function w(k){_.metadata.raw=k,k=k.replace(/&/g,"&").replace(/"/g,"""),k=k.replace(/\n {4}/g," "),k.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(q,S,C){return _.metadata.parsed[S]=C,""})}return g=g.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(k,q,S){return w(S),"¨M"}),g=g.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(k,q,S){return q&&(_.metadata.format=q),w(S),"¨M"}),g=g.replace(/¨M/g,""),g=_.converter._dispatch("metadata.after",g,A,_),g}),o.subParser("outdent",function(g,A,_){return g=_.converter._dispatch("outdent.before",g,A,_),g=g.replace(/^(\t|[ ]{1,4})/gm,"¨0"),g=g.replace(/¨0/g,""),g=_.converter._dispatch("outdent.after",g,A,_),g}),o.subParser("paragraphs",function(g,A,_){g=_.converter._dispatch("paragraphs.before",g,A,_),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,"");for(var w=g.split(/\n{2,}/g),k=[],q=w.length,S=0;S=0?k.push(C):C.search(/\S/)>=0&&(C=o.subParser("spanGamut")(C,A,_),C=C.replace(/^([ \t]*)/g,"

"),C+="

",k.push(C))}for(q=k.length,S=0;S]*>\s*]*>/.test(W)&&(B=!0)}k[S]=W}return g=k.join(` +`),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),_.converter._dispatch("paragraphs.after",g,A,_)}),o.subParser("runExtension",function(g,A,_,w){if(g.filter)A=g.filter(A,w.converter,_);else if(g.regex){var k=g.regex;k instanceof RegExp||(k=new RegExp(k,"g")),A=A.replace(k,g.replace)}return A}),o.subParser("spanGamut",function(g,A,_){return g=_.converter._dispatch("spanGamut.before",g,A,_),g=o.subParser("codeSpans")(g,A,_),g=o.subParser("escapeSpecialCharsWithinTagAttributes")(g,A,_),g=o.subParser("encodeBackslashEscapes")(g,A,_),g=o.subParser("images")(g,A,_),g=o.subParser("anchors")(g,A,_),g=o.subParser("autoLinks")(g,A,_),g=o.subParser("simplifiedAutoLinks")(g,A,_),g=o.subParser("emoji")(g,A,_),g=o.subParser("underline")(g,A,_),g=o.subParser("italicsAndBold")(g,A,_),g=o.subParser("strikethrough")(g,A,_),g=o.subParser("ellipsis")(g,A,_),g=o.subParser("hashHTMLSpans")(g,A,_),g=o.subParser("encodeAmpsAndAngles")(g,A,_),A.simpleLineBreaks?/\n\n¨K/.test(g)||(g=g.replace(/\n+/g,`
`)):g=g.replace(/ +\n/g,`
-`),g=x.converter._dispatch("spanGamut.after",g,A,x),g}),o.subParser("strikethrough",function(g,A,x){function w(k){return A.simplifiedAutoLink&&(k=o.subParser("simplifiedAutoLinks")(k,A,x)),""+k+""}return A.strikethrough&&(g=x.converter._dispatch("strikethrough.before",g,A,x),g=g.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(k,q){return w(q)}),g=x.converter._dispatch("strikethrough.after",g,A,x)),g}),o.subParser("stripLinkDefinitions",function(g,A,x){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]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;g+="¨0";var q=function(S,C,T,E,B,N,W){return C=C.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?x.gUrls[C]=T.replace(/\s/g,""):x.gUrls[C]=o.subParser("encodeAmpsAndAngles")(T,A,x),N?N+W:(W&&(x.gTitles[C]=W.replace(/"|'/g,""")),A.parseImgDimensions&&E&&B&&(x.gDimensions[C]={width:E,height:B}),"")};return g=g.replace(k,q),g=g.replace(w,q),g=g.replace(/¨0/,""),g}),o.subParser("tables",function(g,A,x){if(!A.tables)return g;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 q(B){return/^:[ \t]*--*$/.test(B)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(B)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(B)?' style="text-align:center;"':""}function S(B,N){var W="";return B=B.trim(),(A.tablesHeaderId||A.tableHeaderId)&&(W=' id="'+B.replace(/ /g,"_").toLowerCase()+'"'),B=o.subParser("spanGamut")(B,A,x),""+B+` -`}function C(B,N){var W=o.subParser("spanGamut")(B,A,x);return""+W+` -`}function T(B,N){for(var W=` +`),g=_.converter._dispatch("spanGamut.after",g,A,_),g}),o.subParser("strikethrough",function(g,A,_){function w(k){return A.simplifiedAutoLink&&(k=o.subParser("simplifiedAutoLinks")(k,A,_)),""+k+""}return A.strikethrough&&(g=_.converter._dispatch("strikethrough.before",g,A,_),g=g.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(k,q){return w(q)}),g=_.converter._dispatch("strikethrough.after",g,A,_)),g}),o.subParser("stripLinkDefinitions",function(g,A,_){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]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;g+="¨0";var q=function(S,C,T,W,B,N,E){return C=C.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?_.gUrls[C]=T.replace(/\s/g,""):_.gUrls[C]=o.subParser("encodeAmpsAndAngles")(T,A,_),N?N+E:(E&&(_.gTitles[C]=E.replace(/"|'/g,""")),A.parseImgDimensions&&W&&B&&(_.gDimensions[C]={width:W,height:B}),"")};return g=g.replace(k,q),g=g.replace(w,q),g=g.replace(/¨0/,""),g}),o.subParser("tables",function(g,A,_){if(!A.tables)return g;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 q(B){return/^:[ \t]*--*$/.test(B)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(B)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(B)?' style="text-align:center;"':""}function S(B,N){var E="";return B=B.trim(),(A.tablesHeaderId||A.tableHeaderId)&&(E=' id="'+B.replace(/ /g,"_").toLowerCase()+'"'),B=o.subParser("spanGamut")(B,A,_),""+B+` +`}function C(B,N){var E=o.subParser("spanGamut")(B,A,_);return""+E+` +`}function T(B,N){for(var E=`
-`,j=B.length,I=0;I +`,L=B.length,I=0;I -`,I=0;I -`;for(var P=0;P -`}return W+=` +`,I=0;I +`;for(var P=0;P +`}return E+=`
-`,W}function E(B){var N,W=B.split(` -`);for(N=0;N"+k+""}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(w,k){return""+k+""})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(w,k){return/\S$/.test(k)?""+k+"":w}),g=g.replace(/__(\S[\s\S]*?)__/g,function(w,k){return/\S$/.test(k)?""+k+"":w})),g=g.replace(/(_)/g,o.helper.escapeCharactersCallback),g=x.converter._dispatch("underline.after",g,A,x)),g}),o.subParser("unescapeSpecialChars",function(g,A,x){return g=x.converter._dispatch("unescapeSpecialChars.before",g,A,x),g=g.replace(/¨E(\d+)E/g,function(w,k){var q=parseInt(k);return String.fromCharCode(q)}),g=x.converter._dispatch("unescapeSpecialChars.after",g,A,x),g}),o.subParser("makeMarkdown.blockquote",function(g,A){var x="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q "+x.split(` +`,E}function W(B){var N,E=B.split(` +`);for(N=0;N"+k+""}),g=g.replace(/\b__(\S[\s\S]*?)__\b/g,function(w,k){return""+k+""})):(g=g.replace(/___(\S[\s\S]*?)___/g,function(w,k){return/\S$/.test(k)?""+k+"":w}),g=g.replace(/__(\S[\s\S]*?)__/g,function(w,k){return/\S$/.test(k)?""+k+"":w})),g=g.replace(/(_)/g,o.helper.escapeCharactersCallback),g=_.converter._dispatch("underline.after",g,A,_)),g}),o.subParser("unescapeSpecialChars",function(g,A,_){return g=_.converter._dispatch("unescapeSpecialChars.before",g,A,_),g=g.replace(/¨E(\d+)E/g,function(w,k){var q=parseInt(k);return String.fromCharCode(q)}),g=_.converter._dispatch("unescapeSpecialChars.after",g,A,_),g}),o.subParser("makeMarkdown.blockquote",function(g,A){var _="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q "+_.split(` `).join(` -> `),x}),o.subParser("makeMarkdown.codeBlock",function(g,A){var x=g.getAttribute("language"),w=g.getAttribute("precodenum");return"```"+x+` -`+A.preList[w]+"\n```"}),o.subParser("makeMarkdown.codeSpan",function(g){return"`"+g.innerHTML+"`"}),o.subParser("makeMarkdown.emphasis",function(g,A){var x="";if(g.hasChildNodes()){x+="*";for(var w=g.childNodes,k=w.length,q=0;q",g.hasAttribute("width")&&g.hasAttribute("height")&&(A+=" ="+g.getAttribute("width")+"x"+g.getAttribute("height")),g.hasAttribute("title")&&(A+=' "'+g.getAttribute("title")+'"'),A+=")"),A}),o.subParser("makeMarkdown.links",function(g,A){var x="";if(g.hasChildNodes()&&g.hasAttribute("href")){var w=g.childNodes,k=w.length;x="[";for(var q=0;q",g.hasAttribute("title")&&(x+=' "'+g.getAttribute("title")+'"'),x+=")"}return x}),o.subParser("makeMarkdown.list",function(g,A,x){var w="";if(!g.hasChildNodes())return"";for(var k=g.childNodes,q=k.length,S=g.getAttribute("start")||1,C=0;C"u"||k[C].tagName.toLowerCase()!=="li")){var T="";x==="ol"?T=S.toString()+". ":T="- ",w+=T+o.subParser("makeMarkdown.listItem")(k[C],A),++S}return w+=` +> `),_}),o.subParser("makeMarkdown.codeBlock",function(g,A){var _=g.getAttribute("language"),w=g.getAttribute("precodenum");return"```"+_+` +`+A.preList[w]+"\n```"}),o.subParser("makeMarkdown.codeSpan",function(g){return"`"+g.innerHTML+"`"}),o.subParser("makeMarkdown.emphasis",function(g,A){var _="";if(g.hasChildNodes()){_+="*";for(var w=g.childNodes,k=w.length,q=0;q",g.hasAttribute("width")&&g.hasAttribute("height")&&(A+=" ="+g.getAttribute("width")+"x"+g.getAttribute("height")),g.hasAttribute("title")&&(A+=' "'+g.getAttribute("title")+'"'),A+=")"),A}),o.subParser("makeMarkdown.links",function(g,A){var _="";if(g.hasChildNodes()&&g.hasAttribute("href")){var w=g.childNodes,k=w.length;_="[";for(var q=0;q",g.hasAttribute("title")&&(_+=' "'+g.getAttribute("title")+'"'),_+=")"}return _}),o.subParser("makeMarkdown.list",function(g,A,_){var w="";if(!g.hasChildNodes())return"";for(var k=g.childNodes,q=k.length,S=g.getAttribute("start")||1,C=0;C"u"||k[C].tagName.toLowerCase()!=="li")){var T="";_==="ol"?T=S.toString()+". ":T="- ",w+=T+o.subParser("makeMarkdown.listItem")(k[C],A),++S}return w+=` -`,w.trim()}),o.subParser("makeMarkdown.listItem",function(g,A){for(var x="",w=g.childNodes,k=w.length,q=0;q +`):_+=` +`,_}),o.subParser("makeMarkdown.node",function(g,A,_){_=_||!1;var w="";if(g.nodeType===3)return o.subParser("makeMarkdown.txt")(g,A);if(g.nodeType===8)return" -`;if(g.nodeType!==1)return"";var k=g.tagName.toLowerCase();switch(k){case"h1":x||(w=o.subParser("makeMarkdown.header")(g,A,1)+` +`;if(g.nodeType!==1)return"";var k=g.tagName.toLowerCase();switch(k){case"h1":_||(w=o.subParser("makeMarkdown.header")(g,A,1)+` -`);break;case"h2":x||(w=o.subParser("makeMarkdown.header")(g,A,2)+` +`);break;case"h2":_||(w=o.subParser("makeMarkdown.header")(g,A,2)+` -`);break;case"h3":x||(w=o.subParser("makeMarkdown.header")(g,A,3)+` +`);break;case"h3":_||(w=o.subParser("makeMarkdown.header")(g,A,3)+` -`);break;case"h4":x||(w=o.subParser("makeMarkdown.header")(g,A,4)+` +`);break;case"h4":_||(w=o.subParser("makeMarkdown.header")(g,A,4)+` -`);break;case"h5":x||(w=o.subParser("makeMarkdown.header")(g,A,5)+` +`);break;case"h5":_||(w=o.subParser("makeMarkdown.header")(g,A,5)+` -`);break;case"h6":x||(w=o.subParser("makeMarkdown.header")(g,A,6)+` +`);break;case"h6":_||(w=o.subParser("makeMarkdown.header")(g,A,6)+` -`);break;case"p":x||(w=o.subParser("makeMarkdown.paragraph")(g,A)+` +`);break;case"p":_||(w=o.subParser("makeMarkdown.paragraph")(g,A)+` -`);break;case"blockquote":x||(w=o.subParser("makeMarkdown.blockquote")(g,A)+` +`);break;case"blockquote":_||(w=o.subParser("makeMarkdown.blockquote")(g,A)+` -`);break;case"hr":x||(w=o.subParser("makeMarkdown.hr")(g,A)+` +`);break;case"hr":_||(w=o.subParser("makeMarkdown.hr")(g,A)+` -`);break;case"ol":x||(w=o.subParser("makeMarkdown.list")(g,A,"ol")+` +`);break;case"ol":_||(w=o.subParser("makeMarkdown.list")(g,A,"ol")+` -`);break;case"ul":x||(w=o.subParser("makeMarkdown.list")(g,A,"ul")+` +`);break;case"ul":_||(w=o.subParser("makeMarkdown.list")(g,A,"ul")+` -`);break;case"precode":x||(w=o.subParser("makeMarkdown.codeBlock")(g,A)+` +`);break;case"precode":_||(w=o.subParser("makeMarkdown.codeBlock")(g,A)+` -`);break;case"pre":x||(w=o.subParser("makeMarkdown.pre")(g,A)+` +`);break;case"pre":_||(w=o.subParser("makeMarkdown.pre")(g,A)+` -`);break;case"table":x||(w=o.subParser("makeMarkdown.table")(g,A)+` +`);break;case"table":_||(w=o.subParser("makeMarkdown.table")(g,A)+` `);break;case"code":w=o.subParser("makeMarkdown.codeSpan")(g,A);break;case"em":case"i":w=o.subParser("makeMarkdown.emphasis")(g,A);break;case"strong":case"b":w=o.subParser("makeMarkdown.strong")(g,A);break;case"del":w=o.subParser("makeMarkdown.strikethrough")(g,A);break;case"a":w=o.subParser("makeMarkdown.links")(g,A);break;case"img":w=o.subParser("makeMarkdown.image")(g,A);break;default:w=g.outerHTML+` -`}return w}),o.subParser("makeMarkdown.paragraph",function(g,A){var x="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q"+A.preList[x]+""}),o.subParser("makeMarkdown.strikethrough",function(g,A){var x="";if(g.hasChildNodes()){x+="~~";for(var w=g.childNodes,k=w.length,q=0;qtr>th"),q=g.querySelectorAll("tbody>tr"),S,C;for(S=0;SI&&(I=P)}for(S=0;S/g,"\\$1>"),A=A.replace(/^#/gm,"\\#"),A=A.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),A=A.replace(/^( {0,3}\d+)\./gm,"$1\\."),A=A.replace(/^( {0,3})([+-])/gm,"$1\\$2"),A=A.replace(/]([\s]*)\(/g,"\\]$1\\("),A=A.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),A});var v=this;e.exports?e.exports=o:v.showdown=o}).call(c0)})(vre);var B7e=vre.exports;const N7e=Ao(B7e),L7e=new N7e.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function j7e(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} +`}return w}),o.subParser("makeMarkdown.paragraph",function(g,A){var _="";if(g.hasChildNodes())for(var w=g.childNodes,k=w.length,q=0;q"+A.preList[_]+""}),o.subParser("makeMarkdown.strikethrough",function(g,A){var _="";if(g.hasChildNodes()){_+="~~";for(var w=g.childNodes,k=w.length,q=0;qtr>th"),q=g.querySelectorAll("tbody>tr"),S,C;for(S=0;SI&&(I=P)}for(S=0;S/g,"\\$1>"),A=A.replace(/^#/gm,"\\#"),A=A.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),A=A.replace(/^( {0,3}\d+)\./gm,"$1\\."),A=A.replace(/^( {0,3})([+-])/gm,"$1\\$2"),A=A.replace(/]([\s]*)\(/g,"\\]$1\\("),A=A.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),A});var v=this;e.exports?e.exports=o:v.showdown=o}).call(Dn)})(Ire);var G7e=Ire.exports;const K7e=yo(G7e),Y7e=new K7e.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function Z7e(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} ${o} -${r}`)}function P7e(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function I7e(e){return L7e.makeHtml(j7e(P7e(e)))}function D7e(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function xre(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?RM(e):e.removeAttribute("id"))}function $7e(e){return e===" "||e==="\r"||e===` -`||e===" "}function _re(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=Av(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=Av(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&$7e(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function wre(e){e.nodeName==="BR"&&(Av(e,"next")||e.parentNode.removeChild(e))}function F7e(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function V7e(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const kre=(...e)=>window?.console?.log?.(...e);function IV(e){return e=dp(e,[zre,xre,Ore,gre,mre]),e=$R(e,zx("paste"),{inline:!0}),e=dp(e,[_re,wre]),kre(`Processed inline HTML: +${r}`)}function Q7e(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function J7e(e){return Y7e.makeHtml(Z7e(Q7e(e)))}function eje(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function Dre(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?SM(e):e.removeAttribute("id"))}function tje(e){return e===" "||e==="\r"||e===` +`||e===" "}function Fre(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=qv(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=qv(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&tje(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function $re(e){e.nodeName==="BR"&&(qv(e,"next")||e.parentNode.removeChild(e))}function nje(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function oje(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const Vre=(...e)=>window?.console?.log?.(...e);function JV(e){return e=lp(e,[Nre,Dre,Lre,Bre,Tre]),e=e8(e,kx("paste"),{inline:!0}),e=lp(e,[Fre,$re]),Vre(`Processed inline HTML: -`,e),e}function mf({HTML:e="",plainText:t="",mode:n="AUTO",tagName:o}){if(e=e.replace(/]+>/g,""),e=e.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf(")?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf("",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function xvt(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function Yj({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=vvt(n),n=xvt(n);const o=ev(e);return o.length&&!_vt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function _vt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const e2e=Symbol("requiresWrapperOnCopy");function t2e(e,t,n){let o=t;const[r]=t;if(r&&n.select(Ve).getBlockType(r.name)[e2e]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select($),d=c(r.clientId),p=l(d);p&&(o=me(p,u(d),o))}const s=Uo(o);e.clipboardData.setData("text/plain",kvt(s)),e.clipboardData.setData("text/html",s)}function wvt(e,t){const{plainText:n,html:o,files:r}=Yj(e);let s=[];if(r.length){const i=Ys("from");s=r.reduce((c,l)=>{const u=ja(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=mf({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function kvt(e){return e=e.replace(/
/g,` +*/(function(e,t){(function(n,o){o(e,t)})(Dn,function(n,o){var r=typeof Map=="function"?new Map:function(){var d=[],p=[];return{has:function(b){return d.indexOf(b)>-1},get:function(b){return p[d.indexOf(b)]},set:function(b,h){d.indexOf(b)===-1&&(d.push(b),p.push(h))},delete:function(b){var h=d.indexOf(b);h>-1&&(d.splice(h,1),p.splice(h,1))}}}(),s=function(p){return new Event(p,{bubbles:!0})};try{new Event("test")}catch{s=function(f){var b=document.createEvent("Event");return b.initEvent(f,!0,!1),b}}function i(d){if(!d||!d.nodeName||d.nodeName!=="TEXTAREA"||r.has(d))return;var p=null,f=null,b=null;function h(){var A=window.getComputedStyle(d,null);A.resize==="vertical"?d.style.resize="none":A.resize==="both"&&(d.style.resize="horizontal"),A.boxSizing==="content-box"?p=-(parseFloat(A.paddingTop)+parseFloat(A.paddingBottom)):p=parseFloat(A.borderTopWidth)+parseFloat(A.borderBottomWidth),isNaN(p)&&(p=0),x()}function M(A){{var _=d.style.width;d.style.width="0px",d.offsetWidth,d.style.width=_}d.style.overflowY=A}function z(A){for(var _=[];A&&A.parentNode&&A.parentNode instanceof Element;)A.parentNode.scrollTop&&_.push({node:A.parentNode,scrollTop:A.parentNode.scrollTop}),A=A.parentNode;return _}function y(){if(d.scrollHeight!==0){var A=z(d),_=document.documentElement&&document.documentElement.scrollTop;d.style.height="",d.style.height=d.scrollHeight+p+"px",f=d.clientWidth,A.forEach(function(w){w.node.scrollTop=w.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function x(){y();var A=Math.round(parseFloat(d.style.height)),_=window.getComputedStyle(d,null),w=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):d.offsetHeight;if(w"u"||typeof window.getComputedStyle!="function"?(u=function(p){return p},u.destroy=function(d){return d},u.update=function(d){return d}):(u=function(p,f){return p&&Array.prototype.forEach.call(p.length?p:[p],function(b){return i(b)}),p},u.destroy=function(d){return d&&Array.prototype.forEach.call(d.length?d:[d],c),d},u.update=function(d){return d&&Array.prototype.forEach.call(d.length?d:[d],l),d}),o.default=u,n.exports=o.default})})(KW,KW.exports);var pyt=KW.exports,fyt=function(e,t,n){return n=window.getComputedStyle,(n?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,r){return r.toUpperCase()})]},byt=fyt,hS=byt;function hyt(e){var t=hS(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=hS(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(n*=4,n/=3):t.indexOf("mm")!==-1?(n*=96,n/=25.4):t.indexOf("cm")!==-1?(n*=96,n/=2.54):t.indexOf("in")!==-1?n*=96:t.indexOf("pc")!==-1&&(n*=16),n=Math.round(n),t==="normal"){var r=e.nodeName,s=document.createElement(r);s.innerHTML=" ",r.toUpperCase()==="TEXTAREA"&&s.setAttribute("rows","1");var i=hS(e,"font-size");s.style.fontSize=i,s.style.padding="0px",s.style.border="0px";var c=document.body;c.appendChild(s);var l=s.offsetHeight;n=l,c.removeChild(s)}return n}var myt=hyt,Myt=Dn&&Dn.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])};return function(t,n){e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),YW=Dn&&Dn.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;ni(F).getBlock(e),[e]),{updateBlock:r}=ae(F),s=()=>{const i=Dt(o.name);if(!i)return;const c=Zc(i,t,o.attributes),l=t||hf(i,c),[u]=t?Eg({...o,attributes:c,originalContent:l}):[!0];r(e,{attributes:c,originalContent:l,isValid:u}),t||n(l)};return O.useEffect(()=>{n(s_(o))},[o]),a.jsx(Hj,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:i=>n(i.target.value)})}var Uj=nO(),e0=e=>tO(e,Uj),Xj=nO();e0.write=e=>tO(e,Xj);var Xw=nO();e0.onStart=e=>tO(e,Xw);var Gj=nO();e0.onFrame=e=>tO(e,Gj);var Kj=nO();e0.onFinish=e=>tO(e,Kj);var o2=[];e0.setTimeout=(e,t)=>{const n=e0.now()+t,o=()=>{const s=o2.findIndex(i=>i.cancel==o);~s&&o2.splice(s,1),au-=~s?1:0},r={time:n,handler:e,cancel:o};return o2.splice(qbe(n),0,r),au+=1,Sbe(),r};var qbe=e=>~(~o2.findIndex(t=>t.time>e)||~o2.length);e0.cancel=e=>{Xw.delete(e),Gj.delete(e),Kj.delete(e),Uj.delete(e),Xj.delete(e)};e0.sync=e=>{ZW=!0,e0.batchedUpdates(e),ZW=!1};e0.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...r){t=r,e0.onStart(n)}return o.handler=e,o.cancel=()=>{Xw.delete(n),t=null},o};var Yj=typeof window<"u"?window.requestAnimationFrame:()=>{};e0.use=e=>Yj=e;e0.now=typeof performance<"u"?()=>performance.now():Date.now;e0.batchedUpdates=e=>e();e0.catch=console.error;e0.frameLoop="always";e0.advance=()=>{e0.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Rbe()};var iu=-1,au=0,ZW=!1;function tO(e,t){ZW?(t.delete(e),e(0)):(t.add(e),Sbe())}function Sbe(){iu<0&&(iu=0,e0.frameLoop!=="demand"&&Yj(Cbe))}function vyt(){iu=-1}function Cbe(){~iu&&(Yj(Cbe),e0.batchedUpdates(Rbe))}function Rbe(){const e=iu;iu=e0.now();const t=qbe(iu);if(t&&(Wbe(o2.splice(0,t),n=>n.handler()),au-=t),!au){vyt();return}Xw.flush(),Uj.flush(e?Math.min(64,iu-e):16.667),Gj.flush(),Xj.flush(),Kj.flush()}function nO(){let e=new Set,t=e;return{add(n){au+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return au-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,au-=t.size,Wbe(t,o=>o(n)&&e.add(o)),au+=e.size,t=e)}}}function Wbe(e,t){e.forEach(n=>{try{t(n)}catch(o){e0.catch(o)}})}var xyt=Object.defineProperty,_yt=(e,t)=>{for(var n in t)xyt(e,n,{get:t[n],enumerable:!0})},Ii={};_yt(Ii,{assign:()=>kyt,colors:()=>wu,createStringInterpolator:()=>Qj,skipAnimation:()=>Ebe,to:()=>Tbe,willAdvance:()=>Jj});function QW(){}var wyt=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ge={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function gc(e,t){if(Ge.arr(e)){if(!Ge.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function il(e,t,n){if(Ge.arr(e)){for(let o=0;oGe.und(e)?[]:Ge.arr(e)?e:[e];function XM(e,t){if(e.size){const n=Array.from(e);e.clear(),Hn(n,t)}}var bM=(e,...t)=>XM(e,n=>n(...t)),Zj=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Qj,Tbe,wu=null,Ebe=!1,Jj=QW,kyt=e=>{e.to&&(Tbe=e.to),e.now&&(e0.now=e.now),e.colors!==void 0&&(wu=e.colors),e.skipAnimation!=null&&(Ebe=e.skipAnimation),e.createStringInterpolator&&(Qj=e.createStringInterpolator),e.requestAnimationFrame&&e0.use(e.requestAnimationFrame),e.batchedUpdates&&(e0.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Jj=e.willAdvance),e.frameLoop&&(e0.frameLoop=e.frameLoop)},GM=new Set,Ts=[],mS=[],b5=0,Gw={get idle(){return!GM.size&&!Ts.length},start(e){b5>e.priority?(GM.add(e),e0.onStart(qyt)):(Bbe(e),e0(JW))},advance:JW,sort(e){if(b5)e0.onFrame(()=>Gw.sort(e));else{const t=Ts.indexOf(e);~t&&(Ts.splice(t,1),Nbe(e))}},clear(){Ts=[],GM.clear()}};function qyt(){GM.forEach(Bbe),GM.clear(),e0(JW)}function Bbe(e){Ts.includes(e)||Nbe(e)}function Nbe(e){Ts.splice(Syt(Ts,t=>t.priority>e.priority),0,e)}function JW(e){const t=mS;for(let n=0;n0}function Syt(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Cyt=(e,t,n)=>Math.min(Math.max(n,e),t),Ryt={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Oi="[-+]?\\d*\\.?\\d+",h5=Oi+"%";function Kw(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Wyt=new RegExp("rgb"+Kw(Oi,Oi,Oi)),Tyt=new RegExp("rgba"+Kw(Oi,Oi,Oi,Oi)),Eyt=new RegExp("hsl"+Kw(Oi,h5,h5)),Byt=new RegExp("hsla"+Kw(Oi,h5,h5,Oi)),Nyt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Lyt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jyt=/^#([0-9a-fA-F]{6})$/,Pyt=/^#([0-9a-fA-F]{8})$/;function Iyt(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=jyt.exec(e))?parseInt(t[1]+"ff",16)>>>0:wu&&wu[e]!==void 0?wu[e]:(t=Wyt.exec(e))?(Hf(t[1])<<24|Hf(t[2])<<16|Hf(t[3])<<8|255)>>>0:(t=Tyt.exec(e))?(Hf(t[1])<<24|Hf(t[2])<<16|Hf(t[3])<<8|yK(t[4]))>>>0:(t=Nyt.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Pyt.exec(e))?parseInt(t[1],16)>>>0:(t=Lyt.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Eyt.exec(e))?(OK(AK(t[1]),TA(t[2]),TA(t[3]))|255)>>>0:(t=Byt.exec(e))?(OK(AK(t[1]),TA(t[2]),TA(t[3]))|yK(t[4]))>>>0:null}function MS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function OK(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,s=MS(r,o,e+1/3),i=MS(r,o,e),c=MS(r,o,e-1/3);return Math.round(s*255)<<24|Math.round(i*255)<<16|Math.round(c*255)<<8}function Hf(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function AK(e){return(parseFloat(e)%360+360)%360/360}function yK(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function TA(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function vK(e){let t=Iyt(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,o=(t&16711680)>>>16,r=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${o}, ${r}, ${s})`}var pz=(e,t,n)=>{if(Ge.fun(e))return e;if(Ge.arr(e))return pz({range:e,output:t,extrapolate:n});if(Ge.str(e.output[0]))return Qj(e);const o=e,r=o.output,s=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",c=o.extrapolateRight||o.extrapolate||"extend",l=o.easing||(u=>u);return u=>{const d=Fyt(u,s);return Dyt(u,s[d],s[d+1],r[d],r[d+1],l,i,c,o.map)}};function Dyt(e,t,n,o,r,s,i,c,l){let u=l?l(e):e;if(un){if(c==="identity")return u;c==="clamp"&&(u=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=s(u),o===-1/0?u=-u:r===1/0?u=u+o:u=u*(r-o)+o,u)}function Fyt(e,t){for(var n=1;n=e);++n);return n-1}var $yt=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const o=n*e,r=t==="end"?Math.floor(o):Math.ceil(o);return Cyt(0,1,r/e)},m5=1.70158,EA=m5*1.525,xK=m5+1,_K=2*Math.PI/3,wK=2*Math.PI/4.5,BA=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Vyt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>xK*e*e*e-m5*e*e,easeOutBack:e=>1+xK*Math.pow(e-1,3)+m5*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((EA+1)*2*e-EA)/2:(Math.pow(2*e-2,2)*((EA+1)*(e*2-2)+EA)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*_K),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*_K)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*wK))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*wK)/2+1,easeInBounce:e=>1-BA(1-e),easeOutBounce:BA,easeInOutBounce:e=>e<.5?(1-BA(1-2*e))/2:(1+BA(2*e-1))/2,steps:$yt},fz=Symbol.for("FluidValue.get"),G2=Symbol.for("FluidValue.observers"),Cs=e=>!!(e&&e[fz]),yr=e=>e&&e[fz]?e[fz]():e,kK=e=>e[G2]||null;function Hyt(e,t){e.eventObserved?e.eventObserved(t):e(t)}function bz(e,t){const n=e[G2];n&&n.forEach(o=>{Hyt(o,t)})}var Lbe=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Uyt(this,e)}},Uyt=(e,t)=>jbe(e,fz,t);function oO(e,t){if(e[fz]){let n=e[G2];n||jbe(e,G2,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hz(e,t){const n=e[G2];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[G2]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var jbe=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),f4=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Xyt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,qK=new RegExp(`(${f4.source})(%|[a-z]+)`,"i"),Gyt=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Yw=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Pbe=e=>{const[t,n]=Kyt(e);if(!t||Zj())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){const r=window.getComputedStyle(document.documentElement).getPropertyValue(n);return r||e}else{if(n&&Yw.test(n))return Pbe(n);if(n)return n}return e},Kyt=e=>{const t=Yw.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]},gS,Yyt=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Ibe=e=>{gS||(gS=wu?new RegExp(`(${Object.keys(wu).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>yr(s).replace(Yw,Pbe).replace(Xyt,vK).replace(gS,vK)),n=t.map(s=>s.match(f4).map(Number)),r=n[0].map((s,i)=>n.map(c=>{if(!(i in c))throw Error('The arity of each "output" value must be equal');return c[i]})).map(s=>pz({...e,output:s}));return s=>{const i=!qK.test(t[0])&&t.find(l=>qK.test(l))?.replace(f4,"");let c=0;return t[0].replace(f4,()=>`${r[c++](s)}${i||""}`).replace(Gyt,Yyt)}},Dbe="react-spring: ",Fbe=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Dbe}once requires a function parameter`);return(...o)=>{n||(t(...o),n=!0)}},Zyt=Fbe(console.warn);function Qyt(){Zyt(`${Dbe}The "interpolate" function is deprecated in v9 (use "to" instead)`)}Fbe(console.warn);function Zw(e){return Ge.str(e)&&(e[0]=="#"||/\d/.test(e)||!Zj()&&Yw.test(e)||e in(wu||{}))}var $be=Zj()?O.useEffect:O.useLayoutEffect,Jyt=()=>{const e=O.useRef(!1);return $be(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function e4t(){const e=O.useState()[1],t=Jyt();return()=>{t.current&&e(Math.random())}}function t4t(e,t){const[n]=O.useState(()=>({inputs:t,result:e()})),o=O.useRef(),r=o.current;let s=r;return s?t&&s.inputs&&n4t(t,s.inputs)||(s={inputs:t,result:e()}):s=n,O.useEffect(()=>{o.current=s,r==n&&(n.inputs=n.result=void 0)},[s]),s.result}function n4t(e,t){if(e.length!==t.length)return!1;for(let n=0;nO.useEffect(e,r4t),r4t=[],mz=Symbol.for("Animated:node"),s4t=e=>!!e&&e[mz]===e,fa=e=>e&&e[mz],eP=(e,t)=>wyt(e,mz,t),Qw=e=>e&&e[mz]&&e[mz].getPayload(),Vbe=class{constructor(){eP(this,this)}getPayload(){return this.payload||[]}},rO=class extends Vbe{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ge.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new rO(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ge.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ge.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Mz=class extends rO{constructor(e){super(0),this._string=null,this._toString=pz({output:[e,e]})}static create(e){return new Mz(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ge.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=pz({output:[this.getValue(),e]})),this._value=0,super.reset()}},M5={dependencies:null},Jw=class extends Vbe{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return il(this.source,(n,o)=>{s4t(n)?t[o]=n.getValue(e):Cs(n)?t[o]=yr(n):e||(t[o]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Hn(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return il(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){M5.dependencies&&Cs(e)&&M5.dependencies.add(e);const t=Qw(e);t&&Hn(t,n=>this.add(n))}},Hbe=class extends Jw{constructor(e){super(e)}static create(e){return new Hbe(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,o)=>n.setValue(e[o])).some(Boolean):(super.setValue(e.map(i4t)),!0)}};function i4t(e){return(Zw(e)?Mz:rO).create(e)}function eT(e){const t=fa(e);return t?t.constructor:Ge.arr(e)?Hbe:Zw(e)?Mz:rO}var SK=(e,t)=>{const n=!Ge.fun(e)||e.prototype&&e.prototype.isReactComponent;return O.forwardRef((o,r)=>{const s=O.useRef(null),i=n&&O.useCallback(h=>{s.current=l4t(r,h)},[r]),[c,l]=c4t(o,t),u=e4t(),d=()=>{const h=s.current;if(n&&!h)return;(h?t.applyAnimatedValues(h,c.getValue(!0)):!1)===!1&&u()},p=new a4t(d,l),f=O.useRef();$be(()=>(f.current=p,Hn(l,h=>oO(h,p)),()=>{f.current&&(Hn(f.current.deps,h=>hz(h,f.current)),e0.cancel(f.current.update))})),O.useEffect(d,[]),o4t(()=>()=>{const h=f.current;Hn(h.deps,M=>hz(M,h))});const b=t.getComponentProps(c.getValue());return O.createElement(e,{...b,ref:i})})},a4t=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&e0.write(this.update)}};function c4t(e,t){const n=new Set;return M5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Jw(e),M5.dependencies=null,[e,n]}function l4t(e,t){return e&&(Ge.fun(e)?e(t):e.current=t),t}var CK=Symbol.for("AnimatedComponent"),u4t=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=r=>new Jw(r),getComponentProps:o=r=>r}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},s=i=>{const c=RK(i)||"Anonymous";return Ge.str(i)?i=s[i]||(s[i]=SK(i,r)):i=i[CK]||(i[CK]=SK(i,r)),i.displayName=`Animated(${c})`,i};return il(e,(i,c)=>{Ge.arr(e)&&(c=RK(i)),s[c]=s(i)}),{animated:s}},RK=e=>Ge.str(e)?e:e&&Ge.str(e.displayName)?e.displayName:Ge.fun(e)&&e.name||null;function Xd(e,...t){return Ge.fun(e)?e(...t):e}var KM=(e,t)=>e===!0||!!(t&&e&&(Ge.fun(e)?e(t):Is(e).includes(t))),Ube=(e,t)=>Ge.obj(e)?t&&e[t]:e,Xbe=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,d4t=e=>e,Gbe=(e,t=d4t)=>{let n=p4t;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const s=t(e[r],r);Ge.und(s)||(o[r]=s)}return o},p4t=["config","onProps","onStart","onChange","onPause","onResume","onRest"],f4t={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function b4t(e){const t={};let n=0;if(il(e,(o,r)=>{f4t[r]||(t[r]=o,n++)}),n)return t}function Kbe(e){const t=b4t(e);if(t){const n={to:t};return il(e,(o,r)=>r in t||(n[r]=o)),n}return{...e}}function gz(e){return e=yr(e),Ge.arr(e)?e.map(gz):Zw(e)?Ii.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function tT(e){return Ge.fun(e)||Ge.arr(e)&&Ge.obj(e[0])}var h4t={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},nT={...h4t.default,mass:1,damping:1,easing:Vyt.linear,clamp:!1},m4t=class{constructor(){this.velocity=0,Object.assign(this,nT)}};function M4t(e,t,n){n&&(n={...n},WK(n,t),t={...n,...t}),WK(e,t),Object.assign(e,t);for(const i in nT)e[i]==null&&(e[i]=nT[i]);let{frequency:o,damping:r}=e;const{mass:s}=e;return Ge.und(o)||(o<.01&&(o=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/o,2)*s,e.friction=4*Math.PI*r*s/o),e}function WK(e,t){if(!Ge.und(t.decay))e.duration=void 0;else{const n=!Ge.und(t.tension)||!Ge.und(t.friction);(n||!Ge.und(t.frequency)||!Ge.und(t.damping)||!Ge.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var TK=[],g4t=class{constructor(){this.changed=!1,this.values=TK,this.toValues=null,this.fromValues=TK,this.config=new m4t,this.immediate=!1}};function Ybe(e,{key:t,props:n,defaultProps:o,state:r,actions:s}){return new Promise((i,c)=>{let l,u,d=KM(n.cancel??o?.cancel,t);if(d)b();else{Ge.und(n.pause)||(r.paused=KM(n.pause,t));let h=o?.pause;h!==!0&&(h=r.paused||KM(h,t)),l=Xd(n.delay||0,t),h?(r.resumeQueue.add(f),s.pause()):(s.resume(),f())}function p(){r.resumeQueue.add(f),r.timeouts.delete(u),u.cancel(),l=u.time-e0.now()}function f(){l>0&&!Ii.skipAnimation?(r.delayed=!0,u=e0.setTimeout(b,l),r.pauseQueue.add(p),r.timeouts.add(u)):b()}function b(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{s.start({...n,callId:e,cancel:d},i)}catch(h){c(h)}}})}var tP=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?r2(e.get()):t.every(n=>n.noop)?Zbe(e.get()):mi(e.get(),t.every(n=>n.finished)),Zbe=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),mi=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),r2=e=>({value:e,cancelled:!0,finished:!1});function Qbe(e,t,n,o){const{callId:r,parentId:s,onRest:i}=t,{asyncTo:c,promise:l}=n;return!s&&e===c&&!t.reset?l:n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const u=Gbe(t,(z,y)=>y==="onRest"?void 0:z);let d,p;const f=new Promise((z,y)=>(d=z,p=y)),b=z=>{const y=r<=(n.cancelId||0)&&r2(o)||r!==n.asyncId&&mi(o,!1);if(y)throw z.result=y,p(z),z},h=(z,y)=>{const x=new EK,v=new BK;return(async()=>{if(Ii.skipAnimation)throw zz(n),v.result=mi(o,!1),p(v),v;b(x);const g=Ge.obj(z)?{...z}:{...y,to:z};g.parentId=r,il(u,(_,w)=>{Ge.und(g[w])&&(g[w]=_)});const A=await o.start(g);return b(x),n.paused&&await new Promise(_=>{n.resumeQueue.add(_)}),A})()};let M;if(Ii.skipAnimation)return zz(n),mi(o,!1);try{let z;Ge.arr(e)?z=(async y=>{for(const x of y)await h(x)})(e):z=Promise.resolve(e(h,o.stop.bind(o))),await Promise.all([z.then(d),f]),M=mi(o.get(),!0,!1)}catch(z){if(z instanceof EK)M=z.result;else if(z instanceof BK)M=z.result;else throw z}finally{r==n.asyncId&&(n.asyncId=s,n.asyncTo=s?c:void 0,n.promise=s?l:void 0)}return Ge.fun(i)&&e0.batchedUpdates(()=>{i(M,o,o.item)}),M})()}function zz(e,t){XM(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var EK=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},BK=class extends Error{constructor(){super("SkipAnimationSignal")}},oT=e=>e instanceof nP,z4t=1,nP=class extends Lbe{constructor(){super(...arguments),this.id=z4t++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=fa(this);return e&&e.getValue()}to(...e){return Ii.to(this,e)}interpolate(...e){return Qyt(),Ii.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){bz(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Gw.sort(this),bz(this,{type:"priority",parent:this,priority:e})}},Kp=Symbol.for("SpringPhase"),Jbe=1,rT=2,sT=4,zS=e=>(e[Kp]&Jbe)>0,Nl=e=>(e[Kp]&rT)>0,jm=e=>(e[Kp]&sT)>0,NK=(e,t)=>t?e[Kp]|=rT|Jbe:e[Kp]&=~rT,LK=(e,t)=>t?e[Kp]|=sT:e[Kp]&=~sT,O4t=class extends nP{constructor(e,t){if(super(),this.animation=new g4t,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ge.und(e)||!Ge.und(t)){const n=Ge.obj(e)?{...e}:{...t,from:e};Ge.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Nl(this)||this._state.asyncTo)||jm(this)}get goal(){return yr(this.animation.to)}get velocity(){const e=fa(this);return e instanceof rO?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return zS(this)}get isAnimating(){return Nl(this)}get isPaused(){return jm(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{toValues:r}=o;const{config:s}=o,i=Qw(o.to);!i&&Cs(o.to)&&(r=Is(yr(o.to))),o.values.forEach((u,d)=>{if(u.done)return;const p=u.constructor==Mz?1:i?i[d].lastPosition:r[d];let f=o.immediate,b=p;if(!f){if(b=u.lastPosition,s.tension<=0){u.done=!0;return}let h=u.elapsedTime+=e;const M=o.fromValues[d],z=u.v0!=null?u.v0:u.v0=Ge.arr(s.velocity)?s.velocity[d]:s.velocity;let y;const x=s.precision||(M==p?.005:Math.min(1,Math.abs(p-M)*.001));if(Ge.und(s.duration))if(s.decay){const v=s.decay===!0?.998:s.decay,g=Math.exp(-(1-v)*h);b=M+z/(1-v)*(1-g),f=Math.abs(u.lastPosition-b)<=x,y=z*g}else{y=u.lastVelocity==null?z:u.lastVelocity;const v=s.restVelocity||x/10,g=s.clamp?0:s.bounce,A=!Ge.und(g),_=M==p?u.v0>0:Mv,!(!w&&(f=Math.abs(p-b)<=x,f)));++C){A&&(k=b==p||b>p==_,k&&(y=-y*g,b=p));const T=-s.tension*1e-6*(b-p),W=-s.friction*.001*y,B=(T+W)/s.mass;y=y+B*q,b=b+y*q}}else{let v=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,u.durationProgress>0&&(u.elapsedTime=s.duration*u.durationProgress,h=u.elapsedTime+=e)),v=(s.progress||0)+h/this._memoizedDuration,v=v>1?1:v<0?0:v,u.durationProgress=v),b=M+s.easing(v)*(p-M),y=(b-u.lastPosition)/e,f=v==1}u.lastVelocity=y,Number.isNaN(b)&&(console.warn("Got NaN while animating:",this),f=!0)}i&&!i[d].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(b,s.round)&&(n=!0)});const c=fa(this),l=c.getValue();if(t){const u=yr(o.to);(l!==u||n)&&!s.decay?(c.setValue(u),this._onChange(u)):n&&s.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return e0.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Nl(this)){const{to:e,config:t}=this.animation;e0.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Ge.und(e)?(n=this.queue||[],this.queue=[]):n=[Ge.obj(e)?e:{...t,to:e}],Promise.all(n.map(o=>this._update(o))).then(o=>tP(this,o))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),zz(this._state,e&&this._lastCallId),e0.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Ge.obj(n)?n[t]:n,(n==null||tT(n))&&(n=void 0),o=Ge.obj(o)?o[t]:o,o==null&&(o=void 0);const r={to:n,from:o};return zS(this)||(e.reverse&&([n,o]=[o,n]),o=yr(o),Ge.und(o)?fa(this)||this._set(n):this._set(o)),r}_update({...e},t){const{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Gbe(e,(i,c)=>/^on/.test(c)?Ube(i,n):i)),PK(this,e,"onProps"),Im(this,"onProps",e,this);const r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Ybe(++this._lastCallId,{key:n,props:e,defaultProps:o,state:s,actions:{pause:()=>{jm(this)||(LK(this,!0),bM(s.pauseQueue),Im(this,"onPause",mi(this,Pm(this,this.animation.to)),this))},resume:()=>{jm(this)&&(LK(this,!1),Nl(this)&&this._resume(),bM(s.resumeQueue),Im(this,"onResume",mi(this,Pm(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then(i=>{if(e.loop&&i.finished&&!(t&&i.noop)){const c=e2e(e);if(c)return this._update(c,!0)}return i})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(r2(this));const o=!Ge.und(e.to),r=!Ge.und(e.from);if(o||r)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(r2(this));const{key:s,defaultProps:i,animation:c}=this,{to:l,from:u}=c;let{to:d=l,from:p=u}=e;r&&!o&&(!t.default||Ge.und(d))&&(d=p),t.reverse&&([d,p]=[p,d]);const f=!gc(p,u);f&&(c.from=p),p=yr(p);const b=!gc(d,l);b&&this._focus(d);const h=tT(t.to),{config:M}=c,{decay:z,velocity:y}=M;(o||r)&&(M.velocity=0),t.config&&!h&&M4t(M,Xd(t.config,s),t.config!==i.config?Xd(i.config,s):void 0);let x=fa(this);if(!x||Ge.und(d))return n(mi(this,!0));const v=Ge.und(t.reset)?r&&!t.default:!Ge.und(p)&&KM(t.reset,s),g=v?p:this.get(),A=gz(d),_=Ge.num(A)||Ge.arr(A)||Zw(A),w=!h&&(!_||KM(i.immediate||t.immediate,s));if(b){const C=eT(d);if(C!==x.constructor)if(w)x=this._set(A);else throw Error(`Cannot animate between ${x.constructor.name} and ${C.name}, as the "to" prop suggests`)}const k=x.constructor;let q=Cs(d),S=!1;if(!q){const C=v||!zS(this)&&f;(b||C)&&(S=gc(gz(g),A),q=!S),(!gc(c.immediate,w)&&!w||!gc(M.decay,z)||!gc(M.velocity,y))&&(q=!0)}if(S&&Nl(this)&&(c.changed&&!v?q=!0:q||this._stop(l)),!h&&((q||Cs(l))&&(c.values=x.getPayload(),c.toValues=Cs(d)?null:k==Mz?[1]:Is(A)),c.immediate!=w&&(c.immediate=w,!w&&!v&&this._set(l)),q)){const{onRest:C}=c;Hn(A4t,W=>PK(this,t,W));const T=mi(this,Pm(this,l));bM(this._pendingCalls,T),this._pendingCalls.add(n),c.changed&&e0.batchedUpdates(()=>{c.changed=!v,C?.(T,this),v?Xd(i.onRest,T):c.onStart?.(T,this)})}v&&this._set(g),h?n(Qbe(t.to,t,this._state,this)):q?this._start():Nl(this)&&!b?this._pendingCalls.add(n):n(Zbe(g))}_focus(e){const t=this.animation;e!==t.to&&(kK(this)&&this._detach(),t.to=e,kK(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Cs(t)&&(oO(t,this),oT(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Cs(e)&&hz(e,this)}_set(e,t=!0){const n=yr(e);if(!Ge.und(n)){const o=fa(this);if(!o||!gc(n,o.getValue())){const r=eT(n);!o||o.constructor!=r?eP(this,r.create(n)):o.setValue(n),o&&e0.batchedUpdates(()=>{this._onChange(n,t)})}}return fa(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Im(this,"onStart",mi(this,Pm(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Xd(this.animation.onChange,e,this)),Xd(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;fa(this).reset(yr(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Nl(this)||(NK(this,!0),jm(this)||this._resume())}_resume(){Ii.skipAnimation?this.finish():Gw.start(this)}_stop(e,t){if(Nl(this)){NK(this,!1);const n=this.animation;Hn(n.values,r=>{r.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),bz(this,{type:"idle",parent:this});const o=t?r2(this.get()):mi(this.get(),Pm(this,e??n.to));bM(this._pendingCalls,o),n.changed&&(n.changed=!1,Im(this,"onRest",o,this))}}};function Pm(e,t){const n=gz(t),o=gz(e.get());return gc(o,n)}function e2e(e,t=e.loop,n=e.to){const o=Xd(t);if(o){const r=o!==!0&&Kbe(o),s=(r||e).reverse,i=!r||r.reset;return iT({...e,loop:t,default:!1,pause:void 0,to:!s||tT(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function iT(e){const{to:t,from:n}=e=Kbe(e),o=new Set;return Ge.obj(t)&&jK(t,o),Ge.obj(n)&&jK(n,o),e.keys=o.size?Array.from(o):null,e}function jK(e,t){il(e,(n,o)=>n!=null&&t.add(o))}var A4t=["onStart","onRest","onChange","onPause","onResume"];function PK(e,t,n){e.animation[n]=t[n]!==Xbe(t,n)?Ube(t[n],e.key):void 0}function Im(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var y4t=["onStart","onChange","onRest"],v4t=1,x4t=class{constructor(e,t){this.id=v4t++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];Ge.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(iT(e)),this}start(e){let{queue:t}=this;return e?t=Is(e).map(iT):this.queue=[],this._flush?this._flush(this,t):(n2e(this,t),_4t(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Hn(Is(t),o=>n[o].stop(!!e))}else zz(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(Ge.und(e))this.start({pause:!0});else{const t=this.springs;Hn(Is(e),n=>t[n].pause())}return this}resume(e){if(Ge.und(e))this.start({pause:!1});else{const t=this.springs;Hn(Is(e),n=>t[n].resume())}return this}each(e){il(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,XM(e,([c,l])=>{l.value=this.get(),c(l,this,this._item)}));const s=!o&&this._started,i=r||s&&n.size?this.get():null;r&&t.size&&XM(t,([c,l])=>{l.value=i,c(l,this,this._item)}),s&&(this._started=!1,XM(n,([c,l])=>{l.value=i,c(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;e0.onFrame(this._onFrame)}};function _4t(e,t){return Promise.all(t.map(n=>t2e(e,n))).then(n=>tP(e,n))}async function t2e(e,t,n){const{keys:o,to:r,from:s,loop:i,onRest:c,onResolve:l}=t,u=Ge.obj(t.default)&&t.default;i&&(t.loop=!1),r===!1&&(t.to=null),s===!1&&(t.from=null);const d=Ge.arr(r)||Ge.fun(r)?r:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Hn(y4t,M=>{const z=t[M];if(Ge.fun(z)){const y=e._events[M];t[M]=({finished:x,cancelled:v})=>{const g=y.get(z);g?(x||(g.finished=!1),v&&(g.cancelled=!0)):y.set(z,{value:null,finished:x||!1,cancelled:v||!1})},u&&(u[M]=t[M])}});const p=e._state;t.pause===!p.paused?(p.paused=t.pause,bM(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const f=(o||Object.keys(e.springs)).map(M=>e.springs[M].start(t)),b=t.cancel===!0||Xbe(t,"cancel")===!0;(d||b&&p.asyncId)&&f.push(Ybe(++e._lastAsyncId,{props:t,state:p,actions:{pause:QW,resume:QW,start(M,z){b?(zz(p,e._lastAsyncId),z(r2(e))):(M.onRest=c,z(Qbe(d,M,p,e)))}}})),p.paused&&await new Promise(M=>{p.resumeQueue.add(M)});const h=tP(e,await Promise.all(f));if(i&&h.finished&&!(n&&h.noop)){const M=e2e(t,i,r);if(M)return n2e(e,[M]),t2e(e,M,!0)}return l&&e0.batchedUpdates(()=>l(h,e,e.item)),h}function w4t(e,t){const n=new O4t;return n.key=e,t&&oO(n,t),n}function k4t(e,t,n){t.keys&&Hn(t.keys,o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)})}function n2e(e,t){Hn(t,n=>{k4t(e.springs,n,o=>w4t(o,e))})}var oP=({children:e,...t})=>{const n=O.useContext(g5),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=t4t(()=>({pause:o,immediate:r}),[o,r]);const{Provider:s}=g5;return O.createElement(s,{value:t},e)},g5=q4t(oP,{});oP.Provider=g5.Provider;oP.Consumer=g5.Consumer;function q4t(e,t){return Object.assign(e,O.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var S4t=class extends nP{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=pz(...t);const n=this._get(),o=eT(n);eP(this,o.create(n))}advance(e){const t=this._get(),n=this.get();gc(t,n)||(fa(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&IK(this._active)&&OS(this)}_get(){const e=Ge.arr(this.source)?this.source.map(yr):Is(yr(this.source));return this.calc(...e)}_start(){this.idle&&!IK(this._active)&&(this.idle=!1,Hn(Qw(this),e=>{e.done=!1}),Ii.skipAnimation?(e0.batchedUpdates(()=>this.advance()),OS(this)):Gw.start(this))}_attach(){let e=1;Hn(Is(this.source),t=>{Cs(t)&&oO(t,this),oT(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Hn(Is(this.source),e=>{Cs(e)&&hz(e,this)}),this._active.clear(),OS(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Is(this.source).reduce((t,n)=>Math.max(t,(oT(n)?n.priority:0)+1),0))}};function C4t(e){return e.idle!==!1}function IK(e){return!e.size||Array.from(e).every(C4t)}function OS(e){e.idle||(e.idle=!0,Hn(Qw(e),t=>{t.done=!0}),bz(e,{type:"idle",parent:e}))}Ii.assign({createStringInterpolator:Ibe,to:(e,t)=>new S4t(e,t)});var o2e=/^--/;function R4t(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!o2e.test(e)&&!(YM.hasOwnProperty(e)&&YM[e])?t+"px":(""+t).trim()}var DK={};function W4t(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:o,children:r,scrollTop:s,scrollLeft:i,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(p=>n||e.hasAttribute(p)?p:DK[p]||(DK[p]=p.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));r!==void 0&&(e.textContent=r);for(const p in o)if(o.hasOwnProperty(p)){const f=R4t(p,o[p]);o2e.test(p)?e.style.setProperty(p,f):e.style[p]=f}d.forEach((p,f)=>{e.setAttribute(p,u[f])}),s!==void 0&&(e.scrollTop=s),i!==void 0&&(e.scrollLeft=i),c!==void 0&&e.setAttribute("viewBox",c)}var YM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},T4t=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),E4t=["Webkit","Ms","Moz","O"];YM=Object.keys(YM).reduce((e,t)=>(E4t.forEach(n=>e[T4t(n,t)]=e[t]),e),YM);var B4t=/^(matrix|translate|scale|rotate|skew)/,N4t=/^(translate)/,L4t=/^(rotate|skew)/,AS=(e,t)=>Ge.num(e)&&e!==0?e+t:e,b4=(e,t)=>Ge.arr(e)?e.every(n=>b4(n,t)):Ge.num(e)?e===t:parseFloat(e)===t,j4t=class extends Jw{constructor({x:e,y:t,z:n,...o}){const r=[],s=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),s.push(i=>[`translate3d(${i.map(c=>AS(c,"px")).join(",")})`,b4(i,0)])),il(o,(i,c)=>{if(c==="transform")r.push([i||""]),s.push(l=>[l,l===""]);else if(B4t.test(c)){if(delete o[c],Ge.und(i))return;const l=N4t.test(c)?"px":L4t.test(c)?"deg":"";r.push(Is(i)),s.push(c==="rotate3d"?([u,d,p,f])=>[`rotate3d(${u},${d},${p},${AS(f,l)})`,b4(f,0)]:u=>[`${c}(${u.map(d=>AS(d,l)).join(",")})`,b4(u,c.startsWith("scale")?1:0)])}}),r.length&&(o.transform=new P4t(r,s)),super(o)}},P4t=class extends Lbe{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Hn(this.inputs,(n,o)=>{const r=yr(n[0]),[s,i]=this.transforms[o](Ge.arr(r)?r:n.map(yr));e+=" "+s,t=t&&i}),t?"none":e}observerAdded(e){e==1&&Hn(this.inputs,t=>Hn(t,n=>Cs(n)&&oO(n,this)))}observerRemoved(e){e==0&&Hn(this.inputs,t=>Hn(t,n=>Cs(n)&&hz(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bz(this,e)}},I4t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Ii.assign({batchedUpdates:Jo.unstable_batchedUpdates,createStringInterpolator:Ibe,colors:Ryt});var D4t=u4t(I4t,{applyAnimatedValues:W4t,createAnimatedStyle:e=>new j4t(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),F4t=D4t.animated;const $4t=200;function FK(e){return{top:e.offsetTop,left:e.offsetLeft}}function r2e({triggerAnimationOnChange:e,clientId:t}){const n=O.useRef(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:s,isFirstMultiSelectedBlock:i,isBlockMultiSelected:c,isAncestorMultiSelected:l}=D(F),{previous:u,prevRect:d}=O.useMemo(()=>({previous:n.current&&FK(n.current),prevRect:n.current&&n.current.getBoundingClientRect()}),[e]);return O.useLayoutEffect(()=>{if(!u||!n.current)return;const p=Cr(n.current),f=s(t),b=f||i(t);function h(){if(b&&d){const w=n.current.getBoundingClientRect().top-d.top;w&&(p.scrollTop+=w)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>$4t){h();return}const y=f||c(t)||l(t)?"1":"",x=new x4t({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:_}){if(!n.current)return;let{x:w,y:k}=_;w=Math.round(w),k=Math.round(k);const q=w===0&&k===0;n.current.style.transformOrigin="center center",n.current.style.transform=q?null:`translate3d(${w}px,${k}px,0)`,n.current.style.zIndex=y,h()}});n.current.style.transform=void 0;const v=FK(n.current),g=Math.round(u.left-v.left),A=Math.round(u.top-v.top);return x.start({x:0,y:0,from:{x:g,y:A}}),()=>{x.stop(),x.set({x:0,y:0})}},[u,d,t,o,r,s,i,c,l]),n}const z5=".block-editor-block-list__block",V4t=".block-list-appender",H4t=".block-editor-button-block-appender";function s2e(e,t){return e.closest(z5)===t.closest(z5)}function ZM(e,t){return t.closest([z5,V4t,H4t].join(","))===e}function QM(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const n=e.closest(z5);if(n)return n.id.slice(6)}function i2e(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),s=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,s,o-n,r-s)}function U4t(e){const t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(n.width===0||n.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return!(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")}function h4(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=[e];let r;for(;r=o.pop();)for(const c of r.children)if(U4t(c)){const l=c.getBoundingClientRect();n=i2e(n,l),o.push(c)}const s=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(s,n.top,i-s,n.height),n}function X4t({clientId:e,initialPosition:t}){const n=O.useRef(),{isBlockSelected:o,isMultiSelecting:r,__unstableGetEditorMode:s}=D(F);return O.useEffect(()=>{if(!o(e)||r()||s()==="zoom-out"||t==null||!n.current)return;const{ownerDocument:i}=n.current;if(ZM(n.current,i.activeElement))return;const c=Ln.tabbable.find(n.current).filter(d=>Wu(d)),l=t===-1,u=c[l?c.length-1:0]||n.current;if(!ZM(n.current,u)){i.defaultView.getSelection().removeAllRanges(),n.current.focus();return}if(!n.current.getAttribute("contenteditable")){const d=Ln.tabbable.findNext(n.current);if(d&&ZM(n.current,d)&&nne(d)){d.focus();return}}cne(u,l)},[t,e]),n}function G4t({clientId:e}){const{hoverBlock:t}=ae(F);function n(o){if(o.defaultPrevented)return;const r=o.type==="mouseover"?"add":"remove";o.preventDefault(),o.currentTarget.classList[r]("is-hovered"),t(r==="add"?e:null)}return Et(o=>(o.addEventListener("mouseout",n),o.addEventListener("mouseover",n),()=>{o.removeEventListener("mouseout",n),o.removeEventListener("mouseover",n),o.classList.remove("is-hovered"),t(null)}),[])}function K4t(e){const{isBlockSelected:t}=D(F),{selectBlock:n,selectionChange:o}=ae(F);return Et(r=>{function s(i){if(!r.parentElement.closest('[contenteditable="true"]')){if(t(e)){i.target.isContentEditable||o(e);return}ZM(r,i.target)&&n(e)}}return r.addEventListener("focusin",s),()=>{r.removeEventListener("focusin",s)}},[t,n])}function Y4t({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o}=D(F),{insertAfterBlock:r,removeBlock:s}=ae(F);return Et(i=>{if(!t)return;function c(u){const{keyCode:d,target:p}=u;d!==y1&&d!==Si&&d!==_a||p!==i||Wu(p)||(u.preventDefault(),d===y1?r(e):s(e))}function l(u){u.preventDefault()}return i.addEventListener("keydown",c),i.addEventListener("dragstart",l),()=>{i.removeEventListener("keydown",c),i.removeEventListener("dragstart",l)}},[e,t,n,o,r,s])}function Z4t(e){const{isNavigationMode:t,isBlockSelected:n}=D(F),{setNavigationMode:o,selectBlock:r}=ae(F);return Et(s=>{function i(c){t()&&!c.defaultPrevented&&(c.preventDefault(),n(e)?o(!1):r(e))}return s.addEventListener("mousedown",i),()=>{s.removeEventListener("mousedown",i)}},[e,t,n,o])}function Q4t({editorMode:e}){const{__unstableSetEditorMode:t}=Fe(ae(F));return Et(n=>{if(e!=="zoom-out")return;function o(r){r.defaultPrevented||(r.preventDefault(),t("edit"))}return n.addEventListener("dblclick",o),()=>{n.removeEventListener("dblclick",o)}},[e,t])}function J4t(){const e=O.useContext(Rhe);return Et(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}function evt({isSelected:e}){const t=Zs();return Et(n=>{if(e){const{ownerDocument:o}=n,{defaultView:r}=o;if(!r.IntersectionObserver)return;const s=new r.IntersectionObserver(i=>{i[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),s.disconnect()});return s.observe(n),()=>{s.disconnect()}}},[e])}function a2e({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=Fe(D(F));return Et(o=>{if(!t)return;const r=()=>{n(e).forEach(({clientId:i})=>{const c=o.querySelector(`[data-block="${i}"]`);c&&(c.classList.remove("has-editable-outline"),c.offsetWidth,c.classList.add("has-editable-outline"))})},s=i=>{(i.target===o||i.target.classList.contains("is-root-container"))&&(i.defaultPrevented||(i.preventDefault(),r()))};return o.addEventListener("click",s),()=>o.removeEventListener("click",s)},[t])}function rP(e){if(e.includes(" "))return!1;const n=zx(e),o=pB(n),r=tvt(e),s=e?.startsWith("www."),i=e?.startsWith("#")&&GR(e);return o||s||i||r}function tvt(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}const ek={"core/paragraph":["content"],"core/heading":["content"],"core/image":["id","url","title","alt"],"core/button":["url","text","linkTarget","rel"]},c2e="__default";function nvt(e,t){if(t?.[c2e]?.source==="core/pattern-overrides"){const n=ek[e],o={};for(const r of n){const s=t[r]?t[r]:{source:"core/pattern-overrides"};o[r]=s}return o}return t}function tk(e){return e in ek}function aT(e,t){return tk(e)&&ek[e].includes(t)}function ovt(e){return ek[e]}const rvt=Cn(e=>t=>{const n=h0(),o=O.useContext(Up),r=D(b=>Fe(b($e)).getAllBlockBindingsSources()),{name:s,clientId:i}=t,c=!!t.context["pattern/overrides"],l=t.attributes.metadata?.bindings?.[c2e]?.source==="core/pattern-overrides",u=O.useMemo(()=>nvt(s,t.attributes.metadata?.bindings),[t.attributes.metadata?.bindings,s]),d=D(()=>{if(!u)return;const b={},h=new Map;for(const[M,z]of Object.entries(u)){const{source:y,args:x}=z,v=r[y];!v||!aT(s,M)||h.set(v,{...h.get(v),[M]:{args:x}})}if(h.size)for(const[M,z]of h){const y={};if(M.usesContext?.length)for(const v of M.usesContext)y[v]=o[v];let x={};M.getValues?x=M.getValues({registry:n,context:y,clientId:i,bindings:z}):Object.keys(z).forEach(v=>{x[v]=z[v].args?.key||M.label});for(const[v,g]of Object.entries(x))v==="url"&&(!g||!rP(g))?b[v]=null:b[v]=g}return b},[u,s,i,o,n,r]),{setAttributes:p}=t,f=O.useCallback(b=>{n.batch(()=>{if(!u){p(b);return}const h={...b},M=new Map;for(const[z,y]of Object.entries(h)){if(!u[z]||!aT(s,z))continue;const x=u[z],v=r[x?.source];v?.setValues&&(M.set(v,{...M.get(v),[z]:{args:x.args,newValue:y}}),delete h[z])}if(M.size)for(const[z,y]of M){const x={};if(z.usesContext?.length)for(const v of z.usesContext)x[v]=o[v];z.setValues({registry:n,context:x,clientId:i,bindings:y})}!(l&&c)&&Object.keys(h).length&&(l&&(delete h?.caption,delete h?.href),p(h))})},[n,u,s,i,o,p,r,l,c]);return a.jsx(a.Fragment,{children:a.jsx(e,{...t,attributes:{...t.attributes,...d},setAttributes:f})})},"withBlockBindingSupport");function svt(e,t){return tk(t)?{...e,edit:rvt(e.edit)}:e}r0("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",svt);function ze(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:s,index:i,mode:c,name:l,blockApiVersion:u,blockTitle:d,editorMode:p,isSelected:f,isSubtreeDisabled:b,hasOverlay:h,initialPosition:M,blockEditingMode:z,isHighlighted:y,isMultiSelected:x,isPartiallySelected:v,isReusable:g,isDragging:A,hasChildSelected:_,isBlockMovingMode:w,canInsertMovingBlock:k,isEditingDisabled:q,hasEditableOutline:S,isTemporarilyEditingAsBlocks:C,defaultClassName:T,templateLock:W}=O.useContext(lz),B=le(m("Block: %s"),d),N=c==="html"&&!t?"-visual":"",E=Gt([e.ref,X4t({clientId:n,initialPosition:M}),GAt(n),K4t(n),Y4t({clientId:n,isSelected:f}),Z4t(n),Q4t({editorMode:p}),G4t({clientId:n}),J4t(),r2e({triggerAnimationOnChange:i,clientId:n}),wB({isDisabled:!h}),a2e({clientId:n,isEnabled:l==="core/block"||W==="contentOnly"}),evt({isSelected:f})]),L=eo(),P=!!L[WN]&&tk(l)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};u<2&&n===L.clientId&&globalThis.SCRIPT_DEBUG===!0&&Xt(`Block type "${l}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let H=!1;return(r?.style?.marginTop?.charAt(0)==="-"||r?.style?.marginBottom?.charAt(0)==="-"||r?.style?.marginLeft?.charAt(0)==="-"||r?.style?.marginRight?.charAt(0)==="-")&&(H=!0),{tabIndex:z==="disabled"?-1:0,...r,...e,ref:E,id:`block-${n}${N}`,role:"document","aria-label":B,"data-block":n,"data-type":l,"data-title":d,inert:b?"true":void 0,className:$("block-editor-block-list__block",{"wp-block":!s,"has-block-overlay":h,"is-selected":f,"is-highlighted":y,"is-multi-selected":x,"is-partially-selected":v,"is-reusable":g,"is-dragging":A,"has-child-selected":_,"is-block-moving-mode":w,"can-insert-moving-block":k,"is-editing-disabled":q,"has-editable-outline":S,"has-negative-margin":H,"is-content-locked-temporarily-editing-as-blocks":C},o,e.className,r.className,T),style:{...r.style,...e.style,...P}}}ze.save=wv;function ivt(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=$(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}function NA({children:e,isHtml:t,...n}){return a.jsx("div",{...ze(n,{__unstableIsHtml:t}),children:e})}function cT({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:s,isSelectionEnabled:i,className:c,__unstableLayoutClassNames:l,name:u,isValid:d,attributes:p,wrapperProps:f,setAttributes:b,onReplace:h,onInsertBlocksAfter:M,onMerge:z,toggleSelection:y}){var x;const{mayDisplayControls:v,mayDisplayParentControls:g,themeSupportsLayout:A,..._}=O.useContext(lz),{removeBlock:w}=ae(F),k=O.useCallback(()=>w(r),[r,w]),q=Hw()||{};let S=a.jsx(N3t,{name:u,isSelected:s,attributes:p,setAttributes:b,insertBlocksAfter:n?void 0:M,onReplace:o?h:void 0,onRemove:o?k:void 0,mergeBlocks:o?z:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:y,__unstableLayoutClassNames:l,__unstableParentLayout:Object.keys(q).length?q:void 0,mayDisplayControls:v,mayDisplayParentControls:g,blockEditingMode:_.blockEditingMode,isPreviewMode:_.isPreviewMode});const C=Dt(u);C?.getEditWrapperProps&&(f=ivt(f,C.getEditWrapperProps(p)));const T=f&&!!f["data-align"]&&!A,W=c?.includes("is-position-sticky");T&&(S=a.jsx("div",{className:$("wp-block",W&&c),"data-align":f["data-align"],children:S}));let B;if(d)t==="html"?B=a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{display:"none"},children:S}),a.jsx(NA,{isHtml:!0,children:a.jsx(yyt,{clientId:r})})]}):C?.apiVersion>1?B=S:B=a.jsx(NA,{children:S});else{const I=e?Tg(e):hf(C,p);B=a.jsxs(NA,{className:"has-warning",children:[a.jsx(oyt,{clientId:r}),a.jsx(C1,{children:wx(I)})]})}const{"data-align":N,...E}=(x=f)!==null&&x!==void 0?x:{},L={...E,className:$(E.className,N&&A&&`align${N}`,!(N&&W)&&c)};return a.jsx(lz.Provider,{value:{wrapperProps:L,isAligned:T,..._},children:a.jsx(iyt,{fallback:a.jsx(NA,{className:"has-warning",children:a.jsx(syt,{})}),children:B})})}const avt=Fi((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:s,replaceBlocks:i,toggleSelection:c,__unstableMarkLastChangeAsPersistent:l,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(F);return{setAttributes(f){const{getMultiSelectedBlockClientIds:b}=n.select(F),h=b(),{clientId:M}=t,z=h.length?h:[M];o(z,f)},onInsertBlocks(f,b){const{rootClientId:h}=t;r(f,b,h)},onInsertBlocksAfter(f){const{clientId:b,rootClientId:h}=t,{getBlockIndex:M}=n.select(F),z=M(b);r(f,z+1,h)},onMerge(f){const{clientId:b,rootClientId:h}=t,{getPreviousBlockClientId:M,getNextBlockClientId:z,getBlock:y,getBlockAttributes:x,getBlockName:v,getBlockOrder:g,getBlockIndex:A,getBlockRootClientId:_,canInsertBlockType:w}=n.select(F);function k(){const S=y(b),C=Pn();if(v(b)!==C){const T=l1(S,C);T&&T.length&&i(b,T)}else if(Yc(S)){const T=z(b);T&&n.batch(()=>{d(b),p(T)})}}function q(S,C=!0){const T=_(S),W=g(S),[B]=W;W.length===1&&Gb(y(B))?d(S):n.batch(()=>{if(w(v(B),T))u([B],S,T,A(S));else{const N=l1(y(B),Pn());N&&N.length&&N.every(E=>w(E.name,T))?(r(N,A(S),T,C),d(B,!1)):k()}!g(S).length&&Gb(y(S))&&d(S,!1)})}if(f){if(h){const C=z(h);if(C)if(v(h)===v(C)){const T=x(h),W=x(C);if(Object.keys(T).every(B=>T[B]===W[B])){n.batch(()=>{u(g(C),C,h),d(C,!1)});return}}else{s(h,C);return}}const S=z(b);if(!S)return;g(S).length?q(S,!1):s(b,S)}else{const S=M(b);if(S)s(S,b);else if(h){const C=M(h);if(C&&v(h)===v(C)){const T=x(h),W=x(C);if(Object.keys(T).every(B=>T[B]===W[B])){n.batch(()=>{u(g(h),h,C),d(h,!1)});return}}q(h)}else k()}},onReplace(f,b,h){f.length&&!Yc(f[f.length-1])&&l();const M=f?.length===1&&Array.isArray(f[0])?f[0]:f;i([t.clientId],M,b,h)},toggleSelection(f){c(f)}}});cT=v0(avt,gd("editor.BlockListBlock"))(cT);function cvt(e){const{clientId:t,rootClientId:n}=e,o=D(ee=>{const{isBlockSelected:ie,getBlockMode:se,isSelectionEnabled:be,getTemplateLock:ye,getBlockWithoutAttributes:xe,getBlockAttributes:K,canRemoveBlock:pe,canMoveBlock:G,getSettings:re,getTemporarilyEditingAsBlocks:Me,getBlockEditingMode:he,getBlockName:Q,isFirstMultiSelectedBlock:R,getMultiSelectedBlockClientIds:j,hasSelectedInnerBlock:V,getBlocksByName:de,getBlockIndex:ge,isBlockMultiSelected:ve,isBlockSubtreeDisabled:Ne,isBlockHighlighted:et,__unstableIsFullySelected:mt,__unstableSelectionHasUnmergeableBlock:Mt,isBlockBeingDragged:Ke,isDragging:Nt,hasBlockMovingClientId:zt,canInsertBlockType:Ue,__unstableHasActiveBlockOverlayActive:Xe,__unstableGetEditorMode:ot,getSelectedBlocksInitialCaretPosition:Ct}=Fe(ee(F)),n0=xe(t);if(!n0)return;const{hasBlockSupport:o1,getActiveBlockVariation:B1}=ee($e),p1=K(t),{name:Ot,isValid:k0}=n0,f1=Dt(Ot),{supportsLayout:pr,__unstableIsPreviewMode:fr}=re(),si=f1?.apiVersion>1,br={isPreviewMode:fr,blockWithoutAttributes:n0,name:Ot,attributes:p1,isValid:k0,themeSupportsLayout:pr,index:ge(t),isReusable:dd(f1),className:si?p1.className:void 0,defaultClassName:si?_v(Ot):void 0,blockTitle:f1?.title};if(fr)return br;const N1=ie(t),pt=pe(t),We=G(t),rt=B1(Ot,p1),Ft=ve(t),nn=V(t,!0),j0=zt(),r1=he(t),hr=st(Ot,"multiple",!0)?[]:de(Ot),b1=hr.length&&hr[0]!==t,Yi=ot();return{...br,mode:se(t),isSelectionEnabled:be(),isLocked:!!ye(n),templateLock:ye(t),canRemove:pt,canMove:We,isSelected:N1,isTemporarilyEditingAsBlocks:Me()===t,blockEditingMode:r1,mayDisplayControls:N1||R(t)&&j().every(En=>Q(En)===Ot),mayDisplayParentControls:o1(Q(t),"__experimentalExposeControlsToChildren",!1)&&V(t),blockApiVersion:f1?.apiVersion||1,blockTitle:rt?.title||f1?.title,editorMode:Yi,isSubtreeDisabled:r1==="disabled"&&Ne(t),hasOverlay:Xe(t)&&!Nt(),initialPosition:N1&&(Yi==="edit"||Yi==="zoom-out")?Ct():void 0,isHighlighted:et(t),isMultiSelected:Ft,isPartiallySelected:Ft&&!mt()&&!Mt(),isDragging:Ke(t),hasChildSelected:nn,isBlockMovingMode:!!j0,canInsertMovingBlock:j0&&Ue(Q(j0),n),isEditingDisabled:r1==="disabled",hasEditableOutline:r1!=="disabled"&&he(n)==="disabled",originalBlockClientId:b1?hr[0]:!1}},[t,n]),{isPreviewMode:r,mode:s="visual",isSelectionEnabled:i=!1,isLocked:c=!1,canRemove:l=!1,canMove:u=!1,blockWithoutAttributes:d,name:p,attributes:f,isValid:b,isSelected:h=!1,themeSupportsLayout:M,isTemporarilyEditingAsBlocks:z,blockEditingMode:y,editorMode:x,mayDisplayControls:v,mayDisplayParentControls:g,index:A,blockApiVersion:_,blockTitle:w,isSubtreeDisabled:k,hasOverlay:q,initialPosition:S,isHighlighted:C,isMultiSelected:T,isPartiallySelected:W,isReusable:B,isDragging:N,hasChildSelected:E,isBlockMovingMode:L,canInsertMovingBlock:I,templateLock:P,isEditingDisabled:H,hasEditableOutline:U,className:X,defaultClassName:Z,originalBlockClientId:ne}=o,oe=O.useMemo(()=>({...d,attributes:f}),[d,f]);if(!o)return null;const Y={isPreviewMode:r,clientId:t,className:X,index:A,mode:s,name:p,blockApiVersion:_,blockTitle:w,isSelected:h,isSubtreeDisabled:k,hasOverlay:q,initialPosition:S,blockEditingMode:y,editorMode:x,isHighlighted:C,isMultiSelected:T,isPartiallySelected:W,isReusable:B,isDragging:N,hasChildSelected:E,isBlockMovingMode:L,canInsertMovingBlock:I,templateLock:P,isEditingDisabled:H,hasEditableOutline:U,isTemporarilyEditingAsBlocks:z,defaultClassName:Z,mayDisplayControls:v,mayDisplayParentControls:g,originalBlockClientId:ne,themeSupportsLayout:M};return a.jsx(lz.Provider,{value:Y,children:a.jsx(cT,{...e,mode:s,isSelectionEnabled:i,isLocked:c,canRemove:l,canMove:u,block:oe,name:p,attributes:f,isValid:b,isSelected:h})})}const lvt=O.memo(cvt),$K=[z1(m("While writing, you can press / to quickly insert new blocks."),{kbd:a.jsx("kbd",{})}),z1(m("Indent a list by pressing space at the beginning of a line."),{kbd:a.jsx("kbd",{})}),z1(m("Outdent a list by pressing backspace at the beginning of a line."),{kbd:a.jsx("kbd",{})}),m("Drag files into the editor to automatically insert media blocks."),m("Change a block's type by pressing the block icon on the toolbar.")];function uvt(){const[e]=O.useState(Math.floor(Math.random()*$K.length));return a.jsx(c2t,{children:$K[e]})}function sP({title:e,icon:t,description:n,blockType:o,className:r}){o&&(Re("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:n}=o);const{parentNavBlockClientId:s}=D(c=>{const{getSelectedBlockClientId:l,getBlockParentsByBlockName:u}=c(F),d=l();return{parentNavBlockClientId:u(d,"core/navigation",!0)[0]}},[]),{selectBlock:i}=ae(F);return a.jsxs("div",{className:$("block-editor-block-card",r),children:[s&&a.jsx(fe,{onClick:()=>i(s),label:m("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:ft()?Ei:Fa,size:"small"}),a.jsx(b0,{icon:t,showColors:!0}),a.jsxs(Ye,{spacing:1,children:[a.jsx("h2",{className:"block-editor-block-card__title",children:e}),n&&a.jsx(l0,{className:"block-editor-block-card__description",children:n})]})]})}function dvt(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=SB({},t),o.registerStore(v1,Nw),e.set(t,o)),o}const pvt=Cn(e=>({useSubRegistry:t=!0,...n})=>{const o=h0(),[r]=O.useState(()=>new WeakMap),s=dvt(r,o,t);return s===o?a.jsx(e,{registry:o,...n}):a.jsx(Tne,{value:s,children:a.jsx(e,{registry:s,...n})})},"withRegistryProvider"),VK=()=>{};function l2e({clientId:e=null,value:t,selection:n,onChange:o=VK,onInput:r=VK}){const s=h0(),{resetBlocks:i,resetSelection:c,replaceInnerBlocks:l,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=s.dispatch(F),{getBlockName:p,getBlocks:f,getSelectionStart:b,getSelectionEnd:h}=s.select(F),M=D(w=>!e||w(F).areInnerBlocksControlled(e),[e]),z=O.useRef({incoming:null,outgoing:[]}),y=O.useRef(!1),x=()=>{t&&(d(),e?s.batch(()=>{u(e,!0);const w=t.map(k=>pn(k));y.current&&(z.current.incoming=w),d(),l(e,w)}):(y.current&&(z.current.incoming=t),i(t)))},v=()=>{d(),e?(u(e,!1),d(),l(e,[])):i([])},g=O.useRef(r),A=O.useRef(o);O.useEffect(()=>{g.current=r,A.current=o},[r,o]),O.useEffect(()=>{z.current.outgoing.includes(t)?z.current.outgoing[z.current.outgoing.length-1]===t&&(z.current.outgoing=[]):f(e)!==t&&(z.current.outgoing=[],x(),n&&c(n.selectionStart,n.selectionEnd,n.initialPosition))},[t,e]);const _=O.useRef(!1);O.useEffect(()=>{if(!_.current){_.current=!0;return}M||(z.current.outgoing=[],x())},[M]),O.useEffect(()=>{const{getSelectedBlocksInitialCaretPosition:w,isLastBlockChangePersistent:k,__unstableIsLastBlockChangeIgnored:q,areInnerBlocksControlled:S}=s.select(F);let C=f(e),T=k(),W=!1;y.current=!0;const B=s.subscribe(()=>{if(e!==null&&p(e)===null||!(!e||S(e)))return;const E=k(),L=f(e),I=L!==C;if(C=L,I&&(z.current.incoming||q())){z.current.incoming=null,T=E;return}(I||W&&!I&&E&&!T)&&(T=E,z.current.outgoing.push(C),(T?A.current:g.current)(C,{selection:{selectionStart:b(),selectionEnd:h(),initialPosition:w()}})),W=I},F);return()=>{y.current=!1,B()}},[s,e]),O.useEffect(()=>()=>{v()},[])}function fvt(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...o}=e;return o}return e}function bvt({name:e,category:t,description:n,keyCombination:o,aliases:r}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:o,aliases:r,description:n}}function hvt(e){return{type:"UNREGISTER_SHORTCUT",name:e}}const mvt=Object.freeze(Object.defineProperty({__proto__:null,registerShortcut:bvt,unregisterShortcut:hvt},Symbol.toStringTag,{value:"Module"})),Mvt=[],gvt={display:er,raw:V6e,ariaLabel:bne};function u2e(e,t){return e?e.modifier?gvt[t][e.modifier](e.character):e.character:null}function iP(e,t){return e[t]?e[t].keyCombination:null}function zvt(e,t,n="display"){const o=iP(e,t);return u2e(o,n)}function Ovt(e,t){return e[t]?e[t].description:null}function d2e(e,t){return e[t]&&e[t].aliases?e[t].aliases:Mvt}const p2e=at((e,t)=>[iP(e,t),...d2e(e,t)].filter(Boolean),(e,t)=>[e[t]]),Avt=at((e,t)=>p2e(e,t).map(n=>u2e(n,"raw")),(e,t)=>[e[t]]),yvt=at((e,t)=>Object.entries(e).filter(([,n])=>n.category===t).map(([n])=>n),e=>[e]),vvt=Object.freeze(Object.defineProperty({__proto__:null,getAllShortcutKeyCombinations:p2e,getAllShortcutRawKeyCombinations:Avt,getCategoryShortcuts:yvt,getShortcutAliases:d2e,getShortcutDescription:Ovt,getShortcutKeyCombination:iP,getShortcutRepresentation:zvt},Symbol.toStringTag,{value:"Module"})),xvt="core/keyboard-shortcuts",Nr=tr(xvt,{reducer:fvt,actions:mvt,selectors:vvt});Qs(Nr);function nk(){const{getAllShortcutKeyCombinations:e}=D(Nr);function t(n,o){return e(n).some(({modifier:r,character:s})=>Fs[r](o,s))}return t}const hM=new Set,HK=e=>{for(const t of hM)t(e)},_vt=O.createContext({add:e=>{hM.size===0&&document.addEventListener("keydown",HK),hM.add(e)},delete:e=>{hM.delete(e),hM.size===0&&document.removeEventListener("keydown",HK)}});function Ur(e,t,{isDisabled:n=!1}={}){const o=O.useContext(_vt),r=nk(),s=O.useRef();O.useEffect(()=>{s.current=t},[t]),O.useEffect(()=>{if(n)return;function i(c){r(e,c)&&s.current(c)}return o.add(i),()=>{o.delete(i)}},[e,n,o])}function f2e(){return null}function wvt(){const{registerShortcut:e}=ae(Nr);return O.useEffect(()=>{e({name:"core/block-editor/duplicate",category:"block",description:m("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:m("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:m("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:m("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:m("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:m("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:m("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:m("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:m("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:m("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:m("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:m("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:m("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})},[e]),null}f2e.Register=wvt;const ok=pvt(e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=Fe(ae(F));return O.useEffect(()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})},[n,o,r]),l2e(e),a.jsxs(ntt,{passthrough:!0,children:[!n?.__unstableIsPreviewMode&&a.jsx(f2e.Register,{}),a.jsx(XAt,{children:t})]})}),kvt=e=>a.jsx(ok,{...e,stripExperimentalSettings:!0,children:e.children});function aP(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=D(F),{clearSelectedBlock:o}=ae(F),{clearBlockSelection:r}=e();return Et(s=>{if(!r)return;function i(c){!t()&&!n()||c.target===s&&o()}return s.addEventListener("mousedown",i),()=>{s.removeEventListener("mousedown",i)}},[t,n,o,r])}function qvt(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:s,__unstableIsFullySelected:i}=e(F);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:s(),isFullSelection:i()}}function Svt(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:s}=D(qvt,[]);return Et(i=>{const{ownerDocument:c}=i,{defaultView:l}=c;if(e==null||!o||t)return;const{length:u}=n;u<2||s&&(i.contentEditable=!0,i.focus(),l.getSelection().removeAllRanges())},[o,t,n,r,e,s])}function Cvt(){const e=O.useRef(),t=O.useRef(),n=O.useRef(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:s}=D(F),{setNavigationMode:i,setLastFocus:c}=Fe(ae(F)),l=D(y=>y(F).isNavigationMode(),[]),{getLastFocus:u}=Fe(D(F)),d=l?void 0:"0",p=O.useRef();function f(y){if(p.current)p.current=null;else if(o())e.current.focus();else if(r())u()?.current?u().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else{i(!0);const x=e.current.ownerDocument===y.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,v=y.target.compareDocumentPosition(x)&y.target.DOCUMENT_POSITION_FOLLOWING,g=Ln.tabbable.find(e.current);g.length&&(v?g[0]:g[g.length-1]).focus()}}const b=a.jsx("div",{ref:t,tabIndex:d,onFocus:f}),h=a.jsx("div",{ref:n,tabIndex:d,onFocus:f}),M=Et(y=>{function x(w){if(w.defaultPrevented)return;if(w.keyCode===Ea&&!o()){w.preventDefault(),i(!0);return}if(w.keyCode!==kp)return;const k=w.shiftKey,q=k?"findPrevious":"findNext";if(!o()&&!r()){w.target===y&&i(!0);return}const S=Ln.tabbable[q](w.target),C=w.target.closest("[data-block]"),T=C&&S&&(s2e(C,S)||ZM(C,S));if(nne(S)&&T)return;const W=k?t:n;p.current=!0,W.current.focus({preventScroll:!0})}function v(w){c({...u(),current:w.target});const{ownerDocument:k}=y;!w.relatedTarget&&k.activeElement===k.body&&s()===0&&y.focus()}function g(w){if(w.keyCode!==kp||w.target?.getAttribute("role")==="region"||e.current===w.target)return;const q=w.shiftKey?"findPrevious":"findNext",S=Ln.tabbable[q](w.target);(S===t.current||S===n.current)&&(w.preventDefault(),S.focus({preventScroll:!0}))}const{ownerDocument:A}=y,{defaultView:_}=A;return _.addEventListener("keydown",g),y.addEventListener("keydown",x),y.addEventListener("focusout",v),()=>{_.removeEventListener("keydown",g),y.removeEventListener("keydown",x),y.removeEventListener("focusout",v)}},[]),z=Gt([e,M]);return[b,z,h]}function Rvt(e){const t="",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function Wvt(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function cP({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=Rvt(n),n=Wvt(n);const o=av(e);return o.length&&!Tvt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function Tvt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const b2e=Symbol("requiresWrapperOnCopy");function h2e(e,t,n){let o=t;const[r]=t;if(r&&n.select($e).getBlockType(r.name)[b2e]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select(F),d=c(r.clientId),p=l(d);p&&(o=me(p,u(d),o))}const s=$o(o);e.clipboardData.setData("text/plain",Bvt(s)),e.clipboardData.setData("text/html",s)}function Evt(e,t){const{plainText:n,html:o,files:r}=cP(e);let s=[];if(r.length){const i=Ys("from");s=r.reduce((c,l)=>{const u=Ia(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=mf({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function Bvt(e){return e=e.replace(/
/g,` `),Wr(e).trim().replace(/\n\n+/g,` -`)}function qvt(){const e=O0(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=D($),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:M,__unstableExpandSelection:O,__unstableSplitSelection:y}=ie($),_=Kj();return Lt(v=>{function g(A){if(A.defaultPrevented)return;const x=n();if(x.length===0)return;if(!o()){const{target:C}=A,{ownerDocument:T}=C;if(A.type==="copy"||A.type==="cut"?h6e(T):m6e(T)&&!T.activeElement.isContentEditable)return}const{activeElement:w}=A.target.ownerDocument;if(!v.contains(w))return;const k=l(),q=c()||i(),S=!q&&!k;if(A.type==="copy"||A.type==="cut")if(A.preventDefault(),x.length===1&&f(x[0]),S)O();else{_(A.type,x);let C;if(q)C=t(x);else{const[T,E]=u(),B=t(x.slice(1,x.length-1));C=[T,...B,E]}t2e(A,C,e)}if(A.type==="cut")q&&!S?b(x):(A.target.ownerDocument.activeElement.contentEditable=!1,M());else if(A.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:C}=r();if(A.clipboardData.getData("rich-text")==="true")return;const{plainText:E,html:B,files:N}=Yj(A),W=i();let j=[];if(N.length){const X=Ys("from");j=N.reduce((H,Z)=>{const oe=ja(X,ee=>ee.type==="files"&&ee.isMatch([Z]));return oe&&H.push(oe.transform([Z])),H},[]).flat()}else j=mf({HTML:B,plainText:E,mode:W?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:C});if(typeof j=="string")return;if(W){h(x,j,j.length-1,-1),A.preventDefault();return}if(!o()&&!it(s(x[0]),"splitting",!1)&&!A.__deprecatedOnSplit)return;const[I]=x,P=p(I),U=[];for(const X of j)if(d(X.name,P))U.push(X);else{const H=s(P),Z=X.name!==H?u1(X,H):[X];if(!Z)return;for(const oe of Z)for(const ee of oe.innerBlocks)U.push(ee)}y(U),A.preventDefault()}}return v.ownerDocument.addEventListener("copy",g),v.ownerDocument.addEventListener("cut",g),v.ownerDocument.addEventListener("paste",g),()=>{v.ownerDocument.removeEventListener("copy",g),v.ownerDocument.removeEventListener("cut",g),v.ownerDocument.removeEventListener("paste",g)}},[])}function n2e(){const[e,t,n]=pvt(),o=D(r=>r($).hasMultiSelection(),[]);return[e,Kt([t,qvt(),yvt(),mvt(),Ovt(),Avt(),dvt(),hvt(),bvt(),Lt(r=>{if(r.tabIndex=0,!!o)return r.classList.add("has-multi-selection"),r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{r.classList.remove("has-multi-selection"),r.removeAttribute("aria-label")}},[o])]),n]}function Svt({children:e,...t},n){const[o,r,s]=n2e();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:Kt([r,n]),className:F(t.className,"block-editor-writing-flow"),children:e}),s]})}const Cvt=z.forwardRef(Svt);let WA=null;function Rvt(){return WA||(WA=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||n.id==="wp-reset-editor-styles-css"||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),WA)}function o2e(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function Wvt(e){return Lt(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];o2e(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function Tvt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=D(ee=>{const{getSettings:K}=ee($),ne=K();return{resolvedAssets:ne.__unstableResolvedAssets,isPreviewMode:ne.__unstableIsPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=z.useState(),M=z.useRef(),[O,y]=z.useState([]),_=Gj(),[v,g,A]=n2e(),[x,{height:w}]=Wa(),[k,{width:q}]=Wa(),S=Lt(ee=>{ee._load=()=>{h(ee.contentDocument)};let K;function ne(ae){ae.preventDefault()}function se(){const{contentDocument:ae,ownerDocument:be}=ee,{documentElement:Oe}=ae;K=ae,Oe.classList.add("block-editor-iframe__html"),_(Oe),y(Array.from(be.body.classList).filter(xe=>xe.startsWith("admin-color-")||xe.startsWith("post-type-")||xe==="wp-embed-responsive")),ae.dir=be.dir;for(const xe of Rvt())ae.getElementById(xe.id)||(ae.head.appendChild(xe.cloneNode(!0)),d||console.warn(`${xe.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,xe));K.addEventListener("dragover",ne,!1),K.addEventListener("drop",ne,!1)}return ee.addEventListener("load",se),()=>{delete ee._load,ee.removeEventListener("load",se),K?.removeEventListener("dragover",ne),K?.removeEventListener("drop",ne)}},[]),[C,T]=z.useState(),E=Lt(ee=>{const K=ee.ownerDocument.defaultView;T(K.innerHeight);const ne=()=>{T(K.innerHeight)};return K.addEventListener("resize",ne),()=>{K.removeEventListener("resize",ne)}},[]),[B,N]=z.useState(),W=Lt(ee=>{const K=ee.ownerDocument.defaultView;N(K.innerWidth);const ne=()=>{N(K.innerWidth)};return K.addEventListener("resize",ne),()=>{K.removeEventListener("resize",ne)}},[]),j=o!==1;z.useEffect(()=>{j||(M.current=q)},[q,j]);const I=pB({isDisabled:!s}),P=Kt([Wvt(b),e,_,g,I,j?E:null]),U=` +`)}function Oz(e){const{defaultView:t}=e,{anchorNode:n,focusNode:o}=t.getSelection();if(!n||!o)return;const r=(n.nodeType===n.ELEMENT_NODE?n:n.parentElement).closest("[contenteditable]");if(r&&r.contains(o))return r}function Nvt(e,t,n){const o=t===xi||t===Do,{tagName:r}=e,s=e.getAttribute("type");return o&&!n?r==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(s):!0:r==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(s):r!=="TEXTAREA"}function yS(e,t,n,o){let r=Ln.focusable.find(n);t&&r.reverse(),r=r.slice(r.indexOf(e)+1);let s;o&&(s=e.getBoundingClientRect());function i(c){if(!c.closest("[inert]")&&!(c.children.length===1&&s2e(c,c.firstElementChild)&&c.firstElementChild.getAttribute("contenteditable")==="true")){if(!Ln.tabbable.isTabbableIndex(c)||c.isContentEditable&&c.contentEditable!=="true")return!1;if(o){const l=c.getBoundingClientRect();if(l.left>=s.right||l.right<=s.left)return!1}return!0}}return r.find(i)}function Lvt(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=D(F),{selectBlock:s}=ae(F);return Et(i=>{let c;function l(){c=null}function u(p,f){const b=yS(p,f,i);return b&&QM(b)}function d(p){if(p.defaultPrevented)return;const{keyCode:f,shiftKey:b,ctrlKey:h,altKey:M,metaKey:z}=p,y=f===xi,x=f===Do,v=f===Bs,g=f===Ns,A=y||v,_=v||g,w=y||x,k=_||w,q=b||h||M||z,S=w?v$:B6,{ownerDocument:C}=i,{defaultView:T}=C;if(!k)return;if(o()){if(b||!r())return;p.preventDefault(),A?s(e()):s(t(),-1);return}const W=C.activeElement===i?Oz(C):p.target;if(!Nvt(W,f,q))return;w?c||(c=JR(T)):c=null;const B=vB(W)?!A:A,{keepCaretInsideBlock:N}=n();if(b)u(W,A)&&S(W,A)&&(i.contentEditable=!0,i.focus());else if(w&&v$(W,A)&&(!M||B6(W,B))&&!N){i.contentEditable=!1;const E=yS(W,A,i,!0);E&&(T6e(E,M?!A:A,M?void 0:c),p.preventDefault())}else if(_&&T.getSelection().isCollapsed&&B6(W,B)&&!N){i.contentEditable=!1;const E=yS(W,B,i);cne(E,A),p.preventDefault()}}return i.addEventListener("mousedown",l),i.addEventListener("keydown",d),()=>{i.removeEventListener("mousedown",l),i.removeEventListener("keydown",d)}},[])}function jvt(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=D(F),{multiSelect:o,selectBlock:r}=ae(F),s=nk();return Et(i=>{function c(l){if(!s("core/block-editor/select-all",l))return;const u=Oz(i.ownerDocument),d=t();if(u&&!d.length)return;if(u&&d.length<2&&!S6e(u)){if(i===i.ownerDocument.activeElement){l.preventDefault(),i.ownerDocument.defaultView.getSelection().selectAllChildren(u);return}return}l.preventDefault();const[p]=d,f=n(p),b=e(f);if(d.length===b.length){f&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),i.contentEditable="false",r(f));return}o(b[0],b[b.length-1])}return i.addEventListener("keydown",c),()=>{i.removeEventListener("keydown",c)}},[])}function UK(e,t){e.contentEditable=t,t&&e.focus()}function Pvt(){const{startMultiSelect:e,stopMultiSelect:t}=ae(F),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:s}=D(F);return Et(i=>{const{ownerDocument:c}=i,{defaultView:l}=c;let u,d;function p(){t(),l.removeEventListener("mouseup",p),d=l.requestAnimationFrame(()=>{if(!o())return;UK(i,!1);const b=l.getSelection();if(b.rangeCount){const h=b.getRangeAt(0),{commonAncestorContainer:M}=h,z=h.cloneRange();u.contains(M)&&(u.focus(),b.removeAllRanges(),b.addRange(z))}})}function f({buttons:b,target:h,relatedTarget:M}){h.contains(M)||r()||b===1&&(s()||i!==h&&h.getAttribute("contenteditable")==="true"&&n()&&(u=h,e(),l.addEventListener("mouseup",p),UK(i,!0)))}return i.addEventListener("mouseout",f),()=>{i.removeEventListener("mouseout",f),l.removeEventListener("mouseup",p),l.cancelAnimationFrame(d)}},[e,t,n,o])}function Ivt(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===0?t:t.childNodes[n-1]}function Dvt(e){const{focusNode:t,focusOffset:n}=e;if(t.nodeType===t.TEXT_NODE||n===t.childNodes.length)return t;if(n===0&&one(e)){var o;return(o=t.previousSibling)!==null&&o!==void 0?o:t.parentElement}return t.childNodes[n]}function Fvt(e,t){let n=0;for(;e[n]===t[n];)n++;return n}function vS(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function XK(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function $vt(){const{multiSelect:e,selectBlock:t,selectionChange:n}=ae(F),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:s,getSelectedBlockClientId:i}=D(F);return Et(c=>{const{ownerDocument:l}=c,{defaultView:u}=l;function d(p){const f=u.getSelection();if(!f.rangeCount)return;const b=Ivt(f),h=Dvt(f);if(!c.contains(b)||!c.contains(h))return;const M=p.shiftKey&&p.type==="mouseup";if(f.isCollapsed&&!M){if(c.contentEditable==="true"&&!s()){vS(c,!1);let A=b.nodeType===b.ELEMENT_NODE?b:b.parentElement;A=A?.closest("[contenteditable]"),A?.focus()}return}let z=QM(b),y=QM(h);if(M){const A=r(),_=QM(p.target),w=_!==y;(z===y&&f.isCollapsed||!y||w)&&(y=_),z!==A&&(z=A)}if(z===void 0&&y===void 0){vS(c,!1);return}if(vS(c,!!(z&&y)),z===y)s()?e(z,z):i()!==z&&t(z);else{const A=[...o(z),z],_=[...o(y),y],w=Fvt(A,_);if(A[w]!==z||_[w]!==y){e(A[w],_[w]);return}const k=XK(b),q=XK(h);if(k&&q){var v,g;const S=f.getRangeAt(0),C=m0({element:k,range:S,__unstableIsEditableTree:!0}),T=m0({element:q,range:S,__unstableIsEditableTree:!0}),W=(v=C.start)!==null&&v!==void 0?v:C.end,B=(g=T.start)!==null&&g!==void 0?g:T.end;n({start:{clientId:z,attributeKey:k.dataset.wpBlockAttributeKey,offset:W},end:{clientId:y,attributeKey:q.dataset.wpBlockAttributeKey,offset:B}})}else e(z,y)}}return l.addEventListener("selectionchange",d),u.addEventListener("mouseup",d),()=>{l.removeEventListener("selectionchange",d),u.removeEventListener("mouseup",d)}},[e,t,n,o])}function Vvt(){const{selectBlock:e}=ae(F),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=D(F);return Et(r=>{function s(i){if(!t()||i.button!==0)return;const c=n(),l=QM(i.target);i.shiftKey?c!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",s),()=>{r.removeEventListener("mousedown",s)}},[e,t,n,o])}function Hvt(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:s,canInsertBlockType:i,getBlockRootClientId:c,getSelectionStart:l,getSelectionEnd:u,getBlockAttributes:d}=D(F),{replaceBlocks:p,__unstableSplitSelection:f,removeBlocks:b,__unstableDeleteSelection:h,__unstableExpandSelection:M,__unstableMarkAutomaticChange:z}=ae(F);return Et(y=>{function x(A){if(y.contentEditable==="true"){const _=y.ownerDocument.defaultView.getSelection(),w=_.rangeCount?_.getRangeAt(0):null,k=Oz(y.ownerDocument);k?(y.contentEditable=!1,k.focus(),_.removeAllRanges(),w&&_.addRange(w)):A.preventDefault()}}function v(A){if(!A.defaultPrevented){if(!r()){const{ownerDocument:_}=y;if(y===_.activeElement&&(A.key==="End"||A.key==="Home")){const w=Oz(_),k=_.defaultView.getSelection();k.selectAllChildren(w);const q=A.key==="End"?"collapseToEnd":"collapseToStart";k[q](),A.preventDefault();return}if(A.keyCode===y1){if(A.shiftKey||e())return;const w=n(),k=s(w),q=l(),S=u();if(q.attributeKey===S.attributeKey){const C=d(w)[q.attributeKey],T=Ys("from").filter(({type:B})=>B==="enter"),W=Ia(T,B=>B.regExp.test(C));if(W){p(w,W.transform({content:C})),z();return}}if(!st(k,"splitting",!1)&&!A.__deprecatedOnSplit)return;i(k,c(w))&&(f(),A.preventDefault())}return}A.keyCode===y1?(y.contentEditable=!1,A.preventDefault(),e()?p(t(),me(Pn())):f()):A.keyCode===Si||A.keyCode===_a?(y.contentEditable=!1,A.preventDefault(),e()?b(t()):o()?h(A.keyCode===_a):M()):A.key.length===1&&!(A.metaKey||A.ctrlKey)&&(y.contentEditable=!1,o()?h(A.keyCode===_a):(A.preventDefault(),y.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function g(A){r()&&(y.contentEditable=!1,o()?h():(A.preventDefault(),y.ownerDocument.defaultView.getSelection().removeAllRanges()))}return y.addEventListener("beforeinput",x),y.addEventListener("keydown",v),y.addEventListener("compositionstart",g),()=>{y.removeEventListener("beforeinput",x),y.removeEventListener("keydown",v),y.removeEventListener("compositionstart",g)}},[])}function lP(){const{getBlockName:e}=D(F),{getBlockType:t}=D($e),{createSuccessNotice:n}=ae(Ze);return O.useCallback((o,r)=>{let s="";if(r.length===1){const i=r[0],c=t(e(i))?.title;s=le(m(o==="copy"?'Copied "%s" to clipboard.':'Moved "%s" to clipboard.'),c)}else s=le(o==="copy"?a0("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length):a0("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(s,{type:"snackbar"})},[])}function Uvt(){const e=h0(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=D(F),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:M,__unstableExpandSelection:z,__unstableSplitSelection:y}=ae(F),x=lP();return Et(v=>{function g(A){if(A.defaultPrevented)return;const _=n();if(_.length===0)return;if(!o()){const{target:C}=A,{ownerDocument:T}=C;if(A.type==="copy"||A.type==="cut"?k6e(T):q6e(T)&&!T.activeElement.isContentEditable)return}const{activeElement:w}=A.target.ownerDocument;if(!v.contains(w))return;const k=l(),q=c()||i(),S=!q&&!k;if(A.type==="copy"||A.type==="cut")if(A.preventDefault(),_.length===1&&f(_[0]),S)z();else{x(A.type,_);let C;if(q)C=t(_);else{const[T,W]=u(),B=t(_.slice(1,_.length-1));C=[T,...B,W]}h2e(A,C,e)}if(A.type==="cut")q&&!S?b(_):(A.target.ownerDocument.activeElement.contentEditable=!1,M());else if(A.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:C}=r();if(A.clipboardData.getData("rich-text")==="true")return;const{plainText:W,html:B,files:N}=cP(A),E=i();let L=[];if(N.length){const U=Ys("from");L=N.reduce((X,Z)=>{const ne=Ia(U,oe=>oe.type==="files"&&oe.isMatch([Z]));return ne&&X.push(ne.transform([Z])),X},[]).flat()}else L=mf({HTML:B,plainText:W,mode:E?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:C});if(typeof L=="string")return;if(E){h(_,L,L.length-1,-1),A.preventDefault();return}if(!o()&&!st(s(_[0]),"splitting",!1)&&!A.__deprecatedOnSplit)return;const[I]=_,P=p(I),H=[];for(const U of L)if(d(U.name,P))H.push(U);else{const X=s(P),Z=U.name!==X?l1(U,X):[U];if(!Z)return;for(const ne of Z)for(const oe of ne.innerBlocks)H.push(oe)}y(H),A.preventDefault()}}return v.ownerDocument.addEventListener("copy",g),v.ownerDocument.addEventListener("cut",g),v.ownerDocument.addEventListener("paste",g),()=>{v.ownerDocument.removeEventListener("copy",g),v.ownerDocument.removeEventListener("cut",g),v.ownerDocument.removeEventListener("paste",g)}},[])}function Xvt(){return Et(e=>{function t(o){if(o.target!==e)return;const{ownerDocument:r}=e,{defaultView:s}=r,c=Object.getPrototypeOf(o).constructor.name,l=s[c],u=Oz(r);if(!u||u===e)return;const d={};for(const b in o)d[b]=o[b];d.bubbles=!1;const p=new l(o.type,d);!u.dispatchEvent(p)&&o.preventDefault()}const n=["beforeinput","input","compositionstart","compositionend","compositionupdate","keydown"];return n.forEach(o=>{e.addEventListener(o,t)}),()=>{n.forEach(o=>{e.removeEventListener(o,t)})}},[])}function m2e(){const[e,t,n]=Cvt(),o=D(r=>r(F).hasMultiSelection(),[]);return[e,Gt([t,Uvt(),Hvt(),Pvt(),$vt(),Vvt(),Svt(),jvt(),Lvt(),Et(r=>{if(r.tabIndex=0,!!o)return r.classList.add("has-multi-selection"),r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{r.classList.remove("has-multi-selection"),r.removeAttribute("aria-label")}},[o]),Xvt()]),n]}function Gvt({children:e,...t},n){const[o,r,s]=m2e();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:Gt([r,n]),className:$(t.className,"block-editor-writing-flow"),children:e}),s]})}const Kvt=O.forwardRef(Gvt);let LA=null;function Yvt(){return LA||(LA=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||n.id==="wp-reset-editor-styles-css"||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),LA)}function M2e(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function Zvt(e){return Et(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];M2e(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function Qvt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=D(oe=>{const{getSettings:Y}=oe(F),ee=Y();return{resolvedAssets:ee.__unstableResolvedAssets,isPreviewMode:ee.__unstableIsPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=O.useState(),M=O.useRef(),[z,y]=O.useState([]),x=aP(),[v,g,A]=m2e(),[_,{height:w}]=Ci(),[k,{width:q}]=Ci(),S=Et(oe=>{oe._load=()=>{h(oe.contentDocument)};let Y;function ee(se){se.preventDefault()}function ie(){const{contentDocument:se,ownerDocument:be}=oe,{documentElement:ye}=se;Y=se,ye.classList.add("block-editor-iframe__html"),x(ye),y(Array.from(be.body.classList).filter(xe=>xe.startsWith("admin-color-")||xe.startsWith("post-type-")||xe==="wp-embed-responsive")),se.dir=be.dir;for(const xe of Yvt())se.getElementById(xe.id)||(se.head.appendChild(xe.cloneNode(!0)),d||console.warn(`${xe.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,xe));Y.addEventListener("dragover",ee,!1),Y.addEventListener("drop",ee,!1)}return oe.addEventListener("load",ie),()=>{delete oe._load,oe.removeEventListener("load",ie),Y?.removeEventListener("dragover",ee),Y?.removeEventListener("drop",ee)}},[]),[C,T]=O.useState(),W=Et(oe=>{const Y=oe.ownerDocument.defaultView;T(Y.innerHeight);const ee=()=>{T(Y.innerHeight)};return Y.addEventListener("resize",ee),()=>{Y.removeEventListener("resize",ee)}},[]),[B,N]=O.useState(),E=Et(oe=>{const Y=oe.ownerDocument.defaultView;N(Y.innerWidth);const ee=()=>{N(Y.innerWidth)};return Y.addEventListener("resize",ee),()=>{Y.removeEventListener("resize",ee)}},[]),L=o!==1;O.useEffect(()=>{L||(M.current=q)},[q,L]);const I=wB({isDisabled:!s}),P=Gt([Zvt(b),e,x,g,I,L?W:null]),H=` @@ -441,33 +447,33 @@ Ie.version="2.30.1";rat(Cn);Ie.fn=je;Ie.min=Uct;Ie.max=Xct;Ie.now=Gct;Ie.utc=Qa; - + +
diff --git a/Sources/GutenbergKit/Gutenberg/remote.html b/Sources/GutenbergKit/Gutenberg/remote.html index b4d5529a..3d3e093d 100644 --- a/Sources/GutenbergKit/Gutenberg/remote.html +++ b/Sources/GutenbergKit/Gutenberg/remote.html @@ -7,7 +7,7 @@ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> Gutenberg - +