From 3debcd745b74b9cd14827868cb6f8270a2e9a43e Mon Sep 17 00:00:00 2001 From: Rein Van Oyen Date: Tue, 12 Nov 2024 14:52:11 +0100 Subject: [PATCH] feat: implemented basic tree index --- package-lock.json | 518 +++++++++++++++--- package.json | 9 +- public/js/app.js | 2 +- public/js/manifest.js | 2 +- public/js/vendor.js | 2 +- public/mix-manifest.json | 6 +- resources/js/actions/all.js | 2 + resources/js/actions/tree-index.js | 110 ++++ resources/js/components/many-to-many-field.js | 1 - .../core/ui/drag-insert-placeholder/index.js | 10 + .../ui/drag-insert-placeholder/index.scss | 9 + .../js/core/ui/drag-placeholder/index.js | 10 + .../js/core/ui/drag-placeholder/index.scss | 10 + resources/js/core/ui/tree/index.js | 93 ++++ resources/js/core/ui/tree/index.scss | 37 ++ src/Action/Index.php | 3 +- src/Action/TreeIndex.php | 127 +++++ src/Cmf.php | 2 +- src/Http/Resources/ModelCollection.php | 8 + src/Http/Resources/ModelResource.php | 20 +- src/Http/Resources/TreeModelCollection.php | 39 ++ src/Http/Resources/TreeModelResource.php | 54 ++ 22 files changed, 974 insertions(+), 100 deletions(-) create mode 100644 resources/js/actions/tree-index.js create mode 100644 resources/js/core/ui/drag-insert-placeholder/index.js create mode 100644 resources/js/core/ui/drag-insert-placeholder/index.scss create mode 100644 resources/js/core/ui/drag-placeholder/index.js create mode 100644 resources/js/core/ui/drag-placeholder/index.scss create mode 100644 resources/js/core/ui/tree/index.js create mode 100644 resources/js/core/ui/tree/index.scss create mode 100644 src/Action/TreeIndex.php create mode 100644 src/Http/Resources/TreeModelCollection.php create mode 100644 src/Http/Resources/TreeModelResource.php diff --git a/package-lock.json b/package-lock.json index be65a0f..18145de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,13 @@ "packages": { "": { "dependencies": { + "@minoru/react-dnd-treeview": "^3.4.4", "axios": "^1.3.2", "clsx": "^2.1.0", - "react": "^18.2.0", - "react-dnd": "^14.0.4", - "react-dnd-html5-backend": "^14.0.2", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^18.3.1", "react-redux": "^8.0.5", "react-trix": "^0.10.0", "redux": "^4.2.1", @@ -1776,6 +1777,21 @@ "node": ">=10.0.0" } }, + "node_modules/@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "optional": true, + "dependencies": { + "@emotion/memoize": "0.7.4" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "optional": true + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -1847,12 +1863,93 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==" + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@minoru/react-dnd-treeview": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/@minoru/react-dnd-treeview/-/react-dnd-treeview-3.4.4.tgz", + "integrity": "sha512-S5FRjQFag3cShU7rATx6UhaegYw+Uz3L/IXwBiD5snI+dW2Qm5Ey+8dKC+vpsVoHDYkgE/YKKWz+odGe1rNggA==", + "dependencies": { + "@juggle/resize-observer": "^3.3.1", + "dnd-multi-backend": "^7.0.0-alpha.4", + "framer-motion": "^6.2.8", + "react-dnd-html5-backend": "^16.0.1", + "react-dnd-touch-backend": "^16.0.1", + "react-use-measure": "^2.1.1" + }, + "peerDependencies": { + "react": "17.x || 18.x", + "react-dnd": "15.x || 16.x", + "react-dom": "17.x || 18.x" + } + }, + "node_modules/@motionone/animation": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", + "integrity": "sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==", + "dependencies": { + "@motionone/easing": "^10.18.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "dependencies": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/easing": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.18.0.tgz", + "integrity": "sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==", + "dependencies": { + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/generators": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.18.0.tgz", + "integrity": "sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==", + "dependencies": { + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@motionone/types": { + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.1.tgz", + "integrity": "sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==" + }, + "node_modules/@motionone/utils": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.18.0.tgz", + "integrity": "sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==", + "dependencies": { + "@motionone/types": "^10.17.1", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1889,19 +1986,19 @@ } }, "node_modules/@react-dnd/asap": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-4.0.1.tgz", - "integrity": "sha512-kLy0PJDDwvwwTXxqTFNAAllPHD73AycE9ypWeln/IguoGBEbvFcPDbCV03G52bEcC5E+YgupBE0VzHGdC8SIXg==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", + "integrity": "sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A==" }, "node_modules/@react-dnd/invariant": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-2.0.0.tgz", - "integrity": "sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-4.0.2.tgz", + "integrity": "sha512-xKCTqAK/FFauOM9Ta2pswIyT3D8AQlfrYdOi/toTPEhqCuAs1v5tcJ3Y08Izh1cJ5Jchwy9SeAXmMg6zrKs2iw==" }, "node_modules/@react-dnd/shallowequal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz", - "integrity": "sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-4.0.2.tgz", + "integrity": "sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA==" }, "node_modules/@redux-devtools/core": { "version": "3.13.1", @@ -3174,9 +3271,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001451", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz", - "integrity": "sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==", + "version": "1.0.30001679", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001679.tgz", + "integrity": "sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==", "dev": true, "funding": [ { @@ -3186,6 +3283,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -3957,6 +4058,11 @@ "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", "dev": true }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4077,15 +4183,20 @@ } }, "node_modules/dnd-core": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.1.tgz", - "integrity": "sha512-+PVS2VPTgKFPYWo3vAFEA8WPbTf7/xo43TifH9G8S1KqnrQu0o77A3unrF5yOugy4mIz7K5wAVFHUcha7wsz6A==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-16.0.1.tgz", + "integrity": "sha512-HK294sl7tbw6F6IeuK16YSBUoorvHpY8RHO+9yFfaJyCDVb6n7PRcezrOEOa2SBCqiYpemh5Jx20ZcjKdFAVng==", "dependencies": { - "@react-dnd/asap": "^4.0.0", - "@react-dnd/invariant": "^2.0.0", - "redux": "^4.1.1" + "@react-dnd/asap": "^5.0.1", + "@react-dnd/invariant": "^4.0.1", + "redux": "^4.2.0" } }, + "node_modules/dnd-multi-backend": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/dnd-multi-backend/-/dnd-multi-backend-7.1.3.tgz", + "integrity": "sha512-INOAt4p/5fkaAUpXu0I+ialm1Ewi9HmIhs/558RFrhBZ0s/XGL991w3A2GvBuaPQNsZJEzCJh0mv/0dswxfSfQ==" + }, "node_modules/dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -4810,6 +4921,34 @@ "url": "https://www.patreon.com/infusion" } }, + "node_modules/framer-motion": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "dependencies": { + "@motionone/dom": "10.12.0", + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "popmotion": "11.0.3", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + }, + "optionalDependencies": { + "@emotion/is-prop-valid": "^0.8.2" + }, + "peerDependencies": { + "react": ">=16.8 || ^17.0.0 || ^18.0.0", + "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/framesync": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", + "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -5079,6 +5218,11 @@ "he": "bin/he" } }, + "node_modules/hey-listen": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", + "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -6846,6 +6990,17 @@ "node": ">=8" } }, + "node_modules/popmotion": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", + "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "dependencies": { + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + } + }, "node_modules/postcss": { "version": "8.4.21", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", @@ -7676,9 +7831,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -7687,13 +7842,13 @@ } }, "node_modules/react-dnd": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.5.tgz", - "integrity": "sha512-9i1jSgbyVw0ELlEVt/NkCUkxy1hmhJOkePoCH713u75vzHGyXhPDm28oLfc2NMSBjZRM1Y+wRjHXJT3sPrTy+A==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz", + "integrity": "sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==", "dependencies": { - "@react-dnd/invariant": "^2.0.0", - "@react-dnd/shallowequal": "^2.0.0", - "dnd-core": "14.0.1", + "@react-dnd/invariant": "^4.0.1", + "@react-dnd/shallowequal": "^4.0.1", + "dnd-core": "^16.0.1", "fast-deep-equal": "^3.1.3", "hoist-non-react-statics": "^3.3.2" }, @@ -7716,23 +7871,32 @@ } }, "node_modules/react-dnd-html5-backend": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.1.0.tgz", - "integrity": "sha512-6ONeqEC3XKVf4eVmMTe0oPds+c5B9Foyj8p/ZKLb7kL2qh9COYxiBHv3szd6gztqi/efkmriywLUVlPotqoJyw==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-16.0.1.tgz", + "integrity": "sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw==", "dependencies": { - "dnd-core": "14.0.1" + "dnd-core": "^16.0.1" + } + }, + "node_modules/react-dnd-touch-backend": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd-touch-backend/-/react-dnd-touch-backend-16.0.1.tgz", + "integrity": "sha512-NonoCABzzjyWGZuDxSG77dbgMZ2Wad7eQiCd/ECtsR2/NBLTjGksPUx9UPezZ1nQ/L7iD130Tz3RUshL/ClKLA==", + "dependencies": { + "@react-dnd/invariant": "^4.0.1", + "dnd-core": "^16.0.1" } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-is": { @@ -7795,6 +7959,18 @@ "react-dom": ">=17.0" } }, + "node_modules/react-use-measure": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz", + "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==", + "dependencies": { + "debounce": "^1.2.1" + }, + "peerDependencies": { + "react": ">=16.13", + "react-dom": ">=16.13" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -8334,9 +8510,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } @@ -8863,6 +9039,15 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/style-value-types": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", + "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "dependencies": { + "hey-listen": "^1.0.8", + "tslib": "^2.1.0" + } + }, "node_modules/stylehacks": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", @@ -9071,8 +9256,7 @@ "node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "dev": true + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "node_modules/tty-browserify": { "version": "0.0.0", @@ -11179,6 +11363,21 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "optional": true, + "requires": { + "@emotion/memoize": "0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "optional": true + }, "@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -11240,12 +11439,88 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==" + }, "@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@minoru/react-dnd-treeview": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/@minoru/react-dnd-treeview/-/react-dnd-treeview-3.4.4.tgz", + "integrity": "sha512-S5FRjQFag3cShU7rATx6UhaegYw+Uz3L/IXwBiD5snI+dW2Qm5Ey+8dKC+vpsVoHDYkgE/YKKWz+odGe1rNggA==", + "requires": { + "@juggle/resize-observer": "^3.3.1", + "dnd-multi-backend": "^7.0.0-alpha.4", + "framer-motion": "^6.2.8", + "react-dnd-html5-backend": "^16.0.1", + "react-dnd-touch-backend": "^16.0.1", + "react-use-measure": "^2.1.1" + } + }, + "@motionone/animation": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", + "integrity": "sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==", + "requires": { + "@motionone/easing": "^10.18.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "requires": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, + "@motionone/easing": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.18.0.tgz", + "integrity": "sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==", + "requires": { + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "@motionone/generators": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.18.0.tgz", + "integrity": "sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==", + "requires": { + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", + "tslib": "^2.3.1" + } + }, + "@motionone/types": { + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.1.tgz", + "integrity": "sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==" + }, + "@motionone/utils": { + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.18.0.tgz", + "integrity": "sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==", + "requires": { + "@motionone/types": "^10.17.1", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -11273,19 +11548,19 @@ } }, "@react-dnd/asap": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-4.0.1.tgz", - "integrity": "sha512-kLy0PJDDwvwwTXxqTFNAAllPHD73AycE9ypWeln/IguoGBEbvFcPDbCV03G52bEcC5E+YgupBE0VzHGdC8SIXg==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", + "integrity": "sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A==" }, "@react-dnd/invariant": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-2.0.0.tgz", - "integrity": "sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-4.0.2.tgz", + "integrity": "sha512-xKCTqAK/FFauOM9Ta2pswIyT3D8AQlfrYdOi/toTPEhqCuAs1v5tcJ3Y08Izh1cJ5Jchwy9SeAXmMg6zrKs2iw==" }, "@react-dnd/shallowequal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz", - "integrity": "sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-4.0.2.tgz", + "integrity": "sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA==" }, "@redux-devtools/core": { "version": "3.13.1", @@ -12389,9 +12664,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001451", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz", - "integrity": "sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==", + "version": "1.0.30001679", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001679.tgz", + "integrity": "sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==", "dev": true }, "chalk": { @@ -13001,6 +13276,11 @@ "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", "dev": true }, + "debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -13093,15 +13373,20 @@ } }, "dnd-core": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.1.tgz", - "integrity": "sha512-+PVS2VPTgKFPYWo3vAFEA8WPbTf7/xo43TifH9G8S1KqnrQu0o77A3unrF5yOugy4mIz7K5wAVFHUcha7wsz6A==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-16.0.1.tgz", + "integrity": "sha512-HK294sl7tbw6F6IeuK16YSBUoorvHpY8RHO+9yFfaJyCDVb6n7PRcezrOEOa2SBCqiYpemh5Jx20ZcjKdFAVng==", "requires": { - "@react-dnd/asap": "^4.0.0", - "@react-dnd/invariant": "^2.0.0", - "redux": "^4.1.1" + "@react-dnd/asap": "^5.0.1", + "@react-dnd/invariant": "^4.0.1", + "redux": "^4.2.0" } }, + "dnd-multi-backend": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/dnd-multi-backend/-/dnd-multi-backend-7.1.3.tgz", + "integrity": "sha512-INOAt4p/5fkaAUpXu0I+ialm1Ewi9HmIhs/558RFrhBZ0s/XGL991w3A2GvBuaPQNsZJEzCJh0mv/0dswxfSfQ==" + }, "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -13673,6 +13958,28 @@ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", "dev": true }, + "framer-motion": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "requires": { + "@emotion/is-prop-valid": "^0.8.2", + "@motionone/dom": "10.12.0", + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "popmotion": "11.0.3", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + } + }, + "framesync": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", + "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "requires": { + "tslib": "^2.1.0" + } + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -13880,6 +14187,11 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hey-listen": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", + "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -15216,6 +15528,17 @@ "find-up": "^4.0.0" } }, + "popmotion": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", + "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "requires": { + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + } + }, "postcss": { "version": "8.4.21", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", @@ -15766,40 +16089,49 @@ } }, "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dnd": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.5.tgz", - "integrity": "sha512-9i1jSgbyVw0ELlEVt/NkCUkxy1hmhJOkePoCH713u75vzHGyXhPDm28oLfc2NMSBjZRM1Y+wRjHXJT3sPrTy+A==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz", + "integrity": "sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==", "requires": { - "@react-dnd/invariant": "^2.0.0", - "@react-dnd/shallowequal": "^2.0.0", - "dnd-core": "14.0.1", + "@react-dnd/invariant": "^4.0.1", + "@react-dnd/shallowequal": "^4.0.1", + "dnd-core": "^16.0.1", "fast-deep-equal": "^3.1.3", "hoist-non-react-statics": "^3.3.2" } }, "react-dnd-html5-backend": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.1.0.tgz", - "integrity": "sha512-6ONeqEC3XKVf4eVmMTe0oPds+c5B9Foyj8p/ZKLb7kL2qh9COYxiBHv3szd6gztqi/efkmriywLUVlPotqoJyw==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-16.0.1.tgz", + "integrity": "sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw==", + "requires": { + "dnd-core": "^16.0.1" + } + }, + "react-dnd-touch-backend": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/react-dnd-touch-backend/-/react-dnd-touch-backend-16.0.1.tgz", + "integrity": "sha512-NonoCABzzjyWGZuDxSG77dbgMZ2Wad7eQiCd/ECtsR2/NBLTjGksPUx9UPezZ1nQ/L7iD130Tz3RUshL/ClKLA==", "requires": { - "dnd-core": "14.0.1" + "@react-dnd/invariant": "^4.0.1", + "dnd-core": "^16.0.1" } }, "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" } }, "react-is": { @@ -15835,6 +16167,14 @@ "trix": "^1.3.1" } }, + "react-use-measure": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz", + "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==", + "requires": { + "debounce": "^1.2.1" + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -16242,9 +16582,9 @@ } }, "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "requires": { "loose-envify": "^1.1.0" } @@ -16688,6 +17028,15 @@ } } }, + "style-value-types": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", + "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "requires": { + "hey-listen": "^1.0.8", + "tslib": "^2.1.0" + } + }, "stylehacks": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", @@ -16830,8 +17179,7 @@ "tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "dev": true + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "tty-browserify": { "version": "0.0.0", diff --git a/package.json b/package.json index 53d53a2..ba47c04 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,13 @@ "vue-template-compiler": "^2.7.14" }, "dependencies": { + "@minoru/react-dnd-treeview": "^3.4.4", "axios": "^1.3.2", "clsx": "^2.1.0", - "react": "^18.2.0", - "react-dnd": "^14.0.4", - "react-dnd-html5-backend": "^14.0.2", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^18.3.1", "react-redux": "^8.0.5", "react-trix": "^0.10.0", "redux": "^4.2.1", diff --git a/public/js/app.js b/public/js/app.js index 965e5fe..123aca5 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[773],{957:(t,e,r)=>{"use strict";var n=r(294),o=r(745),i=r(688),a=r(798),c=r(935);let u=function(t){t()};const s=()=>u,l=(0,n.createContext)(null);function f(){return(0,n.useContext)(l)}let p=()=>{throw new Error("uSES not initialized!")};const d=(t,e)=>t===e;function h(t=l){const e=t===l?f:()=>(0,n.useContext)(t);return function(t,r=d){const{store:o,subscription:i,getServerState:a}=e(),c=p(i.addNestedSub,o.getState,a||o.getState,t,r);return(0,n.useDebugValue)(c),c}}const y=h();r(679),r(973);const m={notify(){},get:()=>[]};function b(t,e){let r,n=m;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){const t=s();let e=null,r=null;return{clear(){e=null,r=null},notify(){t((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){let t=[],r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(t){let n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}const a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=m)},getListeners:()=>n};return a}const v=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?n.useLayoutEffect:n.useEffect;let g=null;const w=function({store:t,context:e,children:r,serverState:o}){const i=(0,n.useMemo)((()=>{const e=b(t);return{store:t,subscription:e,getServerState:o?()=>o:void 0}}),[t,o]),a=(0,n.useMemo)((()=>t.getState()),[t]);v((()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[i,a]);const c=e||l;return n.createElement(c.Provider,{value:i},r)};function j(t=l){const e=t===l?f:()=>(0,n.useContext)(t);return function(){const{store:t}=e();return t}}const O=j();function _(t=l){const e=t===l?O:j(t);return function(){return e().dispatch}}const S=_();var x,P;x=a.useSyncExternalStoreWithSelector,p=x,(t=>{g=t})(i.useSyncExternalStore),P=c.unstable_batchedUpdates,u=P;var k=r(890);function E(t){return function(e){var r=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(r,n,t):e(o)}}}}var C=E();C.withExtraArgument=E;const R=C;function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function T(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:I,e=arguments.length>1?arguments[1]:void 0;return"cmf/update"===e.type?L(L({},t),{},{title:e.payload.title,version:e.payload.version}):t},auth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"auth/loggedin":return B(B({},t),{},{isLoggedIn:!0,user:e.payload});case"auth/loggedout":return B(B({},t),{},{isLoggedIn:!1,user:null});default:return t}},location:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"location/refresh":return H(H({},t),{},{refresh:!0});case"location/stop-refresh":return H(H({},t),{},{refresh:!1});case"location/update":var r=H(H({},t.current),e.payload);return H(H({},t),{},{previous:H({},t.current),current:H({},r)});default:return t}},media:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ut,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"media/init":return at(at({},t),{},{isInitialised:!0,directory:e.payload.directory,path:e.payload.path,directories:e.payload.directories,files:e.payload.files});case"media/path/update":return at(at({},t),{},{path:e.payload});case"media/directory/update":return at(at({},t),{},{directory:e.payload});case"media/directories/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?at(at({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))}):at({},t);case"media/directories/update":return at(at({},t),{},{directories:e.payload});case"media/directories/rename":var r=nt(t.directories).map((function(t){return at(at({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return at(at({},t),{},{directories:r});case"media/directories/delete":return at(at({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))});case"media/directories/add":return at(at({},t),{},{directories:[].concat(nt(t.directories),[e.payload]).sort((function(t,e){return t.name.toLowerCase()>e.name.toLowerCase()?1:-1}))});case"media/files/label":var n=nt(t.files).map((function(t){return at(at({},t),{},{label:t.id===e.fileId?e.label:t.label})}));return at(at({},t),{},{files:n});case"media/files/changeProperties":var o=nt(t.files).map((function(t){return t[e.property]=e.fileIds.includes(t.id)?e.value:t[e.property],t}));return at(at({},t),{},{files:o});case"media/files/changeProperty":var i=nt(t.files).map((function(t){return t[e.property]=t.id===e.fileId?e.value:t[e.property],t}));return at(at({},t),{},{files:i});case"media/files/delete":return at(at({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))});case"media/files/add":return at(at({},t),{},{files:[].concat(nt(t.files),[e.payload])});case"media/files/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?at(at({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))}):at({},t);case"media/files/rename":var a=nt(t.files).map((function(t){return at(at({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return at(at({},t),{},{files:a});case"media/files/update":return at(at({},t),{},{files:e.payload});case"media/view/update":return at(at({},t),{},{viewMode:e.payload});default:return t}},modules:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,e=arguments.length>1?arguments[1]:void 0;return"modules/update"===e.type?V(V({},t),{},{all:e.payload.all,primary:e.payload.primary,secondary:e.payload.secondary}):t},language:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et,e=arguments.length>1?arguments[1]:void 0;return"language/update"===e.type?X(X({},t),{},{language:e.payload}):t}});const lt=st;const ft={get:function(t){var e=document.querySelector('meta[name="'+t+'"]');return e?e.getAttribute("content"):null}},pt={get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=window.localStorage.getItem(t);return r||null===e?r:e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},clear:function(){window.localStorage.clear()}};var dt=function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=t.split("."),n=window.i18n,o=0;o1&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("button");return r.setAttribute("type","button"),r.classList.add("button"),r.textContent=t,e&&r.addEventListener("click",e),r},i18nNotify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.notify(mt.get(t,e))},notify:function(t){var e=this;this.notificationStackEl||(this.notificationStackEl=document.createElement("div"),this.notificationStackEl.classList.add("notification-stack"),document.body.appendChild(this.notificationStackEl));var r=document.createElement("div");r.classList.add("notification"),r.textContent=bt.toUpperCaseFirst(t),this.notificationStackEl.appendChild(r),setTimeout((function(){r.classList.add("notification--hidden"),setTimeout((function(){return e.notificationStackEl.removeChild(r)}),250)}),3e3)},copyText:function(t,e){var r=document.createElement("textarea");r.value=t,r.style.top=0,r.style.left=0,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")&&e()}catch(t){console.error("Fallback: Oops, unable to copy text to clipboard",t)}document.body.removeChild(r)}};var gt=r(379),wt=r.n(gt),jt=r(709),Ot={insert:"head",singleton:!1};wt()(jt.Z,Ot);jt.Z.locals;const _t={scrollTop:function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},className:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return t;if("string"==typeof e&&(e=[e]),!e.length)return t;var r=" "+t+"--";return t+(e?r+e.join(r):"")},shallowEqual:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0,i=r;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function te(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}const ee={path:ft.get("cmf:path"),currentPath:{},history:[],parseLocation:function(t){var e="/"+this.path+"/",r=t.search,n=new URLSearchParams(r),o=Object.fromEntries(n),i=t.pathname,a=(i.startsWith(e)?i.slice(e.length):"").split("/");return{module:a[0],action:a[1],params:o}},update:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ht.dispatch({type:"location/update",payload:{module:t,action:e,params:r}})},goTo:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Jt.query(r),i="".concat(this.path,"/").concat(t,"/").concat(e)+(o?"?"+o:"");n?window.open(i):(window.history.pushState({},"",i),this.history.push({module:t,action:e,params:r}),this.update(t,e,r))},refresh:function(){ht.dispatch(function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){te(i,n,o,a,c,"next",t)}function c(t){te(i,n,o,a,c,"throw",t)}a(void 0)}))}}(Xt().mark((function t(e){return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"location/refresh"});case 2:e({type:"location/stop-refresh"});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},goBack:function(){var t=this.history[this.history.length-2],e=t.module,r=t.action,n=t.params;this.goTo(e,r,n)},handleRedirect:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.refresh?this.refresh():t.redirectBack?this.goBack():t.redirect&&this.goTo(t.path.module,t.redirect,e)}};function re(t){var e=y((function(t){return t.modules.primary})),r=function(e){t.onModuleSwitch&&t.onModuleSwitch(),ee.goTo(e.id,"index")},o=function(t,e){"open"===t?r(e):"open_new"===t&&window.open(e.url)},i=function(e){if(t.activeModule&&t.activeModule.id===e.id)return!0;for(var r=0;r{const e=mr.call(t);return gr[e]||(gr[e]=e.slice(8,-1).toLowerCase())});var gr;const wr=t=>(t=t.toLowerCase(),e=>vr(e)===t),jr=t=>e=>typeof e===t,{isArray:Or}=Array,_r=jr("undefined");const Sr=wr("ArrayBuffer");const xr=jr("string"),Pr=jr("function"),kr=jr("number"),Er=t=>null!==t&&"object"==typeof t,Cr=t=>{if("object"!==vr(t))return!1;const e=br(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Rr=wr("Date"),Nr=wr("File"),Tr=wr("Blob"),Lr=wr("FileList"),Dr=wr("URLSearchParams");function Ir(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),Or(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Ar="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Br=t=>!_r(t)&&t!==Ar;const Ur=(Mr="undefined"!=typeof Uint8Array&&br(Uint8Array),t=>Mr&&t instanceof Mr);var Mr;const Gr=wr("HTMLFormElement"),zr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Vr=wr("RegExp"),qr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ir(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},Yr="abcdefghijklmnopqrstuvwxyz",Wr="0123456789",$r={DIGIT:Wr,ALPHA:Yr,ALPHA_DIGIT:Yr+Yr.toUpperCase()+Wr};const Hr={isArray:Or,isArrayBuffer:Sr,isBuffer:function(t){return null!==t&&!_r(t)&&null!==t.constructor&&!_r(t.constructor)&&Pr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||mr.call(t)===e||Pr(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Sr(t.buffer),e},isString:xr,isNumber:kr,isBoolean:t=>!0===t||!1===t,isObject:Er,isPlainObject:Cr,isUndefined:_r,isDate:Rr,isFile:Nr,isBlob:Tr,isRegExp:Vr,isFunction:Pr,isStream:t=>Er(t)&&Pr(t.pipe),isURLSearchParams:Dr,isTypedArray:Ur,isFileList:Lr,forEach:Ir,merge:function t(){const{caseless:e}=Br(this)&&this||{},r={},n=(n,o)=>{const i=e&&Fr(r,o)||o;Cr(r[i])&&Cr(n)?r[i]=t(r[i],n):Cr(n)?r[i]=t({},n):Or(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(Ir(e,((e,n)=>{r&&Pr(e)?t[n]=yr(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const c={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==r&&br(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:vr,kindOfTest:wr,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(Or(t))return t;let e=t.length;if(!kr(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Gr,hasOwnProperty:zr,hasOwnProp:zr,reduceDescriptors:qr,freezeMethods:t=>{qr(t,((e,r)=>{if(Pr(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];Pr(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return Or(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Fr,global:Ar,isContextDefined:Br,ALPHABET:$r,generateString:(t=16,e=$r.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&Pr(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(Er(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=Or(t)?[]:{};return Ir(t,((t,e)=>{const i=r(t,n+1);!_r(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function Kr(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}Hr.inherits(Kr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Hr.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Zr=Kr.prototype,Jr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Jr[t]={value:t}})),Object.defineProperties(Kr,Jr),Object.defineProperty(Zr,"isAxiosError",{value:!0}),Kr.from=(t,e,r,n,o,i)=>{const a=Object.create(Zr);return Hr.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Kr.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Qr=Kr,Xr=null;var tn=r(764).lW;function en(t){return Hr.isPlainObject(t)||Hr.isArray(t)}function rn(t){return Hr.endsWith(t,"[]")?t.slice(0,-2):t}function nn(t,e,r){return t?t.concat(e).map((function(t,e){return t=rn(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const on=Hr.toFlatObject(Hr,{},null,(function(t){return/^is[A-Z]/.test(t)}));const an=function(t,e,r){if(!Hr.isObject(t))throw new TypeError("target must be an object");e=e||new(Xr||FormData);const n=(r=Hr.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!Hr.isUndefined(e[t])}))).metaTokens,o=r.visitor||s,i=r.dots,a=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Hr.isSpecCompliantForm(e);if(!Hr.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(Hr.isDate(t))return t.toISOString();if(!c&&Hr.isBlob(t))throw new Qr("Blob is not supported. Use a Buffer instead.");return Hr.isArrayBuffer(t)||Hr.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):tn.from(t):t}function s(t,r,o){let c=t;if(t&&!o&&"object"==typeof t)if(Hr.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(Hr.isArray(t)&&function(t){return Hr.isArray(t)&&!t.some(en)}(t)||(Hr.isFileList(t)||Hr.endsWith(r,"[]"))&&(c=Hr.toArray(t)))return r=rn(r),c.forEach((function(t,n){!Hr.isUndefined(t)&&null!==t&&e.append(!0===a?nn([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!en(t)||(e.append(nn(o,r,i),u(t)),!1)}const l=[],f=Object.assign(on,{defaultVisitor:s,convertValue:u,isVisitable:en});if(!Hr.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!Hr.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Hr.forEach(r,(function(r,i){!0===(!(Hr.isUndefined(r)||null===r)&&o.call(e,r,Hr.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function cn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function un(t,e){this._pairs=[],t&&an(t,this,e)}const sn=un.prototype;sn.append=function(t,e){this._pairs.push([t,e])},sn.toString=function(t){const e=t?function(e){return t.call(this,e,cn)}:cn;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ln=un;function fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pn(t,e,r){if(!e)return t;const n=r&&r.encode||fn,o=r&&r.serialize;let i;if(i=o?o(e,r):Hr.isURLSearchParams(e)?e.toString():new ln(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const dn=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Hr.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},hn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn="undefined"!=typeof URLSearchParams?URLSearchParams:ln,mn=FormData,bn=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),vn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:mn,Blob},isStandardBrowserEnv:bn,isStandardBrowserWebWorkerEnv:vn,protocols:["http","https","file","blob","url","data"]};const wn=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),c=o>=t.length;if(i=!i&&Hr.isArray(n)?n.length:i,c)return Hr.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Hr.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&Hr.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return Hr.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},jn={"Content-Type":void 0};const On={transitional:hn,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=Hr.isObject(t);o&&Hr.isHTMLForm(t)&&(t=new FormData(t));if(Hr.isFormData(t))return n&&n?JSON.stringify(wn(t)):t;if(Hr.isArrayBuffer(t)||Hr.isBuffer(t)||Hr.isStream(t)||Hr.isFile(t)||Hr.isBlob(t))return t;if(Hr.isArrayBufferView(t))return t.buffer;if(Hr.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return an(t,new gn.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return gn.isNode&&Hr.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=Hr.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return an(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(Hr.isString(t))try{return(e||JSON.parse)(t),Hr.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||On.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&Hr.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw Qr.from(t,Qr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Hr.forEach(["delete","get","head"],(function(t){On.headers[t]={}})),Hr.forEach(["post","put","patch"],(function(t){On.headers[t]=Hr.merge(jn)}));const _n=On,Sn=Hr.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xn=Symbol("internals");function Pn(t){return t&&String(t).trim().toLowerCase()}function kn(t){return!1===t||null==t?t:Hr.isArray(t)?t.map(kn):String(t)}function En(t,e,r,n){return Hr.isFunction(n)?n.call(this,e,r):Hr.isString(e)?Hr.isString(n)?-1!==e.indexOf(n):Hr.isRegExp(n)?n.test(e):void 0:void 0}class Cn{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=Pn(e);if(!o)throw new Error("header name must be a non-empty string");const i=Hr.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=kn(t))}const i=(t,e)=>Hr.forEach(t,((t,r)=>o(t,r,e)));return Hr.isPlainObject(t)||t instanceof this.constructor?i(t,e):Hr.isString(t)&&(t=t.trim())&&!function(t){return/^[-_a-zA-Z]+$/.test(t.trim())}(t)?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&Sn[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=Pn(t)){const r=Hr.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(Hr.isFunction(e))return e.call(this,t,r);if(Hr.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pn(t)){const r=Hr.findKey(this,t);return!(!r||void 0===this[r]||e&&!En(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=Pn(t)){const o=Hr.findKey(r,t);!o||e&&!En(0,r[o],o,e)||(delete r[o],n=!0)}}return Hr.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!En(0,this[o],o,t)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return Hr.forEach(this,((n,o)=>{const i=Hr.findKey(r,o);if(i)return e[i]=kn(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=kn(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Hr.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&Hr.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[xn]=this[xn]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Pn(t);e[n]||(!function(t,e){const r=Hr.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return Hr.isArray(t)?t.forEach(n):n(t),this}}Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Hr.freezeMethods(Cn.prototype),Hr.freezeMethods(Cn);const Rn=Cn;function Nn(t,e){const r=this||_n,n=e||r,o=Rn.from(n.headers);let i=n.data;return Hr.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Tn(t){return!(!t||!t.__CANCEL__)}function Ln(t,e,r){Qr.call(this,null==t?"canceled":t,Qr.ERR_CANCELED,e,r),this.name="CanceledError"}Hr.inherits(Ln,Qr,{__CANCEL__:!0});const Dn=Ln;const In=gn.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),Hr.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Hr.isString(n)&&a.push("path="+n),Hr.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Fn(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const An=gn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=Hr.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Bn=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(c){const u=Date.now(),s=n[a];o||(o=u),r[i]=c,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const s={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};s[e?"download":"upload"]=!0,t(s)}}const Mn="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Rn.from(t.headers).normalize(),i=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}Hr.isFormData(n)&&(gn.isStandardBrowserEnv||gn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const s=Fn(t.baseURL,t.url);function l(){if(!u)return;const n=Rn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Qr("Request failed with status code "+r.status,[Qr.ERR_BAD_REQUEST,Qr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),c()}),(function(t){r(t),c()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),pn(s,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new Qr("Request aborted",Qr.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new Qr("Network Error",Qr.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||hn;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new Qr(e,n.clarifyTimeoutError?Qr.ETIMEDOUT:Qr.ECONNABORTED,t,u)),u=null},gn.isStandardBrowserEnv){const e=(t.withCredentials||An(s))&&t.xsrfCookieName&&In.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&Hr.forEach(o.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),Hr.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&"json"!==i&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",Un(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Un(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{u&&(r(!e||e.type?new Dn(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(s);f&&-1===gn.protocols.indexOf(f)?r(new Qr("Unsupported protocol "+f+":",Qr.ERR_BAD_REQUEST,t)):u.send(n||null)}))},Gn={http:Xr,xhr:Mn};Hr.forEach(Gn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const zn={getAdapter:t=>{t=Hr.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;ot instanceof Rn?t.toJSON():t;function Wn(t,e){e=e||{};const r={};function n(t,e,r){return Hr.isPlainObject(t)&&Hr.isPlainObject(e)?Hr.merge.call({caseless:r},t,e):Hr.isPlainObject(e)?Hr.merge({},e):Hr.isArray(e)?e.slice():e}function o(t,e,r){return Hr.isUndefined(e)?Hr.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!Hr.isUndefined(e))return n(void 0,e)}function a(t,e){return Hr.isUndefined(e)?Hr.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function c(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(t,e)=>o(Yn(t),Yn(e),!0)};return Hr.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=u[n]||o,a=i(t[n],e[n],n);Hr.isUndefined(a)&&i!==c||(r[n]=a)})),r}const $n="1.3.2",Hn={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Hn[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Kn={};Hn.transitional=function(t,e,r){function n(t,e){return"[Axios v"+$n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new Qr(n(o," has been removed"+(e?" in "+e:"")),Qr.ERR_DEPRECATED);return e&&!Kn[o]&&(Kn[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const Zn={assertOptions:function(t,e,r){if("object"!=typeof t)throw new Qr("options must be an object",Qr.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new Qr("option "+i+" must be "+r,Qr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Qr("Unknown option "+i,Qr.ERR_BAD_OPTION)}},validators:Hn},Jn=Zn.validators;class Qn{constructor(t){this.defaults=t,this.interceptors={request:new dn,response:new dn}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Wn(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Zn.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),void 0!==n&&Zn.assertOptions(n,{encode:Jn.function,serialize:Jn.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&Hr.merge(o.common,o[e.method]),i&&Hr.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Rn.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let s;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!c){const t=[qn.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,s=Promise.resolve(e);f{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new Dn(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new to((function(e){t=e})),cancel:t}}}const eo=to;const ro={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ro).forEach((([t,e])=>{ro[e]=t}));const no=ro;const oo=function t(e){const r=new Xn(e),n=yr(Xn.prototype.request,r);return Hr.extend(n,Xn.prototype,r,{allOwnKeys:!0}),Hr.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Wn(e,r))},n}(_n);oo.Axios=Xn,oo.CanceledError=Dn,oo.CancelToken=eo,oo.isCancel=Tn,oo.VERSION=$n,oo.toFormData=an,oo.AxiosError=Qr,oo.Cancel=oo.CanceledError,oo.all=function(t){return Promise.all(t)},oo.spread=function(t){return function(e){return t.apply(null,e)}},oo.isAxiosError=function(t){return Hr.isObject(t)&&!0===t.isAxiosError},oo.mergeConfig=Wn,oo.AxiosHeaders=Rn,oo.formToJSON=t=>wn(Hr.isHTMLForm(t)?new FormData(t):t),oo.HttpStatusCode=no,oo.default=oo;const io=oo;function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function co(){co=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new x(o||[]);return n(a,"_invoke",{value:j(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(P([])));b&&b!==e&&r.call(b,i)&&(y=b);var v=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,c){var u=l(t[n],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ao(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function so(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n={file:t};return e&&(n.directory=e),ho.post("cmf/api/media/upload",Jt.formData(n),{onUploadProgress:r})},yo.media.uploadChunk=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i={status:t,filename:e,chunk:n};return r&&(i.path=r),o&&(i.directory=o),ho.post("cmf/api/media/upload-chunk",Jt.formData(i))},yo.media.path=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/path",{params:e})},yo.media.loadDirectories=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-directories",{params:e})},yo.media.loadFiles=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-files",{params:e})},yo.media.createDirectory=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={name:t};return e&&(r.directory=e),ho.post("cmf/api/media/create-directory",r)},yo.media.renameDirectory=function(t,e){return ho.post("cmf/api/media/rename-directory",{name:t,directory:e})},yo.media.deleteDirectory=function(t){return ho.post("cmf/api/media/delete-directory",{directory:t})},yo.media.moveDirectory=function(t,e){return ho.post("cmf/api/media/move-directory",{directory:t,id:e})},yo.media.renameFile=function(t,e){return ho.post("cmf/api/media/rename-file",{name:t,file:e})},yo.media.deleteFile=function(t){return ho.post("cmf/api/media/delete-file",{file:t})},yo.media.deleteFiles=function(t){return ho.post("cmf/api/media/delete-files",{files:JSON.stringify(t)})},yo.media.labelFile=function(t,e){return ho.post("cmf/api/media/label-file",{label:t,file:e})},yo.media.updateFileDescription=function(t,e){return ho.post("cmf/api/media/update-file-description",{description:t,file:e})},yo.media.updateFileCopyright=function(t,e){return ho.post("cmf/api/media/update-file-copyright",{copyright:t,file:e})},yo.media.updateFileVisibility=function(t,e){return ho.post("cmf/api/media/update-file-visibility",{visibility:t,file:e})},yo.media.updateFilesDescription=function(t,e){return ho.post("cmf/api/media/update-files-description",{description:t,files:JSON.stringify(e)})},yo.media.updateFilesCopyright=function(t,e){return ho.post("cmf/api/media/update-files-copyright",{copyright:t,files:JSON.stringify(e)})},yo.media.moveFile=function(t,e){return ho.post("cmf/api/media/move-file",{directory:t,file:e})},yo.media.moveFiles=function(t,e){return ho.post("cmf/api/media/move-files",{directory:t,files:JSON.stringify(e)})},yo.modules.index=function(){return ho.get("cmf/api/modules")},yo.modules.action=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action),{params:e})},yo.modules.get=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),{params:r})},yo.modules.post=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),Jt.formData(r))},yo.execute.get=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),{params:n})},yo.execute.post=function(t,e,r,n){return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),Jt.formData(n))};const mo=yo;function bo(t){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(t)}function vo(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1])&&(wi.set(t),gi.trigger("language.switch",{id:this.props.id,prevLanguage:this.state.language,language:t})),this.setState({language:t})}},{key:"renderLanguageSwitcher",value:function(){var t=this;return this.props.languages.map((function(e){return(0,St.jsx)("button",{type:"button",onClick:function(r){return t.switchLanguage(e)},className:"translatable__button"+(e===t.state.language?" translatable__button--active":""),children:e},e)}))}},{key:"render",value:function(){return(0,St.jsxs)("div",{className:"translatable",id:"language-"+this.props.id,children:[(0,St.jsx)("div",{className:"translatable__tabs",children:this.renderLanguageSwitcher()}),this.renderTranslatedComponents()]})}}],r&&Si(e.prototype,r),n&&Si(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(n.Component);Ei(Ri,"defaultProps",{id:null,components:[],path:{},data:{},languages:[],errors:{}});const Ni=Ri;function Ti(t){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(t)}function Li(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Di(t){for(var e=1;e5&&(t=(0,St.jsx)("div",{className:"select__search",children:(0,St.jsx)(Xi,{debounce:100,onSearch:function(t){return e.search(t)}})})),(0,St.jsxs)("div",{className:"select__dropdown",children:[t,(0,St.jsx)("div",{className:"select__list",children:(0,St.jsx)(zi,{nullable:this.props.nullable,multiple:this.props.multiple,defaultValues:this.props.multiple?this.state.value:[this.state.value],options:this.state.isSearching?this.state.searchResults:this.props.options,onChange:function(t){return e.handleSelectionChange(t)}})}),this.renderDropdownChildren()]})):null}},{key:"render",value:function(){var t,e=this;return t=this.props.multiple?this.state.value.length?this.state.value.map((function(t){return e.props.options[t]})).join(", "):this.props.nullText:this.props.options[this.state.value]?this.props.options[this.state.value]:this.props.nullText,(0,St.jsxs)("div",{className:"select",ref:this.selectRef,children:[(0,St.jsxs)("div",{className:"select__field",onClick:this.toggle.bind(this),children:[(0,St.jsx)("div",{className:"select__value",children:t}),(0,St.jsx)("div",{className:"select__icon",children:(0,St.jsx)(Wt,{name:this.state.isOpen?this.props.closeIcon:this.props.openIcon})})]}),this.renderDropdown()]})}}],r&&ra(e.prototype,r),o&&ra(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=ca(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ua,"defaultProps",{options:{},multiple:!1,value:"",search:!0,nullable:!1,nullText:"",onChange:function(t){},openIcon:"expand_more",closeIcon:"expand_less"});const sa=ua;function la(t){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(t)}function fa(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]}));var i=n.length?n[0].id:"",a=t.state.value?t.state.value:t.props.nullable?"":i;t.setState({value:a,options:o},(function(){e&&e()}))}))}},{key:"handleChange",value:function(t){this.setState({value:t})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,value:t.data.data.id})})),vt.notify(mt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),vt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Jb.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Jb.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,St.jsx)(_o,{children:(0,St.jsx)(Uo,{title:mt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,St.jsx)(Zo,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:mt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,St.jsx)("div",{className:"belongs-to-field__btn",children:(0,St.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:mt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,St.jsxs)(ge,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:[(0,St.jsx)("div",{className:"belongs-to-field",children:(0,St.jsx)("div",{className:"belongs-to-field__field",children:(0,St.jsx)(sa,{nullable:this.props.nullable,nullText:"– "+mt.get("snippets.no_singular_selected",{singular:this.props.singular})+" –",options:this.state.options,value:this.state.value,onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Uu(e.prototype,r),o&&Uu(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=Vu(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(qu,"defaultProps",{data:{},label:"",name:"",titleColumn:"",nullable:!1,plural:"",singular:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const Yu=qu;function Wu(t){return Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(t)}function $u(t,e){for(var r=0;rA2');var n=e.querySelector(".trix-button-group--block-tools");n&&n.remove();var o=e.querySelector(".trix-button-group--file-tools");o&&o.remove()}},{key:"componentDidMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(t){this.props.data[this.props.name]!==t.data[this.props.name]&&this.setState({redrawKey:this.state.redrawKey+1,value:this.props.data[this.props.name]||""})}},{key:"handleChange",value:function(t,e){this.setState({value:t})}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.value||""}},{key:"getData",value:function(t){return t[this.props.name]=this.state.value||"",t}},{key:"render",value:function(){return(0,St.jsx)(ge,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:(0,St.jsx)("div",{className:"richtext-field",children:(0,St.jsx)(rs.TrixEditor,{value:this.props.data[this.props.name]||"",onChange:this.handleChange.bind(this),onEditorReady:this.handleEditorReady.bind(this)},this.state.redrawKey)})})}}])&&is(e.prototype,r),n&&is(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(n.Component);function fs(t){return fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(t)}function ps(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rr?"left":"right",t.clientY>e?"up":"down")}}},{key:"open",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"down";this.setState({isOpen:!0,dropDirectionX:e,dropDirectionY:r},(function(){t.bindDocumentClick()}))}},{key:"close",value:function(){var t=this;this.setState({isOpen:!1},(function(){t.unbindDocumentClick()}))}},{key:"onContentClick",value:function(t){t.target.classList.contains("dropdown__content")||this.close()}},{key:"render",value:function(){var t=(0,St.jsx)(Je,{stopPropagation:this.props.stopPropagation,text:this.props.text,label:this.props.label,style:[].concat(Qs(this.props.style),["small"]),onClick:this.toggle.bind(this),icon:this.state.isOpen?this.props.closeIcon:this.props.openIcon});return this.props.text||(t=(0,St.jsx)(No,{stopPropagation:this.props.stopPropagation,name:this.state.isOpen?this.props.closeIcon:this.props.openIcon,iconStyle:"small",onClick:this.toggle.bind(this)})),(0,St.jsxs)("div",{className:_t.className("dropdown",this.props.style)+(this.state.isOpen?" dropdown--open":"")+" dropdown--"+this.state.dropDirectionX+" dropdown--"+this.state.dropDirectionY,ref:this.dropdownRef,children:[(0,St.jsx)("div",{className:"dropdown__trigger",children:t}),(0,St.jsx)("div",{className:"dropdown__content",onClick:this.onContentClick.bind(this),children:this.props.children})]})}}],r&&tl(e.prototype,r),o&&tl(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(al,"defaultProps",{label:"",text:"",style:[],autoClose:!1,openIcon:"expand_more",closeIcon:"expand_less",stopPropagation:!0});const cl=al;function ul(t){return function(t){if(Array.isArray(t))return sl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return sl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sl(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Rl(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Nl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Rl(i,n,o,a,c,"next",t)}function c(t){Rl(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Tl(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;this.props.onDirectoryClick(t)}},{key:"load",value:(i=Nl(Cl().mark((function t(){var e=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(this.props.directory).then((function(t){e.setState({directories:t.data.data})}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"loadChildren",value:(o=Nl(Cl().mark((function t(e){var r=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(e).then((function(t){var n=r.state.directoriesMap;n[e]=t.data.data,r.setState({directoriesMap:n})}));case 2:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"toggleCollapse",value:function(t){if(this.state.directoriesMap[t]){var e=this.state.directoriesMap;delete e[t],this.setState({directoriesMap:e})}else this.loadChildren(t)}},{key:"renderChildren",value:function(t){var e=this;return this.state.directoriesMap[t]?this.state.directoriesMap[t].map((function(t){return e.renderDirectory(t)})):null}},{key:"renderDirectory",value:function(t){var e=this;return(0,St.jsxs)("div",{className:"directory-tree__item",children:[(0,St.jsx)(kl,{icon:"folder",text:t.name,style:this.props.selectedDirectory===t.id?"selected":"default",onToggle:function(){return e.toggleCollapse(t.id)},onClick:function(){return e.select(t.id)}}),(0,St.jsx)("div",{className:"directory-tree__children",children:this.renderChildren(t.id)})]},t.id)}},{key:"render",value:function(){var t=this;return this.state.directories.length?(0,St.jsxs)("div",{className:"directory-tree",children:[(0,St.jsx)(kl,{icon:"home",text:mt.get("snippets.files_root"),style:null===this.props.selectedDirectory?"selected":"default",collapsible:!1,onClick:function(){return t.select()}}),this.state.directories.map((function(e){return t.renderDirectory(e)}))]}):null}}],r&&Tl(e.prototype,r),n&&Tl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(n.Component);!function(t,e,r){(e=Fl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Al,"defaultProps",{directory:null,selectedDirectory:null,onDirectoryClick:function(t){}});const Bl=Al;function Ul(t){return Ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(t)}function Ml(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r186?"#000000":"#ffffff"};function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function hf(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(e=[[mt.get("snippets.move_files",{amount:this.props.selectedFileIds.length}),"multi-move"],[mt.get("snippets.delete_files",{amount:this.props.selectedFileIds.length}),"multi-delete"]]),(0,St.jsx)(Sf,{files:this.state.files,fileLabels:this.props.fileLabels,selection:this.props.selectedFileIds,selectionMode:this.props.selectionMode,contextMenuLinks:e,onClick:function(e,r){return t.handleFileClick(e,r)},onContextClick:function(e,r){return t.onFileContextClick(e,r)}})}},{key:"renderDirectories",value:function(){var t=this;return this.props.directories.length?(0,St.jsx)(St.Fragment,{children:(0,St.jsx)(Ef,{directories:this.props.directories,contextMenuLinks:[[mt.get("snippets.rename"),"rename"],[mt.get("snippets.move"),"move"],[mt.get("snippets.delete"),"delete"]],onContextClick:function(e,r){return t.onDirectoryContextClick(e,r)},onClick:function(e,r){return t.props.onDirectoryClick(r.id)}})}):null}},{key:"renderContent",value:function(){return this.state.uploads.length||this.props.directories.length||this.state.files.length?(0,St.jsxs)("div",{className:"file-browser__content",children:[this.renderUploads(),this.renderDirectories(),this.renderFiles()]}):(0,St.jsx)("div",{className:"file-browser__content",children:(0,St.jsx)("div",{className:"file-browser__placeholder",children:(0,St.jsx)(_u,{children:mt.get("snippets.directory_is_empty")})})})}},{key:"render",value:function(){return(0,St.jsxs)("div",{className:"file-browser",children:[this.renderContent(),this.renderMoveWidget()]})}}],r&&Tf(e.prototype,r),n&&Tf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(n.Component);!function(t,e,r){(e=Af(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Bf,"defaultProps",{files:[],directories:[],currentDirectory:null,fileLabels:{},selectionMode:!1,selectedFileIds:[],selectedFiles:[],onDirectoryClick:function(t){},onFileClick:function(t){},onDirectoryDelete:function(t){},onDirectoryRename:function(t,e){},onDirectoryMove:function(t,e){},onFileDelete:function(t){},onFileRename:function(t){},onFileMove:function(t,e){},onFileOpen:function(t){},onSelectionChange:function(t,e){},onSelectionDelete:function(t,e){},onSelectionMove:function(t,e){}});const Uf=Bf;var Mf=r(195),Gf={insert:"head",singleton:!1};wt()(Mf.Z,Gf);Mf.Z.locals;function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Vf(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:function(){},n=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:function(){};Xf++,Qf.push([Xf,t,e,r]),gi.trigger("media.upload.queued",{id:Xf,size:t.size,filename:t.name}),Jf||this.process()},process:function(){var t=this;if(Qf.length){Jf=!0;var e=Qf[0];this.processChunkUpload(e[1],e[2],(function(t){gi.trigger("media.upload.start",{id:e[0],size:e[1].size,filename:t})}),(function(t){gi.trigger("media.upload.progress",{id:e[0],progress:t})}),(function(r){Jf=!1,Qf.shift(),t.process(),gi.trigger("media.upload.success",{id:e[0],file:r}),e[3](r)}),(function(){gi.trigger("media.upload.fail",{id:e[0]}),Jf=!1,Qf.shift(),t.process()}))}},isDone:function(){return 0===Qf.length},processChunkUpload:function(t,e,r,n,o,i){var a,c,u,s=524288,l=Math.ceil(t.size/s),f=0,p=t.name;!function d(){(c=f*s)>t.size&&(c=u+1),u=c+s>=t.size?t.size:c+s;var h=0===f?"start":f===l?"end":"progress";"start"===h&&r(p),mo.media.uploadChunk(h,p,a||null,t.slice(c,u),e).then((function(t){var e=t.data;("created"===e.status&&(a=e.path),++f<=l)?(n(f/l*100),d()):o(e.data)}),(function(t){i()}))}()}};function ep(t){var e=function(e){tp.queueMultiple(e,t.directory,(function(e){t.onFileUploaded(e),tp.isDone()&&t.onUploadDone()}))};return(0,St.jsxs)("div",{className:"file-uploader",children:[(0,St.jsx)("div",{className:"file-uploader__input",children:(0,St.jsx)("input",{type:"file",name:"file-uploader",multiple:!0,onChange:function(t){e(t.target.files)}.bind(this)})}),(0,St.jsx)("div",{className:"file-uploader__placeholder",children:(0,St.jsx)(_u,{children:mt.get("snippets.select_files_from_computer")})})]})}ep.defaultProps={directory:null,onUploadDone:function(){},onFileUploaded:function(t){}};const rp=ep;function np(t){return np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(t)}function op(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;t.isFile?t.file((function(t){".DS_Store"!==t.name&&e.upload(t,r)})):t.isDirectory&&mo.media.createDirectory(t.name,r).then((function(r){var n=r.data.data;e.props.onCreateDirectory(n),t.createReader().readEntries((function(t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Fp(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ap(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fp(i,n,o,a,c,"next",t)}function c(t){Fp(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Bp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Up(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==n[0]?n[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,n){var a=t.data.data,c=e.data.data,u=n.data.data,s=a[a.length-1];i({type:"media/init",payload:{directory:s,path:a,directories:c,files:u}}),o(Up(Up({},r),{},{isLoading:!1}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),d=function(e,n){o(Up(Up({},r),{},{selectedFileIds:e,selectedFiles:n})),t.onSelectionChange(e,n)},h=function(){t.onSelectionConfirm(r.selectedFileIds,r.selectedFiles)},m=function(t){var e=r.selectedFileIds.filter((function(e){return e!==t})),n=r.selectedFiles.filter((function(e){return e.id!==t}));o(Up(Up({},r),{},{selectedFileIds:e,selectedFiles:n}))},b=function(){t.onCancel()},v=function(t){p(t)},g=function(){vt.i18nNotify("snippets.files_uploaded")},w=function(t){!function(t){o(Up(Up({},r),{},{selectedFileIds:[].concat(Dp(r.selectedFileIds),[t.id]),selectedFiles:[].concat(Dp(r.selectedFiles),[t])}))}(t),i({type:"media/files/add",payload:t})},j=function(){var t=Ap(Ip().mark((function t(e){var r,n;return Ip().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.createDirectory(e,s?s.id:null);case 4:r=t.sent,n=r.data.data,vt.i18nNotify("snippets.directory_created"),i({type:"media/directories/add",payload:n}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),vt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),O=function(){var t=Ap(Ip().mark((function t(e,r){var n,o;return Ip().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/files/rename",payload:o}),vt.i18nNotify("snippets.file_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),vt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),_=function(){var t=Ap(Ip().mark((function t(e,r){var n,o;return Ip().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/directories/rename",payload:o}),vt.i18nNotify("snippets.directory_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),vt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),x=function(t,e){mo.media.moveFiles(t,e).then((function(t){vt.i18nNotify("snippets.files_moved"),p(s?s.id:null)}),(function(t){vt.i18nNotify("snippets.file_not_moved")}))},P=function(t,e){mo.media.moveFile(t,e).then((function(t){vt.i18nNotify("snippets.file_moved"),p(s?s.id:null)}),(function(t){vt.i18nNotify("snippets.file_not_moved")}))},k=function(){vt.prompt({title:mt.get("snippets.new_directory"),confirmButtonText:mt.get("snippets.confirm"),cancelButtonText:mt.get("snippets.cancel"),confirm:function(t){return j(t)}})},E=function(){var t=[[mt.get("snippets.deselect"),"deselect"],[mt.get("snippets.jump_to_folder"),"jump_to"]];return r.selectedFiles.length?(0,St.jsxs)("div",{className:"file-picker-widget__selection",children:[(0,St.jsxs)("div",{className:"file-picker-widget__selection-header",children:[mt.get("snippets.your_selection")," (",r.selectedFiles.length,")"]}),r.selectedFiles.map((function(e,r){return(0,St.jsx)("div",{className:"file-picker-widget__file",children:(0,St.jsx)(qt,{links:t,onClick:function(t){return function(t,e){"jump_to"===t?p(e.directory?e.directory.id:null):"deselect"===t&&m(e.id)}(t,e)},children:(0,St.jsx)(Of,{file:e,viewMode:"minimal",actions:[(0,St.jsx)(No,{name:"delete",style:"transparent",onClick:function(t){return m(e.id)}},"delete")]})})},r)}))]}):(0,St.jsx)(_u,{icon:"checklist",children:mt.get("snippets.your_selection_is_empty")})};return(0,St.jsx)(Uo,{style:["modal","wide"],closeable:!0,onClose:b,title:[(0,St.jsx)(cl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,St.jsx)(Bl,{selectedDirectory:s?s.id:null,onDirectoryClick:function(t){return v(t)}})},"path"),(0,St.jsx)(Hf,{items:u,onClick:function(t){t?v(t.id):v()}},"breadcrumbs")],actions:[(0,St.jsx)(Np,{},"view-switcher"),(0,St.jsx)(Je,{text:mt.get("snippets.new_directory"),style:["secondary","small"],onClick:k},"new-dir"),(0,St.jsx)(cl,{text:mt.get("snippets.upload"),style:["primary","small"],children:(0,St.jsx)(rp,{directory:s?s.id:null,onFileUploaded:w,onUploadDone:g})},"upload")],footer:[(0,St.jsx)(Je,{text:mt.get("snippets.cancel"),style:["secondary"],onClick:b},"cancel"),(0,St.jsx)(Je,{text:t.selectionMode?mt.get("snippets.confirm_selection"):mt.get("snippets.select_file"),style:r.selectedFileIds.length?[]:["disabled"],onClick:r.selectedFileIds.length?h:null},"confirm")],children:r.isLoading?null:(0,St.jsx)(sp,{sidebar:E(),children:(0,St.jsx)(wp,{directory:s?s.id:null,onCreateDirectory:j,onUploadDone:g,children:(0,St.jsx)(Uf,{fileLabels:t.fileLabels,currentDirectory:s,selectionMode:t.selectionMode,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,directories:l,files:f,onDirectoryRename:_,onFileRename:O,onFileMove:P,onDirectoryClick:function(t){return v(t)},onSelectionChange:d,onSelectionMove:x})})})})}qp.defaultProps={multiple:!1,onSelectionChange:function(t,e){},onSelectionConfirm:function(t,e){},onCancel:function(){},defaultDirectoryId:null,defaultSelectedFileIds:[],defaultSelectedFiles:[],selectionMode:!1,fileLabels:{}};const Yp=qp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function $p(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedBlocks.length-1)){var e=this.syncBlocksData(),r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedBlocks:e}),vt.notify(mt.get("snippets.order_changed"))}}},{key:"removeBlock",value:function(t,e){var r=this;vt.confirm({title:mt.get("snippets.delete_singular_title",{singular:this.props.singular}),text:mt.get("snippets.delete_singular_text",{singular:this.props.singular}),confirm:function(){var n=r.state.blocksToRemoveById,o=r.state.blocksToRemoveByOrder,i=r.syncBlocksData();i.splice(t,1),e?n.push(e):o.push(t),r.setState({addedBlocks:i,blocksToRemoveById:n,blocksToRemoveByOrder:o}),vt.notify(mt.get("snippets.singular_deleted",{singular:r.props.singular}))}})}},{key:"addBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getBlockDefinition(t),n=this.state.addedBlocks,o={id:null,name:r.name,type:r.type,components:r.components,data:{}};null!==e?(n.splice(e,0,o),vt.notify(mt.get("snippets.singular_inserted",{singular:this.props.singular}))):(n.push(o),vt.notify(mt.get("snippets.singular_added",{singular:this.props.singular}))),this.setState({addedBlocks:n})}},{key:"renderAddBlockDropdown",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.getOwnPropertyNames(this.props.blocks);return n.length?1===n.length?t?(0,St.jsx)(Je,{icon:"add",style:["small","secondary"],text:t,stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,St.jsx)(No,{name:"post_add",iconStyle:"small",stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,St.jsx)(cl,{style:["secondary"],autoClose:!0,text:t,openIcon:"post_add",closeIcon:"post_add",children:(0,St.jsx)(It,{stopPropagation:!1,links:this.getTypeLinks(),onClick:function(t){return e.addBlock(t,r)}})},r):null}},{key:"optionDropdownClick",value:function(t,e,r){"delete"===t&&this.removeBlock(e,r)}},{key:"getTypeLinks",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[t.props.blocks[e].name,e]}))}},{key:"getTypeLinksInsertBelow",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[mt.get("snippets.insert_singular_below",{singular:t.props.blocks[e].name}),e]}))}},{key:"renderContentBlocks",value:function(){var t=this;return this.componentLists=[],this.state.addedBlocks.length?this.state.addedBlocks.map((function(e,r){if(!e)return null;var n=Jb.renderComponentsWith(e.components,e.data,t.props.path,(function(t,e){return(0,St.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0);return t.componentLists.push([n,e.id,e.type]),(0,St.jsx)("div",{className:"content-blocks__item",children:(0,St.jsx)(md,{title:e.name,actions:[(0,St.jsx)(No,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}},0),(0,St.jsx)(No,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Bd(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ud(t,e){for(var r=0;re?1:e>t?-1:0})),e.setState({tags:r,isLoading:!1})}));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"onCancel",value:function(){this.props.onCancel()}},{key:"onConfirm",value:function(){this.props.onConfirm(this.state.selectedTags)}},{key:"onTagClick",value:function(t){this.setState({selectedTags:[].concat(Id(this.state.selectedTags),[t])})}},{key:"onSelectedTagClick",value:function(t){var e=this.state.selectedTags.filter((function(e){return e!==t}));this.setState({selectedTags:e})}},{key:"renderContent",value:function(){return this.state.isLoading?null:this.state.tags.length?(this.state.selectedTags.length&&(t=(0,St.jsxs)("div",{className:"tags-browser__selected",children:[(0,St.jsx)("div",{className:"tags-browser__title",children:mt.get("snippets.selected_tags")}),(0,St.jsx)(Ld,{tags:this.state.selectedTags,onClick:this.onSelectedTagClick.bind(this)})]})),this.state.tags.length&&(e=(0,St.jsxs)("div",{className:"tags-browser__available",children:[(0,St.jsx)("div",{className:"tags-browser__title",children:mt.get("snippets.available_tags")}),(0,St.jsx)(Ld,{tags:this.state.tags,onClick:this.onTagClick.bind(this)})]})),(0,St.jsxs)("div",{className:"tags-browser__tags",children:[t,e]})):(0,St.jsx)(_u,{children:mt.get("snippets.no_tags_available")});var t,e}},{key:"render",value:function(){return(0,St.jsx)(Uo,{style:"modal",title:mt.get("snippets.tags"),closeable:!0,onClose:this.onCancel.bind(this),footer:[(0,St.jsx)(Je,{text:mt.get("snippets.cancel"),style:["secondary"],onClick:this.onCancel.bind(this)},0),(0,St.jsx)(Je,{text:mt.get("snippets.confirm"),onClick:this.onConfirm.bind(this)},1)],children:(0,St.jsx)("div",{className:"tags-browser",children:(0,St.jsx)("div",{className:"tags-browser__content",children:this.renderContent()})})})}}],r&&Ud(e.prototype,r),n&&Ud(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=Vd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(qd,"defaultProps",{id:0,path:{},selectedTags:[],onCancel:function(){},onConfirm:function(t){}});const Yd=qd;function Wd(t){return Wd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wd(t)}function $d(t){return function(t){if(Array.isArray(t))return Hd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Hd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hd(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:function(){};clearTimeout(this.searchTimeout),t&&this.setState({autosuggestIsOpen:!1,tags:[].concat($d(this.state.tags),[t])},e)}},{key:"removeLastTag",value:function(){this.setState({tags:this.state.tags.slice(0,-1)})}},{key:"autosuggest",value:function(t){var e=this;t.length>1&&mo.execute.get(this.props.path,this.props.id,"autosuggest",{search:t}).then((function(t){e.setState({autosuggestIsOpen:!0,autosuggest:t.data})}))}},{key:"openBrowser",value:function(){this.setState({browserIsOpen:!0})}},{key:"closeBrowser",value:function(){this.setState({browserIsOpen:!1})}},{key:"confirmBrowser",value:function(t){this.setState({tags:t,browserIsOpen:!1})}},{key:"render",value:function(){var t,e,r=this;return this.state.autosuggestIsOpen&&this.state.autosuggest.length&&(e=(0,St.jsx)("div",{className:"tags-field__autosuggest",children:this.state.autosuggest.map((function(t,e){return(0,St.jsx)("div",{className:"tags-field__autosuggestion",onClick:function(e){return r.handleSuggestionClick(t)},children:t},e)}))})),this.state.browserIsOpen&&(t=(0,St.jsx)(_o,{children:(0,St.jsx)(Yd,{id:this.props.id,path:this.props.path,selectedTags:this.state.tags,onCancel:this.closeBrowser.bind(this),onConfirm:function(t){return r.confirmBrowser(t)}})})),(0,St.jsx)(ge,{name:this.props.name,required:this.props.showRequiredIndicator,label:this.props.label,errors:this.props.errors,tooltip:this.props.tooltip,children:(0,St.jsx)("div",{className:"tags-field",children:(0,St.jsxs)("div",{className:"tags-field__wrap",children:[(0,St.jsx)("div",{className:"tags-field__browse",children:(0,St.jsx)(No,{style:"transparent",name:"fact_check",onClick:this.openBrowser.bind(this)})}),(0,St.jsx)("div",{className:"tags-field__tags",children:(0,St.jsx)(Ld,{tags:this.state.tags})}),(0,St.jsx)("div",{className:"tags-field__input",children:(0,St.jsx)("input",{className:"tags-field__input-field",ref:this.inputRef,onChange:this.handleChange.bind(this),onKeyUp:this.handleKeyUp.bind(this),onKeyDown:this.handleKeyDown.bind(this),onBlur:this.handleBlur.bind(this)})}),e,t]})})})}}],r&&Kd(e.prototype,r),o&&Kd(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}function rh(t,e){for(var r=0;r1,r=this.props.currentPaget.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,St.jsx)("div",{className:"enum-filter",children:(0,St.jsx)(cl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,St.jsx)(zi,{options:t.options,defaultValues:r.values,onChange:a,onClear:a})})})}Uh.defaultProps={id:0,type:"",options:{},field:"",label:"",data:{},onChange:function(){}};const Mh=Uh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function zh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vh(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,St.jsx)("div",{className:"enum-filter",children:(0,St.jsx)(cl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,St.jsx)(zi,{options:r.options,defaultValues:r.values,onChange:a,onClear:a})})})}$h.defaultProps={id:0,type:"",field:"",label:"",titleColumn:"",data:{},onChange:function(){}};const Hh=$h;function Kh(t){return Kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kh(t)}function Zh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(e){return t.state.options[e]}));this.setState({humanReadableValue:r.length?r.join(", "):mt.get("snippets.tags_all")}),this.props.onChange(this.props.id,e.join(","))}},{key:"clear",value:function(){this.selectListRef.current.clear()}},{key:"onCtxMenuClick",value:function(t){"clear"===t&&this.clear()}},{key:"render",value:function(){var t=this.props.label?this.props.label:mt.get("snippets.tag");return(0,St.jsx)("div",{className:"enum-filter",children:(0,St.jsx)(qt,{onClick:this.onCtxMenuClick.bind(this),links:[["Clear this filter","clear"]],children:(0,St.jsx)(cl,{stopPropagation:!1,style:["secondary"],label:t,text:this.state.humanReadableValue,children:(0,St.jsx)(zi,{options:this.state.options,onChange:this.handleChange.bind(this),onClear:this.handleChange.bind(this),ref:this.selectListRef})})})})}}],r&&Zh(e.prototype,r),o&&Zh(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=ty(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ey,"defaultProps",{id:0,type:"",label:"",onChange:function(){}});const ry=ey;function ny(t){return ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(t)}function oy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function iy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5];return t.map((function(t,c){var u=a?n.createRef():null,s=ly[t.type];return{filter:o((0,St.jsx)(s,dy(dy({},t),{},{data:e,path:r,onChange:i})),c),ref:u}}))}};function my(t){return my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(t)}function by(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function vy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{};this.state.searchKeyword&&(e.search=this.state.searchKeyword);for(var r=!1,n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]})),t.setState({items:n,options:o},(function(){e&&e()}))}))}},{key:"getData",value:function(t){return t[this.props.name]=this.state.selectedItems||[],t}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.selectedItemsIds||[]}},{key:"handleChange",value:function(t){this.setState({selectedItemsIds:t,selectedItems:this.state.items.filter((function(e){return t.includes("".concat(e.id))}))})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,selectedItemsIds:[].concat($y(e.state.selectedItemsIds),[t.data.data.id])})})),vt.notify(mt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),vt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Jb.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Jb.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,St.jsx)(_o,{children:(0,St.jsx)(Uo,{title:mt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,St.jsx)(Zo,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:mt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,St.jsx)("div",{className:"many-to-many-select-field__btn",children:(0,St.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:mt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,St.jsxs)(ge,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,errors:this.props.errors,children:[(0,St.jsx)("div",{className:"many-to-many-select-field",children:(0,St.jsx)("div",{className:"many-to-many-select-field__field",children:(0,St.jsx)(sa,{multiple:!0,value:this.state.selectedItemsIds,options:this.state.options,nullText:"– "+mt.get("snippets.no_plural_selected",{plural:this.props.plural})+" –",onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Ky(e.prototype,r),o&&Ky(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=Xy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(tm,"defaultProps",{path:{},data:{},label:"",name:"",style:"",singular:"",plural:"",titleColumn:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const em=tm;function rm(t){return rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(t)}function nm(t){return function(t){if(Array.isArray(t))return om(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return om(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return om(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function om(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedItems.length-1)){var e=this.state.addedItems,r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedItems:e})}}},{key:"removeItem",value:function(t){var e=this.state.addedItems;e.splice(t,1),this.setState({addedItems:e})}},{key:"renderItems",value:function(){var t=this;return this.componentLists=[],this.state.addedItems.length?this.state.addedItems.map((function(e,r){var n=Jb.renderComponentsWith(t.props.components,e,t.props.path,(function(t,e){return(0,St.jsx)("div",{className:"json-field__component",children:t},e)}),!0,t.props.errors);return t.componentLists.push(n),(0,St.jsxs)("div",{className:"json-field__item",children:[(0,St.jsx)("div",{className:"json-field__item-content",children:n.map((function(t){return t.component}))}),(0,St.jsxs)("div",{className:"json-field__item-actions",children:[(0,St.jsx)(No,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}}),(0,St.jsx)(No,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null,e={},r={};this.componentList.forEach((function(t){t.ref.current.getData&&t.ref.current.getData(e),t.ref.current.handleSubmit&&t.ref.current.handleSubmit(r)})),this.setState({isStored:!0,data:e,submitData:r,isOpen:!1},(function(){t&&t()}))}},{key:"renderComponents",value:function(){return this.componentList=Jb.renderComponentsWith(this.props.components,this.state.isStored?this.state.data:this.props.data,this.props.path,(function(t,e){return(0,St.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0),this.componentList.map((function(t){return t.component}))}},{key:"renderWidget",value:function(){var t=this;return(0,St.jsx)(_o,{children:(0,St.jsx)(Uo,{title:this.props.title,style:"modal",closeable:!0,onClose:this.close.bind(this),footer:[(0,St.jsx)(Je,{text:"Confirm",onClick:function(){t.store()}},"confirm")],children:this.renderComponents()})})}},{key:"render",value:function(){return(0,St.jsxs)(n.Fragment,{children:[(0,St.jsx)(ge,{label:this.props.label,tooltip:this.props.tooltip,children:"link"===this.props.style?(0,St.jsx)(ir,{style:this.props.style,onClick:this.open.bind(this),text:this.props.title}):(0,St.jsx)(Je,{style:["small","secondary"],text:this.props.title,onClick:this.open.bind(this)})}),(0,St.jsx)("div",{style:{display:this.state.isOpen?"block":"none"},children:this.renderWidget()})]})}}],r&&Ob(e.prototype,r),o&&Ob(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.Component);!function(t,e,r){(e=Pb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(kb,"defaultProps",{title:"",label:"",components:[],path:{},data:{},errors:{},style:null});const Eb=kb;function Cb(t){return Cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cb(t)}function Rb(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return t.map((function(t,c){var u=null;i&&(u=n.createRef());var s=Wb[t.type];return{component:o((0,St.jsx)(s,Kb(Kb({},t),{},{data:e,errors:a,path:r,ref:u})),c),ref:u}}))}};var Qb=r(498),Xb={insert:"head",singleton:!1};wt()(Qb.Z,Xb);Qb.Z.locals;function tv(t){return(0,St.jsx)("div",{className:_t.className("checkbox",t.style)+(t.checked?" checkbox--checked":""),onClick:t.onClick})}tv.defaultProps={style:[],checked:!1,onClick:function(){}};const ev=tv;function rv(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function cv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uv(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==f[0]?f[0]:{},i=!1,c=0;c0?(0,St.jsx)("div",{className:"wizard__footer-component",children:(0,St.jsx)(ir,{onClick:this.goToPrev.bind(this),text:"Previous"})},1):null,(0,St.jsx)("div",{className:"wizard__footer-component",children:(0,St.jsx)(Je,{style:"large",onClick:this.goToNext.bind(this),text:this.isLastStep()?mt.get("snippets.create"):mt.get("snippets.next")})},2)]}},{key:"renderWizardContent",value:function(){var t=this;return this.props.steps.map((function(e,r){return(0,St.jsx)("div",{className:"wizard__step-content",style:{display:r===t.state.currentStepIndex?"block":"none"},children:t.componentLists[r].map((function(t){return t.component}))},r)}))}},{key:"isLastStep",value:function(){return this.state.currentStepIndex===this.props.steps.length-1}},{key:"goTo",value:function(t){(t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Yg(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==n[0]?n[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,n){var i=t.data.data,a=e.data.data,c=n.data.data,u=i[i.length-1];p({type:"media/init",payload:{directory:u,path:i,directories:a,files:c}}),o(Yg(Yg({},r),{},{isLoading:!1,currentFile:null,selectedFiles:[],selectedFileIds:[]}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){i.current.params.directory?d(i.current.params.directory):d()},m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?ee.goTo(i.current.module,i.current.action,{directory:t}):ee.goTo(i.current.module,i.current.action)},b=function(){o(Yg(Yg({},r),{},{currentFile:null,selectedFiles:[],selectedFileIds:[]}))},v=function(t,e){e.length?1===e.length?o(Yg(Yg({},r),{},{currentFile:e[0],selectedFiles:e,selectedFileIds:t})):o(Yg(Yg({},r),{},{currentFile:null,selectedFiles:e,selectedFileIds:t})):b()},g=function(){var t=Hg(Vg().mark((function t(e){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteDirectory(e);case 3:p({type:"media/directories/delete",directoryIds:[e]}),vt.i18nNotify("snippets.directory_deleted"),b(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),vt.i18nNotify("snippets.directory_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),w=function(){var t=Hg(Vg().mark((function t(e,r){var n;return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,p({type:"media/directories/rename",payload:n.data.data}),vt.i18nNotify("snippets.directory_renamed"),b(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),vt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),j=function(){var t=Hg(Vg().mark((function t(e,r){var n;return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=12;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,p({type:"media/files/rename",payload:n.data.data}),vt.i18nNotify("snippets.file_renamed"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),vt.i18nNotify("snippets.changes_unsuccessful");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var t=Hg(Vg().mark((function t(e){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFile(e);case 3:p({type:"media/files/delete",fileIds:[e]}),vt.i18nNotify("snippets.file_deleted"),b(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),vt.notify(mt.get("snippets.file_not_deleted"));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),_=function(){var t=Hg(Vg().mark((function t(e){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFiles(e);case 3:p({type:"media/files/delete",fileIds:e}),vt.i18nNotify("snippets.amount_files_deleted",{amount:e.length}),b(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),vt.i18nNotify("snippets.files_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=Hg(Vg().mark((function t(e,r){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.labelFile(e,r);case 3:p({type:"media/files/label",fileId:r,label:e}),vt.i18nNotify("snippets.changes_successful"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),vt.i18nNotify("snippets.changes_unsuccessful");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),P=function(){var t=Hg(Vg().mark((function t(e,r,n){var o;return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFile"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperty",fileId:n,property:e,value:r}),vt.notify(mt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),vt.notify(mt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),k=function(){var t=Hg(Vg().mark((function t(e,r,n){var o;return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFiles"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperties",fileIds:n,property:e,value:r}),vt.notify(mt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),vt.notify(mt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),E=function(){var t=Hg(Vg().mark((function t(e,r){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveDirectory(e,r);case 3:p({type:"media/directories/move",moveToId:e,directoryIds:[r]}),vt.notify(mt.get("snippets.directory_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),vt.notify(mt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),C=function(){var t=Hg(Vg().mark((function t(e,r){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFile(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:[r]}),vt.notify(mt.get("snippets.file_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),vt.notify(mt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),R=function(){var t=Hg(Vg().mark((function t(e,r){return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFiles(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:r}),vt.notify(mt.get("snippets.files_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),vt.notify(mt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),N=function(t){window.open(t.url)},T=function(){h()},L=function(t){(!i.current.params.directory&&!t.directory||t.directory&&i.current.params.directory&&t.directory.id===i.current.params.directory)&&h()},D=function(){var t;vt.prompt({title:mt.get("snippets.new_directory_title"),confirmButtonText:mt.get("snippets.create"),cancelButtonText:mt.get("snippets.cancel"),confirm:(t=Hg(Vg().mark((function t(e){var r;return Vg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.createDirectory(e,i.current.params.directory);case 2:r=t.sent,p({type:"media/directories/add",payload:r.data.data}),vt.notify(mt.get("snippets.directory_created"));case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})})},I=function(t,e){vt.confirm({title:mt.get("snippets.delete_files_title",{amount:t.length}),text:mt.get("snippets.delete_files_text"),confirmButtonText:mt.get("snippets.delete_files_confirm",{amount:t.length}),cancelButtonText:mt.get("snippets.delete_files_cancel"),confirm:function(){return _(t)}})};return(0,St.jsxs)("div",{className:"view-media-directory"+(r.isLoading?" view-media-directory--loading":"")+(r.isDragOver?" view-media-directory--drag-over":""),children:[(0,St.jsxs)("div",{className:"view-media-directory__header",children:[(0,St.jsxs)("div",{className:"view-media-directory__header-title",children:[(0,St.jsx)(cl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,St.jsx)(Bl,{selectedDirectory:s?s.id:null,onDirectoryClick:function(t){return m(t)}})}),(0,St.jsx)(Hf,{items:u,onClick:function(t){t?m(t.id):m()}})]}),(0,St.jsxs)("div",{className:"view-media-directory__header-options",children:[(0,St.jsx)(Np,{}),(0,St.jsx)(Je,{style:["secondary","small"],onClick:D,text:mt.get("snippets.new_directory")}),(0,St.jsx)(cl,{text:mt.get("snippets.upload"),style:["primary","small"],autoClose:!0,children:(0,St.jsx)(rp,{directory:s?s.id:null,onUploadDone:T})})]})]}),(0,St.jsx)("div",{className:"view-media-directory__content",children:r.isLoading?null:(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)("div",{className:"view-media-directory__main",children:(0,St.jsx)(wp,{directory:s?s.id:null,onCreateDirectory:L,onUploadDone:T,children:(0,St.jsx)(Uf,{viewMode:c,currentDirectory:s,directories:l,files:f,fileLabels:t.fileLabels,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,onDirectoryClick:m,onDirectoryDelete:g,onDirectoryRename:w,onDirectoryMove:E,onFileDelete:O,onFileRename:j,onFileOpen:N,onFileMove:C,onSelectionMove:R,onSelectionChange:v,onSelectionDelete:I})})}),(0,St.jsx)("div",{className:"view-media-directory__side",children:r.currentFile?(0,St.jsx)(kg,{file:r.currentFile,fileLabels:t.fileLabels,onLabelFile:function(t){return x(t,r.currentFile.id)},onChangeFileProperty:function(t,e){return P(t,e,r.currentFile.id)},onDeleteFile:function(){vt.confirm({title:mt.get("snippets.delete_file_title"),text:mt.get("snippets.delete_file_text"),confirmButtonText:mt.get("snippets.delete_file_confirm"),cancelButtonText:mt.get("snippets.delete_file_cancel"),confirm:function(){return O(r.currentFile.id)}})},onRenameFile:function(){vt.prompt({title:mt.get("snippets.rename_file_title"),defaultValue:r.currentFile.name,confirmButtonText:mt.get("snippets.rename_file_confirm"),cancelButtonText:mt.get("snippets.rename_file_cancel"),confirm:function(t){mo.media.renameFile(t,r.currentFile.id).then((function(t){o(Yg(Yg({},r),{},{currentFile:t.data.data}),(function(){vt.notify(mt.get("snippets.file_renamed")),h()}))}))}})},onMoveFile:C}):r.selectedFiles.length?(0,St.jsx)(Dg,{files:r.selectedFiles,onDeleteFiles:function(){return I(r.selectedFileIds,r.selectedFiles)},onChangeFilesProperty:function(t,e){return k(t,e,r.selectedFileIds)},onMoveFiles:R}):s?(0,St.jsx)(Bg,{directory:s}):(0,St.jsx)(Gg,{})})]})})]})}Jg.defaultProps={type:"",path:{},id:0,data:{},fileLabels:{}};const Qg=Jg;function Xg(t){return Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xg(t)}function tw(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function sw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lw(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ww(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function jw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ow(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ow(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ow(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>32-e}function r(t,e){var r,n,o,i,a;return o=2147483648&t,i=2147483648&e,a=(1073741823&t)+(1073741823&e),(r=1073741824&t)&(n=1073741824&e)?2147483648^a^o^i:r|n?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function n(t,n,o,i,a,c,u){return t=r(t,r(r(function(t,e,r){return t&e|~t&r}(n,o,i),a),u)),r(e(t,c),n)}function o(t,n,o,i,a,c,u){return t=r(t,r(r(function(t,e,r){return t&r|e&~r}(n,o,i),a),u)),r(e(t,c),n)}function i(t,n,o,i,a,c,u){return t=r(t,r(r(function(t,e,r){return t^e^r}(n,o,i),a),u)),r(e(t,c),n)}function a(t,n,o,i,a,c,u){return t=r(t,r(r(function(t,e,r){return e^(t|~r)}(n,o,i),a),u)),r(e(t,c),n)}function c(t){var e,r="",n="";for(e=0;e<=3;e++)r+=(n="0"+(t>>>8*e&255).toString(16)).substr(n.length-2,2);return r}var u,s,l,f,p,d,h,y,m,b=Array();for(b=function(t){for(var e,r=t.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1),a=0,c=0;c>>29,i}(t=function(t){t=t.replace(/rn/g,"n");for(var e="",r=0;r127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(t)),d=1732584193,h=4023233417,y=2562383102,m=271733878,u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Yw(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ww(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Yw(i,n,o,a,c,"next",t)}function c(t){Yw(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $w(t){var e=S(),r=y((function(t){return t.auth})).user,n=y((function(t){return t.modules.secondary})),o=function(){var t=Ww(qw().mark((function t(){return qw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:vt.confirm({title:mt.get("snippets.logout"),confirmButtonText:mt.get("snippets.logout_confirm"),confirm:function(){var t=Ww(qw().mark((function t(){return qw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.auth.logout();case 2:e({type:"auth/loggedout"}),vt.notify("User logged out");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,St.jsxs)("div",{className:"user-panel",children:[(0,St.jsx)("div",{className:"user-panel__avatar",children:(0,St.jsx)("img",{src:zw.get(r.email),alt:r.name})}),(0,St.jsx)("div",{className:"user-panel__name",children:r.name}),(0,St.jsx)("div",{className:"user-panel__actions",children:(0,St.jsxs)(cl,{style:["secondary"],children:[(0,St.jsx)(It,{stopPropagation:!1,links:n.map((function(t){return[t.title,t.id]})),onClick:function(t){return e=t,void ee.goTo(e,"index");var e}}),(0,St.jsx)("div",{className:"user-panel__logout",children:(0,St.jsx)(Je,{stopPropagation:!1,onClick:o,style:["full","small"],text:mt.get("snippets.logout")})})]})})]})}function Hw(){return(0,St.jsxs)("div",{className:"module",children:[(0,St.jsx)("div",{className:"module__header",children:(0,St.jsx)("div",{className:"module__title",children:(0,St.jsx)(uc,{children:"Not found"})})}),(0,St.jsx)("div",{className:"module__main",children:"Are you sure you're trying to access the correct URL? No module or action was found for this request."})]})}function Kw(t){return Kw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kw(t)}function Zw(){Zw=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new x(o||[]);return n(a,"_invoke",{value:j(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(P([])));b&&b!==e&&r.call(b,i)&&(y=b);var v=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,c){var u=l(t[n],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Kw(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Jw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Qw(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],c=i[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,c)),l=0,f=c>0?a-4:a;for(r=0;r>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,s[l++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,u=n-o;cu?u:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function s(t,e,n){for(var o,i,a=[],c=e;c>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";var n=r(742),o=r(241),i=r(826);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return G(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,o){var i,a=1,c=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,c/=2,u/=2,r/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;ic&&(r=c-u),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:s>223?3:s>191?2:1;if(o+f<=r)switch(f){case 1:s<128&&(l=s);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&s)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&s)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&c)&&(u=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),c=Math.min(i,a),s=this.slice(n,o),l=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return j(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function E(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function D(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function I(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function F(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function A(t,e,r,n,i){return i||F(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,i){return i||F(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i>0)-c&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=r-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},399:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".footer-text{color:var(--fill-color-alt-3);display:block;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;text-align:center;width:100%}.footer-text a{text-decoration:underline;transition:color .5s}.footer-text a:hover{color:var(--primary-color);text-decoration:none}",""]);const i=o},451:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.boolean-switcher{background-color:var(--fill-color-alt-1);border-radius:1.3333333333rem;cursor:pointer;display:inline-block;height:1.6666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:3.3333333333rem}.boolean-switcher:after{background-color:#fff;border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:1.3333333333rem;left:.1666666667rem;position:absolute;top:.1666666667rem;transition:transform .25s;width:1.3333333333rem}.boolean-switcher--alt{background-color:#fff}.boolean-switcher--alt:after{background-color:var(--fill-color-alt-2)}.boolean-switcher--alt.boolean-switcher--checked:after{background-color:#fff}.boolean-switcher--checked{background-color:var(--primary-color-alt-1)}.boolean-switcher--checked:after{transform:translateX(1.6666666667rem)}.boolean-switcher--small{height:1rem;width:2.3333333333rem}.boolean-switcher--small:after{height:.6666666667rem;width:.6666666667rem}.boolean-switcher--small.boolean-switcher--checked:after{transform:translateX(1.3333333333rem)}',""]);const i=o},195:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'@charset "UTF-8";.breadcrumbs__list{display:flex}.breadcrumbs__list li{color:#7b7d85}.breadcrumbs__list li:after{content:"›";margin-left:.6666666667rem;margin-right:.6666666667rem}.breadcrumbs__list li:last-child{color:#464646}.breadcrumbs__list li:last-child span{cursor:default}.breadcrumbs__list li:last-child span:hover{border-bottom:0}.breadcrumbs__list li:last-child:after{display:none}.breadcrumbs__list li span{cursor:pointer}.breadcrumbs__list li span:hover{border-bottom:1px solid hsla(228,4%,50%,.5)}',""]);const i=o},314:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".button-group{border-radius:var(--border-radius);display:flex;flex-wrap:nowrap;overflow:hidden}",""]);const i=o},151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.button{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;overflow:hidden;padding:1rem 2rem;position:relative;transition:background-color .25s;white-space:nowrap}.button:after{bottom:0;box-shadow:inset 0 -2px 0 var(--primary-color-alt-1);content:"";left:0;opacity:.5;position:absolute;right:0;top:0}.button:before{border:1px solid var(--fill-color);border-radius:var(--border-radius);bottom:2px;content:"";left:2px;opacity:0;position:absolute;right:2px;top:2px;transition:opacity 1s}.button:active:before,.button:focus:before{opacity:.25}.button:hover{background-color:var(--primary-color-alt-1)}.button__icon{margin-right:.5rem}.button__label{color:#7b7d85;margin-right:.6666666667rem}.button--grouped{border-radius:0}.button--has-icon{align-items:center;display:inline-flex}.button--disabled{box-shadow:none;cursor:not-allowed;overflow:hidden}.button--disabled:after{background-color:var(--fill-color);bottom:0;box-shadow:none;content:"";left:0;opacity:.75;position:absolute;right:0;top:0}.button--secondary{background-color:var(--fill-color-alt-1);color:#464646}.button--secondary:after{display:none}.button--active,.button--secondary:hover{background-color:var(--fill-color-alt-2)}.button--outline{background-color:#fff;border:1px solid var(--fill-color-alt-1);color:var(--primary-color-alt-1)}.button--outline:after{display:none}.button--outline:hover{background-color:#fff}.button--full{justify-content:center;text-align:center;width:100%}.button--small{height:2.3rem;padding:.6666666667rem 1.3333333333rem}.button--small:after{display:none}.button--large{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}',""]);const i=o},498:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.checkbox{background-color:var(--fill-color-alt-1);cursor:pointer;display:inline-block;height:1.1666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:1.1666666667rem}.checkbox,.checkbox:after{border-radius:var(--border-radius)}.checkbox:after{background-color:#fff;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:.6666666667rem;left:.25rem;position:absolute;top:.25rem;transform:scale(0);transition:transform .25s;width:.6666666667rem}.checkbox--checked{background-color:var(--primary-color-alt-1)}.checkbox--checked:after{transform:scale(1)}',""]);const i=o},554:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".collapsible{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);margin-bottom:1rem}.collapsible__header{align-items:center;background-color:var(--fill-color);display:flex;justify-content:space-between;padding:.3333333333rem .6666666667rem}.collapsible__title{padding-left:1rem;text-align:left;width:100%}.collapsible__content{display:flex;flex-direction:column;gap:2rem;padding:.6666666667rem}.collapsible--closed .collapsible__content{display:none}.collapsible__actions{align-items:center;display:flex;gap:.6666666667rem}.collapsible__component{margin-bottom:2rem}.collapsible__component:last-child{margin-bottom:0}",""]);const i=o},709:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.ctx-overlay{position:fixed}.ctx-mount,.ctx-overlay{bottom:0;left:0;right:0;top:0;z-index:9999}.ctx-mount{position:absolute}@keyframes context-menu{0%{transform:scaleY(.85) scaleX(.85);transform-origin:0 0}to{transform:scaleY(1) scaleX(1);transform-origin:0 0}}.context-menu{width:100%}.context-menu__menu{animation:context-menu .25s;background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:0;width:20rem;z-index:1}.context-menu__wrap{position:relative;width:100%}.context-menu--open .context-menu__wrap:after{border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}',""]);const i=o},279:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},374:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.file-drop-zone{border:1px solid transparent;border-radius:var(--border-radius);display:block;width:100%}.file-drop-zone__overlay{align-items:center;bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;z-index:9998}.file-drop-zone--drag-over .file-drop-zone__overlay{opacity:1;transition:opacity .5s}.file-drop-zone--drag-over{border:1px dashed var(--primary-color);cursor:copy;position:relative}.file-drop-zone--drag-over:after{background-color:var(--fill-color);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;opacity:.85;pointer-events:none;position:absolute;right:0;top:0}',""]);const i=o},926:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".file-uploader{position:relative}.file-uploader__input{bottom:0;left:0;position:absolute;right:0;top:0}.file-uploader__input:has(input:hover){border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius)}.file-uploader__input input{cursor:pointer;height:100%;opacity:0;width:100%}",""]);const i=o},668:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{"use strict";var n=r(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(t){return n.isMemo(t)?a:c[t.$$typeof]||o}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[n.Memo]=a;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=d(r);o&&o!==h&&t(e,o,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var c=u(e),y=u(r),m=0;m{e.read=function(t,e,r,n,o){var i,a,c=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,p=r?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=c;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-s;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=s}return(d?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,c,u,s=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(c=0,a=l):a+f>=1?(c=(e*u-1)*Math.pow(2,o),a+=f):(c=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+d]=255&c,d+=h,c/=256,o-=8);for(a=a<0;t[r+d]=255&a,d+=h,a/=256,s-=8);t[r+d-h]|=128*y}},826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},425:()=>{},921:(t,e)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function j(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case c:case a:case d:return t;default:switch(t=t&&t.$$typeof){case s:case p:case m:case y:case u:return t;default:return e}}case o:return e}}}function O(t){return j(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=s,e.ContextProvider=u,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=y,e.Portal=o,e.Profiler=c,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return O(t)||j(t)===l},e.isConcurrentMode=O,e.isContextConsumer=function(t){return j(t)===s},e.isContextProvider=function(t){return j(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return j(t)===p},e.isFragment=function(t){return j(t)===i},e.isLazy=function(t){return j(t)===m},e.isMemo=function(t){return j(t)===y},e.isPortal=function(t){return j(t)===o},e.isProfiler=function(t){return j(t)===c},e.isStrictMode=function(t){return j(t)===a},e.isSuspense=function(t){return j(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===c||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===y||t.$$typeof===u||t.$$typeof===s||t.$$typeof===p||t.$$typeof===v||t.$$typeof===g||t.$$typeof===w||t.$$typeof===b)},e.typeOf=j},864:(t,e,r)=>{"use strict";t.exports=r(921)},359:(t,e)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function b(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case i:case c:case a:case p:case d:return t;default:switch(t=t&&t.$$typeof){case l:case s:case f:case y:case h:case u:return t;default:return e}}case o:return e}}}r=Symbol.for("react.module.reference")},973:(t,e,r)=>{"use strict";r(359)},53:(t,e)=>{"use strict";function r(t,e){var r=t.length;t.push(e);t:for(;0>>1,o=t[n];if(!(0>>1;ni(u,r))si(l,u)?(t[n]=l,t[s]=r,n=s):(t[n]=u,t[c]=r,n=c);else{if(!(si(l,r)))break t;t[n]=l,t[s]=r,n=s}}}return e}function i(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var s=[],l=[],f=1,p=null,d=3,h=!1,y=!1,m=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(t){for(var e=n(l);null!==e;){if(null===e.callback)o(l);else{if(!(e.startTime<=t))break;o(l),e.sortIndex=e.expirationTime,r(s,e)}e=n(l)}}function j(t){if(m=!1,w(t),!y)if(null!==n(s))y=!0,L(O);else{var e=n(l);null!==e&&D(j,e.startTime-t)}}function O(t,r){y=!1,m&&(m=!1,v(P),P=-1),h=!0;var i=d;try{for(w(r),p=n(s);null!==p&&(!(p.expirationTime>r)||t&&!C());){var a=p.callback;if("function"==typeof a){p.callback=null,d=p.priorityLevel;var c=a(p.expirationTime<=r);r=e.unstable_now(),"function"==typeof c?p.callback=c:p===n(s)&&o(s),w(r)}else o(s);p=n(s)}if(null!==p)var u=!0;else{var f=n(l);null!==f&&D(j,f.startTime-r),u=!1}return u}finally{p=null,d=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,S=!1,x=null,P=-1,k=5,E=-1;function C(){return!(e.unstable_now()-Et||125a?(t.sortIndex=i,r(l,t),null===n(s)&&t===n(l)&&(m?(v(P),P=-1):m=!0,D(j,i-a))):(t.sortIndex=c,r(s,t),y||h||(y=!0,L(O))),t},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(t){var e=d;return function(){var r=d;d=e;try{return t.apply(this,arguments)}finally{d=r}}}},840:(t,e,r)=>{"use strict";t.exports=r(53)},379:(t,e,r)=>{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function c(t){for(var e=-1,r=0;r{"use strict";var n=r(294);var o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=n.useState,a=n.useEffect,c=n.useLayoutEffect,u=n.useDebugValue;function s(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!o(t,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=i({inst:{value:r,getSnapshot:e}}),o=n[0].inst,l=n[1];return c((function(){o.value=r,o.getSnapshot=e,s(o)&&l({inst:o})}),[t,r,e]),a((function(){return s(o)&&l({inst:o}),t((function(){s(o)&&l({inst:o})}))}),[t]),u(r),r};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},139:(t,e,r)=>{"use strict";var n=r(294),o=r(688);var i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},a=o.useSyncExternalStore,c=n.useRef,u=n.useEffect,s=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var f=c(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=s((function(){function t(t){if(!u){if(u=!0,a=t,t=n(t),void 0!==o&&p.hasValue){var e=p.value;if(o(e,t))return c=e}return c=t}if(e=c,i(a,t))return e;var r=n(t);return void 0!==o&&o(e,r)?e:(a=t,c=r)}var a,c,u=!1,s=void 0===r?null:r;return[function(){return t(e())},null===s?void 0:function(){return t(s())}]}),[e,r,n,o]);var d=a(t,f[0],f[1]);return u((function(){p.hasValue=!0,p.value=d}),[d]),l(d),d}},688:(t,e,r)=>{"use strict";t.exports=r(250)},798:(t,e,r)=>{"use strict";t.exports=r(139)},328:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;ec})}},t=>{var e=e=>t(t.s=e);t.O(0,[555,170],(()=>(e(957),e(425))));t.O()}]); \ No newline at end of file +(self.webpackChunk=self.webpackChunk||[]).push([[773],{5410:(t,e,r)=>{"use strict";var n={};r.r(n),r.d(n,{FILE:()=>Rg,HTML:()=>Ig,TEXT:()=>Ng,URL:()=>Dg});var o=r(7294),i=r(745),a=r(1688),s=r(2798),u=r(3935);let c=function(t){t()};const l=()=>c,f=(0,o.createContext)(null);function p(){return(0,o.useContext)(f)}let d=()=>{throw new Error("uSES not initialized!")};const h=(t,e)=>t===e;function y(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(t,r=h){const{store:n,subscription:i,getServerState:a}=e(),s=d(i.addNestedSub,n.getState,a||n.getState,t,r);return(0,o.useDebugValue)(s),s}}const m=y();r(8679),r(2973);const v={notify(){},get:()=>[]};function b(t,e){let r,n=v;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){const t=l();let e=null,r=null;return{clear(){e=null,r=null},notify(){t((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){let t=[],r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(t){let n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}const a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=v)},getListeners:()=>n};return a}const g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?o.useLayoutEffect:o.useEffect;let w=null;const O=function({store:t,context:e,children:r,serverState:n}){const i=(0,o.useMemo)((()=>{const e=b(t);return{store:t,subscription:e,getServerState:n?()=>n:void 0}}),[t,n]),a=(0,o.useMemo)((()=>t.getState()),[t]);g((()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[i,a]);const s=e||f;return o.createElement(s.Provider,{value:i},r)};function j(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(){const{store:t}=e();return t}}const S=j();function x(t=f){const e=t===f?S:j(t);return function(){return e().dispatch}}const P=x();var _,E;_=s.useSyncExternalStoreWithSelector,d=_,(t=>{w=t})(a.useSyncExternalStore),E=u.unstable_batchedUpdates,c=E;var k=r(4890);function C(t){return function(e){var r=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(r,n,t):e(o)}}}}var T=C();T.withExtraArgument=C;const R=T;function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:A,e=arguments.length>1?arguments[1]:void 0;return"cmf/update"===e.type?I(I({},t),{},{title:e.payload.title,version:e.payload.version}):t},auth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"auth/loggedin":return B(B({},t),{},{isLoggedIn:!0,user:e.payload});case"auth/loggedout":return B(B({},t),{},{isLoggedIn:!1,user:null});default:return t}},location:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"location/refresh":return X(X({},t),{},{refresh:!0});case"location/stop-refresh":return X(X({},t),{},{refresh:!1});case"location/update":var r=X(X({},t.current),e.payload);return X(X({},t),{},{previous:X({},t.current),current:X({},r)});default:return t}},media:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"media/init":return st(st({},t),{},{isInitialised:!0,directory:e.payload.directory,path:e.payload.path,directories:e.payload.directories,files:e.payload.files});case"media/path/update":return st(st({},t),{},{path:e.payload});case"media/directory/update":return st(st({},t),{},{directory:e.payload});case"media/directories/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))}):st({},t);case"media/directories/update":return st(st({},t),{},{directories:e.payload});case"media/directories/rename":var r=ot(t.directories).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{directories:r});case"media/directories/delete":return st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))});case"media/directories/add":return st(st({},t),{},{directories:[].concat(ot(t.directories),[e.payload]).sort((function(t,e){return t.name.toLowerCase()>e.name.toLowerCase()?1:-1}))});case"media/files/label":var n=ot(t.files).map((function(t){return st(st({},t),{},{label:t.id===e.fileId?e.label:t.label})}));return st(st({},t),{},{files:n});case"media/files/changeProperties":var o=ot(t.files).map((function(t){return t[e.property]=e.fileIds.includes(t.id)?e.value:t[e.property],t}));return st(st({},t),{},{files:o});case"media/files/changeProperty":var i=ot(t.files).map((function(t){return t[e.property]=t.id===e.fileId?e.value:t[e.property],t}));return st(st({},t),{},{files:i});case"media/files/delete":return st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))});case"media/files/add":return st(st({},t),{},{files:[].concat(ot(t.files),[e.payload])});case"media/files/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))}):st({},t);case"media/files/rename":var a=ot(t.files).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{files:a});case"media/files/update":return st(st({},t),{},{files:e.payload});case"media/view/update":return st(st({},t),{},{viewMode:e.payload});default:return t}},modules:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,e=arguments.length>1?arguments[1]:void 0;return"modules/update"===e.type?H(H({},t),{},{all:e.payload.all,primary:e.payload.primary,secondary:e.payload.secondary}):t},language:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt,e=arguments.length>1?arguments[1]:void 0;return"language/update"===e.type?tt(tt({},t),{},{language:e.payload}):t}});const ft=lt;const pt={get:function(t){var e=document.querySelector('meta[name="'+t+'"]');return e?e.getAttribute("content"):null}},dt={get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=window.localStorage.getItem(t);return r||null===e?r:e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},clear:function(){window.localStorage.clear()}};var ht=function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=t.split("."),n=window.i18n,o=0;o1&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("button");return r.setAttribute("type","button"),r.classList.add("button"),r.textContent=t,e&&r.addEventListener("click",e),r},i18nNotify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.notify(vt.get(t,e))},notify:function(t){var e=this;this.notificationStackEl||(this.notificationStackEl=document.createElement("div"),this.notificationStackEl.classList.add("notification-stack"),document.body.appendChild(this.notificationStackEl));var r=document.createElement("div");r.classList.add("notification"),r.textContent=bt.toUpperCaseFirst(t),this.notificationStackEl.appendChild(r),setTimeout((function(){r.classList.add("notification--hidden"),setTimeout((function(){return e.notificationStackEl.removeChild(r)}),250)}),3e3)},copyText:function(t,e){var r=document.createElement("textarea");r.value=t,r.style.top=0,r.style.left=0,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")&&e()}catch(t){console.error("Fallback: Oops, unable to copy text to clipboard",t)}document.body.removeChild(r)}};var wt=r(3379),Ot=r.n(wt),jt=r(5709),St={insert:"head",singleton:!1};Ot()(jt.Z,St);jt.Z.locals;const xt={scrollTop:function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},className:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return t;if("string"==typeof e&&(e=[e]),!e.length)return t;var r=" "+t+"--";return t+(e?r+e.join(r):"")},shallowEqual:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0,i=r;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ee(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}const re={path:pt.get("cmf:path"),currentPath:{},history:[],parseLocation:function(t){var e="/"+this.path+"/",r=t.search,n=new URLSearchParams(r),o=Object.fromEntries(n),i=t.pathname,a=(i.startsWith(e)?i.slice(e.length):"").split("/");return{module:a[0],action:a[1],params:o}},update:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};yt.dispatch({type:"location/update",payload:{module:t,action:e,params:r}})},goTo:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Jt.query(r),i="".concat(this.path,"/").concat(t,"/").concat(e)+(o?"?"+o:"");n?window.open(i):(window.history.pushState({},"",i),this.history.push({module:t,action:e,params:r}),this.update(t,e,r))},refresh:function(){yt.dispatch(function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ee(i,n,o,a,s,"next",t)}function s(t){ee(i,n,o,a,s,"throw",t)}a(void 0)}))}}(te().mark((function t(e){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"location/refresh"});case 2:e({type:"location/stop-refresh"});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},goBack:function(){var t=this.history[this.history.length-2],e=t.module,r=t.action,n=t.params;this.goTo(e,r,n)},handleRedirect:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.refresh?this.refresh():t.redirectBack?this.goBack():t.redirect&&this.goTo(t.path.module,t.redirect,e)}};function ne(t){var e=m((function(t){return t.modules.primary})),r=function(e){t.onModuleSwitch&&t.onModuleSwitch(),re.goTo(e.id,"index")},n=function(t,e){"open"===t?r(e):"open_new"===t&&window.open(e.url)},i=function(e){if(t.activeModule&&t.activeModule.id===e.id)return!0;for(var r=0;re=>{const r=vr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wr=t=>(t=t.toLowerCase(),e=>gr(e)===t),Or=t=>e=>typeof e===t,{isArray:jr}=Array,Sr=Or("undefined");const xr=wr("ArrayBuffer");const Pr=Or("string"),_r=Or("function"),Er=Or("number"),kr=t=>null!==t&&"object"==typeof t,Cr=t=>{if("object"!==gr(t))return!1;const e=br(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Tr=wr("Date"),Rr=wr("File"),Dr=wr("Blob"),Nr=wr("FileList"),Ir=wr("URLSearchParams");function Lr(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),jr(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Mr=t=>!Sr(t)&&t!==Fr;const Br=(Ur="undefined"!=typeof Uint8Array&&br(Uint8Array),t=>Ur&&t instanceof Ur);var Ur;const Vr=wr("HTMLFormElement"),zr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Gr=wr("RegExp"),Hr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Lr(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},Wr="abcdefghijklmnopqrstuvwxyz",Yr="0123456789",qr={DIGIT:Yr,ALPHA:Wr,ALPHA_DIGIT:Wr+Wr.toUpperCase()+Yr};const $r={isArray:jr,isArrayBuffer:xr,isBuffer:function(t){return null!==t&&!Sr(t)&&null!==t.constructor&&!Sr(t.constructor)&&_r(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||vr.call(t)===e||_r(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&xr(t.buffer),e},isString:Pr,isNumber:Er,isBoolean:t=>!0===t||!1===t,isObject:kr,isPlainObject:Cr,isUndefined:Sr,isDate:Tr,isFile:Rr,isBlob:Dr,isRegExp:Gr,isFunction:_r,isStream:t=>kr(t)&&_r(t.pipe),isURLSearchParams:Ir,isTypedArray:Br,isFileList:Nr,forEach:Lr,merge:function t(){const{caseless:e}=Mr(this)&&this||{},r={},n=(n,o)=>{const i=e&&Ar(r,o)||o;Cr(r[i])&&Cr(n)?r[i]=t(r[i],n):Cr(n)?r[i]=t({},n):jr(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(Lr(e,((e,n)=>{r&&_r(e)?t[n]=mr(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&br(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:gr,kindOfTest:wr,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(jr(t))return t;let e=t.length;if(!Er(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Vr,hasOwnProperty:zr,hasOwnProp:zr,reduceDescriptors:Hr,freezeMethods:t=>{Hr(t,((e,r)=>{if(_r(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];_r(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return jr(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Ar,global:Fr,isContextDefined:Mr,ALPHABET:qr,generateString:(t=16,e=qr.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&_r(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(kr(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=jr(t)?[]:{};return Lr(t,((t,e)=>{const i=r(t,n+1);!Sr(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function Xr(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}$r.inherits(Xr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$r.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kr=Xr.prototype,Zr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Zr[t]={value:t}})),Object.defineProperties(Xr,Zr),Object.defineProperty(Kr,"isAxiosError",{value:!0}),Xr.from=(t,e,r,n,o,i)=>{const a=Object.create(Kr);return $r.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Xr.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Jr=Xr,Qr=null;var tn=r(8764).lW;function en(t){return $r.isPlainObject(t)||$r.isArray(t)}function rn(t){return $r.endsWith(t,"[]")?t.slice(0,-2):t}function nn(t,e,r){return t?t.concat(e).map((function(t,e){return t=rn(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const on=$r.toFlatObject($r,{},null,(function(t){return/^is[A-Z]/.test(t)}));const an=function(t,e,r){if(!$r.isObject(t))throw new TypeError("target must be an object");e=e||new(Qr||FormData);const n=(r=$r.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!$r.isUndefined(e[t])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&$r.isSpecCompliantForm(e);if(!$r.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if($r.isDate(t))return t.toISOString();if(!s&&$r.isBlob(t))throw new Jr("Blob is not supported. Use a Buffer instead.");return $r.isArrayBuffer(t)||$r.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):tn.from(t):t}function c(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if($r.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if($r.isArray(t)&&function(t){return $r.isArray(t)&&!t.some(en)}(t)||($r.isFileList(t)||$r.endsWith(r,"[]"))&&(s=$r.toArray(t)))return r=rn(r),s.forEach((function(t,n){!$r.isUndefined(t)&&null!==t&&e.append(!0===a?nn([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!en(t)||(e.append(nn(o,r,i),u(t)),!1)}const l=[],f=Object.assign(on,{defaultVisitor:c,convertValue:u,isVisitable:en});if(!$r.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!$r.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),$r.forEach(r,(function(r,i){!0===(!($r.isUndefined(r)||null===r)&&o.call(e,r,$r.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function sn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function un(t,e){this._pairs=[],t&&an(t,this,e)}const cn=un.prototype;cn.append=function(t,e){this._pairs.push([t,e])},cn.toString=function(t){const e=t?function(e){return t.call(this,e,sn)}:sn;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ln=un;function fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pn(t,e,r){if(!e)return t;const n=r&&r.encode||fn,o=r&&r.serialize;let i;if(i=o?o(e,r):$r.isURLSearchParams(e)?e.toString():new ln(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const dn=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$r.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},hn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn="undefined"!=typeof URLSearchParams?URLSearchParams:ln,mn=FormData,vn=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),bn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:mn,Blob},isStandardBrowserEnv:vn,isStandardBrowserWebWorkerEnv:bn,protocols:["http","https","file","blob","url","data"]};const wn=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&$r.isArray(n)?n.length:i,s)return $r.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&$r.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&$r.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return $r.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},On={"Content-Type":void 0};const jn={transitional:hn,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=$r.isObject(t);o&&$r.isHTMLForm(t)&&(t=new FormData(t));if($r.isFormData(t))return n&&n?JSON.stringify(wn(t)):t;if($r.isArrayBuffer(t)||$r.isBuffer(t)||$r.isStream(t)||$r.isFile(t)||$r.isBlob(t))return t;if($r.isArrayBufferView(t))return t.buffer;if($r.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return an(t,new gn.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return gn.isNode&&$r.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=$r.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return an(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if($r.isString(t))try{return(e||JSON.parse)(t),$r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||jn.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&$r.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw Jr.from(t,Jr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};$r.forEach(["delete","get","head"],(function(t){jn.headers[t]={}})),$r.forEach(["post","put","patch"],(function(t){jn.headers[t]=$r.merge(On)}));const Sn=jn,xn=$r.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pn=Symbol("internals");function _n(t){return t&&String(t).trim().toLowerCase()}function En(t){return!1===t||null==t?t:$r.isArray(t)?t.map(En):String(t)}function kn(t,e,r,n){return $r.isFunction(n)?n.call(this,e,r):$r.isString(e)?$r.isString(n)?-1!==e.indexOf(n):$r.isRegExp(n)?n.test(e):void 0:void 0}class Cn{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=_n(e);if(!o)throw new Error("header name must be a non-empty string");const i=$r.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=En(t))}const i=(t,e)=>$r.forEach(t,((t,r)=>o(t,r,e)));return $r.isPlainObject(t)||t instanceof this.constructor?i(t,e):$r.isString(t)&&(t=t.trim())&&!function(t){return/^[-_a-zA-Z]+$/.test(t.trim())}(t)?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&xn[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=_n(t)){const r=$r.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if($r.isFunction(e))return e.call(this,t,r);if($r.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_n(t)){const r=$r.findKey(this,t);return!(!r||void 0===this[r]||e&&!kn(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=_n(t)){const o=$r.findKey(r,t);!o||e&&!kn(0,r[o],o,e)||(delete r[o],n=!0)}}return $r.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!kn(0,this[o],o,t)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return $r.forEach(this,((n,o)=>{const i=$r.findKey(r,o);if(i)return e[i]=En(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=En(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $r.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&$r.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[Pn]=this[Pn]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=_n(t);e[n]||(!function(t,e){const r=$r.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return $r.isArray(t)?t.forEach(n):n(t),this}}Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$r.freezeMethods(Cn.prototype),$r.freezeMethods(Cn);const Tn=Cn;function Rn(t,e){const r=this||Sn,n=e||r,o=Tn.from(n.headers);let i=n.data;return $r.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Dn(t){return!(!t||!t.__CANCEL__)}function Nn(t,e,r){Jr.call(this,null==t?"canceled":t,Jr.ERR_CANCELED,e,r),this.name="CanceledError"}$r.inherits(Nn,Jr,{__CANCEL__:!0});const In=Nn;const Ln=gn.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),$r.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$r.isString(n)&&a.push("path="+n),$r.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function An(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Fn=gn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=$r.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Mn=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Un="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Tn.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}$r.isFormData(n)&&(gn.isStandardBrowserEnv||gn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const c=An(t.baseURL,t.url);function l(){if(!u)return;const n=Tn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Jr("Request failed with status code "+r.status,[Jr.ERR_BAD_REQUEST,Jr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),s()}),(function(t){r(t),s()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),pn(c,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new Jr("Request aborted",Jr.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new Jr("Network Error",Jr.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||hn;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new Jr(e,n.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,t,u)),u=null},gn.isStandardBrowserEnv){const e=(t.withCredentials||Fn(c))&&t.xsrfCookieName&&Ln.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&$r.forEach(o.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),$r.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&"json"!==i&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",Bn(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Bn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{u&&(r(!e||e.type?new In(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);f&&-1===gn.protocols.indexOf(f)?r(new Jr("Unsupported protocol "+f+":",Jr.ERR_BAD_REQUEST,t)):u.send(n||null)}))},Vn={http:Qr,xhr:Un};$r.forEach(Vn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const zn={getAdapter:t=>{t=$r.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;ot instanceof Tn?t.toJSON():t;function Yn(t,e){e=e||{};const r={};function n(t,e,r){return $r.isPlainObject(t)&&$r.isPlainObject(e)?$r.merge.call({caseless:r},t,e):$r.isPlainObject(e)?$r.merge({},e):$r.isArray(e)?e.slice():e}function o(t,e,r){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!$r.isUndefined(e))return n(void 0,e)}function a(t,e){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Wn(t),Wn(e),!0)};return $r.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=u[n]||o,a=i(t[n],e[n],n);$r.isUndefined(a)&&i!==s||(r[n]=a)})),r}const qn="1.3.2",$n={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{$n[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Xn={};$n.transitional=function(t,e,r){function n(t,e){return"[Axios v"+qn+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new Jr(n(o," has been removed"+(e?" in "+e:"")),Jr.ERR_DEPRECATED);return e&&!Xn[o]&&(Xn[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const Kn={assertOptions:function(t,e,r){if("object"!=typeof t)throw new Jr("options must be an object",Jr.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new Jr("option "+i+" must be "+r,Jr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Jr("Unknown option "+i,Jr.ERR_BAD_OPTION)}},validators:$n},Zn=Kn.validators;class Jn{constructor(t){this.defaults=t,this.interceptors={request:new dn,response:new dn}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yn(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Kn.assertOptions(r,{silentJSONParsing:Zn.transitional(Zn.boolean),forcedJSONParsing:Zn.transitional(Zn.boolean),clarifyTimeoutError:Zn.transitional(Zn.boolean)},!1),void 0!==n&&Kn.assertOptions(n,{encode:Zn.function,serialize:Zn.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&$r.merge(o.common,o[e.method]),i&&$r.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Tn.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Hn.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new In(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new to((function(e){t=e}));return{token:e,cancel:t}}}const eo=to;const ro={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ro).forEach((([t,e])=>{ro[e]=t}));const no=ro;const oo=function t(e){const r=new Qn(e),n=mr(Qn.prototype.request,r);return $r.extend(n,Qn.prototype,r,{allOwnKeys:!0}),$r.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Yn(e,r))},n}(Sn);oo.Axios=Qn,oo.CanceledError=In,oo.CancelToken=eo,oo.isCancel=Dn,oo.VERSION=qn,oo.toFormData=an,oo.AxiosError=Jr,oo.Cancel=oo.CanceledError,oo.all=function(t){return Promise.all(t)},oo.spread=function(t){return function(e){return t.apply(null,e)}},oo.isAxiosError=function(t){return $r.isObject(t)&&!0===t.isAxiosError},oo.mergeConfig=Yn,oo.AxiosHeaders=Tn,oo.formToJSON=t=>wn($r.isHTMLForm(t)?new FormData(t):t),oo.HttpStatusCode=no,oo.default=oo;const io=oo;function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function so(){so=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ao(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function co(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n={file:t};return e&&(n.directory=e),ho.post("cmf/api/media/upload",Jt.formData(n),{onUploadProgress:r})},yo.media.uploadChunk=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i={status:t,filename:e,chunk:n};return r&&(i.path=r),o&&(i.directory=o),ho.post("cmf/api/media/upload-chunk",Jt.formData(i))},yo.media.path=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/path",{params:e})},yo.media.loadDirectories=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-directories",{params:e})},yo.media.loadFiles=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-files",{params:e})},yo.media.createDirectory=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={name:t};return e&&(r.directory=e),ho.post("cmf/api/media/create-directory",r)},yo.media.renameDirectory=function(t,e){return ho.post("cmf/api/media/rename-directory",{name:t,directory:e})},yo.media.deleteDirectory=function(t){return ho.post("cmf/api/media/delete-directory",{directory:t})},yo.media.moveDirectory=function(t,e){return ho.post("cmf/api/media/move-directory",{directory:t,id:e})},yo.media.renameFile=function(t,e){return ho.post("cmf/api/media/rename-file",{name:t,file:e})},yo.media.deleteFile=function(t){return ho.post("cmf/api/media/delete-file",{file:t})},yo.media.deleteFiles=function(t){return ho.post("cmf/api/media/delete-files",{files:JSON.stringify(t)})},yo.media.labelFile=function(t,e){return ho.post("cmf/api/media/label-file",{label:t,file:e})},yo.media.updateFileDescription=function(t,e){return ho.post("cmf/api/media/update-file-description",{description:t,file:e})},yo.media.updateFileCopyright=function(t,e){return ho.post("cmf/api/media/update-file-copyright",{copyright:t,file:e})},yo.media.updateFileVisibility=function(t,e){return ho.post("cmf/api/media/update-file-visibility",{visibility:t,file:e})},yo.media.updateFilesDescription=function(t,e){return ho.post("cmf/api/media/update-files-description",{description:t,files:JSON.stringify(e)})},yo.media.updateFilesCopyright=function(t,e){return ho.post("cmf/api/media/update-files-copyright",{copyright:t,files:JSON.stringify(e)})},yo.media.moveFile=function(t,e){return ho.post("cmf/api/media/move-file",{directory:t,file:e})},yo.media.moveFiles=function(t,e){return ho.post("cmf/api/media/move-files",{directory:t,files:JSON.stringify(e)})},yo.modules.index=function(){return ho.get("cmf/api/modules")},yo.modules.action=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action),{params:e})},yo.modules.get=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),{params:r})},yo.modules.post=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),Jt.formData(r))},yo.execute.get=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),{params:n})},yo.execute.post=function(t,e,r,n){return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),Jt.formData(n))};const mo=yo;function vo(t){return vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(t)}function bo(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1])&&(wi.set(t),gi.trigger("language.switch",{id:this.props.id,prevLanguage:this.state.language,language:t})),this.setState({language:t})}},{key:"renderLanguageSwitcher",value:function(){var t=this;return this.props.languages.map((function(e){return(0,Pt.jsx)("button",{type:"button",onClick:function(r){return t.switchLanguage(e)},className:"translatable__button"+(e===t.state.language?" translatable__button--active":""),children:e},e)}))}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"translatable",id:"language-"+this.props.id,children:[(0,Pt.jsx)("div",{className:"translatable__tabs",children:this.renderLanguageSwitcher()}),this.renderTranslatedComponents()]})}}],r&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);ki(Ti,"defaultProps",{id:null,components:[],path:{},data:{},languages:[],errors:{}});const Ri=Ti;function Di(t){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(t)}function Ni(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e5&&(t=(0,Pt.jsx)("div",{className:"select__search",children:(0,Pt.jsx)(Qi,{debounce:100,onSearch:function(t){return e.search(t)}})})),(0,Pt.jsxs)("div",{className:"select__dropdown",children:[t,(0,Pt.jsx)("div",{className:"select__list",children:(0,Pt.jsx)(zi,{nullable:this.props.nullable,multiple:this.props.multiple,defaultValues:this.props.multiple?this.state.value:[this.state.value],options:this.state.isSearching?this.state.searchResults:this.props.options,onChange:function(t){return e.handleSelectionChange(t)}})}),this.renderDropdownChildren()]})):null}},{key:"render",value:function(){var t,e=this;return t=this.props.multiple?this.state.value.length?this.state.value.map((function(t){return e.props.options[t]})).join(", "):this.props.nullText:this.props.options[this.state.value]?this.props.options[this.state.value]:this.props.nullText,(0,Pt.jsxs)("div",{className:"select",ref:this.selectRef,children:[(0,Pt.jsxs)("div",{className:"select__field",onClick:this.toggle.bind(this),children:[(0,Pt.jsx)("div",{className:"select__value",children:t}),(0,Pt.jsx)("div",{className:"select__icon",children:(0,Pt.jsx)(qt,{name:this.state.isOpen?this.props.closeIcon:this.props.openIcon})})]}),this.renderDropdown()]})}}],r&&ra(e.prototype,r),n&&ra(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=sa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ua,"defaultProps",{options:{},multiple:!1,value:"",search:!0,nullable:!1,nullText:"",onChange:function(t){},openIcon:"expand_more",closeIcon:"expand_less"});const ca=ua;function la(t){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(t)}function fa(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]}));var i=n.length?n[0].id:"",a=t.state.value?t.state.value:t.props.nullable?"":i;t.setState({value:a,options:o},(function(){e&&e()}))}))}},{key:"handleChange",value:function(t){this.setState({value:t})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,value:t.data.data.id})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Zv.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Zv.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"belongs-to-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:[(0,Pt.jsx)("div",{className:"belongs-to-field",children:(0,Pt.jsx)("div",{className:"belongs-to-field__field",children:(0,Pt.jsx)(ca,{nullable:this.props.nullable,nullText:"– "+vt.get("snippets.no_singular_selected",{singular:this.props.singular})+" –",options:this.state.options,value:this.state.value,onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Bu(e.prototype,r),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gu(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hu,"defaultProps",{data:{},label:"",name:"",titleColumn:"",nullable:!1,plural:"",singular:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const Wu=Hu;function Yu(t){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(t)}function qu(t,e){for(var r=0;rA2');var n=e.querySelector(".trix-button-group--block-tools");n&&n.remove();var o=e.querySelector(".trix-button-group--file-tools");o&&o.remove()}},{key:"componentDidMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(t){this.props.data[this.props.name]!==t.data[this.props.name]&&this.setState({redrawKey:this.state.redrawKey+1,value:this.props.data[this.props.name]||""})}},{key:"handleChange",value:function(t,e){this.setState({value:t})}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.value||""}},{key:"getData",value:function(t){return t[this.props.name]=this.state.value||"",t}},{key:"render",value:function(){return(0,Pt.jsx)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"richtext-field",children:(0,Pt.jsx)(rc.TrixEditor,{value:this.props.data[this.props.name]||"",onChange:this.handleChange.bind(this),onEditorReady:this.handleEditorReady.bind(this)},this.state.redrawKey)})})}}])&&ic(e.prototype,r),n&&ic(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}function pc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rr?"left":"right",t.clientY>e?"up":"down")}}},{key:"open",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"down";this.setState({isOpen:!0,dropDirectionX:e,dropDirectionY:r},(function(){t.bindDocumentClick()}))}},{key:"close",value:function(){var t=this;this.setState({isOpen:!1},(function(){t.unbindDocumentClick()}))}},{key:"onContentClick",value:function(t){t.target.classList.contains("dropdown__content")||this.close()}},{key:"render",value:function(){var t=(0,Pt.jsx)(Je,{stopPropagation:this.props.stopPropagation,text:this.props.text,label:this.props.label,style:[].concat(Jc(this.props.style),["small"]),onClick:this.toggle.bind(this),icon:this.state.isOpen?this.props.closeIcon:this.props.openIcon});return this.props.text||(t=(0,Pt.jsx)(Ro,{stopPropagation:this.props.stopPropagation,name:this.state.isOpen?this.props.closeIcon:this.props.openIcon,iconStyle:"small",onClick:this.toggle.bind(this)})),(0,Pt.jsxs)("div",{className:xt.className("dropdown",this.props.style)+(this.state.isOpen?" dropdown--open":"")+" dropdown--"+this.state.dropDirectionX+" dropdown--"+this.state.dropDirectionY,ref:this.dropdownRef,children:[(0,Pt.jsx)("div",{className:"dropdown__trigger",children:t}),(0,Pt.jsx)("div",{className:"dropdown__content",onClick:this.onContentClick.bind(this),children:this.props.children})]})}}],r&&tl(e.prototype,r),n&&tl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(al,"defaultProps",{label:"",text:"",style:[],autoClose:!1,openIcon:"expand_more",closeIcon:"expand_less",stopPropagation:!0});const sl=al;function ul(t){return function(t){if(Array.isArray(t))return cl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return cl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cl(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Tl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Rl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Tl(i,n,o,a,s,"next",t)}function s(t){Tl(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Dl(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;this.props.onDirectoryClick(t)}},{key:"load",value:(i=Rl(Cl().mark((function t(){var e=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(this.props.directory).then((function(t){e.setState({directories:t.data.data})}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"loadChildren",value:(o=Rl(Cl().mark((function t(e){var r=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(e).then((function(t){var n=r.state.directoriesMap;n[e]=t.data.data,r.setState({directoriesMap:n})}));case 2:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"toggleCollapse",value:function(t){if(this.state.directoriesMap[t]){var e=this.state.directoriesMap;delete e[t],this.setState({directoriesMap:e})}else this.loadChildren(t)}},{key:"renderChildren",value:function(t){var e=this;return this.state.directoriesMap[t]?this.state.directoriesMap[t].map((function(t){return e.renderDirectory(t)})):null}},{key:"renderDirectory",value:function(t){var e=this;return(0,Pt.jsxs)("div",{className:"directory-tree__item",children:[(0,Pt.jsx)(El,{icon:"folder",text:t.name,style:this.props.selectedDirectory===t.id?"selected":"default",onToggle:function(){return e.toggleCollapse(t.id)},onClick:function(){return e.select(t.id)}}),(0,Pt.jsx)("div",{className:"directory-tree__children",children:this.renderChildren(t.id)})]},t.id)}},{key:"render",value:function(){var t=this;return this.state.directories.length?(0,Pt.jsxs)("div",{className:"directory-tree",children:[(0,Pt.jsx)(El,{icon:"home",text:vt.get("snippets.files_root"),style:null===this.props.selectedDirectory?"selected":"default",collapsible:!1,onClick:function(){return t.select()}}),this.state.directories.map((function(e){return t.renderDirectory(e)}))]}):null}}],r&&Dl(e.prototype,r),n&&Dl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.Component);!function(t,e,r){(e=Al(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Fl,"defaultProps",{directory:null,selectedDirectory:null,onDirectoryClick:function(t){}});const Ml=Fl;function Bl(t){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(t)}function Ul(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r186?"#000000":"#ffffff"};function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function hf(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(e=[[vt.get("snippets.move_files",{amount:this.props.selectedFileIds.length}),"multi-move"],[vt.get("snippets.delete_files",{amount:this.props.selectedFileIds.length}),"multi-delete"]]),(0,Pt.jsx)(xf,{files:this.state.files,fileLabels:this.props.fileLabels,selection:this.props.selectedFileIds,selectionMode:this.props.selectionMode,contextMenuLinks:e,onClick:function(e,r){return t.handleFileClick(e,r)},onContextClick:function(e,r){return t.onFileContextClick(e,r)}})}},{key:"renderDirectories",value:function(){var t=this;return this.props.directories.length?(0,Pt.jsx)(Pt.Fragment,{children:(0,Pt.jsx)(kf,{directories:this.props.directories,contextMenuLinks:[[vt.get("snippets.rename"),"rename"],[vt.get("snippets.move"),"move"],[vt.get("snippets.delete"),"delete"]],onContextClick:function(e,r){return t.onDirectoryContextClick(e,r)},onClick:function(e,r){return t.props.onDirectoryClick(r.id)}})}):null}},{key:"renderContent",value:function(){return this.state.uploads.length||this.props.directories.length||this.state.files.length?(0,Pt.jsxs)("div",{className:"file-browser__content",children:[this.renderUploads(),this.renderDirectories(),this.renderFiles()]}):(0,Pt.jsx)("div",{className:"file-browser__content",children:(0,Pt.jsx)("div",{className:"file-browser__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.directory_is_empty")})})})}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"file-browser",children:[this.renderContent(),this.renderMoveWidget()]})}}],r&&Df(e.prototype,r),n&&Df(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);!function(t,e,r){(e=Ff(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Mf,"defaultProps",{files:[],directories:[],currentDirectory:null,fileLabels:{},selectionMode:!1,selectedFileIds:[],selectedFiles:[],onDirectoryClick:function(t){},onFileClick:function(t){},onDirectoryDelete:function(t){},onDirectoryRename:function(t,e){},onDirectoryMove:function(t,e){},onFileDelete:function(t){},onFileRename:function(t){},onFileMove:function(t,e){},onFileOpen:function(t){},onSelectionChange:function(t,e){},onSelectionDelete:function(t,e){},onSelectionMove:function(t,e){}});const Bf=Mf;var Uf=r(4195),Vf={insert:"head",singleton:!1};Ot()(Uf.Z,Vf);Uf.Z.locals;function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Gf(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:function(){},n=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:function(){};Qf++,Jf.push([Qf,t,e,r]),gi.trigger("media.upload.queued",{id:Qf,size:t.size,filename:t.name}),Zf||this.process()},process:function(){var t=this;if(Jf.length){Zf=!0;var e=Jf[0];this.processChunkUpload(e[1],e[2],(function(t){gi.trigger("media.upload.start",{id:e[0],size:e[1].size,filename:t})}),(function(t){gi.trigger("media.upload.progress",{id:e[0],progress:t})}),(function(r){Zf=!1,Jf.shift(),t.process(),gi.trigger("media.upload.success",{id:e[0],file:r}),e[3](r)}),(function(){gi.trigger("media.upload.fail",{id:e[0]}),Zf=!1,Jf.shift(),t.process()}))}},isDone:function(){return 0===Jf.length},processChunkUpload:function(t,e,r,n,o,i){var a,s,u,c=524288,l=Math.ceil(t.size/c),f=0,p=t.name;!function d(){(s=f*c)>t.size&&(s=u+1),u=s+c>=t.size?t.size:s+c;var h=0===f?"start":f===l?"end":"progress";"start"===h&&r(p),mo.media.uploadChunk(h,p,a||null,t.slice(s,u),e).then((function(t){var e=t.data;("created"===e.status&&(a=e.path),++f<=l)?(n(f/l*100),d()):o(e.data)}),(function(t){i()}))}()}};function ep(t){var e=function(e){tp.queueMultiple(e,t.directory,(function(e){t.onFileUploaded(e),tp.isDone()&&t.onUploadDone()}))};return(0,Pt.jsxs)("div",{className:"file-uploader",children:[(0,Pt.jsx)("div",{className:"file-uploader__input",children:(0,Pt.jsx)("input",{type:"file",name:"file-uploader",multiple:!0,onChange:function(t){e(t.target.files)}.bind(this)})}),(0,Pt.jsx)("div",{className:"file-uploader__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.select_files_from_computer")})})]})}ep.defaultProps={directory:null,onUploadDone:function(){},onFileUploaded:function(t){}};const rp=ep;function np(t){return np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(t)}function op(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;t.isFile?t.file((function(t){".DS_Store"!==t.name&&e.upload(t,r)})):t.isDirectory&&mo.media.createDirectory(t.name,r).then((function(r){var n=r.data.data;e.props.onCreateDirectory(n),t.createReader().readEntries((function(t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ap(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Fp(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ap(i,n,o,a,s,"next",t)}function s(t){Ap(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Mp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bp(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var a=t.data.data,s=e.data.data,u=o.data.data,c=a[a.length-1];i({type:"media/init",payload:{directory:c,path:a,directories:s,files:u}}),n(Bp(Bp({},r),{},{isLoading:!1}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),d=function(e,o){n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o})),t.onSelectionChange(e,o)},h=function(){t.onSelectionConfirm(r.selectedFileIds,r.selectedFiles)},y=function(t){var e=r.selectedFileIds.filter((function(e){return e!==t})),o=r.selectedFiles.filter((function(e){return e.id!==t}));n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o}))},v=function(){t.onCancel()},b=function(t){p(t)},g=function(){gt.i18nNotify("snippets.files_uploaded")},w=function(t){!function(t){n(Bp(Bp({},r),{},{selectedFileIds:[].concat(Ip(r.selectedFileIds),[t.id]),selectedFiles:[].concat(Ip(r.selectedFiles),[t])}))}(t),i({type:"media/files/add",payload:t})},O=function(){var t=Fp(Lp().mark((function t(e){var r,n;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.createDirectory(e,c?c.id:null);case 4:r=t.sent,n=r.data.data,gt.i18nNotify("snippets.directory_created"),i({type:"media/directories/add",payload:n}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/files/rename",payload:o}),gt.i18nNotify("snippets.file_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),S=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/directories/rename",payload:o}),gt.i18nNotify("snippets.directory_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),x=function(t,e){mo.media.moveFiles(t,e).then((function(t){gt.i18nNotify("snippets.files_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},_=function(t,e){mo.media.moveFile(t,e).then((function(t){gt.i18nNotify("snippets.file_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},E=function(){gt.prompt({title:vt.get("snippets.new_directory"),confirmButtonText:vt.get("snippets.confirm"),cancelButtonText:vt.get("snippets.cancel"),confirm:function(t){return O(t)}})},k=function(){var t=[[vt.get("snippets.deselect"),"deselect"],[vt.get("snippets.jump_to_folder"),"jump_to"]];return r.selectedFiles.length?(0,Pt.jsxs)("div",{className:"file-picker-widget__selection",children:[(0,Pt.jsxs)("div",{className:"file-picker-widget__selection-header",children:[vt.get("snippets.your_selection")," (",r.selectedFiles.length,")"]}),r.selectedFiles.map((function(e,r){return(0,Pt.jsx)("div",{className:"file-picker-widget__file",children:(0,Pt.jsx)(Wt,{links:t,onClick:function(t){return function(t,e){"jump_to"===t?p(e.directory?e.directory.id:null):"deselect"===t&&y(e.id)}(t,e)},children:(0,Pt.jsx)(jf,{file:e,viewMode:"minimal",actions:[(0,Pt.jsx)(Ro,{name:"delete",style:"transparent",onClick:function(t){return y(e.id)}},"delete")]})})},r)}))]}):(0,Pt.jsx)(Su,{icon:"checklist",children:vt.get("snippets.your_selection_is_empty")})};return(0,Pt.jsx)(Bo,{style:["modal","wide"],closeable:!0,onClose:v,title:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return b(t)}})},"path"),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?b(t.id):b()}},"breadcrumbs")],actions:[(0,Pt.jsx)(Rp,{},"view-switcher"),(0,Pt.jsx)(Je,{text:vt.get("snippets.new_directory"),style:["secondary","small"],onClick:E},"new-dir"),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onFileUploaded:w,onUploadDone:g})},"upload")],footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:v},"cancel"),(0,Pt.jsx)(Je,{text:t.selectionMode?vt.get("snippets.confirm_selection"):vt.get("snippets.select_file"),style:r.selectedFileIds.length?[]:["disabled"],onClick:r.selectedFileIds.length?h:null},"confirm")],children:r.isLoading?null:(0,Pt.jsx)(cp,{sidebar:k(),children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:O,onUploadDone:g,children:(0,Pt.jsx)(Bf,{fileLabels:t.fileLabels,currentDirectory:c,selectionMode:t.selectionMode,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,directories:l,files:f,onDirectoryRename:S,onFileRename:j,onFileMove:_,onDirectoryClick:function(t){return b(t)},onSelectionChange:d,onSelectionMove:x})})})})}Hp.defaultProps={multiple:!1,onSelectionChange:function(t,e){},onSelectionConfirm:function(t,e){},onCancel:function(){},defaultDirectoryId:null,defaultSelectedFileIds:[],defaultSelectedFiles:[],selectionMode:!1,fileLabels:{}};const Wp=Hp;function Yp(t){return Yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yp(t)}function qp(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedBlocks.length-1)){var e=this.syncBlocksData(),r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedBlocks:e}),gt.notify(vt.get("snippets.order_changed"))}}},{key:"removeBlock",value:function(t,e){var r=this;gt.confirm({title:vt.get("snippets.delete_singular_title",{singular:this.props.singular}),text:vt.get("snippets.delete_singular_text",{singular:this.props.singular}),confirm:function(){var n=r.state.blocksToRemoveById,o=r.state.blocksToRemoveByOrder,i=r.syncBlocksData();i.splice(t,1),e?n.push(e):o.push(t),r.setState({addedBlocks:i,blocksToRemoveById:n,blocksToRemoveByOrder:o}),gt.notify(vt.get("snippets.singular_deleted",{singular:r.props.singular}))}})}},{key:"addBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getBlockDefinition(t),n=this.state.addedBlocks,o={id:null,name:r.name,type:r.type,components:r.components,data:{}};null!==e?(n.splice(e,0,o),gt.notify(vt.get("snippets.singular_inserted",{singular:this.props.singular}))):(n.push(o),gt.notify(vt.get("snippets.singular_added",{singular:this.props.singular}))),this.setState({addedBlocks:n})}},{key:"renderAddBlockDropdown",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.getOwnPropertyNames(this.props.blocks);return n.length?1===n.length?t?(0,Pt.jsx)(Je,{icon:"add",style:["small","secondary"],text:t,stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(Ro,{name:"post_add",iconStyle:"small",stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(sl,{style:["secondary"],autoClose:!0,text:t,openIcon:"post_add",closeIcon:"post_add",children:(0,Pt.jsx)(At,{stopPropagation:!1,links:this.getTypeLinks(),onClick:function(t){return e.addBlock(t,r)}})},r):null}},{key:"optionDropdownClick",value:function(t,e,r){"delete"===t&&this.removeBlock(e,r)}},{key:"getTypeLinks",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[t.props.blocks[e].name,e]}))}},{key:"getTypeLinksInsertBelow",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[vt.get("snippets.insert_singular_below",{singular:t.props.blocks[e].name}),e]}))}},{key:"renderContentBlocks",value:function(){var t=this;return this.componentLists=[],this.state.addedBlocks.length?this.state.addedBlocks.map((function(e,r){if(!e)return null;var n=Zv.renderComponentsWith(e.components,e.data,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0);return t.componentLists.push([n,e.id,e.type]),(0,Pt.jsx)("div",{className:"content-blocks__item",children:(0,Pt.jsx)(md,{title:e.name,actions:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}},0),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Md(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Bd(t,e){for(var r=0;re?1:e>t?-1:0})),e.setState({tags:r,isLoading:!1})}));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"onCancel",value:function(){this.props.onCancel()}},{key:"onConfirm",value:function(){this.props.onConfirm(this.state.selectedTags)}},{key:"onTagClick",value:function(t){this.setState({selectedTags:[].concat(Ld(this.state.selectedTags),[t])})}},{key:"onSelectedTagClick",value:function(t){var e=this.state.selectedTags.filter((function(e){return e!==t}));this.setState({selectedTags:e})}},{key:"renderContent",value:function(){return this.state.isLoading?null:this.state.tags.length?(this.state.selectedTags.length&&(t=(0,Pt.jsxs)("div",{className:"tags-browser__selected",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.selected_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.selectedTags,onClick:this.onSelectedTagClick.bind(this)})]})),this.state.tags.length&&(e=(0,Pt.jsxs)("div",{className:"tags-browser__available",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.available_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.tags,onClick:this.onTagClick.bind(this)})]})),(0,Pt.jsxs)("div",{className:"tags-browser__tags",children:[t,e]})):(0,Pt.jsx)(Su,{children:vt.get("snippets.no_tags_available")});var t,e}},{key:"render",value:function(){return(0,Pt.jsx)(Bo,{style:"modal",title:vt.get("snippets.tags"),closeable:!0,onClose:this.onCancel.bind(this),footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:this.onCancel.bind(this)},0),(0,Pt.jsx)(Je,{text:vt.get("snippets.confirm"),onClick:this.onConfirm.bind(this)},1)],children:(0,Pt.jsx)("div",{className:"tags-browser",children:(0,Pt.jsx)("div",{className:"tags-browser__content",children:this.renderContent()})})})}}],r&&Bd(e.prototype,r),n&&Bd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hd,"defaultProps",{id:0,path:{},selectedTags:[],onCancel:function(){},onConfirm:function(t){}});const Wd=Hd;function Yd(t){return Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(t)}function qd(t){return function(t){if(Array.isArray(t))return $d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:function(){};clearTimeout(this.searchTimeout),t&&this.setState({autosuggestIsOpen:!1,tags:[].concat(qd(this.state.tags),[t])},e)}},{key:"removeLastTag",value:function(){this.setState({tags:this.state.tags.slice(0,-1)})}},{key:"autosuggest",value:function(t){var e=this;t.length>1&&mo.execute.get(this.props.path,this.props.id,"autosuggest",{search:t}).then((function(t){e.setState({autosuggestIsOpen:!0,autosuggest:t.data})}))}},{key:"openBrowser",value:function(){this.setState({browserIsOpen:!0})}},{key:"closeBrowser",value:function(){this.setState({browserIsOpen:!1})}},{key:"confirmBrowser",value:function(t){this.setState({tags:t,browserIsOpen:!1})}},{key:"render",value:function(){var t,e,r=this;return this.state.autosuggestIsOpen&&this.state.autosuggest.length&&(e=(0,Pt.jsx)("div",{className:"tags-field__autosuggest",children:this.state.autosuggest.map((function(t,e){return(0,Pt.jsx)("div",{className:"tags-field__autosuggestion",onClick:function(e){return r.handleSuggestionClick(t)},children:t},e)}))})),this.state.browserIsOpen&&(t=(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Wd,{id:this.props.id,path:this.props.path,selectedTags:this.state.tags,onCancel:this.closeBrowser.bind(this),onConfirm:function(t){return r.confirmBrowser(t)}})})),(0,Pt.jsx)(we,{name:this.props.name,required:this.props.showRequiredIndicator,label:this.props.label,errors:this.props.errors,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"tags-field",children:(0,Pt.jsxs)("div",{className:"tags-field__wrap",children:[(0,Pt.jsx)("div",{className:"tags-field__browse",children:(0,Pt.jsx)(Ro,{style:"transparent",name:"fact_check",onClick:this.openBrowser.bind(this)})}),(0,Pt.jsx)("div",{className:"tags-field__tags",children:(0,Pt.jsx)(Nd,{tags:this.state.tags})}),(0,Pt.jsx)("div",{className:"tags-field__input",children:(0,Pt.jsx)("input",{className:"tags-field__input-field",ref:this.inputRef,onChange:this.handleChange.bind(this),onKeyUp:this.handleKeyUp.bind(this),onKeyDown:this.handleKeyDown.bind(this),onBlur:this.handleBlur.bind(this)})}),e,t]})})})}}],r&&Xd(e.prototype,r),n&&Xd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}function rh(t,e){for(var r=0;r1,r=this.props.currentPaget.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:t.options,defaultValues:r.values,onChange:a,onClear:a})})})}Bh.defaultProps={id:0,type:"",options:{},field:"",label:"",data:{},onChange:function(){}};const Uh=Bh;function Vh(t){return Vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(t)}function zh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gh(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:r.options,defaultValues:r.values,onChange:a,onClear:a})})})}qh.defaultProps={id:0,type:"",field:"",label:"",titleColumn:"",data:{},onChange:function(){}};const $h=qh;function Xh(t){return Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(t)}function Kh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(e){return t.state.options[e]}));this.setState({humanReadableValue:r.length?r.join(", "):vt.get("snippets.tags_all")}),this.props.onChange(this.props.id,e.join(","))}},{key:"clear",value:function(){this.selectListRef.current.clear()}},{key:"onCtxMenuClick",value:function(t){"clear"===t&&this.clear()}},{key:"render",value:function(){var t=this.props.label?this.props.label:vt.get("snippets.tag");return(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(Wt,{onClick:this.onCtxMenuClick.bind(this),links:[["Clear this filter","clear"]],children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:t,text:this.state.humanReadableValue,children:(0,Pt.jsx)(zi,{options:this.state.options,onChange:this.handleChange.bind(this),onClear:this.handleChange.bind(this),ref:this.selectListRef})})})})}}],r&&Kh(e.prototype,r),n&&Kh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=ty(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ey,"defaultProps",{id:0,type:"",label:"",onChange:function(){}});const ry=ey;function ny(t){return ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(t)}function oy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function iy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5];return t.map((function(t,s){var u=a?o.createRef():null,c=ly[t.type];return{filter:n((0,Pt.jsx)(c,dy(dy({},t),{},{data:e,path:r,onChange:i})),s),ref:u}}))}};function my(t){return my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(t)}function vy(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function by(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{};this.state.searchKeyword&&(e.search=this.state.searchKeyword);for(var r=!1,n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]})),t.setState({items:n,options:o},(function(){e&&e()}))}))}},{key:"getData",value:function(t){return t[this.props.name]=this.state.selectedItems||[],t}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.selectedItemsIds||[]}},{key:"handleChange",value:function(t){this.setState({selectedItemsIds:t,selectedItems:this.state.items.filter((function(e){return t.includes("".concat(e.id))}))})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,selectedItemsIds:[].concat(qy(e.state.selectedItemsIds),[t.data.data.id])})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Zv.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Zv.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"many-to-many-select-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,errors:this.props.errors,children:[(0,Pt.jsx)("div",{className:"many-to-many-select-field",children:(0,Pt.jsx)("div",{className:"many-to-many-select-field__field",children:(0,Pt.jsx)(ca,{multiple:!0,value:this.state.selectedItemsIds,options:this.state.options,nullText:"– "+vt.get("snippets.no_plural_selected",{plural:this.props.plural})+" –",onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Xy(e.prototype,r),n&&Xy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Qy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(tm,"defaultProps",{path:{},data:{},label:"",name:"",style:"",singular:"",plural:"",titleColumn:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const em=tm;function rm(t){return rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(t)}function nm(t){return function(t){if(Array.isArray(t))return om(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return om(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return om(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function om(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedItems.length-1)){var e=this.state.addedItems,r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedItems:e})}}},{key:"removeItem",value:function(t){var e=this.state.addedItems;e.splice(t,1),this.setState({addedItems:e})}},{key:"renderItems",value:function(){var t=this;return this.componentLists=[],this.state.addedItems.length?this.state.addedItems.map((function(e,r){var n=Zv.renderComponentsWith(t.props.components,e,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"json-field__component",children:t},e)}),!0,t.props.errors);return t.componentLists.push(n),(0,Pt.jsxs)("div",{className:"json-field__item",children:[(0,Pt.jsx)("div",{className:"json-field__item-content",children:n.map((function(t){return t.component}))}),(0,Pt.jsxs)("div",{className:"json-field__item-actions",children:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}}),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null,e={},r={};this.componentList.forEach((function(t){t.ref.current.getData&&t.ref.current.getData(e),t.ref.current.handleSubmit&&t.ref.current.handleSubmit(r)})),this.setState({isStored:!0,data:e,submitData:r,isOpen:!1},(function(){t&&t()}))}},{key:"renderComponents",value:function(){return this.componentList=Zv.renderComponentsWith(this.props.components,this.state.isStored?this.state.data:this.props.data,this.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0),this.componentList.map((function(t){return t.component}))}},{key:"renderWidget",value:function(){var t=this;return(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:this.props.title,style:"modal",closeable:!0,onClose:this.close.bind(this),footer:[(0,Pt.jsx)(Je,{text:"Confirm",onClick:function(){t.store()}},"confirm")],children:this.renderComponents()})})}},{key:"render",value:function(){return(0,Pt.jsxs)(o.Fragment,{children:[(0,Pt.jsx)(we,{label:this.props.label,tooltip:this.props.tooltip,children:"link"===this.props.style?(0,Pt.jsx)(ar,{style:this.props.style,onClick:this.open.bind(this),text:this.props.title}):(0,Pt.jsx)(Je,{style:["small","secondary"],text:this.props.title,onClick:this.open.bind(this)})}),(0,Pt.jsx)("div",{style:{display:this.state.isOpen?"block":"none"},children:this.renderWidget()})]})}}],r&&jv(e.prototype,r),n&&jv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=_v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Ev,"defaultProps",{title:"",label:"",components:[],path:{},data:{},errors:{},style:null});const kv=Ev;function Cv(t){return Cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cv(t)}function Tv(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return t.map((function(t,s){var u=null;i&&(u=o.createRef());var c=Yv[t.type];return{component:n((0,Pt.jsx)(c,Xv(Xv({},t),{},{data:e,errors:a,path:r,ref:u})),s),ref:u}}))}};var Jv=r(2151),Qv={insert:"head",singleton:!1};Ot()(Jv.Z,Qv);Jv.Z.locals;function tb(t){return(0,Pt.jsx)("div",{className:xt.className("checkbox",t.style)+(t.checked?" checkbox--checked":""),onClick:t.onClick})}tb.defaultProps={style:[],checked:!1,onClick:function(){}};const eb=tb;function rb(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ub(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==f[0]?f[0]:{},i=!1,s=0;st&&t[e]?t[e]:r||null),t)}function Ob(t){return"object"==typeof t}const jb="dnd-core/INIT_COORDS",Sb="dnd-core/BEGIN_DRAG",xb="dnd-core/PUBLISH_DRAG_SOURCE",Pb="dnd-core/HOVER",_b="dnd-core/DROP",Eb="dnd-core/END_DRAG";function kb(t,e){return{type:jb,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Cb={type:jb,payload:{clientOffset:null,sourceClientOffset:null}};function Tb(t){return function(e=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:i}=r,a=t.getMonitor(),s=t.getRegistry();t.dispatch(kb(o)),function(t,e,r){gb(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){gb(r.getSource(t),"Expected sourceIds to be registered.")}))}(e,a,s);const u=function(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,a);if(null==u)return void t.dispatch(Cb);let c=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(t){gb("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),c=i(u)}t.dispatch(kb(o,c));const l=s.getSource(u).beginDrag(a,u);if(null==l)return;!function(t){gb(Ob(t),"Item must be an object.")}(l),s.pinSource(u);const f=s.getSourceType(u);return{type:Sb,payload:{itemType:f,item:l,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!n}}}}function Rb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Db(t){for(var e=1;e{const a=function(t,e,r,n){const o=r.getTarget(t);let i=o?o.drop(n,t):void 0;(function(t){gb(void 0===t||Ob(t),"Drop result must either be an object or undefined.")})(i),void 0===i&&(i=0===e?{}:n.getDropResult());return i}(o,i,n,r),s={type:_b,payload:{dropResult:Db({},e,a)}};t.dispatch(s)}))}}function Ib(t){return function(){const e=t.getMonitor(),r=t.getRegistry();!function(t){gb(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);const n=e.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(e,n),r.unpinSource()}return{type:Eb}}}function Lb(t,e){return null===e?null===t:Array.isArray(t)?t.some((t=>t===e)):t===e}function Ab(t){return function(e,{clientOffset:r}={}){!function(t){gb(Array.isArray(t),"Expected targetIds to be an array.")}(e);const n=e.slice(0),o=t.getMonitor(),i=t.getRegistry();return function(t,e,r){for(let n=t.length-1;n>=0;n--){const o=t[n];Lb(e.getTargetType(o),r)||t.splice(n,1)}}(n,i,o.getItemType()),function(t,e,r){gb(e.isDragging(),"Cannot call hover while not dragging."),gb(!e.didDrop(),"Cannot call hover after drop.");for(let e=0;e{const i=r[o];var a;return n[o]=(a=i,(...r)=>{const n=a.apply(t,r);void 0!==n&&e(n)}),n}),{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const t=this.store.getState().refCount>0;this.backend&&(t&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!t&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function Bb(t,e){return{x:t.x-e.x,y:t.y-e.y}}const Ub=[],Vb=[];Ub.__IS_NONE__=!0,Vb.__IS_ALL__=!0;class zb{subscribeToStateChange(t,e={}){const{handlerIds:r}=e;gb("function"==typeof t,"listener must be a function."),gb(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const e=this.store.getState(),o=e.stateId;try{const i=o===n||o===n+1&&!function(t,e){return t!==Ub&&(t===Vb||void 0===e||(r=t,e.filter((t=>r.indexOf(t)>-1))).length>0);var r}(e.dirtyHandlerIds,r);i||t()}finally{n=o}}))}subscribeToOffsetChange(t){gb("function"==typeof t,"listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==e&&(e=r,t())}))}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return gb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);if(gb(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;return Lb(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);if(gb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:r}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Lb(n,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(t);return r?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return e&&r&&n?Bb(function(t,e){return{x:t.x+e.x,y:t.y+e.y}}(e,n),r):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:r}=t;return e&&r?Bb(e,r):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const Gb="undefined"!=typeof global?global:self,Hb=Gb.MutationObserver||Gb.WebKitMutationObserver;function Wb(t){return function(){const e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}const Yb="function"==typeof Hb?function(t){let e=1;const r=new Hb(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}:Wb;class qb{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const $b=new class{enqueueTask(t){const{queue:e,requestFlush:r}=this;e.length||(r(),this.flushing=!0),e[e.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let e=0,r=t.length-this.index;e{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Yb(this.flush),this.requestErrorThrow=Wb((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Xb=new class{create(t){const e=this.freeTasks,r=e.length?e.pop():new qb(this.onError,(t=>e[e.length]=t));return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}($b.registerPendingError);const Kb="dnd-core/ADD_SOURCE",Zb="dnd-core/ADD_TARGET",Jb="dnd-core/REMOVE_SOURCE",Qb="dnd-core/REMOVE_TARGET";function tg(t,e){e&&Array.isArray(t)?t.forEach((t=>tg(t,!1))):gb("string"==typeof t||"symbol"==typeof t,e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var eg;!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(eg||(eg={}));let rg=0;function ng(t){const e=(rg++).toString();switch(t){case eg.SOURCE:return`S${e}`;case eg.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function og(t){switch(t[0]){case"S":return eg.SOURCE;case"T":return eg.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function ig(t,e){const r=t.entries();let n=!1;do{const{done:t,value:[,o]}=r.next();if(o===e)return!0;n=!!t}while(!n);return!1}class ag{addSource(t,e){tg(t),function(t){gb("function"==typeof t.canDrag,"Expected canDrag to be a function."),gb("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),gb("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);const r=this.addHandler(eg.SOURCE,t,e);return this.store.dispatch(function(t){return{type:Kb,payload:{sourceId:t}}}(r)),r}addTarget(t,e){tg(t,!0),function(t){gb("function"==typeof t.canDrop,"Expected canDrop to be a function."),gb("function"==typeof t.hover,"Expected hover to be a function."),gb("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);const r=this.addHandler(eg.TARGET,t,e);return this.store.dispatch(function(t){return{type:Zb,payload:{targetId:t}}}(r)),r}containsHandler(t){return ig(this.dragSources,t)||ig(this.dropTargets,t)}getSource(t,e=!1){gb(this.isSourceId(t),"Expected a valid source ID.");return e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return gb(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return gb(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return gb(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return og(t)===eg.SOURCE}isTargetId(t){return og(t)===eg.TARGET}removeSource(t){var e;gb(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:Jb,payload:{sourceId:t}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},$b.enqueueTask(Xb.create(e))}removeTarget(t){gb(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:Qb,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);gb(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){gb(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,r){const n=ng(t);return this.types.set(n,e),t===eg.SOURCE?this.dragSources.set(n,r):t===eg.TARGET&&this.dropTargets.set(n,r),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const sg=(t,e)=>t===e;function ug(t=Ub,e){switch(e.type){case Pb:break;case Kb:case Zb:case Qb:case Jb:return Ub;default:return Vb}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,o=function(t,e){const r=new Map,n=t=>{r.set(t,r.has(t)?r.get(t)+1:1)};t.forEach(n),e.forEach(n);const o=[];return r.forEach(((t,e)=>{1===t&&o.push(e)})),o}(r,n),i=o.length>0||!function(t,e,r=sg){if(t.length!==e.length)return!1;for(let n=0;nt!==o)))});case _b:return dg({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Eb:return dg({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}var n,o}function mg(t=0,e){switch(e.type){case Kb:case Zb:return t+1;case Jb:case Qb:return t-1;default:return t}}function vg(t=0){return t+1}function bg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gg(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}let xg=0;const Pg=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var _g=(0,o.memo)((function(t){var{children:e}=t,r=Sg(t,["children"]);const[n,i]=function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}const e=function(t,e=Eg(),r,n){const o=e;o[Pg]||(o[Pg]={dragDropManager:Og(t,e,r,n)});return o[Pg]}(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}(r);return(0,o.useEffect)((()=>{if(i){const t=Eg();return++xg,()=>{0==--xg&&(t[Pg]=null)}}}),[]),(0,Pt.jsx)(jg.Provider,{value:n,children:e})}));function Eg(){return"undefined"!=typeof global?global:window}function kg(t){let e=null;return()=>(null==e&&(e=t()),e)}class Cg{enter(t){const e=this.entered.length;return this.entered=function(t,e){const r=new Set,n=t=>r.add(t);t.forEach(n),e.forEach(n);const o=[];return r.forEach((t=>o.push(t))),o}(this.entered.filter((e=>this.isNodeInDocument(e)&&(!e.contains||e.contains(t)))),[t]),0===e&&this.entered.length>0}leave(t){const e=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=t,r.filter((t=>t!==n))),e>0&&0===this.entered.length}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Tg{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})}))}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach((r=>{const n=this.config.exposeProperties[r];null!=n&&(e[r]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Rg="__NATIVE_FILE__",Dg="__NATIVE_URL__",Ng="__NATIVE_TEXT__",Ig="__NATIVE_HTML__";function Lg(t,e,r){const n=e.reduce(((e,r)=>e||t.getData(r)),"");return null!=n?n:r}const Ag={[Rg]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Ig]:{exposeProperties:{html:(t,e)=>Lg(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Dg]:{exposeProperties:{urls:(t,e)=>Lg(t,e,"").split("\n"),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Ng]:{exposeProperties:{text:(t,e)=>Lg(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Fg(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ag).filter((t=>{const r=Ag[t];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some((t=>e.indexOf(t)>-1))}))[0]||null}const Mg=kg((()=>/firefox/i.test(navigator.userAgent))),Bg=kg((()=>Boolean(window.safari)));class Ug{interpolate(t){const{xs:e,ys:r,c1s:n,c2s:o,c3s:i}=this;let a=e.length-1;if(t===e[a])return r[a];let s,u=0,c=i.length-1;for(;u<=c;){s=Math.floor(.5*(u+c));const n=e[s];if(nt))return r[s];c=s-1}}a=Math.max(0,c);const l=t-e[a],f=l*l;return r[a]+n[a]*l+o[a]*f+i[a]*l*f}constructor(t,e){const{length:r}=t,n=[];for(let t=0;tt[e]{let t=new Ug([0,.5,1],[c.y,c.y/f*y,c.y+y-f]).interpolate(d);return Bg()&&i&&(t+=(window.devicePixelRatio-1)*y),t})()}}class Wg{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.globalContext)||void 0===t?void 0:t.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}constructor(t,e){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=e}}function Yg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qg(t){for(var e=1;e{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,r){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);const n=e=>this.handleDragStart(e,t),o=t=>this.handleSelectStart(t);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",o),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const r=e=>this.handleDragEnter(e,t),n=e=>this.handleDragOver(e,t),o=e=>this.handleDrop(e,t);return e.addEventListener("dragenter",r),e.addEventListener("dragover",n),e.addEventListener("drop",o),()=>{e.removeEventListener("dragenter",r),e.removeEventListener("dragover",n),e.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return qg({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return qg({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(n).some((e=>n[e]===t))}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){const r=Ag[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new Tg(r);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;this.mouseMoveTimeoutTimer=setTimeout((()=>{var t;return null===(t=this.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;if(this.currentDragSourceNode=null,this.rootElement)null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&zg(e)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=t=>Boolean(t&&this.document&&this.document.body&&this.document.body.contains(t)),this.endDragIfSourceWasRemovedFromDOM=()=>{const t=this.currentDragSourceNode;null==t||this.isNodeInDocument(t)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=t=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(t||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=t=>{if(t.defaultPrevented)return;const{dragStartSourceIds:e}=this;this.dragStartSourceIds=null;const r=Gg(t);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=t,o=Fg(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const t=this.monitor.getSourceId(),e=this.sourceNodes.get(t),o=this.sourcePreviewNodes.get(t)||e;if(o){const{anchorX:t,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),u=Hg(e,o,r,{anchorX:t,anchorY:i},{offsetX:a,offsetY:s});n.setDragImage(o,u.x,u.y)}}try{null==n||n.setData("application/json",{})}catch(t){}this.setCurrentDragSourceNode(t.target);const{captureDraggingState:e}=this.getCurrentSourcePreviewNodeOptions();e?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(o)this.beginDragNativeItem(o);else{if(n&&!n.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=t=>{var e;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer));if(!this.enterLeaveCounter.enter(t.target)||this.monitor.isDragging())return;const{dataTransfer:r}=t,n=Fg(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=t=>{const{dragEnterTargetIds:e}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=t.altKey,e.length>0&&this.actions.hover(e,{clientOffset:Gg(t)});e.some((t=>this.monitor.canDropOnTarget(t)))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=t=>{var e;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer))},this.handleTopDragOver=t=>{const{dragOverTargetIds:e}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));this.altKeyPressed=t.altKey,this.lastClientOffset=Gg(t),this.scheduleHover(e);(e||[]).some((t=>this.monitor.canDropOnTarget(t)))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=t=>{this.isDraggingNativeItem()&&t.preventDefault();this.enterLeaveCounter.leave(t.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=t=>{var e;(this.dropTargetIds=[],this.isDraggingNativeItem())?(t.preventDefault(),null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):Fg(t.dataTransfer)&&t.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=t=>{const{dropTargetIds:e}=this;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:Gg(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=t=>{const e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},this.options=new Wg(e,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Cg(this.isNodeInDocument)}}const Xg=function(t,e,r){return new $g(t,e,r)};let Kg;var Zg,Jg=[],Qg="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Zg||(Zg={}));var tw,ew=function(t){return Object.freeze(t)},rw=function(t,e){this.inlineSize=t,this.blockSize=e,ew(this)},nw=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ew(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ow=function(t){return t instanceof SVGElement&&"getBBox"in t},iw=function(t){if(ow(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},aw=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},sw="undefined"!=typeof window?window:{},uw=new WeakMap,cw=/auto|scroll/,lw=/^tb|vertical/,fw=/msie|trident/i.test(sw.navigator&&sw.navigator.userAgent),pw=function(t){return parseFloat(t||"0")},dw=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new rw((r?e:t)||0,(r?t:e)||0)},hw=ew({devicePixelContentBoxSize:dw(),borderBoxSize:dw(),contentBoxSize:dw(),contentRect:new nw(0,0,0,0)}),yw=function(t,e){if(void 0===e&&(e=!1),uw.has(t)&&!e)return uw.get(t);if(iw(t))return uw.set(t,hw),hw;var r=getComputedStyle(t),n=ow(t)&&t.ownerSVGElement&&t.getBBox(),o=!fw&&"border-box"===r.boxSizing,i=lw.test(r.writingMode||""),a=!n&&cw.test(r.overflowY||""),s=!n&&cw.test(r.overflowX||""),u=n?0:pw(r.paddingTop),c=n?0:pw(r.paddingRight),l=n?0:pw(r.paddingBottom),f=n?0:pw(r.paddingLeft),p=n?0:pw(r.borderTopWidth),d=n?0:pw(r.borderRightWidth),h=n?0:pw(r.borderBottomWidth),y=f+c,m=u+l,v=(n?0:pw(r.borderLeftWidth))+d,b=p+h,g=s?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-v-t.clientWidth:0,O=o?y+v:0,j=o?m+b:0,S=n?n.width:pw(r.width)-O-w,x=n?n.height:pw(r.height)-j-g,P=S+y+w+v,_=x+m+g+b,E=ew({devicePixelContentBoxSize:dw(Math.round(S*devicePixelRatio),Math.round(x*devicePixelRatio),i),borderBoxSize:dw(P,_,i),contentBoxSize:dw(S,x,i),contentRect:new nw(f,u,S,x)});return uw.set(t,E),E},mw=function(t,e,r){var n=yw(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case Zg.DEVICE_PIXEL_CONTENT_BOX:return a;case Zg.BORDER_BOX:return o;default:return i}},vw=function(t){var e=yw(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=ew([e.borderBoxSize]),this.contentBoxSize=ew([e.contentBoxSize]),this.devicePixelContentBoxSize=ew([e.devicePixelContentBoxSize])},bw=function(t){if(iw(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},gw=function(){var t=1/0,e=[];Jg.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new vw(e.target),o=bw(e.target);n.push(r),e.lastReportedSize=mw(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},Ow=function(){var t,e=0;for(ww(e);Jg.some((function(t){return t.activeTargets.length>0}));)e=gw(),ww(e);return Jg.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Qg}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Qg),window.dispatchEvent(t)),e>0},jw=[],Sw=function(t){if(!tw){var e=0,r=document.createTextNode("");new MutationObserver((function(){return jw.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),tw=function(){r.textContent="".concat(e?e--:e++)}}jw.push(t),tw()},xw=0,Pw={attributes:!0,characterData:!0,childList:!0,subtree:!0},_w=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ew=function(t){return void 0===t&&(t=0),Date.now()+t},kw=!1,Cw=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!kw){kw=!0;var r=Ew(t);!function(t){Sw((function(){requestAnimationFrame(t)}))}((function(){var n=!1;try{n=Ow()}finally{if(kw=!1,t=r-Ew(),!xw)return;n?e.run(1e3):t>0?e.run(t):e.start()}}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,Pw)};document.body?e():sw.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),_w.forEach((function(e){return sw.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),_w.forEach((function(e){return sw.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),Tw=new Cw,Rw=function(t){!xw&&t>0&&Tw.start(),!(xw+=t)&&Tw.stop()},Dw=function(){function t(t,e){this.target=t,this.observedBox=e||Zg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=mw(this.target,this.observedBox,!0);return t=this.target,ow(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Nw=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Iw=new WeakMap,Lw=function(t,e){for(var r=0;r=0&&(o&&Jg.splice(Jg.indexOf(r),1),r.observationTargets.splice(n,1),Rw(-1))},t.disconnect=function(t){var e=this,r=Iw.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Fw=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Aw.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aw(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Aw.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aw(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Aw.unobserve(this,t)},t.prototype.disconnect=function(){Aw.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Mw=function(t,e){return Mw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Mw(t,e)};function Bw(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Mw(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Uw=function(){return Uw=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Gw(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o-1||/[A-Z]/.test(t))}var EO={};var kO=["","X","Y","Z"],CO=["transformPerspective","x","y","z"];function TO(t,e){return CO.indexOf(t)-CO.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return kO.forEach((function(e){return CO.push(t+e)}))}));var RO=new Set(CO);function DO(t){return RO.has(t)}var NO=new Set(["originX","originY","originZ"]);function IO(t){return NO.has(t)}function LO(t,e){var r=e.layout,n=e.layoutId;return DO(t)||IO(t)||(r||void 0!==n)&&(!!EO[t]||"opacity"===t)}var AO=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},FO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function MO(t){return t.startsWith("--")}var BO=function(t,e){return e&&"number"==typeof t?e.transform(t):t};const UO=(t,e)=>r=>Math.max(Math.min(r,e),t),VO=t=>t%1?Number(t.toFixed(5)):t,zO=/(-)?([\d]*\.?[\d])+/g,GO=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,HO=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function WO(t){return"string"==typeof t}const YO=t=>({test:e=>WO(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),qO=YO("deg"),$O=YO("%"),XO=YO("px"),KO=YO("vh"),ZO=YO("vw"),JO=Object.assign(Object.assign({},$O),{parse:t=>$O.parse(t)/100,transform:t=>$O.transform(100*t)}),QO={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},tj=Object.assign(Object.assign({},QO),{transform:UO(0,1)}),ej=Object.assign(Object.assign({},QO),{default:1});var rj=Uw(Uw({},QO),{transform:Math.round}),nj={borderWidth:XO,borderTopWidth:XO,borderRightWidth:XO,borderBottomWidth:XO,borderLeftWidth:XO,borderRadius:XO,radius:XO,borderTopLeftRadius:XO,borderTopRightRadius:XO,borderBottomRightRadius:XO,borderBottomLeftRadius:XO,width:XO,maxWidth:XO,height:XO,maxHeight:XO,size:XO,top:XO,right:XO,bottom:XO,left:XO,padding:XO,paddingTop:XO,paddingRight:XO,paddingBottom:XO,paddingLeft:XO,margin:XO,marginTop:XO,marginRight:XO,marginBottom:XO,marginLeft:XO,rotate:qO,rotateX:qO,rotateY:qO,rotateZ:qO,scale:ej,scaleX:ej,scaleY:ej,scaleZ:ej,skew:qO,skewX:qO,skewY:qO,distance:XO,translateX:XO,translateY:XO,translateZ:XO,x:XO,y:XO,z:XO,perspective:XO,transformPerspective:XO,opacity:tj,originX:JO,originY:JO,originZ:XO,zIndex:rj,fillOpacity:tj,strokeOpacity:tj,numOctaves:rj};function oj(t,e,r,n){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,c=t.transformOrigin;u.length=0;var l=!1,f=!1,p=!0;for(var d in e){var h=e[d];if(MO(d))a[d]=h;else{var y=nj[d],m=BO(h,y);if(DO(d)){if(l=!0,s[d]=m,u.push(d),!p)continue;h!==(null!==(o=y.default)&&void 0!==o?o:0)&&(p=!1)}else IO(d)?(c[d]=m,f=!0):i[d]=m}}l?i.transform=function(t,e,r,n){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,c=void 0===u||u,l="";i.sort(TO);for(var f=!1,p=i.length,d=0;dr=>e(t(r)),lS=(...t)=>t.reduce(cS);var fS=new Set;var pS=new WeakMap,dS=new WeakMap,hS=function(t){var e;null===(e=pS.get(t.target))||void 0===e||e(t)},yS=function(t){t.forEach(hS)};function mS(t,e,r){var n=function(t){var e=t.root,r=Vw(t,["root"]),n=e||document;dS.has(n)||dS.set(n,{});var o=dS.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(yS,Uw({root:e},r))),o[i]}(e);return pS.set(t,r),n.observe(t),function(){pS.delete(t),n.unobserve(t)}}var vS={some:0,all:1};function bS(t,e,r,n){var i=n.root,a=n.margin,s=n.amount,u=void 0===s?"some":s,c=n.once;(0,o.useEffect)((function(){if(t){var n={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof u?u:vS[u]};return mS(r.getInstance(),n,(function(t){var n,o=t.isIntersecting;if(e.isInView!==o&&(e.isInView=o,!c||o||!e.hasEnteredView)){o&&(e.hasEnteredView=!0),null===(n=r.animationState)||void 0===n||n.setActive(Lj.InView,o);var i=r.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,u])}function gS(t,e,r,n){var i=n.fallback,a=void 0===i||i;(0,o.useEffect)((function(){var n,o;t&&a&&("production"!==Ww&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||fS.has(n)||(console.warn(n),o&&console.warn(o),fS.add(n))),requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var n=r.getProps().onViewportEnter;null==n||n(null),null===(t=r.animationState)||void 0===t||t.setActive(Lj.InView,!0)})))}),[t])}var wS=function(t){return function(e){return t(e),null}},OS={inView:wS((function(t){var e=t.visualElement,r=t.whileInView,n=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=(0,o.useRef)({hasEnteredView:!1,isInView:!1}),c=Boolean(r||n||i);s.once&&u.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?gS:bS)(c,u.current,e,s)})),tap:wS((function(t){var e=t.onTap,r=t.onTapStart,n=t.onTapCancel,i=t.whileTap,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(!1),c=(0,o.useRef)(null),l={passive:!(r||e||n||y)};function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function p(){var t;return f(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(Lj.Tap,!1),!iS()}function d(t,r){p()&&(sS(a.getInstance(),t.target)?null==e||e(t,r):null==n||n(t,r))}function h(t,e){p()&&(null==n||n(t,e))}function y(t,e){var n;f(),u.current||(u.current=!0,c.current=lS(Qj(window,"pointerup",d,l),Qj(window,"pointercancel",h,l)),null===(n=a.animationState)||void 0===n||n.setActive(Lj.Tap,!0),null==r||r(t,e))}tS(a,"pointerdown",s?y:void 0,l),uS(f)})),focus:wS((function(t){var e=t.whileFocus,r=t.visualElement;Bj(r,"focus",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Lj.Focus,!0)}:void 0),Bj(r,"blur",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Lj.Focus,!1)}:void 0)})),hover:wS((function(t){var e=t.onHoverStart,r=t.onHoverEnd,n=t.whileHover,o=t.visualElement;tS(o,"pointerenter",e||n?aS(o,!0,e):void 0,{passive:!e}),tS(o,"pointerleave",r||n?aS(o,!1,r):void 0,{passive:!r})}))},jS=0,SS=function(){return jS++},xS=function(){return vO(SS)};function PS(){var t=(0,o.useContext)(eO);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,n=t.register,i=xS();(0,o.useEffect)((function(){return n(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function _S(t,e){if(!Array.isArray(e))return!1;var r=e.length;if(r!==t.length)return!1;for(var n=0;nMath.min(Math.max(r,t),e),kS=.001,CS=.01,TS=10,RS=.05,DS=1;function NS({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let o,i;$w(t<=1e3*TS,"Spring duration must be 10 seconds or less");let a=1-e;a=ES(RS,DS,a),t=ES(CS,TS,t/1e3),a<1?(o=e=>{const n=e*a,o=n*t,i=n-r,s=LS(e,a),u=Math.exp(-o);return kS-i/s*u},i=e=>{const n=e*a*t,i=n*r+r,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-n),c=LS(Math.pow(e,2),a);return(-o(e)+kS>0?-1:1)*((i-s)*u)/c}):(o=e=>Math.exp(-e*t)*((e-r)*t+1)-kS,i=e=>Math.exp(-e*t)*(t*t*(r-e)));const s=function(t,e,r){let n=r;for(let r=1;rvoid 0!==t[e]))}function BS(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:o}=t,i=Vw(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:s,damping:u,mass:c,velocity:l,duration:f,isResolvedFromDuration:p}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!MS(t,FS)&&MS(t,AS)){const r=NS(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),d=US,h=US;function y(){const t=l?-l/1e3:0,n=r-e,i=u/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(r-e)/100,.4)),i<1){const e=LS(a,i);d=o=>{const s=Math.exp(-i*a*o);return r-s*((t+i*a*n)/e*Math.sin(e*o)+n*Math.cos(e*o))},h=r=>{const o=Math.exp(-i*a*r);return i*a*o*(Math.sin(e*r)*(t+i*a*n)/e+n*Math.cos(e*r))-o*(Math.cos(e*r)*(t+i*a*n)-e*n*Math.sin(e*r))}}else if(1===i)d=e=>r-Math.exp(-a*e)*(n+(t+a*n)*e);else{const e=a*Math.sqrt(i*i-1);d=o=>{const s=Math.exp(-i*a*o),u=Math.min(e*o,300);return r-s*((t+i*a*n)*Math.sinh(u)+e*n*Math.cosh(u))/e}}}return y(),{next:t=>{const e=d(t);if(p)a.done=t>=f;else{const i=1e3*h(t),s=Math.abs(i)<=n,u=Math.abs(r-e)<=o;a.done=s&&u}return a.value=a.done?r:e,a},flipTarget:()=>{l=-l,[e,r]=[r,e],y()}}}BS.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const US=t=>0,VS=(t,e,r)=>{const n=e-t;return 0===n?1:(r-t)/n},zS=(t,e,r)=>-r*t+r*e+t,GS=(t,e)=>r=>Boolean(WO(r)&&HO.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),HS=(t,e,r)=>n=>{if(!WO(n))return n;const[o,i,a,s]=n.match(zO);return{[t]:parseFloat(o),[e]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},WS=UO(0,255),YS=Object.assign(Object.assign({},QO),{transform:t=>Math.round(WS(t))}),qS={test:GS("rgb","red"),parse:HS("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+YS.transform(t)+", "+YS.transform(e)+", "+YS.transform(r)+", "+VO(tj.transform(n))+")"};const $S={test:GS("#"),parse:function(t){let e="",r="",n="",o="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),o=t.substr(4,1),e+=e,r+=r,n+=n,o+=o),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:qS.transform},XS={test:GS("hsl","hue"),parse:HS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+$O.transform(VO(e))+", "+$O.transform(VO(r))+", "+VO(tj.transform(n))+")"};function KS(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ZS({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,r/=100;let o=0,i=0,a=0;if(e/=100){const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;o=KS(s,n,t+1/3),i=KS(s,n,t),a=KS(s,n,t-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}const JS=(t,e,r)=>{const n=t*t,o=e*e;return Math.sqrt(Math.max(0,r*(o-n)+n))},QS=[$S,qS,XS],tx=t=>QS.find((e=>e.test(t))),ex=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,rx=(t,e)=>{let r=tx(t),n=tx(e);Xw(!!r,ex(t)),Xw(!!n,ex(e));let o=r.parse(t),i=n.parse(e);r===XS&&(o=ZS(o),r=qS),n===XS&&(i=ZS(i),n=qS);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=JS(o[e],i[e],t));return a.alpha=zS(o.alpha,i.alpha,t),r.transform(a)}},nx={test:t=>qS.test(t)||$S.test(t)||XS.test(t),parse:t=>qS.test(t)?qS.parse(t):XS.test(t)?XS.parse(t):$S.parse(t),transform:t=>WO(t)?t:t.hasOwnProperty("red")?qS.transform(t):XS.transform(t)},ox="${c}",ix="${n}";function ax(t){"number"==typeof t&&(t=`${t}`);const e=[];let r=0;const n=t.match(GO);n&&(r=n.length,t=t.replace(GO,ox),e.push(...n.map(nx.parse)));const o=t.match(zO);return o&&(t=t.replace(zO,ix),e.push(...o.map(QO.parse))),{values:e,numColors:r,tokenised:t}}function sx(t){return ax(t).values}function ux(t){const{values:e,numColors:r,tokenised:n}=ax(t),o=e.length;return t=>{let e=n;for(let n=0;n"number"==typeof t?0:t;const lx={test:function(t){var e,r,n,o;return isNaN(t)&&WO(t)&&(null!==(r=null===(e=t.match(zO))||void 0===e?void 0:e.length)&&void 0!==r?r:0)+(null!==(o=null===(n=t.match(GO))||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0},parse:sx,createTransformer:ux,getAnimatableNone:function(t){const e=sx(t);return ux(t)(e.map(cx))}},fx=t=>"number"==typeof t;function px(t,e){return fx(t)?r=>zS(t,e,r):nx.test(t)?rx(t,e):mx(t,e)}const dx=(t,e)=>{const r=[...t],n=r.length,o=t.map(((t,r)=>px(t,e[r])));return t=>{for(let e=0;e{const r=Object.assign(Object.assign({},t),e),n={};for(const o in r)void 0!==t[o]&&void 0!==e[o]&&(n[o]=px(t[o],e[o]));return t=>{for(const e in n)r[e]=n[e](t);return r}};function yx(t){const e=lx.parse(t),r=e.length;let n=0,o=0,i=0;for(let t=0;t{const r=lx.createTransformer(e),n=yx(t),o=yx(e);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?lS(dx(n.parsed,o.parsed),r):($w(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),r=>`${r>0?e:t}`)},vx=(t,e)=>r=>zS(t,e,r);function bx(t,e,r){const n=[],o=r||("number"==typeof(i=t[0])?vx:"string"==typeof i?nx.test(i)?rx:mx:Array.isArray(i)?dx:"object"==typeof i?hx:void 0);var i;const a=t.length-1;for(let r=0;rt[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=bx(e,n,o),s=2===i?function([t,e],[r]){return n=>r(VS(t,e,n))}(t,a):function(t,e){const r=t.length,n=r-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[n]&&(i=n-1,a=!0),!a){let e=1;for(;eo||e===n);e++);i=e-1}const s=VS(t[i],t[i+1],o);return e[i](s)}}(t,a);return r?e=>s(ES(t[0],t[i-1],e)):s}const wx=t=>e=>1-t(1-e),Ox=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jx=t=>e=>e*e*((t+1)*e-t),Sx=t=>t,xx=(Px=2,t=>Math.pow(t,Px));var Px;const _x=wx(xx),Ex=Ox(xx),kx=t=>1-Math.sin(Math.acos(t)),Cx=wx(kx),Tx=Ox(Cx),Rx=jx(1.525),Dx=wx(Rx),Nx=Ox(Rx),Ix=(t=>{const e=jx(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Lx=t=>{if(1===t||0===t)return t;const e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Ax=wx(Lx);function Fx(t,e){return t.map((()=>e||Ex)).splice(0,t.length-1)}function Mx({from:t=0,to:e=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map((t=>t*e))}(n&&n.length===a.length?n:function(t){const e=t.length;return t.map(((t,r)=>0!==r?r/(e-1):0))}(a),o);function u(){return gx(s,a,{ease:Array.isArray(r)?r:Fx(a,r)})}let c=u();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=u()}}}const Bx={keyframes:Mx,spring:BS,decay:function({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let s=r*t;const u=e+s,c=void 0===i?u:i(u);return c!==u&&(s=c-e),{next:t=>{const e=-s*Math.exp(-t/n);return a.done=!(e>o||e<-o),a.value=a.done?c:c+e,a},flipTarget:()=>{}}}};const Ux=1/60*1e3,Vx="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),zx="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout((()=>t(Vx())),Ux);let Gx=!0,Hx=!1,Wx=!1;const Yx={delta:0,timestamp:0},qx=["read","update","preRender","render","postRender"],$x=qx.reduce(((t,e)=>(t[e]=function(t){let e=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,c=u?e:r;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),u&&o&&(n=e.length)),t},cancel:t=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1),a.delete(t)},process:u=>{if(o)i=!0;else{if(o=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let r=0;rHx=!0)),t)),{}),Xx=qx.reduce(((t,e)=>{const r=$x[e];return t[e]=(t,e=!1,n=!1)=>(Hx||tP(),r.schedule(t,e,n)),t}),{}),Kx=qx.reduce(((t,e)=>(t[e]=$x[e].cancel,t)),{}),Zx=qx.reduce(((t,e)=>(t[e]=()=>$x[e].process(Yx),t)),{}),Jx=t=>$x[t].process(Yx),Qx=t=>{Hx=!1,Yx.delta=Gx?Ux:Math.max(Math.min(t-Yx.timestamp,40),1),Yx.timestamp=t,Wx=!0,qx.forEach(Jx),Wx=!1,Hx&&(Gx=!1,zx(Qx))},tP=()=>{Hx=!0,Gx=!0,Wx||zx(Qx)},eP=()=>Yx,rP=Xx;function nP(t,e,r=0){return t-e-r}const oP=t=>{const e=({delta:e})=>t(e);return{start:()=>rP.update(e,!0),stop:()=>Kx.update(e)}};function iP(t){var e,r,{from:n,autoplay:o=!0,driver:i=oP,elapsed:a=0,repeat:s=0,repeatType:u="loop",repeatDelay:c=0,onPlay:l,onStop:f,onComplete:p,onRepeat:d,onUpdate:h}=t,y=Vw(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let m,v,b,{to:g}=y,w=0,O=y.duration,j=!1,S=!0;const x=function(t){if(Array.isArray(t.to))return Mx;if(Bx[t.type])return Bx[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Mx:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?BS:Mx}(y);(null===(r=(e=x).needsInterpolation)||void 0===r?void 0:r.call(e,n,g))&&(b=gx([0,100],[n,g],{clamp:!1}),n=0,g=100);const P=x(Object.assign(Object.assign({},y),{from:n,to:g}));function _(){w++,"reverse"===u?(S=w%2==0,a=function(t,e,r=0,n=!0){return n?nP(e+-t,e,r):e-(t-e)+r}(a,O,c,S)):(a=nP(a,O,c),"mirror"===u&&P.flipTarget()),j=!1,d&&d()}function E(t){if(S||(t=-t),a+=t,!j){const t=P.next(Math.max(0,a));v=t.value,b&&(v=b(v)),j=S?t.done:a<=0}null==h||h(v),j&&(0===w&&(null!=O||(O=a)),w=e+r:t<=-r}(a,O,c,S)&&_():(m.stop(),p&&p()))}return o&&(null==l||l(),m=i(E),m.start()),{stop:()=>{null==f||f(),m.stop()}}}function aP(t,e){return e?t*(1e3/e):0}var sP=function(t){return 1e3*t};const uP=(t,e)=>1-3*e+3*t,cP=(t,e)=>3*e-6*t,lP=t=>3*t,fP=(t,e,r)=>((uP(e,r)*t+cP(e,r))*t+lP(e))*t,pP=(t,e,r)=>3*uP(e,r)*t*t+2*cP(e,r)*t+lP(e),dP=1e-7,hP=10;const yP=8,mP=.001;const vP=11,bP=1/(vP-1);function gP(t,e,r,n){if(t===e&&r===n)return Sx;const o=new Float32Array(vP);for(let e=0;e=mP?function(t,e,r,n){for(let o=0;o0?r=a:e=a}while(Math.abs(i)>dP&&++s0===t||1===t?t:fP(i(t),e,n)}var wP={linear:Sx,easeIn:xx,easeInOut:Ex,easeOut:_x,circIn:kx,circInOut:Tx,circOut:Cx,backIn:Rx,backInOut:Nx,backOut:Dx,anticipate:Ix,bounceIn:Ax,bounceInOut:t=>t<.5?.5*(1-Lx(1-2*t)):.5*Lx(2*t-1)+.5,bounceOut:Lx},OP=function(t){if(Array.isArray(t)){Xw(4===t.length,"Cubic bezier arrays must contain four numerical values.");var e=zw(t,4);return gP(e[0],e[1],e[2],e[3])}return"string"==typeof t?(Xw(void 0!==wP[t],"Invalid easing type '".concat(t,"'")),wP[t]):t},jP=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},SP=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!lx.test(e)||e.startsWith("url(")))},xP=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},PP=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},_P=function(){return{type:"keyframes",ease:"linear",duration:.3}},EP=function(t){return{type:"keyframes",duration:.8,values:t}},kP={x:xP,y:xP,z:xP,rotate:xP,rotateX:xP,rotateY:xP,rotateZ:xP,scaleX:PP,scaleY:PP,scale:PP,opacity:_P,backgroundColor:_P,color:_P,default:PP},CP=function(t,e){var r;return r=kj(e)?EP:kP[t]||kP.default,Uw({to:e},r(e))};const TP=new Set(["brightness","contrast","saturate","opacity"]);function RP(t){let[e,r]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=r.match(zO)||[];if(!n)return t;const o=r.replace(n,"");let i=TP.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+o+")"}const DP=/([a-z-]*)\(.*?\)/g,NP=Object.assign(Object.assign({},lx),{getAnimatableNone:t=>{const e=t.match(DP);return e?e.map(RP).join(" "):t}});var IP=Uw(Uw({},nj),{color:nx,backgroundColor:nx,outlineColor:nx,fill:nx,stroke:nx,borderColor:nx,borderTopColor:nx,borderRightColor:nx,borderBottomColor:nx,borderLeftColor:nx,filter:NP,WebkitFilter:NP}),LP=function(t){return IP[t]};function AP(t,e){var r,n=LP(t);return n!==NP&&(n=lx),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,e)}var FP={current:!1};var MP=!1;function BP(t,e,r){var n;return Array.isArray(e.to)&&(null!==(n=t.duration)&&void 0!==n||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Gw([],zw(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Vw(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Uw(Uw({},t),CP(r,e.to))),Uw(Uw({},e),function(t){var e=t.ease,r=t.times,n=t.yoyo,o=t.flip,i=t.loop,a=Vw(t,["ease","times","yoyo","flip","loop"]),s=Uw({},a);return r&&(s.offset=r),a.duration&&(s.duration=sP(a.duration)),a.repeatDelay&&(s.repeatDelay=sP(a.repeatDelay)),e&&(s.ease=jP(e)?e.map(OP):OP(e)),"tween"===a.type&&(s.type="keyframes"),(n||i||o)&&($w(!MP,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),MP=!0,n?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||n||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}(t))}function UP(t,e,r,n,o){var i,a=GP(n,t),s=null!==(i=a.from)&&void 0!==i?i:e.get(),u=SP(t,r);"none"===s&&u&&"string"==typeof r?s=AP(t,r):VP(s)&&"string"==typeof r?s=zP(r):!Array.isArray(r)&&VP(r)&&"string"==typeof s&&(r=zP(s));var c=SP(t,s);return $w(c===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(r,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(r," via the `style` property.")),c&&u&&!1!==a.type?function(){var n={from:s,to:r,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function({from:t=0,velocity:e=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:p,onStop:d}){let h;function y(t){return void 0!==r&&tn}function m(t){return void 0===r?n:void 0===n||Math.abs(r-t){var r;null==f||f(e),null===(r=t.onUpdate)||void 0===r||r.call(t,e)},onComplete:p,onStop:d}))}function b(t){v(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(y(t))b({from:t,velocity:e,to:m(t)});else{let n=o*e+t;void 0!==c&&(n=c(n));const a=m(n),s=a===r?-1:1;let l,f;const p=t=>{l=f,f=t,e=aP(t-l,eP().delta),(1===s&&t>a||-1===s&&tnull==h?void 0:h.stop()}}(Uw(Uw({},n),a)):iP(Uw(Uw({},BP(a,n,t)),{onUpdate:function(t){var e;n.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;n.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t,n,i=Tj(r);return e.set(i),o(),null===(t=null==a?void 0:a.onUpdate)||void 0===t||t.call(a,i),null===(n=null==a?void 0:a.onComplete)||void 0===n||n.call(a),{stop:function(){}}}}function VP(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function zP(t){return"number"==typeof t?0:AP("",t)}function GP(t,e){return t[e]||t.default||t}function HP(t,e,r,n){return void 0===n&&(n={}),FP.current&&(n={type:!1}),e.start((function(o){var i,a,s=UP(t,e,r,n,o),u=function(t,e){var r,n;return null!==(n=null!==(r=(GP(t,e)||{}).delay)&&void 0!==r?r:t.delay)&&void 0!==n?n:0}(n,t),c=function(){return a=s()};return u?i=window.setTimeout(c,sP(u)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var WP=function(t){return/^\-?\d*\.?\d+$/.test(t)},YP=function(t){return/^0[^.\s]+$/.test(t)};function qP(t,e){-1===t.indexOf(e)&&t.push(e)}function $P(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)}var XP=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return qP(this.subscriptions,t),function(){return $P(e.subscriptions,t)}},t.prototype.notify=function(t,e,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,r);else for(var o=0;oh&&v,j=Array.isArray(m)?m:[m],S=j.reduce(a,{});!1===b&&(S={});var x=y.prevResolvedValues,P=void 0===x?{}:x,_=Uw(Uw({},P),S),E=function(t){O=!0,p.delete(t),y.needsAnimating[t]=!0};for(var k in _){var C=S[k],T=P[k];d.hasOwnProperty(k)||(C!==T?kj(C)&&kj(T)?!_S(C,T)||w?E(k):y.protectedKeys[k]=!0:void 0!==C?E(k):p.add(k):void 0!==C&&p.has(k)?E(k):y.protectedKeys[k]=!0)}y.prevProp=m,y.prevResolvedValues=S,y.isActive&&(d=Uw(Uw({},d),S)),i&&t.blockInitialAnimation&&(O=!1),O&&!g&&f.push.apply(f,Gw([],zw(j.map((function(t){return{animation:t,options:Uw({type:o},e)}}))),!1))},m=0;mt.hasOwnProperty("x")&&t.hasOwnProperty("y"),g_=t=>b_(t)&&t.hasOwnProperty("z"),w_=(t,e)=>Math.abs(t-e);function O_(t,e){if(fx(t)&&fx(e))return w_(t,e);if(b_(t)&&b_(e)){const r=w_(t.x,e.x),n=w_(t.y,e.y),o=g_(t)&&g_(e)?w_(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}var j_=function(){function t(t,e,r){var n=this,o=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var t=P_(n.lastMoveEventInfo,n.history),e=null!==n.startEvent,r=O_(t.offset,{x:0,y:0})>=3;if(e||r){var o=t.point,i=eP().timestamp;n.history.push(Uw(Uw({},o),{timestamp:i}));var a=n.handlers,s=a.onStart,u=a.onMove;e||(s&&s(n.lastMoveEvent,t),n.startEvent=n.lastMoveEvent),u&&u(n.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){n.lastMoveEvent=t,n.lastMoveEventInfo=S_(e,n.transformPagePoint),Uj(t)&&0===t.buttons?n.handlePointerUp(t,e):rP.update(n.updatePoint,!0)},this.handlePointerUp=function(t,e){n.end();var r=n.handlers,o=r.onEnd,i=r.onSessionEnd,a=P_(S_(e,n.transformPagePoint),n.history);n.startEvent&&o&&o(t,a),i&&i(t,a)},!(Vj(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var i=S_(Wj(t),this.transformPagePoint),a=i.point,s=eP().timestamp;this.history=[Uw(Uw({},a),{timestamp:s})];var u=e.onSessionStart;u&&u(t,P_(i,this.history)),this.removeListeners=lS(Qj(window,"pointermove",this.handlePointerMove),Qj(window,"pointerup",this.handlePointerUp),Qj(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Kx.update(this.updatePoint)},t}();function S_(t,e){return e?{point:e(t.point)}:t}function x_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function P_(t,e){var r=t.point;return{point:r,delta:x_(r,E_(e)),offset:x_(r,__(e)),velocity:k_(e,.1)}}function __(t){return t[0]}function E_(t){return t[t.length-1]}function k_(t,e){if(t.length<2)return{x:0,y:0};for(var r=t.length-1,n=null,o=E_(t);r>=0&&(n=t[r],!(o.timestamp-n.timestamp>sP(e)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function C_(t){return t.max-t.min}function T_(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),O_(t,e)e?r="y":Math.abs(t.x)>e&&(r="x");return r}(u),void(null!==r.currentDirection&&(null==a||a(r.currentDirection)));r.updateAxis("x",e.point,u),r.updateAxis("y",e.point,u),r.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return r.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var r=this.isDragging;if(this.cancel(),r){var n=e.velocity;this.startAnimation(n);var o=this.getProps().onDragEnd;null==o||o(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Lj.Drag,!1)},t.prototype.updateAxis=function(t,e,r){var n=this.getProps().drag;if(r&&sE(t,n,this.currentDirection)){var o,i,a,s,u,c=this.getAxisMotionValue(t),l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=l,i=this.constraints[t],a=this.elastic[t],s=i.min,u=i.max,void 0!==s&&ou&&(o=a?zS(u,o,a.max):Math.min(o,u)),l=o),c.set(l)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),r=e.dragConstraints,n=e.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;r&&uO(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!r||!o)&&function(t,e){var r=e.top,n=e.left,o=e.bottom,i=e.right;return{x:A_(t.x,n,i),y:A_(t.y,r,o)}}(o.actual,r),this.elastic=function(t){return void 0===t&&(t=M_),!1===t?t=0:!0===t&&(t=M_),{x:B_(t,"left","right"),y:B_(t,"top","bottom")}}(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&G_((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var r={};return void 0!==e.min&&(r.min=e.min-t.min),void 0!==e.max&&(r.max=e.max-t.min),r}(o.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,r=t.onMeasureDragConstraints;if(!e||!uO(e))return!1;var n=e.current;Xw(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(t,e,r){var n=oE(t,r),o=e.scroll;return o&&(Q_(n.x,o.x),Q_(n.y,o.y)),n}(n,o.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:F_(t.x,e.x),y:F_(t.y,e.y)}}(o.layout.actual,i);if(r){var s=r(function(t){var e=t.x,r=t.y;return{top:r.min,right:e.max,bottom:r.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=H_(s))}return a},t.prototype.startAnimation=function(t){var e=this,r=this.getProps(),n=r.drag,o=r.dragMomentum,i=r.dragElastic,a=r.dragTransition,s=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},l=G_((function(r){var u;if(sE(r,n,e.currentDirection)){var l=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{};s&&(l={min:0,max:0});var f=i?200:1e6,p=i?40:1e7,d=Uw(Uw({type:"inertia",velocity:o?t[r]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},a),l);return e.startAxisValueAnimation(r,d)}}));return Promise.all(l).then(u)},t.prototype.startAxisValueAnimation=function(t,e){return HP(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;G_((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,r,n="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[n];return o||this.visualElement.getValue(t,null!==(r=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==r?r:0)},t.prototype.snapToCursor=function(t){var e=this;G_((function(r){if(sE(r,e.getProps().drag,e.currentDirection)){var n=e.visualElement.projection,o=e.getAxisMotionValue(r);if(n&&n.layout){var i=n.layout.actual[r],a=i.min,s=i.max;o.set(t[r]-zS(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,r=this.getProps(),n=r.drag,o=r.dragConstraints,i=this.visualElement.projection;if(uO(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};G_((function(t){var r,n,o,i,s,u=e.getAxisMotionValue(t);if(u){var c=u.get();a[t]=(r={min:c,max:c},n=e.constraints[t],o=.5,i=C_(r),(s=C_(n))>i?o=VS(n.min,n.max-i,r.min):i>s&&(o=VS(r.min,r.max-s,n.min)),ES(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),G_((function(t){if(sE(t,n,null)){var r=e.getAxisMotionValue(t),o=e.constraints[t],i=o.min,s=o.max;r.set(zS(i,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;iE.set(this.visualElement,this);var r=Qj(this.visualElement.getInstance(),"pointerdown",(function(t){var r=e.getProps(),n=r.drag,o=r.dragListener;n&&(void 0===o||o)&&e.start(t)})),n=function(){uO(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();var a=Mj(window,"resize",(function(){return e.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(t){var r=t.delta,n=t.hasLayoutChanged;e.isDragging&&n&&(G_((function(t){var n=e.getAxisMotionValue(t);n&&(e.originPoint[t]+=r[t].translate,n.set(n.get()+r[t].translate))})),e.visualElement.syncRender())})),function(){a(),r(),i()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,r=void 0!==e&&e,n=t.dragDirectionLock,o=void 0!==n&&n,i=t.dragPropagation,a=void 0!==i&&i,s=t.dragConstraints,u=void 0!==s&&s,c=t.dragElastic,l=void 0===c?M_:c,f=t.dragMomentum,p=void 0===f||f;return Uw(Uw({},t),{drag:r,dragDirectionLock:o,dragPropagation:a,dragConstraints:u,dragElastic:l,dragMomentum:p})},t}();function sE(t,e,r){return!(!0!==e&&e!==t||null!==r&&r!==t)}var uE={pan:wS((function(t){var e=t.onPan,r=t.onPanStart,n=t.onPanEnd,i=t.onPanSessionStart,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(null),c=(0,o.useContext)(Qw).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,e){u.current=null,n&&n(t,e)}};(0,o.useEffect)((function(){null!==u.current&&u.current.updateHandlers(l)})),tS(a,"pointerdown",s&&function(t){u.current=new j_(t,l,{transformPagePoint:c})}),uS((function(){return u.current&&u.current.end()}))})),drag:wS((function(t){var e=t.dragControls,r=t.visualElement,n=vO((function(){return new aE(r)}));(0,o.useEffect)((function(){return e&&e.subscribe(n)}),[n,e]),(0,o.useEffect)((function(){return n.addListeners()}),[n])}))},cE=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var lE=function(t){var e=t.treeType,r=void 0===e?"":e,n=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,c=t.removeValueFromRenderState,l=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(t,e){var p=t.parent,d=t.props,h=t.presenceId,y=t.blockInitialAnimation,m=t.visualState,v=t.shouldReduceMotion;void 0===e&&(e={});var b,g,w=!1,O=m.latestValues,j=m.renderState,S=function(){var t=cE.map((function(){return new XP})),e={},r={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){cE.forEach((function(n){var o,i="on"+n,a=t[i];null===(o=e[n])||void 0===o||o.call(e),a&&(e[n]=r[i](a))}))}};return t.forEach((function(t,e){r["on"+cE[e]]=function(e){return t.add(e)},r["notify"+cE[e]]=function(){for(var e=[],r=0;r=0?window.pageYOffset:null,c=function(t,e,r){var n=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),r.forEach((function(t){s[t]=EE[t](n,i)})),e.syncRender();var u=e.measureViewportBox();return r.forEach((function(r){var n=e.getValue(r);OE(n,s[r]),t[r]=EE[r](u,i)})),t}(e,t,s);return i.length&&i.forEach((function(e){var r=zw(e,2),n=r[0],o=r[1];t.getValue(n).set(o)})),t.syncRender(),null!==u&&window.scrollTo({top:u}),{target:c,transitionEnd:n}}return{target:e,transitionEnd:n}};var CE=function(t,e,r,n){var o=function(t,e,r){var n,o=Vw(e,[]),i=t.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:r};for(var a in r&&(r=Uw({},r)),t.forEachValue((function(t){var e=t.get();if(dE(e)){var r=mE(e,i);r&&t.set(r)}})),o){var s=o[a];if(dE(s)){var u=mE(s,i);u&&(o[a]=u,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:o,transitionEnd:r}}(t,e,n);return function(t,e,r,n){return wE(e)?kE(t,e,r,n):{target:e,transitionEnd:n}}(t,e=o.target,r,n=o.transitionEnd)};var TE={treeType:"dom",readValueFromInstance:function(t,e){if(DO(e)){var r=LP(e);return r&&r.default||0}var n,o=(n=t,window.getComputedStyle(n));return(MO(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var r;return null===(r=t.style)||void 0===r?void 0:r[e]},measureViewportBox:function(t,e){return oE(t,e.transformPagePoint)},resetTransform:function(t,e,r){var n=r.transformTemplate;e.style.transform=n?n({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var r=e.vars,n=e.style;delete r[t],delete n[t]},makeTargetAnimatable:function(t,e,r,n){var o=r.transformValues;void 0===n&&(n=!0);var i=e.transition,a=e.transitionEnd,s=Vw(e,["transition","transitionEnd"]),u=function(t,e,r){var n,o,i={};for(var a in t)i[a]=null!==(n=a_(a,e))&&void 0!==n?n:null===(o=r.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},t);if(o&&(a&&(a=o(a)),s&&(s=o(s)),u&&(u=o(u))),n){!function(t,e,r){var n,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var c=0;c5)return o;var u=lx.createTransformer(t),c="number"!=typeof s[0]?1:0,l=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=l,s[1+c]/=f;var p=zS(l,f,.5);"number"==typeof s[2+c]&&(s[2+c]/=p),"number"==typeof s[3+c]&&(s[3+c]/=p);var d=u(s);if(i){var h=0;d=d.replace(AE,(function(){var t=a[h];return h++,t}))}return d}},ME=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bw(e,t),e.prototype.componentDidMount=function(){var t,e=this,r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=r.layoutId,s=n.projection;t=BE,Object.assign(EO,t),s&&((null==o?void 0:o.group)&&o.group.add(s),(null==i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions(Uw(Uw({},s.options),{onExitComplete:function(){return e.safeToRemove()}}))),bO.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,r=this.props,n=r.layoutDependency,o=r.visualElement,i=r.drag,a=r.isPresent,s=o.projection;return s?(s.isPresent=a,i||t.layoutDependency!==n||void 0===n?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||rP.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,r=t.layoutGroup,n=t.switchLayoutGroup,o=e.projection;o&&(o.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(o.Component);var BE={borderRadius:Uw(Uw({},LE),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:LE,borderTopRightRadius:LE,borderBottomLeftRadius:LE,borderBottomRightRadius:LE,boxShadow:FE},UE={measureLayout:function(t){var e=zw(PS(),2),r=e[0],n=e[1],i=(0,o.useContext)(wO);return o.createElement(ME,Uw({},t,{layoutGroup:i,switchLayoutGroup:(0,o.useContext)(OO),isPresent:r,safeToRemove:n}))}};var VE=["TopLeft","TopRight","BottomLeft","BottomRight"],zE=VE.length,GE=function(t){return"string"==typeof t?parseFloat(t):t},HE=function(t){return"number"==typeof t||XO.test(t)};function WE(t,e){var r;return null!==(r=t[e])&&void 0!==r?r:t.borderRadius}var YE=$E(0,.5,Cx),qE=$E(.5,.95,Sx);function $E(t,e,r){return function(n){return ne?1:r(VS(t,e,n))}}function XE(t,e){t.min=e.min,t.max=e.max}function KE(t,e){XE(t.x,e.x),XE(t.y,e.y)}function ZE(t,e,r,n,o){return t=X_(t-=e,1/r,n),void 0!==o&&(t=X_(t,1/o,n)),t}function JE(t,e,r,n,o){var i=zw(r,3),a=i[0],s=i[1],u=i[2];!function(t,e,r,n,o,i,a){if(void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5),void 0===i&&(i=t),void 0===a&&(a=t),$O.test(e)&&(e=parseFloat(e),e=zS(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=zS(i.min,i.max,n);t===i&&(s-=e),t.min=ZE(t.min,e,r,s,o),t.max=ZE(t.max,e,r,s,o)}}(t,e[a],e[s],e[u],e.scale,n,o)}var QE=["x","scaleX","originX"],tk=["y","scaleY","originY"];function ek(t,e,r,n){JE(t.x,e,QE,null==r?void 0:r.x,null==n?void 0:n.x),JE(t.y,e,tk,null==r?void 0:r.y,null==n?void 0:n.y)}function rk(t){return 0===t.translate&&1===t.scale}function nk(t){return rk(t.x)&&rk(t.y)}function ok(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var ik=function(){function t(){this.members=[]}return t.prototype.add=function(t){qP(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if($P(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,r=this.members.findIndex((function(e){return t===e}));if(0===r)return!1;for(var n=r;n>=0;n--){var o=this.members[n];if(!1!==o.isPresent){e=o;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var r,n=this.lead;t!==n&&(this.prevLead=n,this.lead=t,t.show(),n&&(n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues,t.snapshot.isShared=!0),(null===(r=t.root)||void 0===r?void 0:r.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&n.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,r,n,o,i;null===(r=(e=t.options).onExitComplete)||void 0===r||r.call(e),null===(i=null===(n=t.resumingFrom)||void 0===n?void 0:(o=n.options).onExitComplete)||void 0===i||i.call(o)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),ak="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function sk(t,e,r){var n=t.x.translate/e.x,o=t.y.translate/e.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),r){var a=r.rotate,s=r.rotateX,u=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),u&&(i+="rotateY(".concat(u,"deg) "))}var c=t.x.scale*e.x,l=t.y.scale*e.y;return(i+="scale(".concat(c,", ").concat(l,")"))===ak?"none":i}var uk=function(t,e){return t.depth-e.depth},ck=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){qP(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){$P(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(uk),this.isDirty=!1,this.children.forEach(t)},t}(),lk=1e3;function fk(t){var e=t.attachResizeListener,r=t.defaultParent,n=t.measureScroll,o=t.checkIsScrollRoot,i=t.resetTransform;return function(){function t(t,e,n){var o=this;void 0===e&&(e={}),void 0===n&&(n=null==r?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(bk),o.nodes.forEach(gk)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?Gw(Gw([],zw(n.path),!1),[n],!1):[],this.parent=n,this.depth=n?n.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var i=0;i=0;n--)if(Boolean(t.path[n].instance)){r=t.path[n];break}var o=(r&&r!==t.root?r.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));o&&t.mount(o,!0)}function Ek(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function kk(t){Ek(t.x),Ek(t.y)}var Ck=fk({attachResizeListener:function(t,e){return Mj(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Tk={current:void 0},Rk=fk({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!Tk.current){var t=new Ck(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Tk.current=t}return Tk.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"},checkIsScrollRoot:function(t){return Boolean("fixed"===window.getComputedStyle(t).position)}}),Dk=Uw(Uw(Uw(Uw({},v_),OS),uE),UE),Nk=xO((function(t,e){return function(t,e,r,n,o){var i=e.forwardMotionProps,a=void 0!==i&&i,s=_O(t)?Aj:Fj;return Uw(Uw({},s),{preloadedFeatures:r,useRender:gj(a),createVisualElement:n,projectionNodeConstructor:o,Component:t})}(t,e,Dk,NE,Rk)}));var Ik=r(296),Lk=r.n(Ik);function Ak(t){let{debounce:e,scroll:r,polyfill:n,offsetSize:i}=void 0===t?{debounce:0,scroll:!1,offsetSize:!1}:t;const a=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,u]=(0,o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),l=e?"number"==typeof e?e:e.scroll:null,f=e?"number"==typeof e?e:e.resize:null,p=(0,o.useRef)(!1);(0,o.useEffect)((()=>(p.current=!0,()=>{p.current=!1})));const[d,h,y]=(0,o.useMemo)((()=>{const t=()=>{if(!c.current.element)return;const{left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l}=c.current.element.getBoundingClientRect(),f={left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l};c.current.element instanceof HTMLElement&&i&&(f.height=c.current.element.offsetHeight,f.width=c.current.element.offsetWidth),Object.freeze(f),p.current&&!Bk(c.current.lastBounds,f)&&u(c.current.lastBounds=f)};return[t,f?Lk()(t,f):t,l?Lk()(t,l):t]}),[u,i,l,f]);function m(){c.current.scrollContainers&&(c.current.scrollContainers.forEach((t=>t.removeEventListener("scroll",y,!0))),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function v(){c.current.element&&(c.current.resizeObserver=new a(y),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach((t=>t.addEventListener("scroll",y,{capture:!0,passive:!0}))))}var b,g,w;return b=y,g=Boolean(r),(0,o.useEffect)((()=>{if(g){const t=b;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}}),[b,g]),w=h,(0,o.useEffect)((()=>{const t=w;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[w]),(0,o.useEffect)((()=>{m(),v()}),[r,y,h]),(0,o.useEffect)((()=>m),[]),[t=>{t&&t!==c.current.element&&(m(),c.current.element=t,c.current.scrollContainers=Fk(t),v())},s,d]}function Fk(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(t);return[r,n,o].some((t=>"auto"===t||"scroll"===t))&&e.push(t),[...e,...Fk(t.parentElement)]}const Mk=["x","y","top","bottom","left","right","width","height"],Bk=(t,e)=>Mk.every((r=>t[r]===e[r]));function Uk(){const{dragDropManager:t}=(0,o.useContext)(jg);return gb(null!=t,"Expected drag drop context"),t}var Vk=r(4063);const zk="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function Gk(t,e,r){const[n,i]=(0,o.useState)((()=>e(t))),a=(0,o.useCallback)((()=>{const o=e(t);Vk(n,o)||(i(o),r&&r())}),[n,t,r]);return zk(a),[n,a]}function Hk(t,e,r){return function(t,e,r){const[n,o]=Gk(t,e,r);return zk((function(){const e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(o,{handlerIds:[e]})}),[t,o]),n}(e,t||(()=>({})),(()=>r.reconnect()))}function Wk(t,e){const r=[...e||[]];return null==e&&"function"!=typeof t&&r.push(t),(0,o.useMemo)((()=>"function"==typeof t?t():t),r)}function Yk(t){return(0,o.useMemo)((()=>t.hooks.dragSource()),[t])}function qk(t){return(0,o.useMemo)((()=>t.hooks.dragPreview()),[t])}function $k(t,e,r,n){let o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(e);for(let a=0;a{if(!(0,o.isValidElement)(e)){const n=e;return t(n,r),n}const n=e;!function(t){if("string"==typeof t.type)return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a
, or turn it into a drag source or a drop target itself.`)}(n);return function(t,e){const r=t.ref;return gb("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,o.cloneElement)(t,{ref:t=>{Jk(r,t),Jk(e,t)}}):(0,o.cloneElement)(t,{ref:e})}(n,r?e=>t(e,r):t)}}function Zk(t){const e={};return Object.keys(t).forEach((r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const t=Kk(n);e[r]=()=>t}})),e}function Jk(t,e){"function"==typeof t?t(e):t.current=e}class Qk{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(e?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!$k(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!$k(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Zk({dragSource:(t,e)=>{this.clearDragSource(),this.dragSourceOptions=e||null,Xk(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,e)=>{this.clearDragPreview(),this.dragPreviewOptions=e||null,Xk(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}let tC=!1,eC=!1;class rC{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){gb(!tC,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return tC=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{tC=!1}}isDragging(){if(!this.sourceId)return!1;gb(!eC,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return eC=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{eC=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}class nC{beginDrag(){const t=this.spec,e=this.monitor;let r=null;return r="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(e):{},null!=r?r:null}canDrag(){const t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}isDragging(t,e){const r=this.spec,n=this.monitor,{isDragging:o}=r;return o?o(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,r=this.connector,{end:n}=t;n&&n(e.getItem(),e),r.reconnect()}constructor(t,e,r){this.spec=t,this.monitor=e,this.connector=r}}function oC(t,e,r){const n=Uk(),i=function(t,e,r){const n=(0,o.useMemo)((()=>new nC(t,e,r)),[e,r]);return(0,o.useEffect)((()=>{n.spec=t}),[t]),n}(t,e,r),a=function(t){return(0,o.useMemo)((()=>{const e=t.type;return gb(null!=e,"spec.type must be defined"),e}),[t])}(t);zk((function(){if(null!=a){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addSource(t,e);return[o,()=>n.removeSource(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}}),[n,e,r,i,a])}function iC(t,e){const r=Wk(t,e);gb(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=function(){const t=Uk();return(0,o.useMemo)((()=>new rC(t)),[t])}(),i=function(t,e){const r=Uk(),n=(0,o.useMemo)((()=>new Qk(r.getBackend())),[r]);return zk((()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource())),[n,t]),zk((()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview())),[n,e]),n}(r.options,r.previewOptions);return oC(r,n,i),[Hk(r.collect,n,i),Yk(i),qk(i)]}function aC(t){return(0,o.useMemo)((()=>t.hooks.dropTarget()),[t])}class sC{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!$k(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Zk({dropTarget:(t,e)=>{this.clearDropTarget(),this.dropTargetOptions=e,Xk(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}let uC=!1;class cC{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;gb(!uC,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return uC=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{uC=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}class lC{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function fC(t,e,r){const n=Uk(),i=function(t,e){const r=(0,o.useMemo)((()=>new lC(t,e)),[e]);return(0,o.useEffect)((()=>{r.spec=t}),[t]),r}(t,e),a=function(t){const{accept:e}=t;return(0,o.useMemo)((()=>(gb(null!=t.accept,"accept must be defined"),Array.isArray(e)?e:[e])),[e])}(t);zk((function(){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addTarget(t,e);return[o,()=>n.removeTarget(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}),[n,e,i,r,a.map((t=>t.toString())).join("|")])}function pC(t,e){const r=Wk(t,e),n=function(){const t=Uk();return(0,o.useMemo)((()=>new cC(t)),[t])}(),i=function(t){const e=Uk(),r=(0,o.useMemo)((()=>new sC(e.getBackend())),[e]);return zk((()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget())),[t]),r}(r.options);return fC(r,n,i),[Hk(r.collect,n,i),aC(i)]}const dC=(t,e)=>({event:t,check:e}),hC=dC("touchstart",(t=>{const e=t;return null!==e.touches&&void 0!==e.touches})),yC=(dC("dragstart",(t=>-1!==t.type.indexOf("drag")||-1!==t.type.indexOf("drop"))),dC("mousedown",(t=>-1===t.type.indexOf("touch")&&-1!==t.type.indexOf("mouse"))),dC("pointerdown",(t=>"mouse"==t.pointerType)));function mC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function bC(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,wC(t,e,"get"))}function gC(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,wC(t,e,"set"),r),r}function wC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var OC=new WeakMap;class jC{constructor(){vC(this,OC,{writable:!0,value:void 0}),mC(this,"register",(t=>{bC(this,OC).push(t)})),mC(this,"unregister",(t=>{let e;for(;-1!==(e=bC(this,OC).indexOf(t));)bC(this,OC).splice(e,1)})),mC(this,"backendChanged",(t=>{for(const e of bC(this,OC))e.backendChanged(t)})),gC(this,OC,[])}}function SC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function xC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PC(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,EC(t,e,"get"))}function _C(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,EC(t,e,"set"),r),r}function EC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var kC=new WeakMap,CC=new WeakMap,TC=new WeakMap,RC=new WeakMap,DC=new WeakMap,NC=new WeakMap,IC=new WeakMap,LC=new WeakMap,AC=new WeakMap,FC=new WeakMap,MC=new WeakMap;class BC{constructor(t,e,r){if(SC(this,kC,{writable:!0,value:void 0}),SC(this,CC,{writable:!0,value:void 0}),SC(this,TC,{writable:!0,value:void 0}),SC(this,RC,{writable:!0,value:void 0}),SC(this,DC,{writable:!0,value:void 0}),SC(this,NC,{writable:!0,value:(t,e,r)=>{var n,o;if(!r.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(r)));const i=r.backend(t,e,r.options);let a=r.id;const s=!r.id&&i&&i.constructor;if(s&&(a=i.constructor.name),!a)throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(r),"\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));if(s&&console.warn("Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend."),PC(this,TC)[a])throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(r)," (conflicts with: ").concat(JSON.stringify(PC(this,TC)[a]),")"));return{id:a,instance:i,preview:null!==(n=r.preview)&&void 0!==n&&n,transition:r.transition,skipDispatchOnTransition:null!==(o=r.skipDispatchOnTransition)&&void 0!==o&&o}}}),xC(this,"setup",(()=>{if("undefined"!=typeof window){if(BC.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");BC.isSetUp=!0,PC(this,IC).call(this,window),PC(this,TC)[PC(this,kC)].instance.setup()}})),xC(this,"teardown",(()=>{"undefined"!=typeof window&&(BC.isSetUp=!1,PC(this,LC).call(this,window),PC(this,TC)[PC(this,kC)].instance.teardown())})),xC(this,"connectDragSource",((t,e,r)=>PC(this,MC).call(this,"connectDragSource",t,e,r))),xC(this,"connectDragPreview",((t,e,r)=>PC(this,MC).call(this,"connectDragPreview",t,e,r))),xC(this,"connectDropTarget",((t,e,r)=>PC(this,MC).call(this,"connectDropTarget",t,e,r))),xC(this,"profile",(()=>PC(this,TC)[PC(this,kC)].instance.profile())),xC(this,"previewEnabled",(()=>PC(this,TC)[PC(this,kC)].preview)),xC(this,"previewsList",(()=>PC(this,CC))),xC(this,"backendsList",(()=>PC(this,RC))),SC(this,IC,{writable:!0,value:t=>{PC(this,RC).forEach((e=>{e.transition&&t.addEventListener(e.transition.event,PC(this,AC))}))}}),SC(this,LC,{writable:!0,value:t=>{PC(this,RC).forEach((e=>{e.transition&&t.removeEventListener(e.transition.event,PC(this,AC))}))}}),SC(this,AC,{writable:!0,value:t=>{const e=PC(this,kC);if(PC(this,RC).some((e=>!(e.id===PC(this,kC)||!e.transition||!e.transition.check(t))&&(_C(this,kC,e.id),!0))),PC(this,kC)!==e){var r;PC(this,TC)[e].instance.teardown(),Object.keys(PC(this,DC)).forEach((t=>{const e=PC(this,DC)[t];e.unsubscribe(),e.unsubscribe=PC(this,FC).call(this,e.func,...e.args)})),PC(this,CC).backendChanged(this);const n=PC(this,TC)[PC(this,kC)];if(n.instance.setup(),n.skipDispatchOnTransition)return;const o=new(0,t.constructor)(t.type,t);null===(r=t.target)||void 0===r||r.dispatchEvent(o)}}}),SC(this,FC,{writable:!0,value:(t,e,r,n)=>PC(this,TC)[PC(this,kC)].instance[t](e,r,n)}),SC(this,MC,{writable:!0,value:(t,e,r,n)=>{const o="".concat(t,"_").concat(e),i=PC(this,FC).call(this,t,e,r,n);return PC(this,DC)[o]={func:t,args:[e,r,n],unsubscribe:i},()=>{PC(this,DC)[o].unsubscribe(),delete PC(this,DC)[o]}}}),!r||!r.backends||r.backends.length<1)throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");_C(this,CC,new jC),_C(this,TC,{}),_C(this,RC,[]),r.backends.forEach((r=>{const n=PC(this,NC).call(this,t,e,r);PC(this,TC)[n.id]=n,PC(this,RC).push(n)})),_C(this,kC,PC(this,RC)[0].id),_C(this,DC,{})}}xC(BC,"isSetUp",!1);const UC=(t,e,r)=>new BC(t,e,r);var VC;!function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"}(VC||(VC={}));class zC{get delay(){var t;return null!==(t=this.args.delay)&&void 0!==t?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return null!==(t=this.args.ignoreContextMenu)&&void 0!==t&&t}get enableHoverOutsideTarget(){var t;return null!==(t=this.args.enableHoverOutsideTarget)&&void 0!==t&&t}get enableKeyboardEvents(){var t;return null!==(t=this.args.enableKeyboardEvents)&&void 0!==t&&t}get enableMouseEvents(){var t;return null!==(t=this.args.enableMouseEvents)&&void 0!==t&&t}get enableTouchEvents(){var t;return null===(t=this.args.enableTouchEvents)||void 0===t||t}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayTouchStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get delayMouseStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayMouseStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get window(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.context)||void 0===t?void 0:t.document)?this.context.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.args)||void 0===t?void 0:t.rootElement)||this.document}constructor(t,e){this.args=t,this.context=e}}const GC={Left:1,Right:2,Center:4},HC={Left:0,Center:1,Right:2};function WC(t){return void 0===t.button||t.button===HC.Left}function YC(t){return!!t.targetTouches}const qC=1;function $C(t,e){return YC(t)?function(t,e){return 1===t.targetTouches.length?$C(t.targetTouches[0]):e&&1===t.touches.length&&t.touches[0].target===e.target?$C(t.touches[0]):void 0}(t,e):{x:t.clientX,y:t.clientY}}const XC=(()=>{let t=!1;try{addEventListener("test",(()=>{}),Object.defineProperty({},"passive",{get:()=>(t=!0,!0)}))}catch(t){}return t})(),KC={[VC.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[VC.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[VC.keyboard]:{keydown:"keydown"}};class ZC{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(gb(!ZC.isSetUp,"Cannot have two Touch backends at the same time."),ZC.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(ZC.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,e,r,n=!1){const o=XC?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=KC[n][e];i&&t.addEventListener(i,r,o)}))}removeEventListener(t,e,r,n=!1){const o=XC?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=KC[n][e];i&&t.removeEventListener(i,r,o)}))}connectDragSource(t,e){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,e),this.addEventListener(e,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(e,"start",r)}}connectDragPreview(t,e,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,e){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const n=n=>{if(!this.document||!r||!this.monitor.isDragging())return;let o;switch(n.type){case KC.mouse.move:o={x:n.clientX,y:n.clientY};break;case KC.touch.move:var i,a;o={x:(null===(i=n.touches[0])||void 0===i?void 0:i.clientX)||0,y:(null===(a=n.touches[0])||void 0===a?void 0:a.clientY)||0}}const s=null!=o?this.document.elementFromPoint(o.x,o.y):void 0,u=s&&e.contains(s);return s===e||u?this.handleMove(n,t):void 0};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(t,e),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",n))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver((()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())})),t&&t.parentElement&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,e,r){this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&function(t){const e=t.nodeType===qC?t:t.parentElement;if(!e)return;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}(e)},this.handleTopMoveStartCapture=t=>{WC(t)&&(this.moveStartSourceIds=[])},this.handleMoveStart=t=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(t)},this.handleTopMoveStart=t=>{if(!WC(t))return;const e=$C(t);e&&(YC(t)&&(this.lastTargetTouchFallback=t.targetTouches[0]),this._mouseClientOffset=e),this.waitingForDelay=!1},this.handleTopMoveStartDelay=t=>{if(!WC(t))return;const e=t.type===KC.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,t),e),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(t,e)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(e)},this.handleTopMove=t=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:e,dragOverTargetIds:r}=this,n=this.options.enableHoverOutsideTarget,o=$C(t,this.lastTargetTouchFallback);if(!o)return;if(this._isScrolling||!this.monitor.isDragging()&&function(t,e,r,n,o){if(!o)return!1;const i=180*Math.atan2(n-e,r-t)/Math.PI+180;for(let t=0;t=e.start)&&(null==e.end||i<=e.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,o.x,o.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var i,a,s,u;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&e&&(i=this._mouseClientOffset.x||0,a=this._mouseClientOffset.y||0,s=o.x,u=o.y,Math.sqrt(Math.pow(Math.abs(s-i),2)+Math.pow(Math.abs(u-a),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(e,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const c=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(c),this.actions.publishDragSource(),t.cancelable&&t.preventDefault();const l=(r||[]).map((t=>this.targetNodes.get(t))).filter((t=>!!t)),f=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(o.x,o.y,l):this.document.elementsFromPoint(o.x,o.y),p=[];for(const t in f){if(!f.hasOwnProperty(t))continue;let e=f[t];for(null!=e&&p.push(e);e;)e=e.parentElement,e&&-1===p.indexOf(e)&&p.push(e)}const d=p.filter((t=>l.indexOf(t)>-1)).map((t=>this._getDropTargetId(t))).filter((t=>!!t)).filter(((t,e,r)=>r.indexOf(t)===e));if(n)for(const t in this.targetNodes){const e=this.targetNodes.get(t);if(c&&e&&e.contains(c)&&-1===d.indexOf(t)){d.unshift(t);break}}d.reverse(),this.actions.hover(d,{clientOffset:o})},this._getDropTargetId=t=>{const e=this.targetNodes.keys();let r=e.next();for(;!1===r.done;){const n=r.value;if(t===this.targetNodes.get(n))return n;r=e.next()}},this.handleTopMoveEndCapture=t=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(t){return void 0===t.buttons||0==(t.buttons&GC.Left)}(t)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(t.cancelable&&t.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=t=>{"Escape"===t.key&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new zC(r,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(VC.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(VC.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(VC.keyboard)}}const JC=function(t,e={},r={}){return new ZC(t,e,r)};var QC=function(){return QC=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.text?1:t.texto?i-1:i]},lT=function(t,e){var r="",n=0;return t.forEach((function(o,i){var a,s=function(t,e){var r=t.getBoundingClientRect();return e>r.top+r.height/2?"down":"up"}(o,(null===(a=e.getClientOffset())||void 0===a?void 0:a.y)||0);""===r?r=s:r!==s&&(r=s,n=i),i===t.length-1&&"down"===s&&(n=i+1)})),n},fT=function(t,e,r){var n=e.closest('[role="list"]'),o=null==n?void 0:n.querySelectorAll(':scope > [role="listitem"]');return o?lT(o,r):null},pT=function(t,e,r,n){var o;if(!e)return null;if(null===t){var i=e.querySelectorAll(':scope > [role="listitem"]');return{id:n.rootId,index:lT(i,r)}}var a=r.getItem(),s=e.querySelector('[role="list"]'),u=function(t,e,r){var n=t.getBoundingClientRect(),o=r.dropTargetOffset,i=n.top+o;return e>n.bottom-o?"lower":e [role="listitem"]');return{id:t.id,index:lT(i,r)}}return"middle"===u?{id:t.id,index:0}:sT(a,t.parent,n)?null===(c=fT(0,e,r))?null:{id:t.parent,index:c}:null};var dT=function(t){return void 0===t&&(t={}),{backends:[{id:"html5",backend:Xg,options:t.html5,transition:yC},{id:"touch",backend:JC,options:t.touch||{enableMouseEvents:!0},preview:!0,transition:hC}]}},hT=function(t,e){return t.some((function(t){return t.parent===e}))},yT=(0,o.createContext)({}),mT=function(t){var e=CT(t.tree,t.initialOpen),r=e[0],n=e[1],i=n.handleToggle,a=n.handleCloseAll,s=n.handleOpenAll,u=n.handleOpen,c=n.handleClose;(0,o.useImperativeHandle)(t.treeRef,(function(){return{open:function(e){return u(e,t.onChangeOpen)},close:function(e){return c(e,t.onChangeOpen)},openAll:function(){return s(t.onChangeOpen)},closeAll:function(){return a(t.onChangeOpen)}}}));var l=Uk().getMonitor(),f=t.canDrop,p=t.canDrag,d=QC(QC({extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},t),{openIds:r,onDrop:function(e,r,n){if(e){a={dragSourceId:e.id,dropTargetId:r,dragSource:e,dropTarget:oT(t.tree,r),monitor:l};var o=t.tree;if(oT(o,e.id)||(o=tT(tT([],o,!0),[e],!1)),!1===t.sort){var i=cT(o,e.id,r,n)[1];return a.destinationIndex=i,a.relativeIndex=n,void t.onDrop(function(t,e,r,n){var o=cT(t,e,r,n),i=o[0],a=o[1],s=tT([],t,!0);return function(t,e,r){var n=e<0?t.length+e:e;if(n>=0&&ne.subscribeToOffsetChange(n))),(0,o.useEffect)((()=>e.subscribeToStateChange(n))),r}((function(t){var e=t.getItemType();return{item:t.getItem(),clientOffset:t.getClientOffset(),isDragging:t.isDragging()&&e===xT.TREE_ITEM}}))},RT=function(){var t=(0,o.useContext)(yT);if(!t)throw new Error("useTreeContext must be used under TreeProvider");return t},DT=function(t){var e,r,n=RT(),i=(0,o.useContext)(wT),a=(0,o.useRef)(null),s=(0,o.useRef)(null),u=n.tree.find((function(e){return e.id===t.id})),c=n.openIds,l=n.classes,f=n.enableAnimateExpand,p=c.includes(t.id),d=function(t,e){var r=RT();(0,o.useEffect)((function(){var t=e.current;return null==t||t.addEventListener("dragstart",ET),null==t||t.addEventListener("touchstart",kT,{passive:!0}),function(){null==t||t.removeEventListener("dragstart",ET),null==t||t.removeEventListener("touchstart",kT)}}),[e]);var n=iC({type:xT.TREE_ITEM,item:function(n){var o=QC({ref:e},t);return r.onDragStart&&r.onDragStart(o,n),o},end:function(t,e){var n=t;r.onDragEnd&&r.onDragEnd(n,e)},canDrag:function(){var n=r.canDrag;return PT===e.current&&(!n||n(t.id))},collect:function(t){return{isDragging:t.isDragging()}}});return[n[0].isDragging,n[1],n[2]]}(u,a),h=d[0],y=d[1],m=d[2],v=function(t,e){var r=RT(),n=(0,o.useContext)(wT),i=pC({accept:tT([xT.TREE_ITEM],r.extraAcceptTypes,!0),drop:function(t,e){var o=n.dropTargetId,i=n.index;e.isOver({shallow:!0})&&void 0!==o&&void 0!==i&&r.onDrop(aT(t)?t:null,o,i),n.hidePlaceholder()},canDrop:function(n,o){if(o.isOver({shallow:!0})){var i=pT(t,e.current,o,r);return null!==i&&sT(n,i.id,r)}return!1},hover:function(o,i){if(i.isOver({shallow:!0})){var a=n.dropTargetId,s=n.index,u=n.showPlaceholder,c=n.hidePlaceholder,l=pT(t,e.current,i,r);if(null===l||!sT(o,l.id,r))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),a=i[0];return[a.isOver,a.dragSource,i[1]]}(u,a),b=v[0],g=v[1],w=v[2];!function(t,e,r){e.current?r(e):r(t),(0,o.useEffect)((function(){e.current?r(e):r(t)}),[e.current])}(a,s,y),sT(g,t.id,n)&&w(a),(0,o.useEffect)((function(){n.dragPreviewRender?m((Kg||(Kg=new Image,Kg.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Kg),{captureDraggingState:!0}):s.current&&m(a)}),[m,n.dragPreviewRender]),e=a,r=(0,o.useContext)(vT),(0,o.useEffect)((function(){if(e.current){var t=e.current,n=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.lock()},o=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.unlock()},i=function(t){return n(t)},a=function(t){return o(t)},s=function(t){return n(t)},u=function(t){return o(t)},c=new MutationObserver((function(){document.activeElement===document.body&&r.unlock()}));return c.observe(t,{subtree:!0,childList:!0}),t.addEventListener("mouseover",i),t.addEventListener("mouseout",a),t.addEventListener("focusin",s),t.addEventListener("focusout",u),function(){c.disconnect(),t.removeEventListener("mouseover",i),t.removeEventListener("mouseout",a),t.removeEventListener("focusin",s),t.removeEventListener("focusout",u)}}}),[e,r]),(0,o.useEffect)((function(){var t;null===(t=e.current)||void 0===t||t.setAttribute("draggable",r.isLock?"false":"true")}),[e,r.isLock]);var O=n.listItemComponent,j=(null==l?void 0:l.listItem)||"";b&&(null==l?void 0:l.dropTarget)&&(j="".concat(j," ").concat(l.dropTarget)),h&&(null==l?void 0:l.draggingSource)&&(j="".concat(j," ").concat(l.draggingSource));var S=!n.canDrag||n.canDrag(t.id),x=i.dropTargetId===t.id,P={depth:t.depth,isOpen:p,isDragging:h,isDropTarget:x,draggable:S,hasChild:hT(n.tree,t.id),containerRef:a,handleRef:s,onToggle:function(){return n.onToggle(u.id)}};return o.createElement(O,{ref:a,className:j,role:"listitem"},n.render(u,P),f&&P.hasChild&&o.createElement(eT,{isVisible:p},o.createElement(IT,{parentId:t.id,depth:t.depth+1})),!f&&P.hasChild&&p&&o.createElement(IT,{parentId:t.id,depth:t.depth+1}))},NT=function(t){var e=RT(),r=e.placeholderRender,n=e.placeholderComponent,i=e.classes,a=(0,o.useContext)(wT),s=Uk().getMonitor().getItem();return r&&s&&t.dropTargetId===a.dropTargetId&&(t.index===a.index||void 0===t.index&&t.listCount===a.index)?o.createElement(n,{className:(null==i?void 0:i.placeholder)||""},r(s,{depth:t.depth})):null},IT=function(t){var e=RT(),r=(0,o.useRef)(null),n=e.tree.filter((function(e){return e.parent===t.parentId})),i=n,a="function"==typeof e.sort?e.sort:nT;if(e.insertDroppableFirst){var s=n.filter((function(t){return t.droppable})),u=n.filter((function(t){return!t.droppable}));!1===e.sort||(s=s.sort(a),u=u.sort(a)),i=tT(tT([],s,!0),u,!0)}else!1!==e.sort&&(i=n.sort(a));var c=function(t){var e=RT(),r=(0,o.useContext)(wT),n=pC({accept:tT([xT.TREE_ITEM],e.extraAcceptTypes,!0),drop:function(t,n){var o=e.rootId,i=e.onDrop,a=r.dropTargetId,s=r.index;n.isOver({shallow:!0})&&void 0!==a&&void 0!==s&&i(aT(t)?t:null,o,s),r.hidePlaceholder()},canDrop:function(t,r){var n=e.rootId;return!!r.isOver({shallow:!0})&&void 0!==t&&sT(t,n,e)},hover:function(n,o){if(o.isOver({shallow:!0})){var i=e.rootId,a=r.dropTargetId,s=r.index,u=r.showPlaceholder,c=r.hidePlaceholder,l=pT(null,t.current,o,e);if(null===l||!sT(n,i,e))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),i=n[0];return[i.isOver,i.dragSource,n[1]]}(r),l=c[0],f=c[1],p=c[2];t.parentId===e.rootId&&sT(f,e.rootId,e)&&p(r);var d=function(t,e){var r=RT(),n=r.rootId,o=r.rootProps,i=r.classes,a=(null==i?void 0:i.container)||"";return e&&(null==i?void 0:i.dropTarget)&&(a="".concat(a," ").concat(i.dropTarget)),t===n&&(null==i?void 0:i.root)&&(a="".concat(a," ").concat(i.root)),t===n&&(null==o?void 0:o.className)&&(a="".concat(a," ").concat(o.className)),a.trim()}(t.parentId,l),h=e.rootProps||{},y=e.listComponent;return o.createElement(y,QC({ref:r,role:"list"},h,{className:d}),i.map((function(e,r){return o.createElement(o.Fragment,{key:e.id},o.createElement(NT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId,index:r}),o.createElement(DT,{id:e.id,depth:t.depth}))})),o.createElement(NT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId}))},LT={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},AT=function(t){var e=t.clientOffset;if(!e)return{};var r=e.x,n=e.y;return{pointerEvents:"none",transform:"translate(".concat(r,"px, ").concat(n,"px)")}},FT=function(){var t=RT(),e=TT(),r=e.isDragging,n=e.clientOffset;return r&&n?o.createElement("div",{style:LT},o.createElement("div",{style:AT(e)},t.dragPreviewRender&&t.dragPreviewRender(e))):null};var MT=(0,o.forwardRef)((function(t,e){return o.createElement(ST,QC({},t,{treeRef:e}),t.dragPreviewRender&&o.createElement(FT,null),o.createElement(IT,{parentId:t.rootId,depth:0}))})),BT=r(3518),UT={insert:"head",singleton:!1};Ot()(BT.Z,UT);BT.Z.locals;const VT=function(){return(0,Pt.jsx)("div",{className:"drag-insert-placeholder"})};var zT=r(5293),GT={insert:"head",singleton:!1};Ot()(zT.Z,GT);zT.Z.locals;const HT=function(t){var e=t.text;return(0,Pt.jsx)("span",{className:"drag-placeholder",children:e})};function WT(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return YT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YT(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ZT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function JT(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==a[0]?a[0]:{},e.next=3,mo.execute.get(t.path,t.id,"load",o);case 3:i=e.sent,n(JT(JT({},r),{},{isLoading:!1,rows:i.data.data}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s=function(){var e=eR(KT().mark((function e(r,n){var o,i=arguments;return KT().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>2&&void 0!==i[2]?i[2]:[],e.next=3,mo.execute.get(t.path,t.id,"updateParent",{id:r,parentId:n,children:o});case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),u=function(){var e=eR(KT().mark((function e(){var r,n=arguments;return KT().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:[],e.next=3,mo.execute.get(t.path,t.id,"updateOrder",{children:r});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=function(e){re.goTo(t.path.module,t.action,{id:e.id})},l=function(){return r.rows.length?(0,Pt.jsx)($T,{data:r.rows,onParentChange:s,onOrderChange:u,onClick:c}):(0,Pt.jsx)("div",{className:"index__placeholder",children:vt.get("snippets.no_plural_found",{plural:t.plural})})};return(0,Pt.jsxs)("div",{className:"index index--"+t.style+(r.isLoading?" index--loading":""),children:[(0,Pt.jsx)("div",{className:"index__header",children:(0,Pt.jsx)("div",{className:"index__header-title",children:bt.toUpperCaseFirst(t.plural)})}),l()]})}oR.defaultProps={type:"",components:[],path:{},id:0,data:{},params:{},action:"",plural:"",singular:""};const iR=oR;function aR(t){return aR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aR(t)}function sR(t,e){for(var r=0;r0?(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(ar,{onClick:this.goToPrev.bind(this),text:"Previous"})},1):null,(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(Je,{style:"large",onClick:this.goToNext.bind(this),text:this.isLastStep()?vt.get("snippets.create"):vt.get("snippets.next")})},2)]}},{key:"renderWizardContent",value:function(){var t=this;return this.props.steps.map((function(e,r){return(0,Pt.jsx)("div",{className:"wizard__step-content",style:{display:r===t.state.currentStepIndex?"block":"none"},children:t.componentLists[r].map((function(t){return t.component}))},r)}))}},{key:"isLastStep",value:function(){return this.state.currentStepIndex===this.props.steps.length-1}},{key:"goTo",value:function(t){(t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ID(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function LD(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var i=t.data.data,a=e.data.data,s=o.data.data,u=i[i.length-1];p({type:"media/init",payload:{directory:u,path:i,directories:a,files:s}}),n(LD(LD({},r),{},{isLoading:!1,currentFile:null,selectedFiles:[],selectedFileIds:[]}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){i.current.params.directory?d(i.current.params.directory):d()},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?re.goTo(i.current.module,i.current.action,{directory:t}):re.goTo(i.current.module,i.current.action)},v=function(){n(LD(LD({},r),{},{currentFile:null,selectedFiles:[],selectedFileIds:[]}))},b=function(t,e){e.length?1===e.length?n(LD(LD({},r),{},{currentFile:e[0],selectedFiles:e,selectedFileIds:t})):n(LD(LD({},r),{},{currentFile:null,selectedFiles:e,selectedFileIds:t})):v()},g=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteDirectory(e);case 3:p({type:"media/directories/delete",directoryIds:[e]}),gt.i18nNotify("snippets.directory_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.directory_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),w=function(){var t=MD(ND().mark((function t(e,r){var n;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,p({type:"media/directories/rename",payload:n.data.data}),gt.i18nNotify("snippets.directory_renamed"),v(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var t=MD(ND().mark((function t(e,r){var n;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=12;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,p({type:"media/files/rename",payload:n.data.data}),gt.i18nNotify("snippets.file_renamed"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}(),j=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFile(e);case 3:p({type:"media/files/delete",fileIds:[e]}),gt.i18nNotify("snippets.file_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.notify(vt.get("snippets.file_not_deleted"));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFiles(e);case 3:p({type:"media/files/delete",fileIds:e}),gt.i18nNotify("snippets.amount_files_deleted",{amount:e.length}),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.files_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.labelFile(e,r);case 3:p({type:"media/files/label",fileId:r,label:e}),gt.i18nNotify("snippets.changes_successful"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.i18nNotify("snippets.changes_unsuccessful");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),_=function(){var t=MD(ND().mark((function t(e,r,n){var o;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFile"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperty",fileId:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),E=function(){var t=MD(ND().mark((function t(e,r,n){var o;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFiles"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperties",fileIds:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),k=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveDirectory(e,r);case 3:p({type:"media/directories/move",moveToId:e,directoryIds:[r]}),gt.notify(vt.get("snippets.directory_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),C=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFile(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:[r]}),gt.notify(vt.get("snippets.file_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),T=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFiles(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:r}),gt.notify(vt.get("snippets.files_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),R=function(t){window.open(t.url)},D=function(){h()},N=function(t){(!i.current.params.directory&&!t.directory||t.directory&&i.current.params.directory&&t.directory.id===i.current.params.directory)&&h()},I=function(){var t;gt.prompt({title:vt.get("snippets.new_directory_title"),confirmButtonText:vt.get("snippets.create"),cancelButtonText:vt.get("snippets.cancel"),confirm:(t=MD(ND().mark((function t(e){var r;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.createDirectory(e,i.current.params.directory);case 2:r=t.sent,p({type:"media/directories/add",payload:r.data.data}),gt.notify(vt.get("snippets.directory_created"));case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})})},L=function(t,e){gt.confirm({title:vt.get("snippets.delete_files_title",{amount:t.length}),text:vt.get("snippets.delete_files_text"),confirmButtonText:vt.get("snippets.delete_files_confirm",{amount:t.length}),cancelButtonText:vt.get("snippets.delete_files_cancel"),confirm:function(){return S(t)}})};return(0,Pt.jsxs)("div",{className:"view-media-directory"+(r.isLoading?" view-media-directory--loading":"")+(r.isDragOver?" view-media-directory--drag-over":""),children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header",children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header-title",children:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return y(t)}})}),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?y(t.id):y()}})]}),(0,Pt.jsxs)("div",{className:"view-media-directory__header-options",children:[(0,Pt.jsx)(Rp,{}),(0,Pt.jsx)(Je,{style:["secondary","small"],onClick:I,text:vt.get("snippets.new_directory")}),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],autoClose:!0,children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onUploadDone:D})})]})]}),(0,Pt.jsx)("div",{className:"view-media-directory__content",children:r.isLoading?null:(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{className:"view-media-directory__main",children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:N,onUploadDone:D,children:(0,Pt.jsx)(Bf,{viewMode:s,currentDirectory:c,directories:l,files:f,fileLabels:t.fileLabels,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,onDirectoryClick:y,onDirectoryDelete:g,onDirectoryRename:w,onDirectoryMove:k,onFileDelete:j,onFileRename:O,onFileOpen:R,onFileMove:C,onSelectionMove:T,onSelectionChange:b,onSelectionDelete:L})})}),(0,Pt.jsx)("div",{className:"view-media-directory__side",children:r.currentFile?(0,Pt.jsx)(vD,{file:r.currentFile,fileLabels:t.fileLabels,onLabelFile:function(t){return x(t,r.currentFile.id)},onChangeFileProperty:function(t,e){return _(t,e,r.currentFile.id)},onDeleteFile:function(){gt.confirm({title:vt.get("snippets.delete_file_title"),text:vt.get("snippets.delete_file_text"),confirmButtonText:vt.get("snippets.delete_file_confirm"),cancelButtonText:vt.get("snippets.delete_file_cancel"),confirm:function(){return j(r.currentFile.id)}})},onRenameFile:function(){gt.prompt({title:vt.get("snippets.rename_file_title"),defaultValue:r.currentFile.name,confirmButtonText:vt.get("snippets.rename_file_confirm"),cancelButtonText:vt.get("snippets.rename_file_cancel"),confirm:function(t){mo.media.renameFile(t,r.currentFile.id).then((function(t){n(LD(LD({},r),{},{currentFile:t.data.data}),(function(){gt.notify(vt.get("snippets.file_renamed")),h()}))}))}})},onMoveFile:C}):r.selectedFiles.length?(0,Pt.jsx)(xD,{files:r.selectedFiles,onDeleteFiles:function(){return L(r.selectedFileIds,r.selectedFiles)},onChangeFilesProperty:function(t,e){return E(t,e,r.selectedFileIds)},onMoveFiles:T}):c?(0,Pt.jsx)(kD,{directory:c}):(0,Pt.jsx)(RD,{})})]})})]})}VD.defaultProps={type:"",path:{},id:0,data:{},fileLabels:{}};const zD=VD;function GD(t){return GD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GD(t)}function HD(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function QD(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function lN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function fN(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pN(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pN(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pN(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>32-e}function r(t,e){var r,n,o,i,a;return o=2147483648&t,i=2147483648&e,a=(1073741823&t)+(1073741823&e),(r=1073741824&t)&(n=1073741824&e)?2147483648^a^o^i:r|n?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function n(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&e|~t&r}(n,o,i),a),u)),r(e(t,s),n)}function o(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&r|e&~r}(n,o,i),a),u)),r(e(t,s),n)}function i(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t^e^r}(n,o,i),a),u)),r(e(t,s),n)}function a(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return e^(t|~r)}(n,o,i),a),u)),r(e(t,s),n)}function s(t){var e,r="",n="";for(e=0;e<=3;e++)r+=(n="0"+(t>>>8*e&255).toString(16)).substr(n.length-2,2);return r}var u,c,l,f,p,d,h,y,m,v=Array();for(v=function(t){for(var e,r=t.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1),a=0,s=0;s>>29,i}(t=function(t){t=t.replace(/rn/g,"n");for(var e="",r=0;r127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(t)),d=1732584193,h=4023233417,y=2562383102,m=271733878,u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function AN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){AN(i,n,o,a,s,"next",t)}function s(t){AN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function MN(t){var e=P(),r=m((function(t){return t.auth})).user,n=m((function(t){return t.modules.secondary})),o=function(){var t=FN(LN().mark((function t(){return LN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:gt.confirm({title:vt.get("snippets.logout"),confirmButtonText:vt.get("snippets.logout_confirm"),confirm:function(){var t=FN(LN().mark((function t(){return LN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.auth.logout();case 2:e({type:"auth/loggedout"}),gt.notify("User logged out");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,Pt.jsxs)("div",{className:"user-panel",children:[(0,Pt.jsx)("div",{className:"user-panel__avatar",children:(0,Pt.jsx)("img",{src:NN.get(r.email),alt:r.name})}),(0,Pt.jsx)("div",{className:"user-panel__name",children:r.name}),(0,Pt.jsx)("div",{className:"user-panel__actions",children:(0,Pt.jsxs)(sl,{style:["secondary"],children:[(0,Pt.jsx)(At,{stopPropagation:!1,links:n.map((function(t){return[t.title,t.id]})),onClick:function(t){return e=t,void re.goTo(e,"index");var e}}),(0,Pt.jsx)("div",{className:"user-panel__logout",children:(0,Pt.jsx)(Je,{stopPropagation:!1,onClick:o,style:["full","small"],text:vt.get("snippets.logout")})})]})})]})}function BN(){return(0,Pt.jsxs)("div",{className:"module",children:[(0,Pt.jsx)("div",{className:"module__header",children:(0,Pt.jsx)("div",{className:"module__title",children:(0,Pt.jsx)(us,{children:"Not found"})})}),(0,Pt.jsx)("div",{className:"module__main",children:"Are you sure you're trying to access the correct URL? No module or action was found for this request."})]})}function UN(t){return UN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UN(t)}function VN(){VN=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==UN(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function zN(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function GN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],s=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,i,a=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict";var n=r(9742),o=r(645),i=r(5826);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),l=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return O(this,t,e,r);case"latin1":case"binary":return j(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function A(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||A(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||A(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},5399:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".footer-text{color:var(--fill-color-alt-3);display:block;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;text-align:center;width:100%}.footer-text a{text-decoration:underline;transition:color .5s}.footer-text a:hover{color:var(--primary-color);text-decoration:none}",""]);const i=o},9451:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.boolean-switcher{background-color:var(--fill-color-alt-1);border-radius:1.3333333333rem;cursor:pointer;display:inline-block;height:1.6666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:3.3333333333rem}.boolean-switcher:after{background-color:#fff;border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:1.3333333333rem;left:.1666666667rem;position:absolute;top:.1666666667rem;transition:transform .25s;width:1.3333333333rem}.boolean-switcher--alt{background-color:#fff}.boolean-switcher--alt:after{background-color:var(--fill-color-alt-2)}.boolean-switcher--alt.boolean-switcher--checked:after{background-color:#fff}.boolean-switcher--checked{background-color:var(--primary-color-alt-1)}.boolean-switcher--checked:after{transform:translateX(1.6666666667rem)}.boolean-switcher--small{height:1rem;width:2.3333333333rem}.boolean-switcher--small:after{height:.6666666667rem;width:.6666666667rem}.boolean-switcher--small.boolean-switcher--checked:after{transform:translateX(1.3333333333rem)}',""]);const i=o},4195:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'@charset "UTF-8";.breadcrumbs__list{display:flex}.breadcrumbs__list li{color:#7b7d85}.breadcrumbs__list li:after{content:"›";margin-left:.6666666667rem;margin-right:.6666666667rem}.breadcrumbs__list li:last-child{color:#464646}.breadcrumbs__list li:last-child span{cursor:default}.breadcrumbs__list li:last-child span:hover{border-bottom:0}.breadcrumbs__list li:last-child:after{display:none}.breadcrumbs__list li span{cursor:pointer}.breadcrumbs__list li span:hover{border-bottom:1px solid hsla(228,4%,50%,.5)}',""]);const i=o},2314:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".button-group{border-radius:var(--border-radius);display:flex;flex-wrap:nowrap;overflow:hidden}",""]);const i=o},9151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.button{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;overflow:hidden;padding:1rem 2rem;position:relative;transition:background-color .25s;white-space:nowrap}.button:after{bottom:0;box-shadow:inset 0 -2px 0 var(--primary-color-alt-1);content:"";left:0;opacity:.5;position:absolute;right:0;top:0}.button:before{border:1px solid var(--fill-color);border-radius:var(--border-radius);bottom:2px;content:"";left:2px;opacity:0;position:absolute;right:2px;top:2px;transition:opacity 1s}.button:active:before,.button:focus:before{opacity:.25}.button:hover{background-color:var(--primary-color-alt-1)}.button__icon{margin-right:.5rem}.button__label{color:#7b7d85;margin-right:.6666666667rem}.button--grouped{border-radius:0}.button--has-icon{align-items:center;display:inline-flex}.button--disabled{box-shadow:none;cursor:not-allowed;overflow:hidden}.button--disabled:after{background-color:var(--fill-color);bottom:0;box-shadow:none;content:"";left:0;opacity:.75;position:absolute;right:0;top:0}.button--secondary{background-color:var(--fill-color-alt-1);color:#464646}.button--secondary:after{display:none}.button--active,.button--secondary:hover{background-color:var(--fill-color-alt-2)}.button--outline{background-color:#fff;border:1px solid var(--fill-color-alt-1);color:var(--primary-color-alt-1)}.button--outline:after{display:none}.button--outline:hover{background-color:#fff}.button--full{justify-content:center;text-align:center;width:100%}.button--small{height:2.3rem;padding:.6666666667rem 1.3333333333rem}.button--small:after{display:none}.button--large{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}',""]);const i=o},2151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.checkbox{background-color:var(--fill-color-alt-1);cursor:pointer;display:inline-block;height:1.1666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:1.1666666667rem}.checkbox,.checkbox:after{border-radius:var(--border-radius)}.checkbox:after{background-color:#fff;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:.6666666667rem;left:.25rem;position:absolute;top:.25rem;transform:scale(0);transition:transform .25s;width:.6666666667rem}.checkbox--checked{background-color:var(--primary-color-alt-1)}.checkbox--checked:after{transform:scale(1)}',""]);const i=o},8554:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".collapsible{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);margin-bottom:1rem}.collapsible__header{align-items:center;background-color:var(--fill-color);display:flex;justify-content:space-between;padding:.3333333333rem .6666666667rem}.collapsible__title{padding-left:1rem;text-align:left;width:100%}.collapsible__content{display:flex;flex-direction:column;gap:2rem;padding:.6666666667rem}.collapsible--closed .collapsible__content{display:none}.collapsible__actions{align-items:center;display:flex;gap:.6666666667rem}.collapsible__component{margin-bottom:2rem}.collapsible__component:last-child{margin-bottom:0}",""]);const i=o},5709:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.ctx-overlay{position:fixed}.ctx-mount,.ctx-overlay{bottom:0;left:0;right:0;top:0;z-index:9999}.ctx-mount{position:absolute}@keyframes context-menu{0%{transform:scaleY(.85) scaleX(.85);transform-origin:0 0}to{transform:scaleY(1) scaleX(1);transform-origin:0 0}}.context-menu{width:100%}.context-menu__menu{animation:context-menu .25s;background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:0;width:20rem;z-index:1}.context-menu__wrap{position:relative;width:100%}.context-menu--open .context-menu__wrap:after{border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}',""]);const i=o},6279:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},3518:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-insert-placeholder{background-color:var(--primary-color);height:2px;width:100%}",""]);const i=o},5293:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-placeholder{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;padding:.3333333333rem .6666666667rem}",""]);const i=o},7374:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.file-drop-zone{border:1px solid transparent;border-radius:var(--border-radius);display:block;width:100%}.file-drop-zone__overlay{align-items:center;bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;z-index:9998}.file-drop-zone--drag-over .file-drop-zone__overlay{opacity:1;transition:opacity .5s}.file-drop-zone--drag-over{border:1px dashed var(--primary-color);cursor:copy;position:relative}.file-drop-zone--drag-over:after{background-color:var(--fill-color);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;opacity:.85;pointer-events:none;position:absolute;right:0;top:0}',""]);const i=o},3359:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".file-uploader{position:relative}.file-uploader__input{bottom:0;left:0;position:absolute;right:0;top:0}.file-uploader__input:has(input:hover){border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius)}.file-uploader__input input{cursor:pointer;height:100%;opacity:0;width:100%}",""]);const i=o},3668:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},8122:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".tree-row{cursor:pointer;padding:.6666666667rem 2rem;transition:background-color .25s}.tree-row--drop-target{background-color:var(--fill-color-alt-1)}.tree-row:hover{background-color:var(--fill-color)}.tree-row__content{display:flex}.tree-row__toggle{margin-right:1rem}",""]);const i=o},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{function e(t,e,r){var n,o,i,a,s;function u(){var c=Date.now()-a;c=0?n=setTimeout(u,e-c):(n=null,r||(s=t.apply(i,o),i=o=null))}null==e&&(e=100);var c=function(){i=this,o=arguments,a=Date.now();var c=r&&!n;return n||(n=setTimeout(u,e)),c&&(s=t.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=t.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}e.debounce=e,t.exports=e},4063:t=>{"use strict";t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r}},8679:(t,e,r)=>{"use strict";var n=r(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return n.isMemo(t)?a:s[t.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=d(r);o&&o!==h&&t(e,o,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var s=u(e),y=u(r),m=0;m{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,p=r?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;t[r+d]=255&a,d+=h,a/=256,c-=8);t[r+d-h]|=128*y}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},7425:()=>{},4155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case s:case a:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case m:case y:case u:return t;default:return e}}case o:return e}}}function j(t){return O(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=c,e.ContextProvider=u,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=y,e.Portal=o,e.Profiler=s,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return j(t)||O(t)===l},e.isConcurrentMode=j,e.isContextConsumer=function(t){return O(t)===c},e.isContextProvider=function(t){return O(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return O(t)===p},e.isFragment=function(t){return O(t)===i},e.isLazy=function(t){return O(t)===m},e.isMemo=function(t){return O(t)===y},e.isPortal=function(t){return O(t)===o},e.isProfiler=function(t){return O(t)===s},e.isStrictMode=function(t){return O(t)===a},e.isSuspense=function(t){return O(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===s||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===y||t.$$typeof===u||t.$$typeof===c||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===w||t.$$typeof===v)},e.typeOf=O},9864:(t,e,r)=>{"use strict";t.exports=r(9921)},8359:(t,e)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case i:case s:case a:case p:case d:return t;default:switch(t=t&&t.$$typeof){case l:case c:case f:case y:case h:case u:return t;default:return e}}case o:return e}}}r=Symbol.for("react.module.reference")},2973:(t,e,r)=>{"use strict";r(8359)},53:(t,e)=>{"use strict";function r(t,e){var r=t.length;t.push(e);t:for(;0>>1,o=t[n];if(!(0>>1;ni(u,r))ci(l,u)?(t[n]=l,t[c]=r,n=c):(t[n]=u,t[s]=r,n=s);else{if(!(ci(l,r)))break t;t[n]=l,t[c]=r,n=c}}}return e}function i(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],f=1,p=null,d=3,h=!1,y=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(t){for(var e=n(l);null!==e;){if(null===e.callback)o(l);else{if(!(e.startTime<=t))break;o(l),e.sortIndex=e.expirationTime,r(c,e)}e=n(l)}}function O(t){if(m=!1,w(t),!y)if(null!==n(c))y=!0,N(j);else{var e=n(l);null!==e&&I(O,e.startTime-t)}}function j(t,r){y=!1,m&&(m=!1,b(_),_=-1),h=!0;var i=d;try{for(w(r),p=n(c);null!==p&&(!(p.expirationTime>r)||t&&!C());){var a=p.callback;if("function"==typeof a){p.callback=null,d=p.priorityLevel;var s=a(p.expirationTime<=r);r=e.unstable_now(),"function"==typeof s?p.callback=s:p===n(c)&&o(c),w(r)}else o(c);p=n(c)}if(null!==p)var u=!0;else{var f=n(l);null!==f&&I(O,f.startTime-r),u=!1}return u}finally{p=null,d=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,P=null,_=-1,E=5,k=-1;function C(){return!(e.unstable_now()-kt||125a?(t.sortIndex=i,r(l,t),null===n(c)&&t===n(l)&&(m?(b(_),_=-1):m=!0,I(O,i-a))):(t.sortIndex=s,r(c,t),y||h||(y=!0,N(j))),t},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(t){var e=d;return function(){var r=d;d=e;try{return t.apply(this,arguments)}finally{d=r}}}},3840:(t,e,r)=>{"use strict";t.exports=r(53)},3379:(t,e,r)=>{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function s(t){for(var e=-1,r=0;r{"use strict";var n=r(7294);var o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,u=n.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!o(t,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=i({inst:{value:r,getSnapshot:e}}),o=n[0].inst,l=n[1];return s((function(){o.value=r,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,r,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),u(r),r};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},139:(t,e,r)=>{"use strict";var n=r(7294),o=r(1688);var i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},a=o.useSyncExternalStore,s=n.useRef,u=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var f=s(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=c((function(){function t(t){if(!u){if(u=!0,a=t,t=n(t),void 0!==o&&p.hasValue){var e=p.value;if(o(e,t))return s=e}return s=t}if(e=s,i(a,t))return e;var r=n(t);return void 0!==o&&o(e,r)?e:(a=t,s=r)}var a,s,u=!1,c=void 0===r?null:r;return[function(){return t(e())},null===c?void 0:function(){return t(c())}]}),[e,r,n,o]);var d=a(t,f[0],f[1]);return u((function(){p.hasValue=!0,p.value=d}),[d]),l(d),d}},1688:(t,e,r)=>{"use strict";t.exports=r(3250)},2798:(t,e,r)=>{"use strict";t.exports=r(139)},1328:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;es})}},t=>{var e=e=>t(t.s=e);t.O(0,[555,170],(()=>(e(5410),e(7425))));t.O()}]); \ No newline at end of file diff --git a/public/js/manifest.js b/public/js/manifest.js index 2df4f6e..502c403 100644 --- a/public/js/manifest.js +++ b/public/js/manifest.js @@ -1 +1 @@ -(()=>{"use strict";var r,e={},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={id:r,exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}o.m=e,r=[],o.O=(e,t,n,i)=>{if(!t){var a=1/0;for(s=0;s=i)&&Object.keys(o.O).every((r=>o.O[r](t[f])))?t.splice(f--,1):(l=!1,i0&&r[s-1][2]>i;s--)r[s]=r[s-1];r[s]=[t,n,i]},o.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return o.d(e,{a:e}),e},o.d=(r,e)=>{for(var t in e)o.o(e,t)&&!o.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),o.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={929:0,170:0};o.O.j=e=>0===r[e];var e=(e,t)=>{var n,i,[a,l,f]=t,u=0;if(a.some((e=>0!==r[e]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(f)var s=f(o)}for(e&&e(t);u{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(s=0;s=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={929:0,170:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[l,a,u]=t,f=0;if(l.some((r=>0!==e[r]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(u)var s=u(o)}for(r&&r(t);f{"use strict";n.d(e,{Z:()=>o});var r=n(645),i=n.n(r)()((function(t){return t[1]}));i.push([t.id,"@charset \"UTF-8\";trix-editor{border:1px solid #bbb;border-radius:3px;margin:0;min-height:5em;outline:none;padding:.4em .6em}trix-toolbar *{box-sizing:border-box}trix-toolbar .trix-button-row{display:flex;flex-wrap:nowrap;justify-content:space-between;overflow-x:auto}trix-toolbar .trix-button-group{border-color:#ccc #bbb #888;border-radius:3px;border-style:solid;border-width:1px;display:flex;margin-bottom:10px}trix-toolbar .trix-button-group:not(:first-child){margin-left:1.5vw}@media (max-device-width:768px){trix-toolbar .trix-button-group:not(:first-child){margin-left:0}}trix-toolbar .trix-button-group-spacer{flex-grow:1}@media (max-device-width:768px){trix-toolbar .trix-button-group-spacer{display:none}}trix-toolbar .trix-button{background:transparent;border:none;border-bottom:1px solid #ddd;border-radius:0;color:rgba(0,0,0,.6);float:left;font-size:.75em;font-weight:600;margin:0;outline:none;padding:0 .5em;position:relative;white-space:nowrap}trix-toolbar .trix-button:not(:first-child){border-left:1px solid #ccc}trix-toolbar .trix-button.trix-active{background:#cbeefa;color:#000}trix-toolbar .trix-button:not(:disabled){cursor:pointer}trix-toolbar .trix-button:disabled{color:rgba(0,0,0,.125)}@media (max-device-width:768px){trix-toolbar .trix-button{letter-spacing:-.01em;padding:0 .3em}}trix-toolbar .trix-button--icon{font-size:inherit;height:1.6em;max-width:calc(.8em + 4vw);text-indent:-9999px;width:2.6em}@media (max-device-width:768px){trix-toolbar .trix-button--icon{height:2em;max-width:calc(.8em + 3.5vw)}}trix-toolbar .trix-button--icon:before{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;content:\"\";display:inline-block;left:0;opacity:.6;position:absolute;right:0;top:0}@media (max-device-width:768px){trix-toolbar .trix-button--icon:before{left:6%;right:6%}}trix-toolbar .trix-button--icon.trix-active:before{opacity:1}trix-toolbar .trix-button--icon:disabled:before{opacity:.125}trix-toolbar .trix-button--icon-attach:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M16.5 6v11.5a4 4 0 1 1-8 0V5a2.5 2.5 0 0 1 5 0v10.5a1 1 0 1 1-2 0V6H10v9.5a2.5 2.5 0 0 0 5 0V5a4 4 0 1 0-8 0v12.5a5.5 5.5 0 0 0 11 0V6h-1.5z'/%3E%3C/svg%3E\");bottom:4%;top:8%}trix-toolbar .trix-button--icon-bold:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M15.6 11.8c1-.7 1.6-1.8 1.6-2.8a4 4 0 0 0-4-4H7v14h7c2.1 0 3.7-1.7 3.7-3.8 0-1.5-.8-2.8-2.1-3.4zM10 7.5h3a1.5 1.5 0 1 1 0 3h-3v-3zm3.5 9H10v-3h3.5a1.5 1.5 0 1 1 0 3z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-italic:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M10 5v3h2.2l-3.4 8H6v3h8v-3h-2.2l3.4-8H18V5h-8z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-link:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M9.88 13.7a4.3 4.3 0 0 1 0-6.07l3.37-3.37a4.26 4.26 0 0 1 6.07 0 4.3 4.3 0 0 1 0 6.06l-1.96 1.72a.91.91 0 1 1-1.3-1.3l1.97-1.71a2.46 2.46 0 0 0-3.48-3.48l-3.38 3.37a2.46 2.46 0 0 0 0 3.48.91.91 0 1 1-1.3 1.3z'/%3E%3Cpath d='M4.25 19.46a4.3 4.3 0 0 1 0-6.07l1.93-1.9a.91.91 0 1 1 1.3 1.3l-1.93 1.9a2.46 2.46 0 0 0 3.48 3.48l3.37-3.38c.96-.96.96-2.52 0-3.48a.91.91 0 1 1 1.3-1.3 4.3 4.3 0 0 1 0 6.07l-3.38 3.38a4.26 4.26 0 0 1-6.07 0z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-strike:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='m12.73 14 .28.14c.26.15.45.3.57.44.12.14.18.3.18.5 0 .3-.15.56-.44.75-.3.2-.76.3-1.39.3A13.52 13.52 0 0 1 7 14.95v3.37a10.64 10.64 0 0 0 4.84.88c1.26 0 2.35-.19 3.28-.56.93-.37 1.64-.9 2.14-1.57s.74-1.45.74-2.32c0-.26-.02-.51-.06-.75h-5.21zm-5.5-4c-.08-.34-.12-.7-.12-1.1 0-1.29.52-2.3 1.58-3.02 1.05-.72 2.5-1.08 4.34-1.08 1.62 0 3.28.34 4.97 1l-1.3 2.93c-1.47-.6-2.73-.9-3.8-.9-.55 0-.96.08-1.2.26-.26.17-.38.38-.38.64 0 .27.16.52.48.74.17.12.53.3 1.05.53H7.23zM3 13h18v-2H3v2z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-quote:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg version='1' xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-heading-1:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg version='1' xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 9v3H9v7H6v-7H3V9h9zM8 4h14v3h-6v12h-3V7H8V4z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-code:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M18.2 12 15 15.2l1.4 1.4L21 12l-4.6-4.6L15 8.8l3.2 3.2zM5.8 12 9 8.8 7.6 7.4 3 12l4.6 4.6L9 15.2 5.8 12z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-bullet-list:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg version='1' xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 4a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm4 3h14v-2H8v2zm0-6h14v-2H8v2zm0-8v2h14V5H8z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-number-list:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-undo:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12.5 8c-2.6 0-5 1-6.9 2.6L2 7v9h9l-3.6-3.6A8 8 0 0 1 20 16l2.4-.8a10.5 10.5 0 0 0-10-7.2z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-redo:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M18.4 10.6a10.5 10.5 0 0 0-16.9 4.6L4 16a8 8 0 0 1 12.7-3.6L13 16h9V7l-3.6 3.6z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-decrease-nesting-level:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M3 19h19v-2H3v2zm7-6h12v-2H10v2zm-8.3-.3 2.8 2.9L6 14.2 4 12l2-2-1.4-1.5L1 12l.7.7zM3 5v2h19V5H3z'/%3E%3C/svg%3E\")}trix-toolbar .trix-button--icon-increase-nesting-level:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M3 19h19v-2H3v2zm7-6h12v-2H10v2zm-6.9-1L1 14.2l1.4 1.4L6 12l-.7-.7-2.8-2.8L1 9.9 3.1 12zM3 5v2h19V5H3z'/%3E%3C/svg%3E\")}trix-toolbar .trix-dialogs{position:relative}trix-toolbar .trix-dialog{background:#fff;border-radius:5px;border-top:2px solid #888;box-shadow:0 .3em 1em #ccc;font-size:.75em;left:0;padding:15px 10px;position:absolute;right:0;top:0;z-index:5}trix-toolbar .trix-input--dialog{-webkit-appearance:none;-moz-appearance:none;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:none;font-size:inherit;font-weight:400;margin:0 10px 0 0;outline:none;padding:.5em .8em}trix-toolbar .trix-input--dialog.validate:invalid{box-shadow:0 0 1.5px 1px red}trix-toolbar .trix-button--dialog{border-bottom:none;font-size:inherit;padding:.5em}trix-toolbar .trix-dialog--link{max-width:600px}trix-toolbar .trix-dialog__link-fields{align-items:baseline;display:flex}trix-toolbar .trix-dialog__link-fields .trix-input{flex:1}trix-toolbar .trix-dialog__link-fields .trix-button-group{flex:0 0 content;margin:0}trix-editor [data-trix-mutable]:not(.attachment__caption-editor){-webkit-user-select:none;-moz-user-select:none;user-select:none}trix-editor [data-trix-cursor-target]::-moz-selection,trix-editor [data-trix-mutable] ::-moz-selection,trix-editor [data-trix-mutable]::-moz-selection{background:none}trix-editor [data-trix-cursor-target]::selection,trix-editor [data-trix-mutable] ::selection,trix-editor [data-trix-mutable]::selection{background:none}trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection{background:highlight}trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection{background:highlight}trix-editor [data-trix-mutable].attachment.attachment--file{border-color:transparent;box-shadow:0 0 0 2px highlight}trix-editor [data-trix-mutable].attachment img{box-shadow:0 0 0 2px highlight}trix-editor .attachment{position:relative}trix-editor .attachment:hover{cursor:default}trix-editor .attachment--preview .attachment__caption:hover{cursor:text}trix-editor .attachment__progress{height:20px;left:5%;opacity:.9;position:absolute;top:calc(50% - 10px);transition:opacity .2s ease-in;width:90%;z-index:1}trix-editor .attachment__progress[value=\"100\"]{opacity:0}trix-editor .attachment__caption-editor{-webkit-appearance:none;-moz-appearance:none;border:none;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;outline:none;padding:0;text-align:center;vertical-align:top;width:100%}trix-editor .attachment__toolbar{left:0;position:absolute;text-align:center;top:-.9em;width:100%;z-index:1}trix-editor .trix-button-group{display:inline-flex}trix-editor .trix-button{background:transparent;border:none;border-radius:0;color:#666;float:left;font-size:80%;margin:0;outline:none;padding:0 .8em;position:relative;white-space:nowrap}trix-editor .trix-button:not(:first-child){border-left:1px solid #ccc}trix-editor .trix-button.trix-active{background:#cbeefa}trix-editor .trix-button:not(:disabled){cursor:pointer}trix-editor .trix-button--remove{background-color:#fff;border:2px solid highlight;border-radius:50%;box-shadow:1px 1px 6px rgba(0,0,0,.25);display:inline-block;height:1.8em;line-height:1.8em;outline:none;padding:0;text-indent:-9999px;width:1.8em}trix-editor .trix-button--remove:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg height='24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 6.4 17.6 5 12 10.6 6.4 5 5 6.4l5.6 5.6L5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:90%;bottom:0;content:\"\";display:inline-block;left:0;opacity:.7;position:absolute;right:0;top:0}trix-editor .trix-button--remove:hover{border-color:#333}trix-editor .trix-button--remove:hover:before{opacity:1}trix-editor .attachment__metadata-container{position:relative}trix-editor .attachment__metadata{background-color:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-size:.8em;left:50%;max-width:90%;padding:.1em .6em;position:absolute;top:2em;transform:translate(-50%)}trix-editor .attachment__metadata .attachment__name{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}trix-editor .attachment__metadata .attachment__size{margin-left:.2em;white-space:nowrap}.trix-content{line-height:1.5}.trix-content *{box-sizing:border-box;margin:0;padding:0}.trix-content h1{font-size:1.2em;line-height:1.2}.trix-content blockquote{border:solid #ccc;border-width:0 0 0 .3em;margin-left:.3em;padding-left:.6em}.trix-content [dir=rtl] blockquote,.trix-content blockquote[dir=rtl]{border-width:0 .3em 0 0;margin-right:.3em;padding-right:.6em}.trix-content li{margin-left:1em}.trix-content [dir=rtl] li{margin-right:1em}.trix-content pre{background-color:#eee;display:inline-block;font-family:monospace;font-size:.9em;overflow-x:auto;padding:.5em;vertical-align:top;white-space:pre;width:100%}.trix-content img{height:auto;max-width:100%}.trix-content .attachment{display:inline-block;max-width:100%;position:relative}.trix-content .attachment a{color:inherit;text-decoration:none}.trix-content .attachment a:hover,.trix-content .attachment a:visited:hover{color:inherit}.trix-content .attachment__caption{text-align:center}.trix-content .attachment__caption .attachment__name+.attachment__size:before{content:\" · \"}.trix-content .attachment--preview{text-align:center;width:100%}.trix-content .attachment--preview .attachment__caption{color:#666;font-size:.9em;line-height:1.2}.trix-content .attachment--file{border:1px solid #bbb;border-radius:5px;color:#333;line-height:1;margin:0 2px 2px;padding:.4em 1em}.trix-content .attachment-gallery{display:flex;flex-wrap:wrap;position:relative}.trix-content .attachment-gallery .attachment{flex:1 0 33%;max-width:33%;padding:0 .5em}.trix-content .attachment-gallery.attachment-gallery--2 .attachment,.trix-content .attachment-gallery.attachment-gallery--4 .attachment{flex-basis:50%;max-width:50%}",""]);const o=i},448:(t,e,n)=>{"use strict";var r=n(294),i=n(840);function o(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n